@effect/platform-bun 4.0.0-beta.67 → 4.0.0-beta.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/BunClusterHttp.d.ts +3 -3
  2. package/dist/BunClusterHttp.js +3 -3
  3. package/dist/BunClusterSocket.d.ts +4 -4
  4. package/dist/BunClusterSocket.js +4 -4
  5. package/dist/BunCrypto.d.ts +10 -0
  6. package/dist/BunCrypto.d.ts.map +1 -0
  7. package/dist/BunCrypto.js +14 -0
  8. package/dist/BunCrypto.js.map +1 -0
  9. package/dist/BunFileSystem.d.ts +1 -1
  10. package/dist/BunFileSystem.js +1 -1
  11. package/dist/BunHttpPlatform.d.ts +1 -1
  12. package/dist/BunHttpPlatform.js +1 -1
  13. package/dist/BunHttpServer.d.ts +6 -6
  14. package/dist/BunHttpServer.js +6 -6
  15. package/dist/BunMultipart.d.ts +2 -2
  16. package/dist/BunMultipart.js +2 -2
  17. package/dist/BunPath.d.ts +3 -3
  18. package/dist/BunPath.js +3 -3
  19. package/dist/BunRedis.d.ts +3 -3
  20. package/dist/BunRedis.js +3 -3
  21. package/dist/BunRuntime.d.ts +3 -3
  22. package/dist/BunRuntime.js +1 -1
  23. package/dist/BunServices.d.ts +3 -2
  24. package/dist/BunServices.d.ts.map +1 -1
  25. package/dist/BunServices.js +3 -2
  26. package/dist/BunServices.js.map +1 -1
  27. package/dist/BunStdio.d.ts +1 -1
  28. package/dist/BunStdio.js +1 -1
  29. package/dist/BunStream.d.ts +1 -0
  30. package/dist/BunStream.d.ts.map +1 -1
  31. package/dist/BunStream.js +1 -0
  32. package/dist/BunStream.js.map +1 -1
  33. package/dist/index.d.ts +375 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +375 -0
  36. package/dist/index.js.map +1 -1
  37. package/package.json +4 -4
  38. package/src/BunClusterHttp.ts +3 -3
  39. package/src/BunClusterSocket.ts +4 -4
  40. package/src/BunCrypto.ts +16 -0
  41. package/src/BunFileSystem.ts +1 -1
  42. package/src/BunHttpPlatform.ts +1 -1
  43. package/src/BunHttpServer.ts +6 -6
  44. package/src/BunMultipart.ts +2 -2
  45. package/src/BunPath.ts +3 -3
  46. package/src/BunRedis.ts +3 -3
  47. package/src/BunRuntime.ts +3 -3
  48. package/src/BunServices.ts +5 -2
  49. package/src/BunStdio.ts +1 -1
  50. package/src/BunStream.ts +1 -0
  51. package/src/index.ts +376 -0
@@ -50,21 +50,21 @@ import { layerK8sHttpClient } from "./BunClusterSocket.ts";
50
50
  import type { BunServices } from "./BunServices.ts";
51
51
  export {
52
52
  /**
53
- * @category Re-exports
53
+ * @category re-exports
54
54
  * @since 4.0.0
55
55
  */
56
56
  layerK8sHttpClient };
57
57
  /**
58
58
  * Bun HTTP server layer for cluster runners, using `ShardingConfig.runnerListenAddress` or `runnerAddress` as the listen address.
59
59
  *
60
- * @category Layers
60
+ * @category layers
61
61
  * @since 4.0.0
62
62
  */
63
63
  export declare const layerHttpServer: Layer.Layer<HttpPlatform | Etag.Generator | BunServices | HttpServer, ServeError, ShardingConfig.ShardingConfig>;
64
64
  /**
65
65
  * Creates Bun cluster layers for HTTP or WebSocket transport, configuring serialization, storage, runner health, and optional client-only mode.
66
66
  *
67
- * @category Layers
67
+ * @category layers
68
68
  * @since 4.0.0
69
69
  */
