@effect/platform-bun 4.0.0 → 4.0.2

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 (113) hide show
  1. package/ai-docs/package.json +2 -2
  2. package/ai-docs/tsconfig.json +2 -1
  3. package/dist/BunChildProcessSpawner.d.ts +1 -0
  4. package/dist/BunChildProcessSpawner.d.ts.map +1 -1
  5. package/dist/BunChildProcessSpawner.js +1 -0
  6. package/dist/BunChildProcessSpawner.js.map +1 -1
  7. package/dist/BunClusterHttp.d.ts +3 -0
  8. package/dist/BunClusterHttp.d.ts.map +1 -1
  9. package/dist/BunClusterHttp.js +4 -0
  10. package/dist/BunClusterHttp.js.map +1 -1
  11. package/dist/BunClusterSocket.d.ts +5 -0
  12. package/dist/BunClusterSocket.d.ts.map +1 -1
  13. package/dist/BunClusterSocket.js +5 -0
  14. package/dist/BunClusterSocket.js.map +1 -1
  15. package/dist/BunCrypto.d.ts +1 -0
  16. package/dist/BunCrypto.d.ts.map +1 -1
  17. package/dist/BunCrypto.js +2 -0
  18. package/dist/BunCrypto.js.map +1 -1
  19. package/dist/BunFileSystem.d.ts +1 -0
  20. package/dist/BunFileSystem.d.ts.map +1 -1
  21. package/dist/BunFileSystem.js +2 -0
  22. package/dist/BunFileSystem.js.map +1 -1
  23. package/dist/BunHttpClient.d.ts +1 -0
  24. package/dist/BunHttpClient.d.ts.map +1 -1
  25. package/dist/BunHttpClient.js +1 -0
  26. package/dist/BunHttpClient.js.map +1 -1
  27. package/dist/BunHttpPlatform.d.ts +1 -0
  28. package/dist/BunHttpPlatform.d.ts.map +1 -1
  29. package/dist/BunHttpPlatform.js +2 -0
  30. package/dist/BunHttpPlatform.js.map +1 -1
  31. package/dist/BunHttpServer.d.ts +10 -1
  32. package/dist/BunHttpServer.d.ts.map +1 -1
  33. package/dist/BunHttpServer.js +16 -2
  34. package/dist/BunHttpServer.js.map +1 -1
  35. package/dist/BunHttpServerRequest.d.ts +2 -0
  36. package/dist/BunHttpServerRequest.d.ts.map +1 -1
  37. package/dist/BunHttpServerRequest.js +1 -0
  38. package/dist/BunHttpServerRequest.js.map +1 -1
  39. package/dist/BunMultipart.d.ts +3 -0
  40. package/dist/BunMultipart.d.ts.map +1 -1
  41. package/dist/BunMultipart.js +2 -0
  42. package/dist/BunMultipart.js.map +1 -1
  43. package/dist/BunPath.d.ts +3 -0
  44. package/dist/BunPath.d.ts.map +1 -1
  45. package/dist/BunPath.js +4 -0
  46. package/dist/BunPath.js.map +1 -1
  47. package/dist/BunRuntime.d.ts +3 -0
  48. package/dist/BunRuntime.d.ts.map +1 -1
  49. package/dist/BunRuntime.js +2 -0
  50. package/dist/BunRuntime.js.map +1 -1
  51. package/dist/BunServices.d.ts +3 -0
  52. package/dist/BunServices.d.ts.map +1 -1
  53. package/dist/BunServices.js +1 -0
  54. package/dist/BunServices.js.map +1 -1
  55. package/dist/BunSink.d.ts +1 -0
  56. package/dist/BunSink.d.ts.map +1 -1
  57. package/dist/BunSink.js +1 -0
  58. package/dist/BunSink.js.map +1 -1
  59. package/dist/BunSocket.d.ts +3 -0
  60. package/dist/BunSocket.d.ts.map +1 -1
  61. package/dist/BunSocket.js +2 -0
  62. package/dist/BunSocket.js.map +1 -1
  63. package/dist/BunSocketServer.d.ts +1 -0
  64. package/dist/BunSocketServer.d.ts.map +1 -1
  65. package/dist/BunSocketServer.js +1 -0
  66. package/dist/BunSocketServer.js.map +1 -1
  67. package/dist/BunStdio.d.ts +1 -0
  68. package/dist/BunStdio.d.ts.map +1 -1
  69. package/dist/BunStdio.js +2 -0
  70. package/dist/BunStdio.js.map +1 -1
  71. package/dist/BunStream.d.ts +1 -0
  72. package/dist/BunStream.d.ts.map +1 -1
  73. package/dist/BunStream.js +2 -0
  74. package/dist/BunStream.js.map +1 -1
  75. package/dist/BunTerminal.d.ts +2 -0
  76. package/dist/BunTerminal.d.ts.map +1 -1
  77. package/dist/BunTerminal.js +3 -0
  78. package/dist/BunTerminal.js.map +1 -1
  79. package/dist/BunWorker.d.ts +2 -0
  80. package/dist/BunWorker.d.ts.map +1 -1
  81. package/dist/BunWorker.js +3 -0
  82. package/dist/BunWorker.js.map +1 -1
  83. package/dist/BunWorkerRunner.d.ts +1 -0
  84. package/dist/BunWorkerRunner.d.ts.map +1 -1
  85. package/dist/BunWorkerRunner.js +2 -0
  86. package/dist/BunWorkerRunner.js.map +1 -1
  87. package/dist/index.d.ts +22 -0
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +22 -0
  90. package/dist/index.js.map +1 -1
  91. package/package.json +4 -4
  92. package/src/BunChildProcessSpawner.ts +1 -0
  93. package/src/BunClusterHttp.ts +4 -0
  94. package/src/BunClusterSocket.ts +5 -0
  95. package/src/BunCrypto.ts +2 -0
  96. package/src/BunFileSystem.ts +2 -0
  97. package/src/BunHttpClient.ts +1 -0
  98. package/src/BunHttpPlatform.ts +2 -0
  99. package/src/BunHttpServer.ts +19 -1
  100. package/src/BunHttpServerRequest.ts +2 -0
  101. package/src/BunMultipart.ts +3 -0
  102. package/src/BunPath.ts +4 -0
  103. package/src/BunRuntime.ts +4 -0
  104. package/src/BunServices.ts +3 -0
  105. package/src/BunSink.ts +1 -0
  106. package/src/BunSocket.ts +3 -0
  107. package/src/BunSocketServer.ts +1 -0
  108. package/src/BunStdio.ts +2 -0
  109. package/src/BunStream.ts +2 -0
  110. package/src/BunTerminal.ts +3 -0
  111. package/src/BunWorker.ts +3 -0
  112. package/src/BunWorkerRunner.ts +2 -0
  113. package/src/index.ts +22 -0
