@effect/platform-bun 4.0.0-beta.70 → 4.0.0-beta.72
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/BunClusterHttp.d.ts +26 -2
- package/dist/BunClusterHttp.d.ts.map +1 -1
- package/dist/BunClusterHttp.js +26 -2
- package/dist/BunClusterHttp.js.map +1 -1
- package/dist/BunCrypto.d.ts +1 -1
- package/dist/BunCrypto.d.ts.map +1 -1
- package/dist/BunCrypto.js +10 -2
- package/dist/BunCrypto.js.map +1 -1
- package/dist/BunHttpServer.d.ts +1 -1
- package/dist/BunHttpServer.js +1 -1
- package/dist/BunHttpServerRequest.d.ts +1 -1
- package/dist/BunHttpServerRequest.js +1 -1
- package/dist/BunPath.d.ts.map +1 -1
- package/dist/BunPath.js +28 -16
- package/dist/BunPath.js.map +1 -1
- package/dist/BunRedis.d.ts +27 -18
- package/dist/BunRedis.d.ts.map +1 -1
- package/dist/BunRedis.js +27 -18
- package/dist/BunRedis.js.map +1 -1
- package/dist/BunRuntime.d.ts +3 -3
- package/dist/BunRuntime.d.ts.map +1 -1
- package/dist/BunRuntime.js +29 -16
- package/dist/BunRuntime.js.map +1 -1
- package/dist/BunStdio.d.ts.map +1 -1
- package/dist/BunStdio.js +23 -11
- package/dist/BunStdio.js.map +1 -1
- package/dist/BunStream.d.ts +2 -2
- package/dist/BunStream.d.ts.map +1 -1
- package/dist/BunStream.js +27 -18
- package/dist/BunStream.js.map +1 -1
- package/dist/BunTerminal.d.ts.map +1 -1
- package/dist/BunTerminal.js +29 -11
- package/dist/BunTerminal.js.map +1 -1
- package/dist/BunWorker.d.ts.map +1 -1
- package/dist/BunWorker.js +28 -11
- package/dist/BunWorker.js.map +1 -1
- package/dist/BunWorkerRunner.d.ts.map +1 -1
- package/dist/BunWorkerRunner.js +29 -15
- package/dist/BunWorkerRunner.js.map +1 -1
- package/dist/index.d.ts +0 -373
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -373
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/BunClusterHttp.ts +26 -2
- package/src/BunCrypto.ts +10 -2
- package/src/BunHttpServer.ts +1 -1
- package/src/BunHttpServerRequest.ts +1 -1
- package/src/BunPath.ts +28 -16
- package/src/BunRedis.ts +27 -18
- package/src/BunRuntime.ts +29 -16
- package/src/BunStdio.ts +23 -11
- package/src/BunStream.ts +27 -18
- package/src/BunTerminal.ts +29 -11
- package/src/BunWorker.ts +28 -11
- package/src/BunWorkerRunner.ts +29 -15
- package/src/index.ts +0 -373
package/dist/BunClusterHttp.d.ts
CHANGED
|
@@ -50,14 +50,14 @@ import { layerK8sHttpClient } from "./BunClusterSocket.ts";
|
|
|
50
50
|
import type { BunServices } from "./BunServices.ts";
|
|
51
51
|
export {
|
|
52
52
|
/**
|
|
53
|
-
* Kubernetes HTTP client
|
|
53
|
+
* Layer that provides a Kubernetes HTTP client for runner health checks.
|
|
54
54
|
*
|
|
55
55
|
* @category re-exports
|
|
56
56
|
* @since 4.0.0
|
|
57
57
|
*/
|
|
58
58
|
layerK8sHttpClient };
|
|
59
59
|
/**
|
|
60
|
-
* Bun HTTP server
|
|
60
|
+
* Layer that provides a Bun HTTP server for cluster runners.
|
|
61
61
|
*
|
|
62
62
|
* @category layers
|
|
63
63
|
* @since 4.0.0
|
|
@@ -66,6 +66,30 @@ export declare const layerHttpServer: Layer.Layer<HttpPlatform | Etag.Generator
|
|
|
66
66
|
/**
|
|
67
67
|
* Creates Bun cluster layers for HTTP or WebSocket transport, configuring serialization, storage, runner health, and optional client-only mode.
|
|
68
68
|
*
|
|
69
|
+
* **When to use**
|
|
70
|
+
*
|
|
71
|
+
* Use to install the complete Bun HTTP or WebSocket cluster layer, including
|
|
72
|
+
* client-only cluster access when a process should connect without serving
|
|
73
|
+
* runner RPCs.
|
|
74
|
+
*
|
|
75
|
+
* **Details**
|
|
76
|
+
*
|
|
77
|
+
* `serialization` defaults to MessagePack, `runnerHealth` defaults to ping
|
|
78
|
+
* checks, SQL-backed storage is used by default, and `shardingConfig` is
|
|
79
|
+
* overlaid on environment-loaded sharding configuration. `local` storage uses
|
|
80
|
+
* no-op message storage plus in-memory runner storage, while `byo` leaves both
|
|
81
|
+
* message and runner storage for the caller to provide.
|
|
82
|
+
*
|
|
83
|
+
* **Gotchas**
|
|
84
|
+
*
|
|
85
|
+
* `clientOnly` does not start the HTTP server or receive shard assignments.
|
|
86
|
+
* Non-client-only mode listens with `runnerListenAddress` when present, falling
|
|
87
|
+
* back to `runnerAddress`. HTTP and WebSocket runner RPCs use the default
|
|
88
|
+
* `HttpRunner` route.
|
|
89
|
+
*
|
|
90
|
+
* @see {@link layerHttpServer} for the server layer used by non-client-only transports
|
|
91
|
+
* @see {@link layerK8sHttpClient} for Kubernetes runner health support
|
|
92
|
+
*
|
|
69
93
|
* @category layers
|
|
70
94
|
* @since 4.0.0
|
|
71
95
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunClusterHttp.d.ts","sourceRoot":"","sources":["../src/BunClusterHttp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAGrC,OAAO,KAAK,cAAc,MAAM,wCAAwC,CAAA;AAExE,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAA;AAC1D,OAAO,KAAK,aAAa,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,cAAc,MAAM,wCAAwC,CAAA;AAGxE,OAAO,KAAK,KAAK,IAAI,MAAM,2BAA2B,CAAA;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,O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AAS,OAAO,GAAG,KAAK,GAAG,cAAc,CAAC,cAAc,CAAC,EAC5F,MAAM,CAAC,WAAW,EAClB,OAAO,SAAS,OAAO,GAAG,KAAK,GAC3B,KAAK,SAAS,OAAO,GAAG,CAAC,cAAc,CAAC,cAAc,GAAG,aAAa,CAAC,aAAa,CAAC,GACrF,SAAS,CACd,GACD,KAAK,CAAC,KAAK,CACT,QAAQ,GAAG,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,cAAc,EAC1D,UAAU,GAAG,MAAM,CAAC,WAAW,EAC/B,OAAO,SAAS,OAAO,GAAG,KAAK,GAC3B,KAAK,SAAS,OAAO,GAAG,CAAC,cAAc,CAAC,cAAc,GAAG,aAAa,CAAC,aAAa,CAAC,GACrF,SAAS,CAiDhB,CAAA"}
|
package/dist/BunClusterHttp.js
CHANGED
|
@@ -17,14 +17,14 @@ import * as BunHttpServer from "./BunHttpServer.js";
|
|
|
17
17
|
import * as BunSocket from "./BunSocket.js";
|
|
18
18
|
export {
|
|
19
19
|
/**
|
|
20
|
-
* Kubernetes HTTP client
|
|
20
|
+
* Layer that provides a Kubernetes HTTP client for runner health checks.
|
|
21
21
|
*
|
|
22
22
|
* @category re-exports
|
|
23
23
|
* @since 4.0.0
|
|
24
24
|
*/
|
|
25
25
|
layerK8sHttpClient };
|
|
26
26
|
/**
|
|
27
|
-
* Bun HTTP server
|
|
27
|
+
* Layer that provides a Bun HTTP server for cluster runners.
|
|
28
28
|
*
|
|
29
29
|
* @category layers
|
|
30
30
|
* @since 4.0.0
|
|
@@ -40,6 +40,30 @@ export const layerHttpServer = /*#__PURE__*/Effect.gen(function* () {
|
|
|
40
40
|
/**
|
|
41
41
|
* Creates Bun cluster layers for HTTP or WebSocket transport, configuring serialization, storage, runner health, and optional client-only mode.
|
|
42
42
|
*
|
|
43
|
+
* **When to use**
|
|
44
|
+
*
|
|
45
|
+
* Use to install the complete Bun HTTP or WebSocket cluster layer, including
|
|
46
|
+
* client-only cluster access when a process should connect without serving
|
|
47
|
+
* runner RPCs.
|
|
48
|
+
*
|
|
49
|
+
* **Details**
|
|
50
|
+
*
|
|
51
|
+
* `serialization` defaults to MessagePack, `runnerHealth` defaults to ping
|
|
52
|
+
* checks, SQL-backed storage is used by default, and `shardingConfig` is
|
|
53
|
+
* overlaid on environment-loaded sharding configuration. `local` storage uses
|
|
54
|
+
* no-op message storage plus in-memory runner storage, while `byo` leaves both
|
|
55
|
+
* message and runner storage for the caller to provide.
|
|
56
|
+
*
|
|
57
|
+
* **Gotchas**
|
|
58
|
+
*
|
|
59
|
+
* `clientOnly` does not start the HTTP server or receive shard assignments.
|
|
60
|
+
* Non-client-only mode listens with `runnerListenAddress` when present, falling
|
|
61
|
+
* back to `runnerAddress`. HTTP and WebSocket runner RPCs use the default
|
|
62
|
+
* `HttpRunner` route.
|
|
63
|
+
*
|
|
64
|
+
* @see {@link layerHttpServer} for the server layer used by non-client-only transports
|
|
65
|
+
* @see {@link layerK8sHttpClient} for Kubernetes runner health support
|
|
66
|
+
*
|
|
43
67
|
* @category layers
|
|
44
68
|
* @since 4.0.0
|
|
45
69
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunClusterHttp.js","names":["Effect","Layer","Option","HttpRunner","MessageStorage","RunnerHealth","Runners","RunnerStorage","ShardingConfig","SqlMessageStorage","SqlRunnerStorage","FetchHttpClient","RpcSerialization","layerK8sHttpClient","BunFileSystem","BunHttpServer","BunSocket","layerHttpServer","gen","config","listenAddress","orElse","runnerListenAddress","runnerAddress","isNone","die","layer","value","pipe","unwrap","options","clientOnly","transport","provide","layerHttpClientOnly","layerWebsocketClientOnly","layerWebSocketConstructor","layerHttp","layerWebsocket","runnerHealth","empty","layerK8s","runnerHealthK8s","layerPing","layerRpc","layerClientProtocolHttpDefault","layerClientProtocolWebsocketDefault","provideMerge","storage","layerNoop","orDie","layerMemory","layerFromEnv","shardingConfig","serialization","layerNdjson","layerMsgPack"],"sources":["../src/BunClusterHttp.ts"],"s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|
|
1
|
+
{"version":3,"file":"BunClusterHttp.js","names":["Effect","Layer","Option","HttpRunner","MessageStorage","RunnerHealth","Runners","RunnerStorage","ShardingConfig","SqlMessageStorage","SqlRunnerStorage","FetchHttpClient","RpcSerialization","layerK8sHttpClient","BunFileSystem","BunHttpServer","BunSocket","layerHttpServer","gen","config","listenAddress","orElse","runnerListenAddress","runnerAddress","isNone","die","layer","value","pipe","unwrap","options","clientOnly","transport","provide","layerHttpClientOnly","layerWebsocketClientOnly","layerWebSocketConstructor","layerHttp","layerWebsocket","runnerHealth","empty","layerK8s","runnerHealthK8s","layerPing","layerRpc","layerClientProtocolHttpDefault","layerClientProtocolWebsocketDefault","provideMerge","storage","layerNoop","orDie","layerMemory","layerFromEnv","shardingConfig","serialization","layerNdjson","layerMsgPack"],"sources":["../src/BunClusterHttp.ts"],"sourcesContent":[null],"mappings":"AAqCA,OAAO,KAAKA,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,UAAU,MAAM,oCAAoC;AAChE,OAAO,KAAKC,cAAc,MAAM,wCAAwC;AACxE,OAAO,KAAKC,YAAY,MAAM,sCAAsC;AACpE,OAAO,KAAKC,OAAO,MAAM,iCAAiC;AAC1D,OAAO,KAAKC,aAAa,MAAM,uCAAuC;AAEtE,OAAO,KAAKC,cAAc,MAAM,wCAAwC;AACxE,OAAO,KAAKC,iBAAiB,MAAM,2CAA2C;AAC9E,OAAO,KAAKC,gBAAgB,MAAM,0CAA0C;AAE5E,OAAO,KAAKC,eAAe,MAAM,sCAAsC;AAIvE,OAAO,KAAKC,gBAAgB,MAAM,sCAAsC;AAExE,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AACnD,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AAEnD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;AACE;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C,EACnEpD,KAAK,CAACgC,OAAO,CACXH,OAAO,EAAEwB,aAAa,KAAK,QAAQ,GAAG1C,gBAAgB,CAAC2C,WAAW,GAAG3C,gBAAgB,CAAC4C,YAAY,CACnG,CACK;AACV,CAAC","ignoreList":[]}
|
package/dist/BunCrypto.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Crypto from "effect/Crypto";
|
|
2
2
|
import type * as Layer from "effect/Layer";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Layer that provides the Bun Crypto service implementation.
|
|
5
5
|
*
|
|
6
6
|
* @category layers
|
|
7
7
|
* @since 1.0.0
|
package/dist/BunCrypto.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunCrypto.d.ts","sourceRoot":"","sources":["../src/BunCrypto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BunCrypto.d.ts","sourceRoot":"","sources":["../src/BunCrypto.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAoB,CAAA"}
|
package/dist/BunCrypto.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Bun
|
|
2
|
+
* The `BunCrypto` module provides Bun's `Crypto` service layer for Effect
|
|
3
|
+
* programs. Provide {@link layer} at the edge of a Bun app, CLI, script, or
|
|
4
|
+
* test to satisfy `effect/Crypto` with cryptographically secure random bytes,
|
|
5
|
+
* UUID generation, random values, and SHA digest operations.
|
|
6
|
+
*
|
|
7
|
+
* This adapter reuses the shared Node-compatible implementation, so randomness
|
|
8
|
+
* and digest behavior follow Bun's `node:crypto` compatibility layer. SHA-1 is
|
|
9
|
+
* present for interoperability with existing protocols, not for new
|
|
10
|
+
* security-sensitive designs.
|
|
3
11
|
*
|
|
4
12
|
* @since 1.0.0
|
|
5
13
|
*/
|
|
6
14
|
import * as NodeCrypto from "@effect/platform-node-shared/NodeCrypto";
|
|
7
15
|
/**
|
|
8
|
-
*
|
|
16
|
+
* Layer that provides the Bun Crypto service implementation.
|
|
9
17
|
*
|
|
10
18
|
* @category layers
|
|
11
19
|
* @since 1.0.0
|
package/dist/BunCrypto.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunCrypto.js","names":["NodeCrypto","layer"],"sources":["../src/BunCrypto.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BunCrypto.js","names":["NodeCrypto","layer"],"sources":["../src/BunCrypto.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;AAaA,OAAO,KAAKA,UAAU,MAAM,yCAAyC;AAIrE;;;;;;AAMA,OAAO,MAAMC,KAAK,GAA+BD,UAAU,CAACC,KAAK","ignoreList":[]}
|
package/dist/BunHttpServer.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export declare const layer: <R extends string>(options: ServeOptions<R> & {
|
|
|
103
103
|
readonly gracefulShutdownTimeout?: Duration.Input | undefined;
|
|
104
104
|
}) => Layer.Layer<Server.HttpServer | HttpPlatform | Etag.Generator | BunServices.BunServices>;
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
106
|
+
* Layer that starts a Bun HTTP server on an ephemeral port for tests.
|
|
107
107
|
*
|
|
108
108
|
* @category layers
|
|
109
109
|
* @since 4.0.0
|
package/dist/BunHttpServer.js
CHANGED
|
@@ -178,7 +178,7 @@ export const layerHttpServices = /*#__PURE__*/Layer.mergeAll(Platform.layer, Eta
|
|
|
178
178
|
*/
|
|
179
179
|
export const layer = options => Layer.mergeAll(layerServer(options), layerHttpServices);
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
181
|
+
* Layer that starts a Bun HTTP server on an ephemeral port for tests.
|
|
182
182
|
*
|
|
183
183
|
* @category layers
|
|
184
184
|
* @since 4.0.0
|
|
@@ -27,7 +27,7 @@ import type { HttpServerRequest } from "effect/unstable/http/HttpServerRequest";
|
|
|
27
27
|
/**
|
|
28
28
|
* Returns the underlying `Bun.BunRequest` from an Effect `HttpServerRequest`.
|
|
29
29
|
*
|
|
30
|
-
* @category
|
|
30
|
+
* @category accessors
|
|
31
31
|
* @since 4.0.0
|
|
32
32
|
*/
|
|
33
33
|
export declare const toBunServerRequest: <T extends string = string>(self: HttpServerRequest) => Bun.BunRequest<T>;
|
package/dist/BunPath.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunPath.d.ts","sourceRoot":"","sources":["../src/BunPath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BunPath.d.ts","sourceRoot":"","sources":["../src/BunPath.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAkB,CAAA;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAA;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAA"}
|
package/dist/BunPath.js
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Bun layers for Effect's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
2
|
+
* Bun-backed layers for Effect's {@link Path} service.
|
|
3
|
+
*
|
|
4
|
+
* This module provides the `Path` service for Bun programs by reusing the
|
|
5
|
+
* shared Node-compatible path implementation. Provide one of these layers when
|
|
6
|
+
* Bun code should receive path operations from the Effect environment instead
|
|
7
|
+
* of importing runtime path helpers directly.
|
|
8
|
+
*
|
|
9
|
+
* **Mental model**
|
|
10
|
+
*
|
|
11
|
+
* Bun exposes Node-compatible path and file URL behavior, so the default
|
|
12
|
+
* {@link layer} follows the host operating system's rules. The
|
|
13
|
+
* {@link layerPosix} and {@link layerWin32} variants pin parsing and formatting
|
|
14
|
+
* to POSIX or Windows semantics for portable tests, generated paths, and
|
|
15
|
+
* cross-platform tooling.
|
|
16
|
+
*
|
|
17
|
+
* **Common tasks**
|
|
18
|
+
*
|
|
19
|
+
* Use {@link layer} for normal Bun applications and CLIs. Use
|
|
20
|
+
* {@link layerPosix} or {@link layerWin32} when code must produce stable path
|
|
21
|
+
* syntax regardless of the machine running Bun. `BunServices.layer` already
|
|
22
|
+
* includes {@link layer}, so import this module directly when only `Path` or a
|
|
23
|
+
* fixed platform variant is needed.
|
|
24
|
+
*
|
|
25
|
+
* **Gotchas**
|
|
26
|
+
*
|
|
27
|
+
* Path operations are syntactic. They normalize and convert strings and
|
|
28
|
+
* `file:` URLs, but they do not read the filesystem, check permissions, confirm
|
|
29
|
+
* that a path exists, or make request URLs safe to use as local paths.
|
|
18
30
|
*
|
|
19
31
|
* @since 4.0.0
|
|
20
32
|
*/
|
package/dist/BunPath.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunPath.js","names":["NodePath","layer","layerPosix","layerWin32"],"sources":["../src/BunPath.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BunPath.js","names":["NodePath","layer","layerPosix","layerWin32"],"sources":["../src/BunPath.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,KAAKA,QAAQ,MAAM,uCAAuC;AAIjE;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAsBD,QAAQ,CAACC,KAAK;AAEtD;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAsBF,QAAQ,CAACE,UAAU;AAEhE;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAsBH,QAAQ,CAACG,UAAU","ignoreList":[]}
|
package/dist/BunRedis.d.ts
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bun Redis integration backed by Bun's built-in `RedisClient`.
|
|
3
3
|
*
|
|
4
|
-
* This module
|
|
5
|
-
* both the
|
|
6
|
-
* `BunRedis` service for direct access to the
|
|
7
|
-
* applications that need Redis-backed persistence, persisted queues,
|
|
4
|
+
* This module creates scoped Bun `RedisClient` connections and exposes them as
|
|
5
|
+
* both the portable `Redis` service used by Effect persistence modules and the
|
|
6
|
+
* Bun-specific `BunRedis` service for direct access to the raw client. Use it in
|
|
7
|
+
* Bun applications that need Redis-backed persistence, persisted queues,
|
|
8
8
|
* distributed rate limiting, custom Redis commands, or Bun Redis features such
|
|
9
|
-
* as pub/sub
|
|
9
|
+
* as pub/sub.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* the layer scope ends, so install the layer at the lifetime you want for the
|
|
13
|
-
* connection and pass a Redis URL, Bun `RedisOptions`, or `layerConfig` for
|
|
14
|
-
* connection settings. The portable `Redis` service sends ordinary commands
|
|
15
|
-
* through `RedisClient.send`; pub/sub is available through `BunRedis.client`
|
|
16
|
-
* or `BunRedis.use` and should normally use a separately scoped client so a
|
|
17
|
-
* subscription does not interfere with command traffic used by persistence or
|
|
18
|
-
* rate limiter stores.
|
|
11
|
+
* **Mental model**
|
|
19
12
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
13
|
+
* `layer` and `layerConfig` acquire one `RedisClient` for the layer scope. The
|
|
14
|
+
* same client backs the portable `Redis.Redis` command interface and the
|
|
15
|
+
* `BunRedis` service, and it is closed with `close` when the scope finalizes.
|
|
16
|
+
* Install the layer at the lifetime you want for that connection.
|
|
17
|
+
*
|
|
18
|
+
* **Common tasks**
|
|
19
|
+
*
|
|
20
|
+
* Pass a Redis URL or Bun `RedisOptions` to `layer` for direct configuration,
|
|
21
|
+
* or use `layerConfig` when connection settings should come from Effect
|
|
22
|
+
* configuration. Depend on `Redis.Redis` for persistence and rate limiter
|
|
23
|
+
* stores. Depend on `BunRedis` when you need `RedisClient` features that are
|
|
24
|
+
* not exposed by the portable service, including custom commands and pub/sub.
|
|
25
|
+
*
|
|
26
|
+
* **Gotchas**
|
|
27
|
+
*
|
|
28
|
+
* Pub/sub should normally use a separately scoped client so a subscription does
|
|
29
|
+
* not interfere with ordinary command traffic. Persistence and rate limiter
|
|
30
|
+
* stores build keys and Lua scripts on top of this service, so choose stable
|
|
31
|
+
* prefixes and store ids, account for persisted values that may fail to decode
|
|
32
|
+
* after schema changes, and avoid unbounded high-cardinality rate-limit keys
|
|
33
|
+
* without a cleanup or bounding strategy.
|
|
25
34
|
*
|
|
26
35
|
* @since 4.0.0
|
|
27
36
|
*/
|
package/dist/BunRedis.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunRedis.d.ts","sourceRoot":"","sources":["../src/BunRedis.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BunRedis.d.ts","sourceRoot":"","sources":["../src/BunRedis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;;qBASvC,WAAW;kBACd,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;;AARjG;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,aAGO;CAAG;AAmCxC;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAChB,UAAU,CAAC;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,GAAG,SAAS,KAC/D,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAuC,CAAA;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GACtB,SAAS,MAAM,CAAC,IAAI,CAAC;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,KAC7D,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,EAAE,MAAM,CAAC,WAAW,CAKtD,CAAA"}
|
package/dist/BunRedis.js
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bun Redis integration backed by Bun's built-in `RedisClient`.
|
|
3
3
|
*
|
|
4
|
-
* This module
|
|
5
|
-
* both the
|
|
6
|
-
* `BunRedis` service for direct access to the
|
|
7
|
-
* applications that need Redis-backed persistence, persisted queues,
|
|
4
|
+
* This module creates scoped Bun `RedisClient` connections and exposes them as
|
|
5
|
+
* both the portable `Redis` service used by Effect persistence modules and the
|
|
6
|
+
* Bun-specific `BunRedis` service for direct access to the raw client. Use it in
|
|
7
|
+
* Bun applications that need Redis-backed persistence, persisted queues,
|
|
8
8
|
* distributed rate limiting, custom Redis commands, or Bun Redis features such
|
|
9
|
-
* as pub/sub
|
|
9
|
+
* as pub/sub.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* the layer scope ends, so install the layer at the lifetime you want for the
|
|
13
|
-
* connection and pass a Redis URL, Bun `RedisOptions`, or `layerConfig` for
|
|
14
|
-
* connection settings. The portable `Redis` service sends ordinary commands
|
|
15
|
-
* through `RedisClient.send`; pub/sub is available through `BunRedis.client`
|
|
16
|
-
* or `BunRedis.use` and should normally use a separately scoped client so a
|
|
17
|
-
* subscription does not interfere with command traffic used by persistence or
|
|
18
|
-
* rate limiter stores.
|
|
11
|
+
* **Mental model**
|
|
19
12
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
13
|
+
* `layer` and `layerConfig` acquire one `RedisClient` for the layer scope. The
|
|
14
|
+
* same client backs the portable `Redis.Redis` command interface and the
|
|
15
|
+
* `BunRedis` service, and it is closed with `close` when the scope finalizes.
|
|
16
|
+
* Install the layer at the lifetime you want for that connection.
|
|
17
|
+
*
|
|
18
|
+
* **Common tasks**
|
|
19
|
+
*
|
|
20
|
+
* Pass a Redis URL or Bun `RedisOptions` to `layer` for direct configuration,
|
|
21
|
+
* or use `layerConfig` when connection settings should come from Effect
|
|
22
|
+
* configuration. Depend on `Redis.Redis` for persistence and rate limiter
|
|
23
|
+
* stores. Depend on `BunRedis` when you need `RedisClient` features that are
|
|
24
|
+
* not exposed by the portable service, including custom commands and pub/sub.
|
|
25
|
+
*
|
|
26
|
+
* **Gotchas**
|
|
27
|
+
*
|
|
28
|
+
* Pub/sub should normally use a separately scoped client so a subscription does
|
|
29
|
+
* not interfere with ordinary command traffic. Persistence and rate limiter
|
|
30
|
+
* stores build keys and Lua scripts on top of this service, so choose stable
|
|
31
|
+
* prefixes and store ids, account for persisted values that may fail to decode
|
|
32
|
+
* after schema changes, and avoid unbounded high-cardinality rate-limit keys
|
|
33
|
+
* without a cleanup or bounding strategy.
|
|
25
34
|
*
|
|
26
35
|
* @since 4.0.0
|
|
27
36
|
*/
|
package/dist/BunRedis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunRedis.js","names":["RedisClient","Config","Context","Effect","Fn","Layer","Scope","Redis","BunRedis","Service","make","fnUntraced","options","scope","addFinalizer","sync","client","close","url","use","f","tryPromise","try","catch","cause","RedisError","redis","send","command","args","bunRedis","identity","pipe","add","layer","effectContext","layerConfig","unwrap","flatMap"],"sources":["../src/BunRedis.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BunRedis.js","names":["RedisClient","Config","Context","Effect","Fn","Layer","Scope","Redis","BunRedis","Service","make","fnUntraced","options","scope","addFinalizer","sync","client","close","url","use","f","tryPromise","try","catch","cause","RedisError","redis","send","command","args","bunRedis","identity","pipe","add","layer","effectContext","layerConfig","unwrap","flatMap"],"sources":["../src/BunRedis.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAASA,WAAW,QAA2B,KAAK;AACpD,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,EAAE,MAAM,iBAAiB;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,mCAAmC;AAE1D;;;;;;AAMA,OAAM,MAAOC,QAAS,sBAAQN,OAAO,CAACO,OAAO,EAGzC,CAAC,+BAA+B,CAAC;AAErC,MAAMC,IAAI,gBAAGP,MAAM,CAACQ,UAAU,CAAC,WAC7BC,OAEgB;EAEhB,MAAMC,KAAK,GAAG,OAAOV,MAAM,CAACU,KAAK;EACjC,OAAOP,KAAK,CAACQ,YAAY,CAACD,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O,CAAC,CAACoB,IAAI,CACzB7B,MAAM,CAACmC,OAAO,CAAC5B,IAAI,CAAC,CACrB,CACF","ignoreList":[]}
|
package/dist/BunRuntime.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Teardown } from "effect/Runtime";
|
|
|
5
5
|
*
|
|
6
6
|
* **When to use**
|
|
7
7
|
*
|
|
8
|
-
* Use
|
|
8
|
+
* Use to run an Effect as your application's main program,
|
|
9
9
|
* especially when you need structured error handling, log management,
|
|
10
10
|
* interrupt support, or advanced teardown capabilities.
|
|
11
11
|
*
|
|
@@ -31,7 +31,7 @@ export declare const runMain: {
|
|
|
31
31
|
*
|
|
32
32
|
* **When to use**
|
|
33
33
|
*
|
|
34
|
-
* Use
|
|
34
|
+
* Use to run an Effect as your application's main program,
|
|
35
35
|
* especially when you need structured error handling, log management,
|
|
36
36
|
* interrupt support, or advanced teardown capabilities.
|
|
37
37
|
*
|
|
@@ -60,7 +60,7 @@ export declare const runMain: {
|
|
|
60
60
|
*
|
|
61
61
|
* **When to use**
|
|
62
62
|
*
|
|
63
|
-
* Use
|
|
63
|
+
* Use to run an Effect as your application's main program,
|
|
64
64
|
* especially when you need structured error handling, log management,
|
|
65
65
|
* interrupt support, or advanced teardown capabilities.
|
|
66
66
|
*
|
package/dist/BunRuntime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunRuntime.d.ts","sourceRoot":"","sources":["../src/BunRuntime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BunRuntime.d.ts","sourceRoot":"","sources":["../src/BunRuntime.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,CACE,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KACzC,GACA,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAA;IACvC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,CAAC,CAAC,EAAE,CAAC,EACH,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KACzC,GACA,IAAI,CAAA;CACc,CAAA"}
|
package/dist/BunRuntime.js
CHANGED
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Bun
|
|
3
|
-
*
|
|
4
|
-
* This module exposes `runMain
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
2
|
+
* Bun process runner for Effect programs.
|
|
3
|
+
*
|
|
4
|
+
* This module exposes Bun's `runMain` entry point. It is the function to call
|
|
5
|
+
* at the outer edge of a Bun CLI, script, server, or worker when a single
|
|
6
|
+
* Effect should become the process main fiber and use Bun's Node-compatible
|
|
7
|
+
* process, signal, and teardown behavior.
|
|
8
|
+
*
|
|
9
|
+
* **Mental model**
|
|
10
|
+
*
|
|
11
|
+
* `runMain` delegates to the shared Node-compatible runner. It starts the
|
|
12
|
+
* supplied Effect as the process root, reports failures through the configured
|
|
13
|
+
* runtime reporting, and translates `SIGINT` or `SIGTERM` into interruption so
|
|
14
|
+
* scoped resources can finalize before teardown chooses an exit code.
|
|
15
|
+
*
|
|
16
|
+
* **Common tasks**
|
|
17
|
+
*
|
|
18
|
+
* - Launch a Bun CLI or one-off script from an Effect.
|
|
19
|
+
* - Start a long-running Bun server or worker under an Effect scope.
|
|
20
|
+
* - Customize error reporting or teardown with `runMain` options.
|
|
21
|
+
* - Provide `BunServices.layer` or narrower layers before calling `runMain`.
|
|
22
|
+
*
|
|
23
|
+
* **Gotchas**
|
|
24
|
+
*
|
|
25
|
+
* This module runs the program; it does not provide filesystem, network,
|
|
26
|
+
* terminal, or other platform services. Long-lived servers, subscriptions, and
|
|
27
|
+
* worker loops should be acquired in Effect scopes so interruption from process
|
|
28
|
+
* signals can release them. Finalizers that never complete can keep shutdown
|
|
29
|
+
* waiting.
|
|
17
30
|
*
|
|
18
31
|
* @since 4.0.0
|
|
19
32
|
*/
|
|
@@ -23,7 +36,7 @@ import * as NodeRuntime from "@effect/platform-node-shared/NodeRuntime";
|
|
|
23
36
|
*
|
|
24
37
|
* **When to use**
|
|
25
38
|
*
|
|
26
|
-
* Use
|
|
39
|
+
* Use to run an Effect as your application's main program,
|
|
27
40
|
* especially when you need structured error handling, log management,
|
|
28
41
|
* interrupt support, or advanced teardown capabilities.
|
|
29
42
|
*
|
package/dist/BunRuntime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunRuntime.js","names":["NodeRuntime","runMain"],"sources":["../src/BunRuntime.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BunRuntime.js","names":["NodeRuntime","runMain"],"sources":["../src/BunRuntime.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,KAAKA,WAAW,MAAM,0CAA0C;AAIvE;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMC,OAAO,GAgEhBD,WAAW,CAACC,OAAO","ignoreList":[]}
|
package/dist/BunStdio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunStdio.d.ts","sourceRoot":"","sources":["../src/BunStdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BunStdio.d.ts","sourceRoot":"","sources":["../src/BunStdio.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAmB,CAAA"}
|
package/dist/BunStdio.js
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Process stdio for Bun applications.
|
|
3
3
|
*
|
|
4
|
-
* This module provides the
|
|
5
|
-
* the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
* This module provides the Bun layer for Effect's `Stdio` service by adapting
|
|
5
|
+
* the current process arguments and standard streams. Arguments come from
|
|
6
|
+
* `process.argv`, input is read from `process.stdin`, and output and error
|
|
7
|
+
* output write to `process.stdout` and `process.stderr`.
|
|
8
|
+
*
|
|
9
|
+
* **Mental model**
|
|
10
|
+
*
|
|
11
|
+
* `BunStdio.layer` is a thin Bun-facing wrapper around the shared
|
|
12
|
+
* Node-compatible stdio implementation. It does not create private streams for
|
|
13
|
+
* an application; it exposes the global streams owned by the running Bun
|
|
14
|
+
* process through the `Stdio` service.
|
|
15
|
+
*
|
|
16
|
+
* **Common tasks**
|
|
17
|
+
*
|
|
18
|
+
* - Provide `Stdio` for Bun CLIs, scripts, command runners, and tests.
|
|
19
|
+
* - Read process arguments or standard input through Effect services.
|
|
20
|
+
* - Write normal output and diagnostics without depending directly on
|
|
21
|
+
* `process.stdout` or `process.stderr`.
|
|
22
|
+
*
|
|
23
|
+
* **Gotchas**
|
|
11
24
|
*
|
|
12
|
-
* The underlying stdio streams are global resources owned by the Bun process.
|
|
13
25
|
* The layer keeps stdin open and does not end stdout or stderr by default,
|
|
14
26
|
* which avoids closing handles that prompts, loggers, or other code may still
|
|
15
27
|
* use. Stdio may be attached to a TTY, pipe, or redirected file, so
|
|
16
28
|
* terminal-specific behavior such as raw mode, echo, colors, cursor control,
|
|
17
|
-
* and terminal dimensions should be
|
|
18
|
-
*
|
|
29
|
+
* and terminal dimensions should be handled with terminal APIs such as
|
|
30
|
+
* `BunTerminal`, not inferred from this layer.
|
|
19
31
|
*
|
|
20
32
|
* @since 4.0.0
|
|
21
33
|
*/
|
package/dist/BunStdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunStdio.js","names":["NodeStdio","layer"],"sources":["../src/BunStdio.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BunStdio.js","names":["NodeStdio","layer"],"sources":["../src/BunStdio.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,KAAKA,SAAS,MAAM,wCAAwC;AAInE;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAAuBD,SAAS,CAACC,KAAK","ignoreList":[]}
|
package/dist/BunStream.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import * as Stream from "effect/Stream";
|
|
|
5
5
|
*/
|
|
6
6
|
export * from "@effect/platform-node-shared/NodeStream";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* .
|
|
8
|
+
* Creates a stream from a `ReadableStream` using Bun's optimized `.readMany`
|
|
9
|
+
* API.
|
|
10
10
|
*
|
|
11
11
|
* @category constructors
|
|
12
12
|
* @since 4.0.0
|
package/dist/BunStream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunStream.d.ts","sourceRoot":"","sources":["../src/BunStream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BunStream.d.ts","sourceRoot":"","sources":["../src/BunStream.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAG9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC;;GAEG;AACH,cAAc,yCAAyC,CAAA;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,CAAC,EACrC,SAAS;IACP,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7C,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;IACvC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAChD,KACA,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CA6Bf,CAAA"}
|