70
70
  export declare const layer: <const ClientOnly extends boolean = false, const Storage extends "local" | "sql" | "byo" = never>(options: {
@@ -17,14 +17,14 @@ import * as BunHttpServer from "./BunHttpServer.js";
17
17
  import * as BunSocket from "./BunSocket.js";
18
18
  export {
19
19
  /**
20
- * @category Re-exports
20
+ * @category re-exports
21
21
  * @since 4.0.0
22
22
  */
23
23
  layerK8sHttpClient };
24
24
  /**
25
25
  * Bun HTTP server layer for cluster runners, using `ShardingConfig.runnerListenAddress` or `runnerAddress` as the listen address.
26
26
  *
27
- * @category Layers
27
+ * @category layers
28
28
  * @since 4.0.0
29
29
  */
30
30
  export const layerHttpServer = /*#__PURE__*/Effect.gen(function* () {
@@ -38,7 +38,7 @@ export const layerHttpServer = /*#__PURE__*/Effect.gen(function* () {
38
38
  /**
39
39
  * Creates Bun cluster layers for HTTP or WebSocket transport, configuring serialization, storage, runner health, and optional client-only mode.
40
40
  *
41
- * @category Layers
41
+ * @category layers
42
42
  * @since 4.0.0
43
43
  */
44
44
  export const layer = options => {
@@ -49,19 +49,19 @@ import type * as SocketServer from "effect/unstable/socket/SocketServer";
49
49
  import type { SqlClient } from "effect/unstable/sql/SqlClient";
50
50
  export {
51
51
  /**
52
- * @category Re-exports
52
+ * @category re-exports
53
53
  * @since 4.0.0
54
54
  */
55
55
  layerClientProtocol,
56
56
  /**
57
- * @category Re-exports
57
+ * @category re-exports
58
58
  * @since 4.0.0
59
59
  */
60
60
  layerSocketServer };
61
61
  /**
62
62
  * Creates Bun socket cluster layers, configuring serialization, storage, runner health, and optional client-only mode.
63
63
  *
64
- * @category Layers
64
+ * @category layers
65
65
  * @since 4.0.0
66
66
  */
67
67
  export declare const layer: <const ClientOnly extends boolean = false, const Storage extends "local" | "sql" | "byo" = never>(options?: {
@@ -78,7 +78,7 @@ export declare const layer: <const ClientOnly extends boolean = false, const Sto
78
78
  /**
79
79
  * Layer that provides `K8sHttpClient`, using the Kubernetes service-account CA certificate when it is available.
80
80
  *
81
- * @category Layers
81
+ * @category layers
82
82
  * @since 4.0.0
83
83
  */
84
84
  export declare const layerK8sHttpClient: Layer.Layer<K8sHttpClient.K8sHttpClient>;
@@ -54,19 +54,19 @@ import * as RpcSerialization from "effect/unstable/rpc/RpcSerialization";
54
54
  import * as BunFileSystem from "./BunFileSystem.js";
55
55
  export {
56
56
  /**
57
- * @category Re-exports
57
+ * @category re-exports
58
58
  * @since 4.0.0
59
59
  */
60
60
  layerClientProtocol,
61
61
  /**
62
- * @category Re-exports
62
+ * @category re-exports
63
63
  * @since 4.0.0
64
64
  */
65
65
  layerSocketServer };
66
66
  /**
67
67
  * Creates Bun socket cluster layers, configuring serialization, storage, runner health, and optional client-only mode.
68
68
  *
69
- * @category Layers
69
+ * @category layers
70
70
  * @since 4.0.0
71
71
  */
72
72
  export const layer = options => {
@@ -81,7 +81,7 @@ export const layer = options => {
81
81
  /**
82
82
  * Layer that provides `K8sHttpClient`, using the Kubernetes service-account CA certificate when it is available.
83
83
  *
84
- * @category Layers
84
+ * @category layers
85
85
  * @since 4.0.0
86
86
  */
87
87
  export const layerK8sHttpClient = /*#__PURE__*/K8sHttpClient.layer.pipe(/*#__PURE__*/Layer.provide(/*#__PURE__*/Layer.unwrap(/*#__PURE__*/Effect.gen(function* () {
@@ -0,0 +1,10 @@
1
+ import type * as Crypto from "effect/Crypto";
2
+ import type * as Layer from "effect/Layer";
3
+ /**
4
+ * A layer that provides the Bun Crypto service implementation.
5
+ *
6
+ * @category layers
7
+ * @since 1.0.0
8
+ */
9
+ export declare const layer: Layer.Layer<Crypto.Crypto>;
10
+ //# sourceMappingURL=BunCrypto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BunCrypto.d.ts","sourceRoot":"","sources":["../src/BunCrypto.ts"],"names":[],"mappings":"AAMA,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"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Bun platform Crypto service layer.
3
+ *
4
+ * @since 1.0.0
5
+ */
6
+ import * as NodeCrypto from "@effect/platform-node-shared/NodeCrypto";
7
+ /**
8
+ * A layer that provides the Bun Crypto service implementation.
9
+ *
10
+ * @category layers
11
+ * @since 1.0.0
12
+ */
13
+ export const layer = NodeCrypto.layer;
14
+ //# sourceMappingURL=BunCrypto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BunCrypto.js","names":["NodeCrypto","layer"],"sources":["../src/BunCrypto.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,OAAO,KAAKA,UAAU,MAAM,yCAAyC;AAIrE;;;;;;AAMA,OAAO,MAAMC,KAAK,GAA+BD,UAAU,CAACC,KAAK","ignoreList":[]}
@@ -3,7 +3,7 @@ import type * as Layer from "effect/Layer";
3
3
  /**
4
4
  * Layer that provides the `FileSystem` service for Bun using the shared Node file-system implementation.
5
5
  *
6
- * @category layer
6
+ * @category layers
7
7
  * @since 4.0.0
8
8
  */
9
9
  export declare const layer: Layer.Layer<FileSystem, never, never>;
@@ -27,7 +27,7 @@ import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem";
27
27
  /**
28
28
  * Layer that provides the `FileSystem` service for Bun using the shared Node file-system implementation.
29
29
  *
30
- * @category layer
30
+ * @category layers
31
31
  * @since 4.0.0
32
32
  */
33
33
  export const layer = NodeFileSystem.layer;
@@ -3,7 +3,7 @@ import * as Platform from "effect/unstable/http/HttpPlatform";
3
3
  /**
4
4
  * Layer that provides the Bun `HttpPlatform`, including file responses backed by `Bun.file`.
5
5
  *
6
- * @category Layers
6
+ * @category layers
7
7
  * @since 4.0.0
8
8
  */
9
9
  export declare const layer: Layer.Layer<Platform.HttpPlatform, never, never>;
@@ -30,7 +30,7 @@ const make = /*#__PURE__*/Platform.make({
30
30
  /**
31
31
  * Layer that provides the Bun `HttpPlatform`, including file responses backed by `Bun.file`.
32
32
  *
33
- * @category Layers
33
+ * @category layers
34
34
  * @since 4.0.0
35
35
  */
36
36
  export const layer = /*#__PURE__*/Layer.effect(Platform.HttpPlatform)(make).pipe(/*#__PURE__*/Layer.provide(BunFileSystem.layer), /*#__PURE__*/Layer.provide(Etag.layer));
@@ -62,7 +62,7 @@ export type ServeOptions<R extends string> = (Bun.Serve.UnixServeOptions<WebSock
62
62
  /**
63
63
  * Creates a scoped Bun `HttpServer` from `Bun.serve` options, stopping the server on scope finalization with optional graceful shutdown settings.
64
64
  *
65
- * @category Constructors
65
+ * @category constructors
66
66
  * @since 4.0.0
67
67
  */
68
68
  export declare const make: <R extends string>(options: ServeOptions<R> & {
@@ -78,7 +78,7 @@ export declare const make: <R extends string>(options: ServeOptions<R> & {
78
78
  /**
79
79
  * Layer that provides only `HttpServer` by constructing a scoped Bun server from the supplied serve options.
80
80
  *
81
- * @category Layers
81
+ * @category layers
82
82
  * @since 4.0.0
83
83
  */
84
84
  export declare const layerServer: <R extends string>(options: ServeOptions<R> & {
@@ -88,14 +88,14 @@ export declare const layerServer: <R extends string>(options: ServeOptions<R> &
88
88
  /**
89
89
  * Layer that provides Bun HTTP support services: `HttpPlatform`, weak ETag generation, and `BunServices`.
90
90
  *
91
- * @category Layers
91
+ * @category layers
92
92
  * @since 4.0.0
93
93
  */
94
94
  export declare const layerHttpServices: Layer.Layer<HttpPlatform | Etag.Generator | BunServices.BunServices>;
95
95
  /**
96
96
  * Layer that provides a Bun `HttpServer` together with the Bun HTTP platform, ETag generator, and Bun services.
97
97
  *
98
- * @category Layers
98
+ * @category layers
99
99
  * @since 4.0.0
100
100
  */
101
101
  export declare const layer: <R extends string>(options: ServeOptions<R> & {
@@ -105,14 +105,14 @@ export declare const layer: <R extends string>(options: ServeOptions<R> & {
105
105
  /**
106
106
  * Test layer that starts a Bun HTTP server on an ephemeral port and provides the HTTP test client dependencies.
107
107
  *
108
- * @category Layers
108
+ * @category layers
109
109
  * @since 4.0.0
110
110
  */
111
111
  export declare const layerTest: Layer.Layer<Server.HttpServer | HttpPlatform | FileSystem.FileSystem | Etag.Generator | Path.Path | HttpClient>;
112
112
  /**
113
113
  * Creates the Bun HTTP server and support-services layer from configurable serve options.
114
114
  *
115
- * @category Layers
115
+ * @category layers
116
116
  * @since 4.0.0
117
117
  */
118
118
  export declare const layerConfig: <R extends string>(options: Config.Wrap<ServeOptions<R> & {
@@ -31,7 +31,7 @@ import * as BunStream from "./BunStream.js";
31
31
  /**
32
32
  * Creates a scoped Bun `HttpServer` from `Bun.serve` options, stopping the server on scope finalization with optional graceful shutdown settings.
33
33
  *
34
- * @category Constructors
34
+ * @category constructors
35
35
  * @since 4.0.0
36
36
  */
37
37
  export const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
@@ -159,28 +159,28 @@ const makeResponse = (request, response, context, scope) => {
159
159
  /**
160
160
  * Layer that provides only `HttpServer` by constructing a scoped Bun server from the supplied serve options.
161
161
  *
162
- * @category Layers
162
+ * @category layers
163
163
  * @since 4.0.0
164
164
  */
165
165
  export const layerServer = /*#__PURE__*/flow(make, /*#__PURE__*/Layer.effect(Server.HttpServer));
166
166
  /**
167
167
  * Layer that provides Bun HTTP support services: `HttpPlatform`, weak ETag generation, and `BunServices`.
168
168
  *
169
- * @category Layers
169
+ * @category layers
170
170
  * @since 4.0.0
171
171
  */
172
172
  export const layerHttpServices = /*#__PURE__*/Layer.mergeAll(Platform.layer, Etag.layerWeak, BunServices.layer);
173
173
  /**
174
174
  * Layer that provides a Bun `HttpServer` together with the Bun HTTP platform, ETag generator, and Bun services.
175
175
  *
176
- * @category Layers
176
+ * @category layers
177
177
  * @since 4.0.0
178
178
  */
179
179
  export const layer = options => Layer.mergeAll(layerServer(options), layerHttpServices);
180
180
  /**
181
181
  * Test layer that starts a Bun HTTP server on an ephemeral port and provides the HTTP test client dependencies.
182
182
  *
183
- * @category Layers
183
+ * @category layers
184
184
  * @since 4.0.0
185
185
  */
186
186
  export const layerTest = /*#__PURE__*/Server.layerTestClient.pipe(/*#__PURE__*/Layer.provide(/*#__PURE__*/FetchHttpClient.layer.pipe(/*#__PURE__*/Layer.provide(/*#__PURE__*/Layer.succeed(FetchHttpClient.RequestInit)({
@@ -191,7 +191,7 @@ export const layerTest = /*#__PURE__*/Server.layerTestClient.pipe(/*#__PURE__*/L
191
191
  /**
192
192
  * Creates the Bun HTTP server and support-services layer from configurable serve options.
193
193
  *
194
- * @category Layers
194
+ * @category layers
195
195
  * @since 4.0.0
196
196
  */
197
197
  export const layerConfig = options => Layer.mergeAll(Layer.effect(Server.HttpServer)(Effect.flatMap(Config.unwrap(options), make)), layerHttpServices);
@@ -29,14 +29,14 @@ import * as Multipart from "effect/unstable/http/Multipart";
29
29
  /**
30
30
  * Parses a Bun `Request` body as multipart data and returns a stream of multipart parts.
31
31
  *
32
- * @category Constructors
32
+ * @category constructors
33
33
  * @since 4.0.0
34
34
  */
35
35
  export declare const stream: (source: Request) => Stream.Stream<Multipart.Part, Multipart.MultipartError>;
36
36
  /**
37
37
  * Parses and persists multipart data from a Bun `Request`, requiring file-system, path, and scope services.
38
38
  *
39
- * @category Constructors
39
+ * @category constructors
40
40
  * @since 4.0.0
41
41
  */
42
42
  export declare const persisted: (source: Request) => Effect.Effect<Multipart.Persisted, Multipart.MultipartError, FileSystem | Path | Scope.Scope>;
@@ -4,7 +4,7 @@ import * as BunStream from "./BunStream.js";
4
4
  /**
5
5
  * Parses a Bun `Request` body as multipart data and returns a stream of multipart parts.
6
6
  *
7
- * @category Constructors
7
+ * @category constructors
8
8
  * @since 4.0.0
9
9
  */
10
10
  export const stream = source => BunStream.fromReadableStream({
@@ -20,7 +20,7 @@ const emptyReadbleStream = /*#__PURE__*/new ReadableStream({
20
20
  /**
21
21
  * Parses and persists multipart data from a Bun `Request`, requiring file-system, path, and scope services.
22
22
  *
23
- * @category Constructors
23
+ * @category constructors
24
24
  * @since 4.0.0
25
25
  */
26
26
  export const persisted = source => Multipart.toPersisted(stream(source));
package/dist/BunPath.d.ts CHANGED
@@ -3,21 +3,21 @@ import type { Path } from "effect/Path";
3
3
  /**
4
4
  * Layer that provides the default `Path` service for Bun using the shared Node path implementation.
5
5
  *
6
- * @category layer
6
+ * @category layers
7
7
  * @since 4.0.0
8
8
  */
9
9
  export declare const layer: Layer.Layer<Path>;
10
10
  /**
11
11
  * Layer that provides the POSIX `Path` service for Bun using the shared Node path implementation.
12
12
  *
13
- * @category layer
13
+ * @category layers
14
14
  * @since 4.0.0
15
15
  */
16
16
  export declare const layerPosix: Layer.Layer<Path>;
17
17
  /**
18
18
  * Layer that provides the Win32 `Path` service for Bun using the shared Node path implementation.
19
19
  *
20
- * @category layer
20
+ * @category layers
21
21
  * @since 4.0.0
22
22
  */
23
23
  export declare const layerWin32: Layer.Layer<Path>;
package/dist/BunPath.js CHANGED
@@ -22,21 +22,21 @@ import * as NodePath from "@effect/platform-node-shared/NodePath";
22
22
  /**
23
23
  * Layer that provides the default `Path` service for Bun using the shared Node path implementation.
24
24
  *
25
- * @category layer
25
+ * @category layers
26
26
  * @since 4.0.0
27
27
  */
28
28
  export const layer = NodePath.layer;
29
29
  /**
30
30
  * Layer that provides the POSIX `Path` service for Bun using the shared Node path implementation.
31
31
  *
32
- * @category layer
32
+ * @category layers
33
33
  * @since 4.0.0
34
34
  */
35
35
  export const layerPosix = NodePath.layerPosix;
36
36
  /**
37
37
  * Layer that provides the Win32 `Path` service for Bun using the shared Node path implementation.
38
38
  *
39
- * @category layer
39
+ * @category layers
40
40
  * @since 4.0.0
41
41
  */
42
42
  export const layerWin32 = NodePath.layerWin32;
@@ -38,7 +38,7 @@ declare const BunRedis_base: Context.ServiceClass<BunRedis, "@effect/platform-bu
38
38
  /**
39
39
  * Service tag for Bun Redis integration, exposing the raw `RedisClient` and a `use` helper that maps client promise failures to `RedisError`.
40
40
  *
41
- * @category Service
41
+ * @category services
42
42
  * @since 4.0.0
43
43
  */
44
44
  export declare class BunRedis extends BunRedis_base {
@@ -46,7 +46,7 @@ export declare class BunRedis extends BunRedis_base {
46
46
  /**
47
47
  * Creates scoped Bun Redis layers for `Redis.Redis` and `BunRedis`, closing the underlying client when the scope finalizes.
48
48
  *
49
- * @category Layers
49
+ * @category layers
50
50
  * @since 4.0.0
51
51
  */
52
52
  export declare const layer: (options?: ({
@@ -55,7 +55,7 @@ export declare const layer: (options?: ({
55
55
  /**
56
56
  * Creates scoped Bun Redis layers from configurable Redis options, closing the underlying client when the scope finalizes.
57
57
  *
58
- * @category Layers
58
+ * @category layers
59
59
  * @since 4.0.0
60
60
  */
61
61
  export declare const layerConfig: (options: Config.Wrap<{
package/dist/BunRedis.js CHANGED
@@ -36,7 +36,7 @@ import * as Redis from "effect/unstable/persistence/Redis";
36
36
  /**
37
37
  * Service tag for Bun Redis integration, exposing the raw `RedisClient` and a `use` helper that maps client promise failures to `RedisError`.
38
38
  *
39
- * @category Service
39
+ * @category services
40
40
  * @since 4.0.0
41
41
  */
42
42
  export class BunRedis extends /*#__PURE__*/Context.Service()("@effect/platform-bun/BunRedis") {}
@@ -67,14 +67,14 @@ const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
67
67
  /**
68
68
  * Creates scoped Bun Redis layers for `Redis.Redis` and `BunRedis`, closing the underlying client when the scope finalizes.
69
69
  *
70
- * @category Layers
70
+ * @category layers
71
71
  * @since 4.0.0
72
72
  */
73
73
  export const layer = options => Layer.effectContext(make(options));
74
74
  /**
75
75
  * Creates scoped Bun Redis layers from configurable Redis options, closing the underlying client when the scope finalizes.
76
76
  *
77
- * @category Layers
77
+ * @category layers
78
78
  * @since 4.0.0
79
79
  */
80
80
  export const layerConfig = options => Layer.effectContext(Config.unwrap(options).pipe(Effect.flatMap(make)));
@@ -24,7 +24,7 @@ import type { Teardown } from "effect/Runtime";
24
24
  * when you need structured error handling, log management, interrupt support,
25
25
  * or advanced teardown capabilities.
26
26
  *
27
- * @category Run main
27
+ * @category running
28
28
  * @since 4.0.0
29
29
  */
30
30
  export declare const runMain: {
@@ -52,7 +52,7 @@ export declare const runMain: {
52
52
  * when you need structured error handling, log management, interrupt support,
53
53
  * or advanced teardown capabilities.
54
54
  *
55
- * @category Run main
55
+ * @category running
56
56
  * @since 4.0.0
57
57
  */
58
58
  (options?: {
@@ -83,7 +83,7 @@ export declare const runMain: {
83
83
  * when you need structured error handling, log management, interrupt support,
84
84
  * or advanced teardown capabilities.
85
85
  *
86
- * @category Run main
86
+ * @category running
87
87
  * @since 4.0.0
88
88
  */
89
89
  <E, A>(effect: Effect<A, E>, options?: {
@@ -42,7 +42,7 @@ import * as NodeRuntime from "@effect/platform-node-shared/NodeRuntime";
42
42
  * when you need structured error handling, log management, interrupt support,
43
43
  * or advanced teardown capabilities.
44
44
  *
45
- * @category Run main
45
+ * @category running
46
46
  * @since 4.0.0
47
47
  */
48
48
  export const runMain = NodeRuntime.runMain;
@@ -21,6 +21,7 @@
21
21
  *
22
22
  * @since 4.0.0
23
23
  */
24
+ import type { Crypto } from "effect/Crypto";
24
25
  import type { FileSystem } from "effect/FileSystem";
25
26
  import * as Layer from "effect/Layer";
26
27
  import type { Path } from "effect/Path";
@@ -34,12 +35,12 @@ import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSp
34
35
  * @category models
35
36
  * @since 4.0.0
36
37
  */
37
- export type BunServices = ChildProcessSpawner | FileSystem | Path | Terminal | Stdio;
38
+ export type BunServices = ChildProcessSpawner | Crypto | FileSystem | Path | Terminal | Stdio;
38
39
  /**
39
40
  * Provides the default Bun implementations for child process spawning,
40
41
  * filesystem, path, stdio, and terminal services.
41
42
  *
42
- * @category layer
43
+ * @category layers
43
44
  * @since 4.0.0
44
45
  */
45
46
  export declare const layer: Layer.Layer<BunServices>;
@@ -1 +1 @@
1
- {"version":3,"file":"BunServices.d.ts","sourceRoot":"","sources":["../src/BunServices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAA;AAOtF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAA;AAEpF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAO1C,CAAA"}
1
+ {"version":3,"file":"BunServices.d.ts","sourceRoot":"","sources":["../src/BunServices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAA;AAQtF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE7F;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAQ1C,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import * as Layer from "effect/Layer";
2
2
  import * as BunChildProcessSpawner from "./BunChildProcessSpawner.js";
3
+ import * as BunCrypto from "./BunCrypto.js";
3
4
  import * as BunFileSystem from "./BunFileSystem.js";
4
5
  import * as BunPath from "./BunPath.js";
5
6
  import * as BunStdio from "./BunStdio.js";
@@ -8,8 +9,8 @@ import * as BunTerminal from "./BunTerminal.js";
8
9
  * Provides the default Bun implementations for child process spawning,
9
10
  * filesystem, path, stdio, and terminal services.
10
11
  *
11
- * @category layer
12
+ * @category layers
12
13
  * @since 4.0.0
13
14
  */
14
- export const layer = /*#__PURE__*/BunChildProcessSpawner.layer.pipe(/*#__PURE__*/Layer.provideMerge(/*#__PURE__*/Layer.mergeAll(BunFileSystem.layer, BunPath.layer, BunStdio.layer, BunTerminal.layer)));
15
+ export const layer = /*#__PURE__*/BunChildProcessSpawner.layer.pipe(/*#__PURE__*/Layer.provideMerge(/*#__PURE__*/Layer.mergeAll(BunFileSystem.layer, BunCrypto.layer, BunPath.layer, BunStdio.layer, BunTerminal.layer)));
15
16
  //# sourceMappingURL=BunServices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BunServices.js","names":["Layer","BunChildProcessSpawner","BunFileSystem","BunPath","BunStdio","BunTerminal","layer","pipe","provideMerge","mergeAll"],"sources":["../src/BunServices.ts"],"sourcesContent":[null],"mappings":"AAwBA,OAAO,KAAKA,KAAK,MAAM,cAAc;AAKrC,OAAO,KAAKC,sBAAsB,MAAM,6BAA6B;AACrE,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AACnD,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAW/C;;;;;;;AAOA,OAAO,MAAMC,KAAK,gBAA6BL,sBAAsB,CAACK,KAAK,CAACC,IAAI,cAC9EP,KAAK,CAACQ,YAAY,cAACR,KAAK,CAACS,QAAQ,CAC/BP,aAAa,CAACI,KAAK,EACnBH,OAAO,CAACG,KAAK,EACbF,QAAQ,CAACE,KAAK,EACdD,WAAW,CAACC,KAAK,CAClB,CAAC,CACH","ignoreList":[]}
1
+ {"version":3,"file":"BunServices.js","names":["Layer","BunChildProcessSpawner","BunCrypto","BunFileSystem","BunPath","BunStdio","BunTerminal","layer","pipe","provideMerge","mergeAll"],"sources":["../src/BunServices.ts"],"sourcesContent":[null],"mappings":"AAyBA,OAAO,KAAKA,KAAK,MAAM,cAAc;AAKrC,OAAO,KAAKC,sBAAsB,MAAM,6BAA6B;AACrE,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AACnD,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAW/C;;;;;;;AAOA,OAAO,MAAMC,KAAK,gBAA6BN,sBAAsB,CAACM,KAAK,CAACC,IAAI,cAC9ER,KAAK,CAACS,YAAY,cAACT,KAAK,CAACU,QAAQ,CAC/BP,aAAa,CAACI,KAAK,EACnBL,SAAS,CAACK,KAAK,EACfH,OAAO,CAACG,KAAK,EACbF,QAAQ,CAACE,KAAK,EACdD,WAAW,CAACC,KAAK,CAClB,CAAC,CACH","ignoreList":[]}
@@ -4,7 +4,7 @@ import type { Stdio } from "effect/Stdio";
4
4
  * Provides the `Stdio` service backed by the current process arguments,
5
5
  * stdin, stdout, and stderr streams.
6
6
  *
7
- * @category layer
7
+ * @category layers
8
8
  * @since 4.0.0
9
9
  */
10
10
  export declare const layer: Layer.Layer<Stdio>;
package/dist/BunStdio.js CHANGED
@@ -24,7 +24,7 @@ import * as NodeStdio from "@effect/platform-node-shared/NodeStdio";
24
24
  * Provides the `Stdio` service backed by the current process arguments,
25
25
  * stdin, stdout, and stderr streams.
26
26
  *
27
- * @category layer
27
+ * @category layers
28
28
  * @since 4.0.0
29
29
  */
30
30
  export const layer = NodeStdio.layer;
@@ -8,6 +8,7 @@ export * from "@effect/platform-node-shared/NodeStream";
8
8
  * An optimized version of `Stream.fromReadableStream` that uses the Bun
9
9
  * .readMany API to read multiple values at once from a `ReadableStream`.
10
10
  *
11
+ * @category constructors
11
12
  * @since 4.0.0
12
13
  */
13
14
  export declare const fromReadableStream: <A, E>(options: {
@@ -1 +1 @@
1
- {"version":3,"file":"BunStream.d.ts","sourceRoot":"","sources":["../src/BunStream.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAG9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC;;GAEG;AACH,cAAc,yCAAyC,CAAA;AAEvD;;;;;GAKG;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"}
1
+ {"version":3,"file":"BunStream.d.ts","sourceRoot":"","sources":["../src/BunStream.ts"],"names":[],"mappings":"AA4BA,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"}
package/dist/BunStream.js CHANGED
@@ -36,6 +36,7 @@ export * from "@effect/platform-node-shared/NodeStream";
36
36
  * An optimized version of `Stream.fromReadableStream` that uses the Bun
37
37
  * .readMany API to read multiple values at once from a `ReadableStream`.
38
38
  *
39
+ * @category constructors
39
40
  * @since 4.0.0
40
41
  */
41
42
  export const fromReadableStream = options => Stream.fromChannel(Channel.fromTransform(Effect.fnUntraced(function* (_, scope) {
@@ -1 +1 @@
1
- {"version":3,"file":"BunStream.js","names":["Arr","Cause","Channel","Effect","Scope","Stream","fromReadableStream","options","fromChannel","fromTransform","fnUntraced","_","scope","reader","evaluate","getReader","addFinalizer","releaseLockOnEnd","sync","releaseLock","promise","cancel","readMany","callback","resume","result","then","succeed","e","fail","onError","flatMap","loop","done","value","isReadonlyArrayNonEmpty"],"sources":["../src/BunStream.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,KAAKA,GAAG,MAAM,cAAc;AACnC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAGvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAEvC;;;AAGA,cAAc,yCAAyC;AAEvD;;;;;;AAMA,OAAO,MAAMC,kBAAkB,GAC7BC,OAIC,IAEDF,MAAM,CAACG,WAAW,CAACN,OAAO,CAACO,aAAa,CAACN,MAAM,CAACO,UAAU,CAAC,WAAUC,CAAC,EAAEC,KAAK;EAC3E,MAAMC,MAAM,GAAGN,OAAO,CAACO,QAAQ,EAAE,CAACC,SAAS,EAAE;EAC7C,OAAOX,KAAK,CAACY,YAAY,CACvBJ,KAAK,EACLL,OAAO,CAACU,gBAAgB,GAAGd,MAAM,CAACe,IAAI,CAAC,MAAML,MAAM,CAACM,WAAW,EAAE,CAAC,GAAGhB,MAAM,CAACiB,OAAO,CAAC,MAAMP,MAAM,CAACQ,MAAM,EAAE,CAAC,CAC3G;EACD,MAAMC,QAAQ,GAAGnB,MAAM,CAACoB,QAAQ,CAAiDC,MAAM,IAAI;IACzF,MAAMC,MAAM,GAAGZ,MAAM,CAACS,QAAQ,EAAE;IAChC,IAAI,MAAM,IAAIG,MAAM,EAAE;MACpBA,MAAM,CAACC,IAAI,CAAEf,CAAC,IAAKa,MAAM,CAACrB,MAAM,CAACwB,OAAO,CAAChB,CAAC,CAAC,CAAC,EAAGiB,CAAC,IAAKJ,MAAM,CAACrB,MAAM,CAAC0B,IAAI,CAACtB,OAAO,CAACuB,OAAO,CAACF,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/F,CAAC,MAAM;MACLJ,MAAM,CAACrB,MAAM,CAACwB,OAAO,CAACF,MAAM,CAAC,CAAC;IAChC;EACF,CAAC,CAAC;EACF;EACA,OAAOtB,MAAM,CAAC4B,OAAO,CACnBT,QAAQ,EACR,SAASU,IAAIA,CACX;IAAEC,IAAI;IAAEC;EAAK,CAAE;IAEf,IAAID,IAAI,EAAE;MACR,OAAOhC,KAAK,CAACgC,IAAI,EAAE;IACrB,CAAC,MAAM,IAAI,CAACjC,GAAG,CAACmC,uBAAuB,CAACD,KAAK,CAAC,EAAE;MAC9C,OAAO/B,MAAM,CAAC4B,OAAO,CAACT,QAAQ,EAAEU,IAAI,CAAC;IACvC;IACA,OAAO7B,MAAM,CAACwB,OAAO,CAACO,KAAK,CAAC;EAC9B,CAAC,CACF;AACH,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"BunStream.js","names":["Arr","Cause","Channel","Effect","Scope","Stream","fromReadableStream","options","fromChannel","fromTransform","fnUntraced","_","scope","reader","evaluate","getReader","addFinalizer","releaseLockOnEnd","sync","releaseLock","promise","cancel","readMany","callback","resume","result","then","succeed","e","fail","onError","flatMap","loop","done","value","isReadonlyArrayNonEmpty"],"sources":["../src/BunStream.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,KAAKA,GAAG,MAAM,cAAc;AACnC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAGvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,MAAM,MAAM,eAAe;AAEvC;;;AAGA,cAAc,yCAAyC;AAEvD;;;;;;;AAOA,OAAO,MAAMC,kBAAkB,GAC7BC,OAIC,IAEDF,MAAM,CAACG,WAAW,CAACN,OAAO,CAACO,aAAa,CAACN,MAAM,CAACO,UAAU,CAAC,WAAUC,CAAC,EAAEC,KAAK;EAC3E,MAAMC,MAAM,GAAGN,OAAO,CAACO,QAAQ,EAAE,CAACC,SAAS,EAAE;EAC7C,OAAOX,KAAK,CAACY,YAAY,CACvBJ,KAAK,EACLL,OAAO,CAACU,gBAAgB,GAAGd,MAAM,CAACe,IAAI,CAAC,MAAML,MAAM,CAACM,WAAW,EAAE,CAAC,GAAGhB,MAAM,CAACiB,OAAO,CAAC,MAAMP,MAAM,CAACQ,MAAM,EAAE,CAAC,CAC3G;EACD,MAAMC,QAAQ,GAAGnB,MAAM,CAACoB,QAAQ,CAAiDC,MAAM,IAAI;IACzF,MAAMC,MAAM,GAAGZ,MAAM,CAACS,QAAQ,EAAE;IAChC,IAAI,MAAM,IAAIG,MAAM,EAAE;MACpBA,MAAM,CAACC,IAAI,CAAEf,CAAC,IAAKa,MAAM,CAACrB,MAAM,CAACwB,OAAO,CAAChB,CAAC,CAAC,CAAC,EAAGiB,CAAC,IAAKJ,MAAM,CAACrB,MAAM,CAAC0B,IAAI,CAACtB,OAAO,CAACuB,OAAO,CAACF,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/F,CAAC,MAAM;MACLJ,MAAM,CAACrB,MAAM,CAACwB,OAAO,CAACF,MAAM,CAAC,CAAC;IAChC;EACF,CAAC,CAAC;EACF;EACA,OAAOtB,MAAM,CAAC4B,OAAO,CACnBT,QAAQ,EACR,SAASU,IAAIA,CACX;IAAEC,IAAI;IAAEC;EAAK,CAAE;IAEf,IAAID,IAAI,EAAE;MACR,OAAOhC,KAAK,CAACgC,IAAI,EAAE;IACrB,CAAC,MAAM,IAAI,CAACjC,GAAG,CAACmC,uBAAuB,CAACD,KAAK,CAAC,EAAE;MAC9C,OAAO/B,MAAM,CAAC4B,OAAO,CAACT,QAAQ,EAAEU,IAAI,CAAC;IACvC;IACA,OAAO7B,MAAM,CAACwB,OAAO,CAACO,KAAK,CAAC;EAC9B,CAAC,CACF;AACH,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}