@@ -6,6 +6,7 @@
6
6
  * and terminal services. Use the layer when a Bun program wants the standard
7
7
  * platform services from one place.
8
8
  *
9
+ * @stability unstable
9
10
  * @since 4.0.0
10
11
  */
11
12
  import type { Crypto } from "effect/Crypto"
@@ -26,6 +27,7 @@ import * as BunTerminal from "./BunTerminal.ts"
26
27
  * The union of core services provided by the Bun platform layer, including child
27
28
  * process spawning, filesystem, path, stdio, and terminal services.
28
29
  *
30
+ * @stability unstable
29
31
  * @category models
30
32
  * @since 4.0.0
31
33
  */
@@ -35,6 +37,7 @@ export type BunServices = ChildProcessSpawner | Crypto | FileSystem | Path | Ter
35
37
  * Provides the default Bun implementations for child process spawning,
36
38
  * filesystem, path, stdio, and terminal services.
37
39
  *
40
+ * @stability unstable
38
41
  * @category layers
39
42
  * @since 4.0.0
40
43
  */
package/src/BunSink.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * @stability unstable
2
3
  * @since 4.0.0
3
4
  */
4
5
 
package/src/BunSocket.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * It also provides Bun WebSocket layers using `globalThis.WebSocket`, including
7
7
  * a constructor layer and a `Socket.Socket` layer for a WebSocket URL.
8
8
  *
9
+ * @stability unstable
9
10
  * @since 4.0.0
10
11
  */
11
12
  import type * as Duration from "effect/Duration"
@@ -23,6 +24,7 @@ export * from "@effect/platform-node-shared/NodeSocket"
23
24
  * Provides a `Socket.WebSocketConstructor` backed by Bun's global
24
25
  * `WebSocket` implementation.
25
26
  *
27
+ * @stability unstable
26
28
  * @category layers
27
29
  * @since 4.0.0
28
30
  */
@@ -40,6 +42,7 @@ export const layerWebSocketConstructor: Layer.Layer<
40
42
  * `WebSocket` constructor, honoring protocol, open-timeout, and
