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
|
@@ -102,7 +102,7 @@ import * as Snowflake from "./Snowflake.js";
|
|
|
102
102
|
* Use to access or provide cluster routing, shard ownership, entity
|
|
103
103
|
* registration, singleton registration, and persisted-work polling.
|
|
104
104
|
*
|
|
105
|
-
* @category
|
|
105
|
+
* @category services
|
|
106
106
|
* @since 4.0.0
|
|
107
107
|
*/
|
|
108
108
|
export class Sharding extends /*#__PURE__*/Context.Service()("effect/cluster/Sharding") {}
|
|
@@ -41,7 +41,7 @@ declare const SingletonAddress_base: Schema.Class<SingletonAddress, Schema.Struc
|
|
|
41
41
|
/**
|
|
42
42
|
* Represents the unique address of an singleton within the cluster.
|
|
43
43
|
*
|
|
44
|
-
* @category
|
|
44
|
+
* @category address
|
|
45
45
|
* @since 4.0.0
|
|
46
46
|
*/
|
|
47
47
|
export declare class SingletonAddress extends SingletonAddress_base {
|
|
@@ -37,7 +37,7 @@ const TypeId = "~effect/cluster/SingletonAddress";
|
|
|
37
37
|
/**
|
|
38
38
|
* Represents the unique address of an singleton within the cluster.
|
|
39
39
|
*
|
|
40
|
-
* @category
|
|
40
|
+
* @category address
|
|
41
41
|
* @since 4.0.0
|
|
42
42
|
*/
|
|
43
43
|
export class SingletonAddress extends /*#__PURE__*/Schema.Class(TypeId)({
|
|
@@ -153,35 +153,35 @@ export declare const make: (options: {
|
|
|
153
153
|
/**
|
|
154
154
|
* Extracts the Unix timestamp in milliseconds from a snowflake id.
|
|
155
155
|
*
|
|
156
|
-
* @category
|
|
156
|
+
* @category parts
|
|
157
157
|
* @since 4.0.0
|
|
158
158
|
*/
|
|
159
159
|
export declare const timestamp: (snowflake: Snowflake) => number;
|
|
160
160
|
/**
|
|
161
161
|
* Extracts the timestamp from a snowflake id as a `DateTime.Utc`.
|
|
162
162
|
*
|
|
163
|
-
* @category
|
|
163
|
+
* @category parts
|
|
164
164
|
* @since 4.0.0
|
|
165
165
|
*/
|
|
166
166
|
export declare const dateTime: (snowflake: Snowflake) => DateTime.Utc;
|
|
167
167
|
/**
|
|
168
168
|
* Extracts the machine id component from a snowflake id.
|
|
169
169
|
*
|
|
170
|
-
* @category
|
|
170
|
+
* @category parts
|
|
171
171
|
* @since 4.0.0
|
|
172
172
|
*/
|
|
173
173
|
export declare const machineId: (snowflake: Snowflake) => MachineId;
|
|
174
174
|
/**
|
|
175
175
|
* Extracts the per-machine sequence component from a snowflake id.
|
|
176
176
|
*
|
|
177
|
-
* @category
|
|
177
|
+
* @category parts
|
|
178
178
|
* @since 4.0.0
|
|
179
179
|
*/
|
|
180
180
|
export declare const sequence: (snowflake: Snowflake) => number;
|
|
181
181
|
/**
|
|
182
182
|
* Decomposes a snowflake id into its timestamp, machine id, and sequence parts.
|
|
183
183
|
*
|
|
184
|
-
* @category
|
|
184
|
+
* @category parts
|
|
185
185
|
* @since 4.0.0
|
|
186
186
|
*/
|
|
187
187
|
export declare const toParts: (snowflake: Snowflake) => Snowflake.Parts;
|
|
@@ -73,35 +73,35 @@ export const make = options => BigInt(options.timestamp - constEpochMillis) << c
|
|
|
73
73
|
/**
|
|
74
74
|
* Extracts the Unix timestamp in milliseconds from a snowflake id.
|
|
75
75
|
*
|
|
76
|
-
* @category
|
|
76
|
+
* @category parts
|
|
77
77
|
* @since 4.0.0
|
|
78
78
|
*/
|
|
79
79
|
export const timestamp = snowflake => Number(snowflake >> constBigInt22) + sinceUnixEpoch;
|
|
80
80
|
/**
|
|
81
81
|
* Extracts the timestamp from a snowflake id as a `DateTime.Utc`.
|
|
82
82
|
*
|
|
83
|
-
* @category
|
|
83
|
+
* @category parts
|
|
84
84
|
* @since 4.0.0
|
|
85
85
|
*/
|
|
86
86
|
export const dateTime = snowflake => DateTime.makeUnsafe(timestamp(snowflake));
|
|
87
87
|
/**
|
|
88
88
|
* Extracts the machine id component from a snowflake id.
|
|
89
89
|
*
|
|
90
|
-
* @category
|
|
90
|
+
* @category parts
|
|
91
91
|
* @since 4.0.0
|
|
92
92
|
*/
|
|
93
93
|
export const machineId = snowflake => Number((snowflake >> constBigInt12) % constBigInt1024);
|
|
94
94
|
/**
|
|
95
95
|
* Extracts the per-machine sequence component from a snowflake id.
|
|
96
96
|
*
|
|
97
|
-
* @category
|
|
97
|
+
* @category parts
|
|
98
98
|
* @since 4.0.0
|
|
99
99
|
*/
|
|
100
100
|
export const sequence = snowflake => Number(snowflake % constBigInt4096);
|
|
101
101
|
/**
|
|
102
102
|
* Decomposes a snowflake id into its timestamp, machine id, and sequence parts.
|
|
103
103
|
*
|
|
104
|
-
* @category
|
|
104
|
+
* @category parts
|
|
105
105
|
* @since 4.0.0
|
|
106
106
|
*/
|
|
107
107
|
export const toParts = snowflake => ({
|
|
@@ -12,7 +12,7 @@ declare const DevToolsClient_base: Context.ServiceClass<DevToolsClient, "effect/
|
|
|
12
12
|
* Service for sending span and span-event telemetry to the Effect devtools
|
|
13
13
|
* connection.
|
|
14
14
|
*
|
|
15
|
-
* @category
|
|
15
|
+
* @category services
|
|
16
16
|
* @since 4.0.0
|
|
17
17
|
*/
|
|
18
18
|
export declare class DevToolsClient extends DevToolsClient_base {
|
|
@@ -52,7 +52,7 @@ const ResponseSchema = /*#__PURE__*/Schema.toCodecJson(DevToolsSchema.Response);
|
|
|
52
52
|
* Service for sending span and span-event telemetry to the Effect devtools
|
|
53
53
|
* connection.
|
|
54
54
|
*
|
|
55
|
-
* @category
|
|
55
|
+
* @category services
|
|
56
56
|
* @since 4.0.0
|
|
57
57
|
*/
|
|
58
58
|
export class DevToolsClient extends /*#__PURE__*/Context.Service()("effect/devtools/DevToolsClient") {}
|
|
@@ -65,7 +65,7 @@ declare const EventLog_base: Context.ServiceClass<EventLog, "effect/eventlog/Eve
|
|
|
65
65
|
* only when the handler succeeds, and exposes access to the underlying journal
|
|
66
66
|
* entries and destroy operation.
|
|
67
67
|
*
|
|
68
|
-
* @category
|
|
68
|
+
* @category services
|
|
69
69
|
* @since 4.0.0
|
|
70
70
|
*/
|
|
71
71
|
export declare class EventLog extends EventLog_base {
|
|
@@ -58,7 +58,7 @@ import { StoreId } from "./EventLogMessage.js";
|
|
|
58
58
|
* only when the handler succeeds, and exposes access to the underlying journal
|
|
59
59
|
* entries and destroy operation.
|
|
60
60
|
*
|
|
61
|
-
* @category
|
|
61
|
+
* @category services
|
|
62
62
|
* @since 4.0.0
|
|
63
63
|
*/
|
|
64
64
|
export class EventLog extends /*#__PURE__*/Context.Service()("effect/eventlog/EventLog") {}
|
|
@@ -79,7 +79,7 @@ declare const EventLogEncryption_base: Context.ServiceClass<EventLogEncryption,
|
|
|
79
79
|
* Use to provide cryptographic operations required by encrypted event-log
|
|
80
80
|
* replication.
|
|
81
81
|
*
|
|
82
|
-
* @category
|
|
82
|
+
* @category services
|
|
83
83
|
* @since 4.0.0
|
|
84
84
|
*/
|
|
85
85
|
export declare class EventLogEncryption extends EventLogEncryption_base {
|
|
@@ -67,7 +67,7 @@ const toBufferSource = data => new Uint8Array(toArrayBuffer(data));
|
|
|
67
67
|
* Use to provide cryptographic operations required by encrypted event-log
|
|
68
68
|
* replication.
|
|
69
69
|
*
|
|
70
|
-
* @category
|
|
70
|
+
* @category services
|
|
71
71
|
* @since 4.0.0
|
|
72
72
|
*/
|
|
73
73
|
export class EventLogEncryption extends /*#__PURE__*/Context.Service()("effect/eventlog/EventLogEncryption") {}
|
|
@@ -37,7 +37,7 @@ declare const EventLogRemote_base: Context.ServiceClass<EventLogRemote, "effect/
|
|
|
37
37
|
* It can write local entries to the remote, stream remote changes from a sequence
|
|
38
38
|
* number, and run effects only after the supplied identity has authenticated.
|
|
39
39
|
*
|
|
40
|
-
* @category
|
|
40
|
+
* @category services
|
|
41
41
|
* @since 4.0.0
|
|
42
42
|
*/
|
|
43
43
|
export declare class EventLogRemote extends EventLogRemote_base {
|
|
@@ -47,7 +47,7 @@ import { makeGetIdentityRootSecretMaterial } from "./internal/identityRootSecret
|
|
|
47
47
|
* It can write local entries to the remote, stream remote changes from a sequence
|
|
48
48
|
* number, and run effects only after the supplied identity has authenticated.
|
|
49
49
|
*
|
|
50
|
-
* @category
|
|
50
|
+
* @category services
|
|
51
51
|
* @since 4.0.0
|
|
52
52
|
*/
|
|
53
53
|
export class EventLogRemote extends /*#__PURE__*/Context.Service()("effect/eventlog/EventLogRemote") {}
|
|
@@ -28,7 +28,7 @@ declare const EventLogServerUnencrypted_base: Context.ServiceClass<EventLogServe
|
|
|
28
28
|
* Use to access or provide the server service that handles plaintext
|
|
29
29
|
* event-log writes.
|
|
30
30
|
*
|
|
31
|
-
* @category
|
|
31
|
+
* @category services
|
|
32
32
|
* @since 4.0.0
|
|
33
33
|
*/
|
|
34
34
|
export declare class EventLogServerUnencrypted extends EventLogServerUnencrypted_base {
|
|
@@ -114,7 +114,7 @@ declare const EventLogServerAuthorization_base: Context.ServiceClass<EventLogSer
|
|
|
114
114
|
* Use to provide authorization checks for plaintext event-log writes, reads,
|
|
115
115
|
* and identity authentication.
|
|
116
116
|
*
|
|
117
|
-
* @category
|
|
117
|
+
* @category services
|
|
118
118
|
* @since 4.0.0
|
|
119
119
|
*/
|
|
120
120
|
export declare class EventLogServerAuthorization extends EventLogServerAuthorization_base {
|
|
@@ -138,7 +138,7 @@ declare const StoreMapping_base: Context.ServiceClass<StoreMapping, "effect/even
|
|
|
138
138
|
* Use to map client-visible store identifiers to server storage identifiers
|
|
139
139
|
* before authorizing or serving unencrypted event-log requests.
|
|
140
140
|
*
|
|
141
|
-
* @category
|
|
141
|
+
* @category services
|
|
142
142
|
* @since 4.0.0
|
|
143
143
|
*/
|
|
144
144
|
export declare class StoreMapping extends StoreMapping_base {
|
|
@@ -66,7 +66,7 @@ import * as EventLogServer from "./EventLogServer.js";
|
|
|
66
66
|
* Use to access or provide the server service that handles plaintext
|
|
67
67
|
* event-log writes.
|
|
68
68
|
*
|
|
69
|
-
* @category
|
|
69
|
+
* @category services
|
|
70
70
|
* @since 4.0.0
|
|
71
71
|
*/
|
|
72
72
|
export class EventLogServerUnencrypted extends /*#__PURE__*/Context.Service()("effect/eventlog/EventLogServerUnencrypted") {}
|
|
@@ -199,7 +199,7 @@ export class EventLogServerAuthError extends /*#__PURE__*/Data.TaggedError("Even
|
|
|
199
199
|
* Use to provide authorization checks for plaintext event-log writes, reads,
|
|
200
200
|
* and identity authentication.
|
|
201
201
|
*
|
|
202
|
-
* @category
|
|
202
|
+
* @category services
|
|
203
203
|
* @since 4.0.0
|
|
204
204
|
*/
|
|
205
205
|
export class EventLogServerAuthorization extends /*#__PURE__*/Context.Service()("effect/eventlog/EventLogServerUnencrypted/EventLogServerAuthorization") {}
|
|
@@ -212,7 +212,7 @@ export class EventLogServerAuthorization extends /*#__PURE__*/Context.Service()(
|
|
|
212
212
|
* Use to map client-visible store identifiers to server storage identifiers
|
|
213
213
|
* before authorizing or serving unencrypted event-log requests.
|
|
214
214
|
*
|
|
215
|
-
* @category
|
|
215
|
+
* @category services
|
|
216
216
|
* @since 4.0.0
|
|
217
217
|
*/
|
|
218
218
|
export class StoreMapping extends /*#__PURE__*/Context.Service()("effect/eventlog/EventLogServerUnencrypted/StoreMapping") {}
|
|
@@ -113,7 +113,7 @@ declare const CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
|
113
113
|
* HTTP cookie value with its decoded value, encoded value, and optional cookie
|
|
114
114
|
* attributes such as domain, path, expiration, security, and same-site settings.
|
|
115
115
|
*
|
|
116
|
-
* @category
|
|
116
|
+
* @category cookies
|
|
117
117
|
* @since 4.0.0
|
|
118
118
|
*/
|
|
119
119
|
export interface Cookie extends Inspectable.Inspectable {
|
|
@@ -73,7 +73,7 @@ export interface Strong {
|
|
|
73
73
|
/**
|
|
74
74
|
* Formats an `Etag` as an HTTP header value, including quotes and the `W/` prefix for weak tags.
|
|
75
75
|
*
|
|
76
|
-
* @category
|
|
76
|
+
* @category converting
|
|
77
77
|
* @since 4.0.0
|
|
78
78
|
*/
|
|
79
79
|
export declare const toString: (self: Etag) => string;
|
|
@@ -37,7 +37,7 @@ import * as Option from "../../Option.js";
|
|
|
37
37
|
/**
|
|
38
38
|
* Formats an `Etag` as an HTTP header value, including quotes and the `W/` prefix for weak tags.
|
|
39
39
|
*
|
|
40
|
-
* @category
|
|
40
|
+
* @category converting
|
|
41
41
|
* @since 4.0.0
|
|
42
42
|
*/
|
|
43
43
|
export const toString = self => {
|
|
@@ -41,7 +41,7 @@ import * as HttpClient from "./HttpClient.ts";
|
|
|
41
41
|
*
|
|
42
42
|
* Defaults to `globalThis.fetch`.
|
|
43
43
|
*
|
|
44
|
-
* @category
|
|
44
|
+
* @category services
|
|
45
45
|
* @since 4.0.0
|
|
46
46
|
*/
|
|
47
47
|
export declare const Fetch: Context.Reference<typeof globalThis.fetch>;
|
|
@@ -58,7 +58,7 @@ declare const RequestInit_base: Context.ServiceClass<RequestInit, "effect/http/F
|
|
|
58
58
|
*
|
|
59
59
|
* Request-specific method, headers, body, and abort signal are supplied by the client when a request is executed.
|
|
60
60
|
*
|
|
61
|
-
* @category
|
|
61
|
+
* @category services
|
|
62
62
|
* @since 4.0.0
|
|
63
63
|
*/
|
|
64
64
|
export declare class RequestInit extends RequestInit_base {
|
|
@@ -45,7 +45,7 @@ import * as HttpClientResponse from "./HttpClientResponse.js";
|
|
|
45
45
|
*
|
|
46
46
|
* Defaults to `globalThis.fetch`.
|
|
47
47
|
*
|
|
48
|
-
* @category
|
|
48
|
+
* @category services
|
|
49
49
|
* @since 4.0.0
|
|
50
50
|
*/
|
|
51
51
|
export const Fetch = /*#__PURE__*/Context.Reference("effect/http/FetchHttpClient/Fetch", {
|
|
@@ -63,7 +63,7 @@ export const Fetch = /*#__PURE__*/Context.Reference("effect/http/FetchHttpClient
|
|
|
63
63
|
*
|
|
64
64
|
* Request-specific method, headers, body, and abort signal are supplied by the client when a request is executed.
|
|
65
65
|
*
|
|
66
|
-
* @category
|
|
66
|
+
* @category services
|
|
67
67
|
* @since 4.0.0
|
|
68
68
|
*/
|
|
69
69
|
export class RequestInit extends /*#__PURE__*/Context.Service()("effect/http/FetchHttpClient/RequestInit") {}
|
|
@@ -122,7 +122,7 @@ export declare namespace HttpClient {
|
|
|
122
122
|
* Use to provide the HTTP client implementation consumed by the module's
|
|
123
123
|
* request accessor functions.
|
|
124
124
|
*
|
|
125
|
-
* @category
|
|
125
|
+
* @category services
|
|
126
126
|
* @since 4.0.0
|
|
127
127
|
*/
|
|
128
128
|
export declare const HttpClient: Context.Service<HttpClient, HttpClient>;
|
|
@@ -40,7 +40,7 @@ export const isHttpClient = u => Predicate.hasProperty(u, TypeId);
|
|
|
40
40
|
* Use to provide the HTTP client implementation consumed by the module's
|
|
41
41
|
* request accessor functions.
|
|
42
42
|
*
|
|
43
|
-
* @category
|
|
43
|
+
* @category services
|
|
44
44
|
* @since 4.0.0
|
|
45
45
|
*/
|
|
46
46
|
export const HttpClient = /*#__PURE__*/Context.Service("effect/HttpClient");
|
|
@@ -82,7 +82,7 @@ export interface HttpClientRequest extends Inspectable.Inspectable, Pipeable {
|
|
|
82
82
|
/**
|
|
83
83
|
* Options for constructing or modifying an `HttpClientRequest`.
|
|
84
84
|
*
|
|
85
|
-
* @category
|
|
85
|
+
* @category options
|
|
86
86
|
* @since 4.0.0
|
|
87
87
|
*/
|
|
88
88
|
export interface Options {
|
|
@@ -104,7 +104,7 @@ export declare namespace Options {
|
|
|
104
104
|
/**
|
|
105
105
|
* Request options that omit the method and URL for helpers that already receive those values separately.
|
|
106
106
|
*
|
|
107
|
-
* @category
|
|
107
|
+
* @category options
|
|
108
108
|
* @since 4.0.0
|
|
109
109
|
*/
|
|
110
110
|
interface NoUrl extends Omit<Options, "method" | "url"> {
|
|
@@ -90,7 +90,7 @@ export declare const xForwardedHeaders: <E, R>(httpApp: Effect.Effect<Response.H
|
|
|
90
90
|
/**
|
|
91
91
|
* Middleware that parses the current request URL's search parameters and provides them as `ParsedSearchParams`.
|
|
92
92
|
*
|
|
93
|
-
* @category
|
|
93
|
+
* @category search params
|
|
94
94
|
* @since 4.0.0
|
|
95
95
|
*/
|
|
96
96
|
export declare const searchParamsParser: <E, R>(httpApp: Effect.Effect<HttpServerResponse, E, R>) => Effect.Effect<Response.HttpServerResponse, E, HttpServerRequest | Exclude<R, Request.ParsedSearchParams>>;
|
|
@@ -194,7 +194,7 @@ export const xForwardedHeaders = /*#__PURE__*/make(httpApp => Effect.updateServi
|
|
|
194
194
|
/**
|
|
195
195
|
* Middleware that parses the current request URL's search parameters and provides them as `ParsedSearchParams`.
|
|
196
196
|
*
|
|
197
|
-
* @category
|
|
197
|
+
* @category search params
|
|
198
198
|
* @since 4.0.0
|
|
199
199
|
*/
|
|
200
200
|
export const searchParamsParser = httpApp => Effect.withFiber(fiber => {
|
|
@@ -46,7 +46,7 @@ declare const HttpPlatform_base: Context.ServiceClass<HttpPlatform, "effect/http
|
|
|
46
46
|
/**
|
|
47
47
|
* Service for platform-specific HTTP response helpers, including file-backed server responses.
|
|
48
48
|
*
|
|
49
|
-
* @category
|
|
49
|
+
* @category services
|
|
50
50
|
* @since 4.0.0
|
|
51
51
|
*/
|
|
52
52
|
export declare class HttpPlatform extends HttpPlatform_base {
|
|
@@ -35,7 +35,7 @@ import * as Response from "./HttpServerResponse.js";
|
|
|
35
35
|
/**
|
|
36
36
|
* Service for platform-specific HTTP response helpers, including file-backed server responses.
|
|
37
37
|
*
|
|
38
|
-
* @category
|
|
38
|
+
* @category services
|
|
39
39
|
* @since 4.0.0
|
|
40
40
|
*/
|
|
41
41
|
export class HttpPlatform extends /*#__PURE__*/Context.Service()("effect/http/HttpPlatform") {}
|
|
@@ -86,7 +86,7 @@ declare const RouteContext_base: Context.ServiceClass<RouteContext, "effect/http
|
|
|
86
86
|
* It provides the route definition and the path parameters captured by the route
|
|
87
87
|
* matcher.
|
|
88
88
|
*
|
|
89
|
-
* @category
|
|
89
|
+
* @category services
|
|
90
90
|
* @since 4.0.0
|
|
91
91
|
*/
|
|
92
92
|
export declare class RouteContext extends RouteContext_base {
|
|
@@ -94,7 +94,7 @@ export declare class RouteContext extends RouteContext_base {
|
|
|
94
94
|
/**
|
|
95
95
|
* Effect that returns the path parameters captured for the current matched route.
|
|
96
96
|
*
|
|
97
|
-
* @category
|
|
97
|
+
* @category getters
|
|
98
98
|
* @since 4.0.0
|
|
99
99
|
*/
|
|
100
100
|
export declare const params: Effect.Effect<ReadonlyRecord<string, string | undefined>, never, RouteContext>;
|
|
@@ -654,7 +654,7 @@ export declare const provideRequest: <A2, E2, R2>(layer: Layer.Layer<A2, E2, R2>
|
|
|
654
654
|
/**
|
|
655
655
|
* Runs the provided application layer as an HTTP server.
|
|
656
656
|
*
|
|
657
|
-
* @category
|
|
657
|
+
* @category server
|
|
658
658
|
* @since 4.0.0
|
|
659
659
|
*/
|
|
660
660
|
export declare const serve: <A, E, R, HE, HR = Request.Only<"Requires", R> | Request.Only<"GlobalRequires", R>>(appLayer: Layer.Layer<A, E, R>, options?: {
|
|
@@ -683,7 +683,7 @@ export declare const serve: <A, E, R, HE, HR = Request.Only<"Requires", R> | Req
|
|
|
683
683
|
* Web `Response` values and a `dispose` function for releasing the layer
|
|
684
684
|
* resources.
|
|
685
685
|
*
|
|
686
|
-
* @category
|
|
686
|
+
* @category server
|
|
687
687
|
* @since 4.0.0
|
|
688
688
|
*/
|
|
689
689
|
export declare const toWebHandler: <A, E, R extends HttpRouter | Request<"Requires", any> | Request<"GlobalRequires", any> | Request<"Error", any> | Request<"GlobalError", any>, HE, HR = Exclude<Request.Only<"Requires", R> | Request.Only<"GlobalRequires", R>, A>>(appLayer: Layer.Layer<A, E, R>, options?: {
|
|
@@ -204,14 +204,14 @@ export const RouterConfig = /*#__PURE__*/Context.Reference("effect/http/HttpRout
|
|
|
204
204
|
* It provides the route definition and the path parameters captured by the route
|
|
205
205
|
* matcher.
|
|
206
206
|
*
|
|
207
|
-
* @category
|
|
207
|
+
* @category services
|
|
208
208
|
* @since 4.0.0
|
|
209
209
|
*/
|
|
210
210
|
export class RouteContext extends /*#__PURE__*/Context.Service()("effect/http/HttpRouter/RouteContext") {}
|
|
211
211
|
/**
|
|
212
212
|
* Effect that returns the path parameters captured for the current matched route.
|
|
213
213
|
*
|
|
214
|
-
* @category
|
|
214
|
+
* @category getters
|
|
215
215
|
* @since 4.0.0
|
|
216
216
|
*/
|
|
217
217
|
export const params = /*#__PURE__*/Effect.map(RouteContext, _ => _.params);
|
|
@@ -644,7 +644,7 @@ export const provideRequest = layer => self => Layer.provide(self, middleware()(
|
|
|
644
644
|
/**
|
|
645
645
|
* Runs the provided application layer as an HTTP server.
|
|
646
646
|
*
|
|
647
|
-
* @category
|
|
647
|
+
* @category server
|
|
648
648
|
* @since 4.0.0
|
|
649
649
|
*/
|
|
650
650
|
export const serve = (appLayer, options) => {
|
|
@@ -669,7 +669,7 @@ export const serve = (appLayer, options) => {
|
|
|
669
669
|
* Web `Response` values and a `dispose` function for releasing the layer
|
|
670
670
|
* resources.
|
|
671
671
|
*
|
|
672
|
-
* @category
|
|
672
|
+
* @category server
|
|
673
673
|
* @since 4.0.0
|
|
674
674
|
*/
|
|
675
675
|
export const toWebHandler = (appLayer, options) => {
|
|
@@ -84,7 +84,7 @@ export interface HttpServerResponse extends Inspectable.Inspectable, Pipeable, E
|
|
|
84
84
|
/**
|
|
85
85
|
* Common options accepted by HTTP server response constructors.
|
|
86
86
|
*
|
|
87
|
-
* @category
|
|
87
|
+
* @category options
|
|
88
88
|
* @since 4.0.0
|
|
89
89
|
*/
|
|
90
90
|
export interface Options {
|
|
@@ -106,7 +106,7 @@ export declare namespace Options {
|
|
|
106
106
|
* Response options for constructors whose body determines its own content type
|
|
107
107
|
* and content length.
|
|
108
108
|
*
|
|
109
|
-
* @category
|
|
109
|
+
* @category options
|
|
110
110
|
* @since 4.0.0
|
|
111
111
|
*/
|
|
112
112
|
interface WithContent extends Omit<Options, "contentType" | "contentLength"> {
|
|
@@ -115,7 +115,7 @@ export declare namespace Options {
|
|
|
115
115
|
* Response options for constructors that allow overriding the content type while
|
|
116
116
|
* deriving the content length from the body.
|
|
117
117
|
*
|
|
118
|
-
* @category
|
|
118
|
+
* @category options
|
|
119
119
|
* @since 4.0.0
|
|
120
120
|
*/
|
|
121
121
|
interface WithContentType extends Omit<Options, "contentLength"> {
|