effect 4.0.0-beta.73 → 4.0.0-beta.74
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 +16 -16
- package/dist/Array.js +4 -4
- package/dist/Boolean.d.ts +2 -2
- package/dist/Boolean.js +2 -2
- package/dist/Channel.d.ts +63 -63
- package/dist/Channel.js +25 -25
- package/dist/Chunk.d.ts +17 -17
- package/dist/Chunk.js +5 -5
- package/dist/Context.d.ts +3 -3
- package/dist/Context.js +1 -1
- package/dist/Cron.d.ts +4 -4
- package/dist/Cron.js +4 -4
- package/dist/Deferred.d.ts +37 -37
- package/dist/Deferred.js +13 -13
- package/dist/Duration.d.ts +6 -6
- package/dist/Duration.js +2 -2
- package/dist/Effect.d.ts +58 -58
- package/dist/Effect.js +39 -39
- package/dist/Equal.d.ts +2 -2
- package/dist/Equal.js +2 -2
- package/dist/Equivalence.d.ts +1 -1
- package/dist/Equivalence.js +1 -1
- package/dist/ExecutionPlan.d.ts +2 -2
- package/dist/ExecutionPlan.js +1 -1
- package/dist/FileSystem.d.ts +6 -6
- package/dist/FileSystem.js +2 -2
- package/dist/Function.d.ts +5 -5
- package/dist/Function.js +5 -5
- package/dist/Graph.d.ts +11 -11
- package/dist/Graph.js +5 -5
- package/dist/HKT.d.ts +1 -1
- package/dist/HashMap.d.ts +3 -3
- package/dist/HashSet.d.ts +1 -1
- package/dist/Iterable.d.ts +15 -15
- package/dist/Iterable.js +5 -5
- package/dist/Layer.d.ts +16 -16
- package/dist/Layer.js +5 -5
- package/dist/Logger.d.ts +5 -5
- package/dist/Logger.js +4 -4
- package/dist/ManagedRuntime.d.ts +2 -2
- package/dist/Match.d.ts +20 -20
- package/dist/Match.js +16 -16
- package/dist/Metric.d.ts +16 -16
- package/dist/Metric.js +3 -3
- package/dist/Option.d.ts +36 -36
- package/dist/Option.js +17 -17
- package/dist/Order.d.ts +1 -1
- package/dist/Order.js +1 -1
- package/dist/Path.d.ts +1 -1
- package/dist/Path.js +1 -1
- package/dist/Pipeable.d.ts +1 -1
- package/dist/Pipeable.js +1 -1
- package/dist/Predicate.d.ts +5 -5
- package/dist/PubSub.d.ts +9 -9
- package/dist/PubSub.js +5 -5
- package/dist/Queue.d.ts +24 -24
- package/dist/Queue.js +20 -20
- package/dist/Record.d.ts +15 -15
- package/dist/Record.js +5 -5
- package/dist/Redacted.d.ts +2 -2
- package/dist/Redacted.js +1 -1
- package/dist/Ref.d.ts +6 -6
- package/dist/Ref.js +6 -6
- package/dist/RegExp.d.ts +1 -1
- package/dist/RegExp.js +1 -1
- package/dist/Request.d.ts +4 -4
- package/dist/RequestResolver.d.ts +6 -6
- package/dist/RequestResolver.js +2 -2
- package/dist/Resource.d.ts +1 -1
- package/dist/Resource.js +1 -1
- package/dist/Result.d.ts +18 -18
- package/dist/Result.js +11 -11
- package/dist/Schedule.d.ts +44 -44
- package/dist/Schedule.js +18 -18
- package/dist/Schema.d.ts +177 -459
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +25 -25
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +1 -1
- package/dist/SchemaGetter.d.ts +13 -13
- package/dist/SchemaGetter.js +12 -12
- package/dist/SchemaParser.d.ts +3 -3
- package/dist/SchemaParser.js +3 -3
- package/dist/Scope.d.ts +1 -1
- package/dist/Scope.js +1 -1
- package/dist/Sink.d.ts +5 -5
- package/dist/Sink.js +3 -3
- package/dist/Stream.d.ts +55 -55
- package/dist/Stream.js +21 -21
- package/dist/String.d.ts +5 -5
- package/dist/String.js +3 -3
- package/dist/Struct.d.ts +8 -8
- package/dist/Struct.js +3 -3
- package/dist/SynchronizedRef.d.ts +57 -57
- package/dist/SynchronizedRef.js +19 -19
- package/dist/Terminal.d.ts +1 -1
- package/dist/Terminal.js +1 -1
- package/dist/Tracer.d.ts +5 -5
- package/dist/Tracer.js +2 -2
- package/dist/Tuple.d.ts +14 -14
- package/dist/Tuple.js +6 -6
- package/dist/TxHashMap.d.ts +3 -3
- package/dist/TxHashSet.d.ts +1 -1
- package/dist/Unify.d.ts +7 -7
- package/dist/Unify.js +1 -1
- package/dist/testing/TestClock.d.ts +5 -5
- package/dist/testing/TestClock.js +4 -4
- package/dist/testing/TestConsole.d.ts +3 -3
- package/dist/testing/TestConsole.js +3 -3
- package/dist/unstable/ai/Chat.d.ts +2 -2
- package/dist/unstable/ai/Chat.js +2 -2
- package/dist/unstable/ai/EmbeddingModel.d.ts +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +2 -2
- package/dist/unstable/ai/IdGenerator.js +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +4 -4
- package/dist/unstable/ai/LanguageModel.js +1 -1
- package/dist/unstable/ai/Prompt.d.ts +15 -15
- package/dist/unstable/ai/Prompt.js +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +5 -5
- package/dist/unstable/ai/Telemetry.js +2 -2
- package/dist/unstable/ai/Tokenizer.d.ts +1 -1
- package/dist/unstable/ai/Tokenizer.js +1 -1
- package/dist/unstable/ai/Tool.d.ts +6 -6
- package/dist/unstable/ai/Tool.js +6 -6
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +1 -1
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -3
- package/dist/unstable/cli/Primitive.js +1 -1
- package/dist/unstable/cli/Prompt.d.ts +11 -11
- package/dist/unstable/cli/internal/parser.js +145 -10
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +1 -1
- package/dist/unstable/cluster/Entity.js +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
- package/dist/unstable/cluster/HttpRunner.js +2 -2
- package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +1 -1
- package/dist/unstable/cluster/Runners.d.ts +1 -1
- package/dist/unstable/cluster/Runners.js +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +1 -1
- package/dist/unstable/cluster/Sharding.js +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +5 -5
- package/dist/unstable/cluster/Snowflake.js +5 -5
- package/dist/unstable/devtools/DevToolsClient.d.ts +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +1 -1
- package/dist/unstable/eventlog/EventLog.js +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +3 -3
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +3 -3
- package/dist/unstable/http/Cookies.d.ts +1 -1
- package/dist/unstable/http/Etag.d.ts +1 -1
- package/dist/unstable/http/Etag.js +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +2 -2
- package/dist/unstable/http/FetchHttpClient.js +2 -2
- package/dist/unstable/http/HttpClient.d.ts +1 -1
- package/dist/unstable/http/HttpClient.js +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -2
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -1
- package/dist/unstable/http/HttpMiddleware.js +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +1 -1
- package/dist/unstable/http/HttpPlatform.js +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +4 -4
- package/dist/unstable/http/HttpRouter.js +4 -4
- package/dist/unstable/http/HttpServerResponse.d.ts +3 -3
- package/dist/unstable/http/Url.d.ts +33 -33
- package/dist/unstable/http/Url.js +11 -11
- package/dist/unstable/httpapi/HttpApi.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApi.js +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.js +13 -13
- package/dist/unstable/observability/PrometheusMetrics.d.ts +4 -4
- package/dist/unstable/observability/PrometheusMetrics.js +2 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts +3 -3
- package/dist/unstable/persistence/KeyValueStore.js +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -2
- package/dist/unstable/persistence/Persistable.js +2 -2
- package/dist/unstable/persistence/PersistedQueue.d.ts +8 -8
- package/dist/unstable/persistence/PersistedQueue.js +8 -8
- package/dist/unstable/persistence/RateLimiter.d.ts +1 -1
- package/dist/unstable/persistence/RateLimiter.js +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +5 -5
- package/dist/unstable/process/ChildProcess.js +2 -2
- package/dist/unstable/reactivity/AsyncResult.d.ts +4 -4
- package/dist/unstable/reactivity/AsyncResult.js +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +1 -1
- package/dist/unstable/reactivity/Atom.js +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +1 -1
- package/dist/unstable/reactivity/Reactivity.js +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +5 -5
- package/dist/unstable/rpc/Rpc.js +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +3 -3
- package/dist/unstable/rpc/RpcSchema.js +2 -2
- package/dist/unstable/schema/Model.d.ts +2 -2
- package/dist/unstable/schema/Model.js +1 -1
- package/dist/unstable/socket/Socket.d.ts +3 -3
- package/dist/unstable/socket/Socket.js +3 -3
- package/dist/unstable/socket/SocketServer.d.ts +1 -1
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/sql/Migrator.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +3 -3
- package/dist/unstable/sql/SqlClient.js +2 -2
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/Statement.d.ts +2 -2
- package/dist/unstable/sql/Statement.js +2 -2
- package/dist/unstable/workers/Transferable.d.ts +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Worker.d.ts +1 -1
- package/dist/unstable/workers/Worker.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +1 -1
- package/dist/unstable/workflow/Activity.js +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +1 -1
- package/package.json +1 -1
- package/src/Array.ts +16 -16
- package/src/Boolean.ts +2 -2
- package/src/Channel.ts +67 -67
- package/src/Chunk.ts +18 -18
- package/src/Context.ts +4 -4
- package/src/Cron.ts +4 -4
- package/src/Deferred.ts +37 -37
- package/src/Duration.ts +6 -6
- package/src/Effect.ts +58 -58
- package/src/Equal.ts +2 -2
- package/src/Equivalence.ts +1 -1
- package/src/ExecutionPlan.ts +2 -2
- package/src/FileSystem.ts +6 -6
- package/src/Function.ts +5 -5
- package/src/Graph.ts +11 -11
- package/src/HKT.ts +1 -1
- package/src/HashMap.ts +3 -3
- package/src/HashSet.ts +1 -1
- package/src/Iterable.ts +15 -15
- package/src/Layer.ts +16 -16
- package/src/Logger.ts +7 -7
- package/src/ManagedRuntime.ts +2 -2
- package/src/Match.ts +20 -20
- package/src/Metric.ts +20 -20
- package/src/Option.ts +36 -36
- package/src/Order.ts +1 -1
- package/src/Path.ts +1 -1
- package/src/Pipeable.ts +1 -1
- package/src/Predicate.ts +5 -5
- package/src/PubSub.ts +9 -9
- package/src/Queue.ts +24 -24
- package/src/Record.ts +15 -15
- package/src/Redacted.ts +2 -2
- package/src/Ref.ts +18 -18
- package/src/RegExp.ts +1 -1
- package/src/Request.ts +4 -4
- package/src/RequestResolver.ts +8 -8
- package/src/Resource.ts +1 -1
- package/src/Result.ts +18 -18
- package/src/Schedule.ts +45 -45
- package/src/Schema.ts +177 -459
- package/src/SchemaAST.ts +1 -1
- package/src/SchemaGetter.ts +13 -13
- package/src/SchemaParser.ts +3 -3
- package/src/Scope.ts +1 -1
- package/src/Sink.ts +5 -5
- package/src/Stream.ts +57 -57
- package/src/String.ts +5 -5
- package/src/Struct.ts +8 -8
- package/src/SynchronizedRef.ts +57 -57
- package/src/Terminal.ts +1 -1
- package/src/Tracer.ts +5 -5
- package/src/Tuple.ts +14 -14
- package/src/TxHashMap.ts +3 -3
- package/src/TxHashSet.ts +1 -1
- package/src/Unify.ts +7 -7
- package/src/testing/TestClock.ts +5 -5
- package/src/testing/TestConsole.ts +3 -3
- package/src/unstable/ai/Chat.ts +2 -2
- package/src/unstable/ai/EmbeddingModel.ts +1 -1
- package/src/unstable/ai/IdGenerator.ts +2 -2
- package/src/unstable/ai/LanguageModel.ts +4 -4
- package/src/unstable/ai/Prompt.ts +15 -15
- package/src/unstable/ai/Telemetry.ts +5 -5
- package/src/unstable/ai/Tokenizer.ts +1 -1
- package/src/unstable/ai/Tool.ts +6 -6
- package/src/unstable/cli/Command.ts +5 -1
- package/src/unstable/cli/Param.ts +1 -1
- package/src/unstable/cli/Primitive.ts +3 -3
- package/src/unstable/cli/Prompt.ts +11 -11
- package/src/unstable/cli/internal/parser.ts +204 -10
- package/src/unstable/cluster/Entity.ts +1 -1
- package/src/unstable/cluster/HttpRunner.ts +2 -2
- package/src/unstable/cluster/K8sHttpClient.ts +1 -1
- package/src/unstable/cluster/Runners.ts +1 -1
- package/src/unstable/cluster/Sharding.ts +1 -1
- package/src/unstable/cluster/SingletonAddress.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +5 -5
- package/src/unstable/devtools/DevToolsClient.ts +1 -1
- package/src/unstable/eventlog/EventLog.ts +1 -1
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogRemote.ts +1 -1
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +3 -3
- package/src/unstable/http/Cookies.ts +1 -1
- package/src/unstable/http/Etag.ts +1 -1
- package/src/unstable/http/FetchHttpClient.ts +2 -2
- package/src/unstable/http/HttpClient.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +2 -2
- package/src/unstable/http/HttpMiddleware.ts +1 -1
- package/src/unstable/http/HttpPlatform.ts +1 -1
- package/src/unstable/http/HttpRouter.ts +4 -4
- package/src/unstable/http/HttpServerResponse.ts +3 -3
- package/src/unstable/http/Url.ts +33 -33
- package/src/unstable/httpapi/HttpApi.ts +1 -1
- package/src/unstable/httpapi/HttpApiError.ts +13 -13
- package/src/unstable/observability/PrometheusMetrics.ts +4 -4
- package/src/unstable/persistence/KeyValueStore.ts +3 -3
- package/src/unstable/persistence/Persistable.ts +2 -2
- package/src/unstable/persistence/PersistedQueue.ts +8 -8
- package/src/unstable/persistence/RateLimiter.ts +1 -1
- package/src/unstable/process/ChildProcess.ts +5 -5
- package/src/unstable/reactivity/AsyncResult.ts +4 -4
- package/src/unstable/reactivity/Atom.ts +1 -1
- package/src/unstable/reactivity/AtomRegistry.ts +1 -1
- package/src/unstable/reactivity/Reactivity.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +5 -5
- package/src/unstable/rpc/RpcMiddleware.ts +1 -1
- package/src/unstable/rpc/RpcSchema.ts +3 -3
- package/src/unstable/schema/Model.ts +2 -2
- package/src/unstable/socket/Socket.ts +3 -3
- package/src/unstable/socket/SocketServer.ts +1 -1
- package/src/unstable/sql/Migrator.ts +1 -1
- package/src/unstable/sql/SqlClient.ts +3 -3
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/Statement.ts +2 -2
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +1 -1
- package/src/unstable/workflow/Activity.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +1 -1
|
@@ -66,7 +66,7 @@ import * as Stream from "../../Stream.ts"
|
|
|
66
66
|
* mutations so successful effects invalidate keys, and turn query effects into
|
|
67
67
|
* queues or streams that rerun when keys are invalidated.
|
|
68
68
|
*
|
|
69
|
-
* @category
|
|
69
|
+
* @category services
|
|
70
70
|
* @since 4.0.0
|
|
71
71
|
*/
|
|
72
72
|
export class Reactivity extends Context.Service<
|
package/src/unstable/rpc/Rpc.ts
CHANGED
|
@@ -1027,7 +1027,7 @@ export const make = <
|
|
|
1027
1027
|
* })
|
|
1028
1028
|
* ```
|
|
1029
1029
|
*
|
|
1030
|
-
* @category
|
|
1030
|
+
* @category constructors
|
|
1031
1031
|
* @since 4.0.0
|
|
1032
1032
|
*/
|
|
1033
1033
|
export const custom = <Def extends Custom>(
|
|
@@ -1080,7 +1080,7 @@ export const custom = <Def extends Custom>(
|
|
|
1080
1080
|
* A custom constructor receives the original success, error, and defect schemas
|
|
1081
1081
|
* and returns transformed output schemas through `out`.
|
|
1082
1082
|
*
|
|
1083
|
-
* @category
|
|
1083
|
+
* @category constructors
|
|
1084
1084
|
* @since 4.0.0
|
|
1085
1085
|
*/
|
|
1086
1086
|
export interface Custom {
|
|
@@ -1099,7 +1099,7 @@ export declare namespace Custom {
|
|
|
1099
1099
|
/**
|
|
1100
1100
|
* The transformed schemas produced by a custom RPC constructor.
|
|
1101
1101
|
*
|
|
1102
|
-
* @category
|
|
1102
|
+
* @category constructors
|
|
1103
1103
|
* @since 4.0.0
|
|
1104
1104
|
*/
|
|
1105
1105
|
export interface Out<
|
|
@@ -1115,7 +1115,7 @@ export declare namespace Custom {
|
|
|
1115
1115
|
* The default custom-constructor output shape for arbitrary success and error
|
|
1116
1116
|
* schemas.
|
|
1117
1117
|
*
|
|
1118
|
-
* @category
|
|
1118
|
+
* @category constructors
|
|
1119
1119
|
* @since 4.0.0
|
|
1120
1120
|
*/
|
|
1121
1121
|
export type OutDefault = Out<Schema.Top, Schema.Top>
|
|
@@ -1124,7 +1124,7 @@ export declare namespace Custom {
|
|
|
1124
1124
|
* Applies a custom constructor definition to concrete success and error
|
|
1125
1125
|
* schemas and returns its transformed output schema type.
|
|
1126
1126
|
*
|
|
1127
|
-
* @category
|
|
1127
|
+
* @category constructors
|
|
1128
1128
|
* @since 4.0.0
|
|
1129
1129
|
*/
|
|
1130
1130
|
export type Kind<
|
|
@@ -279,7 +279,7 @@ export interface AnyServiceWithProps extends Context.Key<any, RpcMiddleware<any,
|
|
|
279
279
|
* requirements, provided services, error schema, and client-side requirement
|
|
280
280
|
* metadata.
|
|
281
281
|
*
|
|
282
|
-
* @category
|
|
282
|
+
* @category constructors
|
|
283
283
|
* @since 4.0.0
|
|
284
284
|
*/
|
|
285
285
|
export const Service = <
|
|
@@ -48,7 +48,7 @@ const StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema"
|
|
|
48
48
|
* Returns `true` when a schema is an RPC stream schema created by
|
|
49
49
|
* `RpcSchema.Stream`.
|
|
50
50
|
*
|
|
51
|
-
* @category
|
|
51
|
+
* @category streams
|
|
52
52
|
* @since 4.0.0
|
|
53
53
|
*/
|
|
54
54
|
export function isStreamSchema(schema: Schema.Top): schema is Stream<Schema.Top, Schema.Top> {
|
|
@@ -72,7 +72,7 @@ export function getStreamSchemas(schema: Schema.Top): Option.Option<{
|
|
|
72
72
|
* A schema marker for RPC streaming responses, storing the success element
|
|
73
73
|
* schema and stream error schema used for encoding and decoding stream chunks.
|
|
74
74
|
*
|
|
75
|
-
* @category
|
|
75
|
+
* @category streams
|
|
76
76
|
* @since 4.0.0
|
|
77
77
|
*/
|
|
78
78
|
export interface Stream<A extends Schema.Top, E extends Schema.Top> extends
|
|
@@ -97,7 +97,7 @@ const schema = Schema.declare(Stream_.isStream)
|
|
|
97
97
|
* Creates an RPC stream schema from a stream element success schema and stream
|
|
98
98
|
* error schema.
|
|
99
99
|
*
|
|
100
|
-
* @category
|
|
100
|
+
* @category streams
|
|
101
101
|
* @since 4.0.0
|
|
102
102
|
*/
|
|
103
103
|
export function Stream<A extends Schema.Top, E extends Schema.Top>(success: A, error: E): Stream<A, E> {
|
|
@@ -670,7 +670,7 @@ export const DateTimeUpdateFromNumber: DateTimeUpdateFromNumber = Field({
|
|
|
670
670
|
* Variant field type for a JSON value stored as text in database variants and
|
|
671
671
|
* exposed through the supplied schema in JSON variants.
|
|
672
672
|
*
|
|
673
|
-
* @category
|
|
673
|
+
* @category models
|
|
674
674
|
* @since 4.0.0
|
|
675
675
|
*/
|
|
676
676
|
export interface JsonFromString<S extends Schema.Top> extends
|
|
@@ -691,7 +691,7 @@ export interface JsonFromString<S extends Schema.Top> extends
|
|
|
691
691
|
*
|
|
692
692
|
* The "json" variants will use the object schema directly.
|
|
693
693
|
*
|
|
694
|
-
* @category
|
|
694
|
+
* @category constructors
|
|
695
695
|
* @since 4.0.0
|
|
696
696
|
*/
|
|
697
697
|
export const JsonFromString = <S extends Schema.Top>(
|
|
@@ -66,7 +66,7 @@ export const isSocket = (u: unknown): u is Socket => Predicate.hasProperty(u, Ty
|
|
|
66
66
|
* Use to access or provide the socket implementation used by programs that
|
|
67
67
|
* read and write frames through the Effect environment.
|
|
68
68
|
*
|
|
69
|
-
* @category
|
|
69
|
+
* @category services
|
|
70
70
|
* @since 4.0.0
|
|
71
71
|
*/
|
|
72
72
|
export const Socket: Context.Service<Socket, Socket> = Context.Service<Socket>("effect/socket/Socket")
|
|
@@ -567,7 +567,7 @@ export const defaultCloseCodeIsError = (_code: number) => true
|
|
|
567
567
|
* Context service for the active `WebSocket` instance available while a
|
|
568
568
|
* WebSocket-backed socket run is handling events.
|
|
569
569
|
*
|
|
570
|
-
* @category
|
|
570
|
+
* @category services
|
|
571
571
|
* @since 4.0.0
|
|
572
572
|
*/
|
|
573
573
|
export class WebSocket extends Context.Service<WebSocket, globalThis.WebSocket>()(
|
|
@@ -578,7 +578,7 @@ export class WebSocket extends Context.Service<WebSocket, globalThis.WebSocket>(
|
|
|
578
578
|
* Context service for constructing `WebSocket` instances from a URL and
|
|
579
579
|
* optional protocols.
|
|
580
580
|
*
|
|
581
|
-
* @category
|
|
581
|
+
* @category services
|
|
582
582
|
* @since 4.0.0
|
|
583
583
|
*/
|
|
584
584
|
export class WebSocketConstructor extends Context.Service<
|
|
@@ -32,7 +32,7 @@ import type * as Socket from "./Socket.ts"
|
|
|
32
32
|
* Context service for a socket server, exposing its bound address and a run
|
|
33
33
|
* loop that handles each accepted `Socket`.
|
|
34
34
|
*
|
|
35
|
-
* @category
|
|
35
|
+
* @category services
|
|
36
36
|
* @since 4.0.0
|
|
37
37
|
*/
|
|
38
38
|
export class SocketServer extends Context.Service<SocketServer, {
|
|
@@ -57,7 +57,7 @@ import type { SqlError } from "./SqlError.ts"
|
|
|
57
57
|
* Options for running SQL migrations, including the migration loader, optional
|
|
58
58
|
* schema dump directory, and migrations table name.
|
|
59
59
|
*
|
|
60
|
-
* @category
|
|
60
|
+
* @category options
|
|
61
61
|
* @since 4.0.0
|
|
62
62
|
*/
|
|
63
63
|
export interface MigratorOptions<R = never> {
|
|
@@ -102,7 +102,7 @@ export interface SqlClient extends Constructor {
|
|
|
102
102
|
* Use to access or provide the SQL client used to build statements, stream
|
|
103
103
|
* rows, reserve connections, and run transactions.
|
|
104
104
|
*
|
|
105
|
-
* @category
|
|
105
|
+
* @category services
|
|
106
106
|
* @since 4.0.0
|
|
107
107
|
*/
|
|
108
108
|
export const SqlClient = Context.Service<SqlClient>("effect/sql/SqlClient")
|
|
@@ -118,7 +118,7 @@ export declare namespace SqlClient {
|
|
|
118
118
|
* the SQL compiler, transaction SQL, row transformation, tracing attributes,
|
|
119
119
|
* and optional reactive query integration.
|
|
120
120
|
*
|
|
121
|
-
* @category
|
|
121
|
+
* @category options
|
|
122
122
|
* @since 4.0.0
|
|
123
123
|
*/
|
|
124
124
|
export interface MakeOptions {
|
|
@@ -336,7 +336,7 @@ export declare namespace TransactionConnection {
|
|
|
336
336
|
* Creates a unique context service tag for the active transaction connection of
|
|
337
337
|
* a specific SQL client.
|
|
338
338
|
*
|
|
339
|
-
* @category
|
|
339
|
+
* @category services
|
|
340
340
|
* @since 4.0.0
|
|
341
341
|
*/
|
|
342
342
|
export const TransactionConnection = (
|
|
@@ -81,7 +81,7 @@ export type Acquirer = Effect<Connection, SqlError, Scope>
|
|
|
81
81
|
/**
|
|
82
82
|
* Service tag for a low-level SQL `Connection`.
|
|
83
83
|
*
|
|
84
|
-
* @category
|
|
84
|
+
* @category services
|
|
85
85
|
* @since 4.0.0
|
|
86
86
|
*/
|
|
87
87
|
export const Connection = Context.Service<Connection>("effect/sql/SqlConnection")
|
|
@@ -135,7 +135,7 @@ export const CurrentTransformer = Context.Reference<Transformer | undefined>("ef
|
|
|
135
135
|
/**
|
|
136
136
|
* Returns `true` when a value is a SQL `Fragment`.
|
|
137
137
|
*
|
|
138
|
-
* @category
|
|
138
|
+
* @category guards
|
|
139
139
|
* @since 4.0.0
|
|
140
140
|
*/
|
|
141
141
|
export const isFragment = (u: unknown): u is Fragment => hasProperty(u, FragmentTypeId)
|
|
@@ -143,7 +143,7 @@ export const isFragment = (u: unknown): u is Fragment => hasProperty(u, Fragment
|
|
|
143
143
|
/**
|
|
144
144
|
* Creates a type guard for custom SQL segments with the specified custom kind.
|
|
145
145
|
*
|
|
146
|
-
* @category
|
|
146
|
+
* @category guards
|
|
147
147
|
* @since 4.0.0
|
|
148
148
|
*/
|
|
149
149
|
export const isCustom = <A extends Custom<any, any, any, any>>(
|
|
@@ -113,7 +113,7 @@ export const addAll = (
|
|
|
113
113
|
* Creates a schema getter that records transferables derived from a value in
|
|
114
114
|
* the current `Collector` while passing the value through unchanged.
|
|
115
115
|
*
|
|
116
|
-
* @category
|
|
116
|
+
* @category getters
|
|
117
117
|
* @since 4.0.0
|
|
118
118
|
*/
|
|
119
119
|
export const getterAddAll = <A>(
|
|
@@ -284,7 +284,7 @@ export const idempotencyKey: (
|
|
|
284
284
|
* Runs a non-empty collection of activities as a durable race and returns the
|
|
285
285
|
* first completed success or failure using unioned success and error schemas.
|
|
286
286
|
*
|
|
287
|
-
* @category
|
|
287
|
+
* @category racing
|
|
288
288
|
* @since 4.0.0
|
|
289
289
|
*/
|
|
290
290
|
export const raceAll = <const Activities extends NonEmptyReadonlyArray<Any>>(
|
|
@@ -273,7 +273,7 @@ export const into: {
|
|
|
273
273
|
* Runs effects as a durable race, returning a previously persisted result when
|
|
274
274
|
* present or completing a named deferred with the first result.
|
|
275
275
|
*
|
|
276
|
-
* @category
|
|
276
|
+
* @category racing
|
|
277
277
|
* @since 4.0.0
|
|
278
278
|
*/
|
|
279
279
|
export const raceAll = <
|