41
43
  * high-water-mark options.
42
44
  *
45
+ * @stability unstable
43
46
  * @category layers
44
47
  * @since 4.0.0
45
48
  */
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * @stability unstable
2
3
  * @since 4.0.0
3
4
  */
4
5
 
package/src/BunStdio.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * is read from `process.stdin`, and output and error output write to
7
7
  * `process.stdout` and `process.stderr`.
8
8
  *
9
+ * @stability unstable
9
10
  * @since 4.0.0
10
11
  */
11
12
  import * as NodeStdio from "@effect/platform-node-shared/NodeStdio"
@@ -16,6 +17,7 @@ import type { Stdio } from "effect/Stdio"
16
17
  * Provides the `Stdio` service backed by the current process arguments,
17
18
  * stdin, stdout, and stderr streams.
18
19
  *
20
+ * @stability unstable
19
21
  * @category layers
20
22
  * @since 4.0.0
21
23
  */
package/src/BunStream.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * `ReadableStream` adapter that uses Bun's `readMany` reader method to pull
8
8
  * batches of values into an Effect `Stream`.
9
9
  *
10
+ * @stability unstable
10
11
  * @since 4.0.0
11
12
  */
12
13
  import * as Arr from "effect/Array"
@@ -27,6 +28,7 @@ export * from "@effect/platform-node-shared/NodeStream"
27
28
  * Creates a stream from a `ReadableStream` using Bun's optimized `.readMany`
28
29
  * API.
29
30
  *
31
+ * @stability unstable
30
32
  * @category constructors
31
33
  * @since 4.0.0
32
34
  */
@@ -5,6 +5,7 @@
5
5
  * creates a scoped process-backed `Terminal` service, and `layer` provides the
6
6
  * default terminal service with the standard quit behavior for key input.
7
7
  *
8
+ * @stability unstable
8
9
  * @since 4.0.0
9
10
  */
10
11
  import * as NodeTerminal from "@effect/platform-node-shared/NodeTerminal"
@@ -17,6 +18,7 @@ import type { Terminal, UserInput } from "effect/Terminal"
17
18
  * Creates a scoped `Terminal` service backed by process stdin/stdout, using the
18
19
  * optional predicate to decide when key input should end the input stream.
19
20
  *
21
+ * @stability unstable
20
22
  * @category constructors
21
23
  * @since 4.0.0
22
24
  */
@@ -26,6 +28,7 @@ export const make: (shouldQuit?: (input: UserInput) => boolean) => Effect<Termin
26
28
  * Provides the default process-backed `Terminal` service, ending key input on
27
29
  * the default quit keys.
28
30
  *
31
+ * @stability unstable
29
32
  * @category layers
30
33
  * @since 4.0.0
31
34
  */
package/src/BunWorker.ts CHANGED
@@ -8,6 +8,7 @@
8
8
  * asks workers to close on scope finalization, and terminates them if graceful
9
9
  * shutdown times out.
10
10
  *
11
+ * @stability unstable
11
12
  * @since 4.0.0
12
13
  */
13
14
  import * as Deferred from "effect/Deferred"
@@ -22,6 +23,7 @@ import { WorkerError, WorkerUnknownError } from "effect/workers/WorkerError"
22
23
  * Provides the Bun `WorkerPlatform` together with a `Worker.Spawner` created
23
24
  * from the supplied worker spawning function.
24
25
  *
26
+ * @stability unstable
25
27
  * @category layers
26
28
  * @since 4.0.0
27
29
  */
@@ -38,6 +40,7 @@ export const layer = (
38
40
  * Effect workers and requesting graceful worker shutdown during scope
39
41
  * finalization before terminating on timeout.
40
42
  *
43
+ * @stability unstable
41
44
  * @category layers
42
45
  * @since 4.0.0
43
46
  */
@@ -7,6 +7,7 @@
7
7
  * responses through the worker `postMessage` channel, and closes when the
8
8
  * parent sends the close message.
9
9
  *
10
+ * @stability unstable
10
11
  * @since 4.0.0
11
12
  */
12
13
  import * as Cause from "effect/Cause"
@@ -27,6 +28,7 @@ declare const self: MessagePort
27
28
  * routing parent messages to the registered handler and sending responses back
28
29
  * through the worker port.
29
30
  *
31
+ * @stability unstable
30
32
  * @category layers
31
33
  * @since 4.0.0
32
34
  */
package/src/index.ts CHANGED
@@ -1,60 +1,72 @@
1
1
  /**
2
+ * @stability unstable
2
3
  * @since 4.0.0
3
4
  */
4
5
 
5
6
  // @barrel: Auto-generated exports. Do not edit manually.
6
7
 
7
8
  /**
9
+ * @stability unstable
8
10
  * @since 4.0.0
9
11
  */
10
12
  export * as BunChildProcessSpawner from "./BunChildProcessSpawner.ts"
11
13
 
12
14
  /**
15
+ * @stability unstable
13
16
  * @since 4.0.0
14
17
  */
15
18
  export * as BunClusterHttp from "./BunClusterHttp.ts"
16
19
 
17
20
  /**
21
+ * @stability unstable
18
22
  * @since 4.0.0
19
23
  */
20
24
  export * as BunClusterSocket from "./BunClusterSocket.ts"
21
25
 
22
26
  /**
27
+ * @stability unstable
23
28
  * @since 1.0.0
24
29
  */
25
30
  export * as BunCrypto from "./BunCrypto.ts"
26
31
 
27
32
  /**
33
+ * @stability unstable
28
34
  * @since 4.0.0
29
35
  */
30
36
  export * as BunFileSystem from "./BunFileSystem.ts"
31
37
 
32
38
  /**
39
+ * @stability unstable
33
40
  * @since 4.0.0
34
41
  */
35
42
  export * as BunHttpClient from "./BunHttpClient.ts"
36
43
 
37
44
  /**
45
+ * @stability unstable
38
46
  * @since 4.0.0
39
47
  */
40
48
  export * as BunHttpPlatform from "./BunHttpPlatform.ts"
41
49
 
42
50
  /**
51
+ * @stability unstable
43
52
  * @since 4.0.0
44
53
  */
45
54
  export * as BunHttpServer from "./BunHttpServer.ts"
46
55
 
47
56
  /**
57
+ * @stability unstable
48
58
  * @since 4.0.0
49
59
  */
50
60
  export * as BunHttpServerRequest from "./BunHttpServerRequest.ts"
51
61
 
52
62
  /**
63
+ * @stability unstable
53
64
  * @since 4.0.0
54
65
  */
55
66
  export * as BunMultipart from "./BunMultipart.ts"
56
67
 
57
68
  /**
69
+ * @stability unstable
58
70
  * @since 4.0.0
59
71
  */
60
72
  export * as BunPath from "./BunPath.ts"
@@ -66,51 +78,61 @@ export * as BunPath from "./BunPath.ts"
66
78
  export * as BunRedis from "./BunRedis.ts"
67
79
 
68
80
  /**
81
+ * @stability unstable
69
82
  * @since 4.0.0
70
83
  */
71
84
  export * as BunRuntime from "./BunRuntime.ts"
72
85
 
73
86
  /**
87
+ * @stability unstable
74
88
  * @since 4.0.0
75
89
  */
76
90
  export * as BunServices from "./BunServices.ts"
77
91
 
78
92
  /**
93
+ * @stability unstable
79
94
  * @since 4.0.0
80
95
  */
81
96
  export * as BunSink from "./BunSink.ts"
82
97
 
83
98
  /**
99
+ * @stability unstable
84
100
  * @since 4.0.0
85
101
  */
86
102
  export * as BunSocket from "./BunSocket.ts"
87
103
 
88
104
  /**
105
+ * @stability unstable
89
106
  * @since 4.0.0
90
107
  */
91
108
  export * as BunSocketServer from "./BunSocketServer.ts"
92
109
 
93
110
  /**
111
+ * @stability unstable
94
112
  * @since 4.0.0
95
113
  */
96
114
  export * as BunStdio from "./BunStdio.ts"
97
115
 
98
116
  /**
117
+ * @stability unstable
99
118
  * @since 4.0.0
100
119
  */
101
120
  export * as BunStream from "./BunStream.ts"
102
121
 
103
122
  /**
123
+ * @stability unstable
104
124
  * @since 4.0.0
105
125
  */
106
126
  export * as BunTerminal from "./BunTerminal.ts"
107
127
 
108
128
  /**
129
+ * @stability unstable
109
130
  * @since 4.0.0
110
131
  */
111
132
  export * as BunWorker from "./BunWorker.ts"
112
133
 
113
134
  /**
135
+ * @stability unstable
114
136
  * @since 4.0.0
115
137
  */
116
138
  export * as BunWorkerRunner from "./BunWorkerRunner.ts"