@effect/platform-bun 4.0.1 → 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.
- package/ai-docs/package.json +2 -2
- package/ai-docs/tsconfig.json +2 -1
- package/dist/BunChildProcessSpawner.d.ts +1 -0
- package/dist/BunChildProcessSpawner.d.ts.map +1 -1
- package/dist/BunChildProcessSpawner.js +1 -0
- package/dist/BunChildProcessSpawner.js.map +1 -1
- package/dist/BunClusterHttp.d.ts +3 -0
- package/dist/BunClusterHttp.d.ts.map +1 -1
- package/dist/BunClusterHttp.js +4 -0
- package/dist/BunClusterHttp.js.map +1 -1
- package/dist/BunClusterSocket.d.ts +5 -0
- package/dist/BunClusterSocket.d.ts.map +1 -1
- package/dist/BunClusterSocket.js +5 -0
- package/dist/BunClusterSocket.js.map +1 -1
- package/dist/BunCrypto.d.ts +1 -0
- package/dist/BunCrypto.d.ts.map +1 -1
- package/dist/BunCrypto.js +2 -0
- package/dist/BunCrypto.js.map +1 -1
- package/dist/BunFileSystem.d.ts +1 -0
- package/dist/BunFileSystem.d.ts.map +1 -1
- package/dist/BunFileSystem.js +2 -0
- package/dist/BunFileSystem.js.map +1 -1
- package/dist/BunHttpClient.d.ts +1 -0
- package/dist/BunHttpClient.d.ts.map +1 -1
- package/dist/BunHttpClient.js +1 -0
- package/dist/BunHttpClient.js.map +1 -1
- package/dist/BunHttpPlatform.d.ts +1 -0
- package/dist/BunHttpPlatform.d.ts.map +1 -1
- package/dist/BunHttpPlatform.js +2 -0
- package/dist/BunHttpPlatform.js.map +1 -1
- package/dist/BunHttpServer.d.ts +10 -1
- package/dist/BunHttpServer.d.ts.map +1 -1
- package/dist/BunHttpServer.js +16 -2
- package/dist/BunHttpServer.js.map +1 -1
- package/dist/BunHttpServerRequest.d.ts +2 -0
- package/dist/BunHttpServerRequest.d.ts.map +1 -1
- package/dist/BunHttpServerRequest.js +1 -0
- package/dist/BunHttpServerRequest.js.map +1 -1
- package/dist/BunMultipart.d.ts +3 -0
- package/dist/BunMultipart.d.ts.map +1 -1
- package/dist/BunMultipart.js +2 -0
- package/dist/BunMultipart.js.map +1 -1
- package/dist/BunPath.d.ts +3 -0
- package/dist/BunPath.d.ts.map +1 -1
- package/dist/BunPath.js +4 -0
- package/dist/BunPath.js.map +1 -1
- package/dist/BunRuntime.d.ts +3 -0
- package/dist/BunRuntime.d.ts.map +1 -1
- package/dist/BunRuntime.js +2 -0
- package/dist/BunRuntime.js.map +1 -1
- package/dist/BunServices.d.ts +3 -0
- package/dist/BunServices.d.ts.map +1 -1
- package/dist/BunServices.js +1 -0
- package/dist/BunServices.js.map +1 -1
- package/dist/BunSink.d.ts +1 -0
- package/dist/BunSink.d.ts.map +1 -1
- package/dist/BunSink.js +1 -0
- package/dist/BunSink.js.map +1 -1
- package/dist/BunSocket.d.ts +3 -0
- package/dist/BunSocket.d.ts.map +1 -1
- package/dist/BunSocket.js +2 -0
- package/dist/BunSocket.js.map +1 -1
- package/dist/BunSocketServer.d.ts +1 -0
- package/dist/BunSocketServer.d.ts.map +1 -1
- package/dist/BunSocketServer.js +1 -0
- package/dist/BunSocketServer.js.map +1 -1
- package/dist/BunStdio.d.ts +1 -0
- package/dist/BunStdio.d.ts.map +1 -1
- package/dist/BunStdio.js +2 -0
- package/dist/BunStdio.js.map +1 -1
- package/dist/BunStream.d.ts +1 -0
- package/dist/BunStream.d.ts.map +1 -1
- package/dist/BunStream.js +2 -0
- package/dist/BunStream.js.map +1 -1
- package/dist/BunTerminal.d.ts +2 -0
- package/dist/BunTerminal.d.ts.map +1 -1
- package/dist/BunTerminal.js +3 -0
- package/dist/BunTerminal.js.map +1 -1
- package/dist/BunWorker.d.ts +2 -0
- package/dist/BunWorker.d.ts.map +1 -1
- package/dist/BunWorker.js +3 -0
- package/dist/BunWorker.js.map +1 -1
- package/dist/BunWorkerRunner.d.ts +1 -0
- package/dist/BunWorkerRunner.d.ts.map +1 -1
- package/dist/BunWorkerRunner.js +2 -0
- package/dist/BunWorkerRunner.js.map +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/BunChildProcessSpawner.ts +1 -0
- package/src/BunClusterHttp.ts +4 -0
- package/src/BunClusterSocket.ts +5 -0
- package/src/BunCrypto.ts +2 -0
- package/src/BunFileSystem.ts +2 -0
- package/src/BunHttpClient.ts +1 -0
- package/src/BunHttpPlatform.ts +2 -0
- package/src/BunHttpServer.ts +19 -1
- package/src/BunHttpServerRequest.ts +2 -0
- package/src/BunMultipart.ts +3 -0
- package/src/BunPath.ts +4 -0
- package/src/BunRuntime.ts +4 -0
- package/src/BunServices.ts +3 -0
- package/src/BunSink.ts +1 -0
- package/src/BunSocket.ts +3 -0
- package/src/BunSocketServer.ts +1 -0
- package/src/BunStdio.ts +2 -0
- package/src/BunStream.ts +2 -0
- package/src/BunTerminal.ts +3 -0
- package/src/BunWorker.ts +3 -0
- package/src/BunWorkerRunner.ts +2 -0
- package/src/index.ts +22 -0
package/dist/BunWorker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunWorker.js","names":[],"sources":["../src/BunWorker.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BunWorker.js","names":[],"sources":["../src/BunWorker.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;AAaA,OAAO,KAAK,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe;AACvC,OAAO,KAAK,IAAI,MAAM,aAAa;AACnC,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,MAAM,MAAM,uBAAuB;AAC/C,SAAS,WAAW,EAAE,kBAAkB,QAAQ,4BAA4B;AAE5E;;;;;;;;AAQA,OAAO,MAAM,KAAK,GAChB,KAAwC,IAExC,KAA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E,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC;SAC7B;OACF,CAAC,CACH;IACH;IACA,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC;IAC3C,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC;IACvC,OAAO,KAAK,CAAC,YAAY,CACvB,KAAK,EACL,MAAM,CAAC,IAAI,CAAC,MAAK;MACf,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC;MAC9C,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC;IAC5C,CAAC,CAAC,CACH;EACH;CACD,CAAC,CACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunWorkerRunner.d.ts","sourceRoot":"","sources":["../src/BunWorkerRunner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BunWorkerRunner.d.ts","sourceRoot":"","sources":["../src/BunWorkerRunner.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAGrC,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAA;AAI3D;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAqE/D,CAAA"}
|
package/dist/BunWorkerRunner.js
CHANGED
|
@@ -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";
|
|
@@ -24,6 +25,7 @@ import * as WorkerRunner from "effect/workers/WorkerRunner";
|
|
|
24
25
|
* routing parent messages to the registered handler and sending responses back
|
|
25
26
|
* through the worker port.
|
|
26
27
|
*
|
|
28
|
+
* @stability unstable
|
|
27
29
|
* @category layers
|
|
28
30
|
* @since 4.0.0
|
|
29
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BunWorkerRunner.js","names":[],"sources":["../src/BunWorkerRunner.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"BunWorkerRunner.js","names":[],"sources":["../src/BunWorkerRunner.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAYA,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe;AACvC,OAAO,KAAK,IAAI,MAAM,aAAa;AACnC,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,SAAS,QAAQ,QAAQ,iBAAiB;AAC1C,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,SAAS,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,QAAQ,4BAA4B;AAC9F,OAAO,KAAK,YAAY,MAAM,6BAA6B;AAI3D;;;;;;;;;AASA,OAAO,MAAM,KAAK,gBAAmD,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;EACpH,KAAK,eAAE,MAAM,CAAC,UAAU,CAAC,aAAS;IAChC,IAAI,EAAE,aAAa,IAAI,IAAI,CAAC,EAAE;MAC5B,OAAO,OAAO,IAAI,WAAW,CAAC;QAC5B,MAAM,EAAE,IAAI,gBAAgB,CAAC;UAAE,OAAO,EAAE;QAAyB,CAAE;OACpE,CAAC;IACJ;IACA,MAAM,IAAI,GAAG,IAAI;IACjB,MAAM,GAAG,GACP,OAAsE,IAEtE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,WAAU,KAAK;MACjD,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,EAAqB;MAC3D,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;MACrC,M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AAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,cAAc,CAAC;MAC1D,CAAC,CAAC,CACH;MACD,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC;MAC3C,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,cAAc,CAAC;MACrD,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;MAErB,OAAO,OAAO,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEL,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,OAAU,EAAE,QAAiC,KAChF,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE;MAC7B,QAAQ,EAAE;KACX,CAAC;IACJ,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,OAAU,EAAE,QAAiC,KAC1E,MAAM,CAAC,IAAI,CAAC,MAAM,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACrD,OAAO,QAAQ,CAAsC;MAAE,GAAG;MAAE,IAAI;MAAE;IAAU,CAAE,CAAC;EACjF,CAAC;CACF,CAAC","ignoreList":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,47 +1,59 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @stability unstable
|
|
2
3
|
* @since 4.0.0
|
|
3
4
|
*/
|
|
4
5
|
/**
|
|
6
|
+
* @stability unstable
|
|
5
7
|
* @since 4.0.0
|
|
6
8
|
*/
|
|
7
9
|
export * as BunChildProcessSpawner from "./BunChildProcessSpawner.ts";
|
|
8
10
|
/**
|
|
11
|
+
* @stability unstable
|
|
9
12
|
* @since 4.0.0
|
|
10
13
|
*/
|
|
11
14
|
export * as BunClusterHttp from "./BunClusterHttp.ts";
|
|
12
15
|
/**
|
|
16
|
+
* @stability unstable
|
|
13
17
|
* @since 4.0.0
|
|
14
18
|
*/
|
|
15
19
|
export * as BunClusterSocket from "./BunClusterSocket.ts";
|
|
16
20
|
/**
|
|
21
|
+
* @stability unstable
|
|
17
22
|
* @since 1.0.0
|
|
18
23
|
*/
|
|
19
24
|
export * as BunCrypto from "./BunCrypto.ts";
|
|
20
25
|
/**
|
|
26
|
+
* @stability unstable
|
|
21
27
|
* @since 4.0.0
|
|
22
28
|
*/
|
|
23
29
|
export * as BunFileSystem from "./BunFileSystem.ts";
|
|
24
30
|
/**
|
|
31
|
+
* @stability unstable
|
|
25
32
|
* @since 4.0.0
|
|
26
33
|
*/
|
|
27
34
|
export * as BunHttpClient from "./BunHttpClient.ts";
|
|
28
35
|
/**
|
|
36
|
+
* @stability unstable
|
|
29
37
|
* @since 4.0.0
|
|
30
38
|
*/
|
|
31
39
|
export * as BunHttpPlatform from "./BunHttpPlatform.ts";
|
|
32
40
|
/**
|
|
41
|
+
* @stability unstable
|
|
33
42
|
* @since 4.0.0
|
|
34
43
|
*/
|
|
35
44
|
export * as BunHttpServer from "./BunHttpServer.ts";
|
|
36
45
|
/**
|
|
46
|
+
* @stability unstable
|
|
37
47
|
* @since 4.0.0
|
|
38
48
|
*/
|
|
39
49
|
export * as BunHttpServerRequest from "./BunHttpServerRequest.ts";
|
|
40
50
|
/**
|
|
51
|
+
* @stability unstable
|
|
41
52
|
* @since 4.0.0
|
|
42
53
|
*/
|
|
43
54
|
export * as BunMultipart from "./BunMultipart.ts";
|
|
44
55
|
/**
|
|
56
|
+
* @stability unstable
|
|
45
57
|
* @since 4.0.0
|
|
46
58
|
*/
|
|
47
59
|
export * as BunPath from "./BunPath.ts";
|
|
@@ -51,42 +63,52 @@ export * as BunPath from "./BunPath.ts";
|
|
|
51
63
|
*/
|
|
52
64
|
export * as BunRedis from "./BunRedis.ts";
|
|
53
65
|
/**
|
|
66
|
+
* @stability unstable
|
|
54
67
|
* @since 4.0.0
|
|
55
68
|
*/
|
|
56
69
|
export * as BunRuntime from "./BunRuntime.ts";
|
|
57
70
|
/**
|
|
71
|
+
* @stability unstable
|
|
58
72
|
* @since 4.0.0
|
|
59
73
|
*/
|
|
60
74
|
export * as BunServices from "./BunServices.ts";
|
|
61
75
|
/**
|
|
76
|
+
* @stability unstable
|
|
62
77
|
* @since 4.0.0
|
|
63
78
|
*/
|
|
64
79
|
export * as BunSink from "./BunSink.ts";
|
|
65
80
|
/**
|
|
81
|
+
* @stability unstable
|
|
66
82
|
* @since 4.0.0
|
|
67
83
|
*/
|
|
68
84
|
export * as BunSocket from "./BunSocket.ts";
|
|
69
85
|
/**
|
|
86
|
+
* @stability unstable
|
|
70
87
|
* @since 4.0.0
|
|
71
88
|
*/
|
|
72
89
|
export * as BunSocketServer from "./BunSocketServer.ts";
|
|
73
90
|
/**
|
|
91
|
+
* @stability unstable
|
|
74
92
|
* @since 4.0.0
|
|
75
93
|
*/
|
|
76
94
|
export * as BunStdio from "./BunStdio.ts";
|
|
77
95
|
/**
|
|
96
|
+
* @stability unstable
|
|
78
97
|
* @since 4.0.0
|
|
79
98
|
*/
|
|
80
99
|
export * as BunStream from "./BunStream.ts";
|
|
81
100
|
/**
|
|
101
|
+
* @stability unstable
|
|
82
102
|
* @since 4.0.0
|
|
83
103
|
*/
|
|
84
104
|
export * as BunTerminal from "./BunTerminal.ts";
|
|
85
105
|
/**
|
|
106
|
+
* @stability unstable
|
|
86
107
|
* @since 4.0.0
|
|
87
108
|
*/
|
|
88
109
|
export * as BunWorker from "./BunWorker.ts";
|
|
89
110
|
/**
|
|
111
|
+
* @stability unstable
|
|
90
112
|
* @since 4.0.0
|
|
91
113
|
*/
|
|
92
114
|
export * as BunWorkerRunner from "./BunWorkerRunner.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,OAAO,KAAK,sBA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eAAe,MAAM,sBAAsB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,48 +1,60 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @stability unstable
|
|
2
3
|
* @since 4.0.0
|
|
3
4
|
*/
|
|
4
5
|
// @barrel: Auto-generated exports. Do not edit manually.
|
|
5
6
|
/**
|
|
7
|
+
* @stability unstable
|
|
6
8
|
* @since 4.0.0
|
|
7
9
|
*/
|
|
8
10
|
export * as BunChildProcessSpawner from "./BunChildProcessSpawner.js";
|
|
9
11
|
/**
|
|
12
|
+
* @stability unstable
|
|
10
13
|
* @since 4.0.0
|
|
11
14
|
*/
|
|
12
15
|
export * as BunClusterHttp from "./BunClusterHttp.js";
|
|
13
16
|
/**
|
|
17
|
+
* @stability unstable
|
|
14
18
|
* @since 4.0.0
|
|
15
19
|
*/
|
|
16
20
|
export * as BunClusterSocket from "./BunClusterSocket.js";
|
|
17
21
|
/**
|
|
22
|
+
* @stability unstable
|
|
18
23
|
* @since 1.0.0
|
|
19
24
|
*/
|
|
20
25
|
export * as BunCrypto from "./BunCrypto.js";
|
|
21
26
|
/**
|
|
27
|
+
* @stability unstable
|
|
22
28
|
* @since 4.0.0
|
|
23
29
|
*/
|
|
24
30
|
export * as BunFileSystem from "./BunFileSystem.js";
|
|
25
31
|
/**
|
|
32
|
+
* @stability unstable
|
|
26
33
|
* @since 4.0.0
|
|
27
34
|
*/
|
|
28
35
|
export * as BunHttpClient from "./BunHttpClient.js";
|
|
29
36
|
/**
|
|
37
|
+
* @stability unstable
|
|
30
38
|
* @since 4.0.0
|
|
31
39
|
*/
|
|
32
40
|
export * as BunHttpPlatform from "./BunHttpPlatform.js";
|
|
33
41
|
/**
|
|
42
|
+
* @stability unstable
|
|
34
43
|
* @since 4.0.0
|
|
35
44
|
*/
|
|
36
45
|
export * as BunHttpServer from "./BunHttpServer.js";
|
|
37
46
|
/**
|
|
47
|
+
* @stability unstable
|
|
38
48
|
* @since 4.0.0
|
|
39
49
|
*/
|
|
40
50
|
export * as BunHttpServerRequest from "./BunHttpServerRequest.js";
|
|
41
51
|
/**
|
|
52
|
+
* @stability unstable
|
|
42
53
|
* @since 4.0.0
|
|
43
54
|
*/
|
|
44
55
|
export * as BunMultipart from "./BunMultipart.js";
|
|
45
56
|
/**
|
|
57
|
+
* @stability unstable
|
|
46
58
|
* @since 4.0.0
|
|
47
59
|
*/
|
|
48
60
|
export * as BunPath from "./BunPath.js";
|
|
@@ -52,42 +64,52 @@ export * as BunPath from "./BunPath.js";
|
|
|
52
64
|
*/
|
|
53
65
|
export * as BunRedis from "./BunRedis.js";
|
|
54
66
|
/**
|
|
67
|
+
* @stability unstable
|
|
55
68
|
* @since 4.0.0
|
|
56
69
|
*/
|
|
57
70
|
export * as BunRuntime from "./BunRuntime.js";
|
|
58
71
|
/**
|
|
72
|
+
* @stability unstable
|
|
59
73
|
* @since 4.0.0
|
|
60
74
|
*/
|
|
61
75
|
export * as BunServices from "./BunServices.js";
|
|
62
76
|
/**
|
|
77
|
+
* @stability unstable
|
|
63
78
|
* @since 4.0.0
|
|
64
79
|
*/
|
|
65
80
|
export * as BunSink from "./BunSink.js";
|
|
66
81
|
/**
|
|
82
|
+
* @stability unstable
|
|
67
83
|
* @since 4.0.0
|
|
68
84
|
*/
|
|
69
85
|
export * as BunSocket from "./BunSocket.js";
|
|
70
86
|
/**
|
|
87
|
+
* @stability unstable
|
|
71
88
|
* @since 4.0.0
|
|
72
89
|
*/
|
|
73
90
|
export * as BunSocketServer from "./BunSocketServer.js";
|
|
74
91
|
/**
|
|
92
|
+
* @stability unstable
|
|
75
93
|
* @since 4.0.0
|
|
76
94
|
*/
|
|
77
95
|
export * as BunStdio from "./BunStdio.js";
|
|
78
96
|
/**
|
|
97
|
+
* @stability unstable
|
|
79
98
|
* @since 4.0.0
|
|
80
99
|
*/
|
|
81
100
|
export * as BunStream from "./BunStream.js";
|
|
82
101
|
/**
|
|
102
|
+
* @stability unstable
|
|
83
103
|
* @since 4.0.0
|
|
84
104
|
*/
|
|
85
105
|
export * as BunTerminal from "./BunTerminal.js";
|
|
86
106
|
/**
|
|
107
|
+
* @stability unstable
|
|
87
108
|
* @since 4.0.0
|
|
88
109
|
*/
|
|
89
110
|
export * as BunWorker from "./BunWorker.js";
|
|
90
111
|
/**
|
|
112
|
+
* @stability unstable
|
|
91
113
|
* @since 4.0.0
|
|
92
114
|
*/
|
|
93
115
|
export * as BunWorkerRunner from "./BunWorkerRunner.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;AAKA;AAEA;;;;AAIA,OAAO,KAAK,sBAAsB,MAAM,6BAA6B;AAErE;;;;AAIA,OAAO,KAAK,cAAc,MAAM,qBAAqB;AAErD;;;;AAIA,OAAO,KAAK,gBAAgB,MAAM,uBAAuB;AAEzD;;;;AAIA,OAAO,KAAK,SAAS,MAAM,gBAAgB;AAE3C;;;;AAIA,OAAO,KAAK,aAAa,MAAM,oBAAoB;AAEnD;;;;AAIA,OAAO,KAAK,aAAa,MAAM,oBAAoB;AAEnD;;;;AAIA,OAAO,KAAK,eAAe,MAAM,sBAAsB;AAEvD;;;;AAIA,OAAO,KAAK,aAAa,MAAM,oBAAoB;AAEnD;;;;AAIA,OAAO,KAAK,oBAAoB,MAAM,2BAA2B;AAEjE;;;;AAIA,OAAO,KAAK,YAAY,MAAM,mBAAmB;AAEjD;;;;AAIA,OAAO,KAAK,OAAO,MAAM,cAAc;AAEvC;;;;AAIA,OAAO,KAAK,QAAQ,MAAM,eAAe;AAEzC;;;;AAIA,OAAO,KAAK,UAAU,MAAM,iBAAiB;AAE7C;;;;AAIA,OAAO,KAAK,WAAW,MAAM,kBAAkB;AAE/C;;;;AAIA,OAAO,KAAK,OAAO,MAAM,cAAc;AAEvC;;;;AAIA,OAAO,KAAK,SAAS,MAAM,gBAAgB;AAE3C;;;;AAIA,OAAO,KAAK,eAAe,MAAM,sBAAsB;AAEvD;;;;AAIA,OAAO,KAAK,QAAQ,MAAM,eAAe;AAEzC;;;;AAIA,OAAO,KAAK,SAAS,MAAM,gBAAgB;AAE3C;;;;AAIA,OAAO,KAAK,WAAW,MAAM,kBAAkB;AAE/C;;;;AAIA,OAAO,KAAK,SAAS,MAAM,gBAAgB;AAE3C;;;;AAIA,OAAO,KAAK,eAAe,MAAM,sBAAsB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/platform-bun",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Platform specific implementations for the Bun runtime",
|
|
7
7
|
"homepage": "https://effect.website",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"provenance": true
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"effect": "^4.0.
|
|
52
|
+
"effect": "^4.0.2"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@effect/platform-node-shared": "^4.0.
|
|
55
|
+
"@effect/platform-node-shared": "^4.0.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/bun": "^1.4.2",
|
|
59
|
-
"effect": "^4.0.
|
|
59
|
+
"effect": "^4.0.2"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"codegen": "effect-utils codegen",
|
package/src/BunClusterHttp.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* choosing serialization, runner health checks, runner storage, message
|
|
7
7
|
* storage, and optional client-only mode from the supplied options.
|
|
8
8
|
*
|
|
9
|
+
* @stability unstable
|
|
9
10
|
* @since 4.0.0
|
|
10
11
|
*/
|
|
11
12
|
import * as HttpRunner from "effect/cluster/HttpRunner"
|
|
@@ -39,6 +40,7 @@ export {
|
|
|
39
40
|
/**
|
|
40
41
|
* Layer that provides a Kubernetes HTTP client for runner health checks.
|
|
41
42
|
*
|
|
43
|
+
* @stability unstable
|
|
42
44
|
* @category re-exports
|
|
43
45
|
* @since 4.0.0
|
|
44
46
|
*/
|
|
@@ -48,6 +50,7 @@ export {
|
|
|
48
50
|
/**
|
|
49
51
|
* Layer that provides a Bun HTTP server for cluster runners.
|
|
50
52
|
*
|
|
53
|
+
* @stability unstable
|
|
51
54
|
* @category layers
|
|
52
55
|
* @since 4.0.0
|
|
53
56
|
*/
|
|
@@ -94,6 +97,7 @@ export const layerHttpServer: Layer.Layer<
|
|
|
94
97
|
* @see {@link layerHttpServer} for the server layer used by non-client-only transports
|
|
95
98
|
* @see {@link layerK8sHttpClient} for Kubernetes runner health support
|
|
96
99
|
*
|
|
100
|
+
* @stability unstable
|
|
97
101
|
* @category layers
|
|
98
102
|
* @since 4.0.0
|
|
99
103
|
*/
|
package/src/BunClusterSocket.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* re-exports the shared socket client and server protocol layers and provides
|
|
8
8
|
* `layerK8sHttpClient` for Kubernetes runner health checks.
|
|
9
9
|
*
|
|
10
|
+
* @stability unstable
|
|
10
11
|
* @since 4.0.0
|
|
11
12
|
*/
|
|
12
13
|
import { layerClientProtocol, layerSocketServer } from "@effect/platform-node-shared/NodeClusterSocket"
|
|
@@ -36,6 +37,7 @@ export {
|
|
|
36
37
|
* Provides the cluster `RpcClientProtocol` using the shared socket client
|
|
37
38
|
* implementation.
|
|
38
39
|
*
|
|
40
|
+
* @stability unstable
|
|
39
41
|
* @category re-exports
|
|
40
42
|
* @since 4.0.0
|
|
41
43
|
*/
|
|
@@ -44,6 +46,7 @@ export {
|
|
|
44
46
|
* Provides the socket server used by Bun cluster runners through the shared
|
|
45
47
|
* socket server implementation.
|
|
46
48
|
*
|
|
49
|
+
* @stability unstable
|
|
47
50
|
* @category re-exports
|
|
48
51
|
* @since 4.0.0
|
|
49
52
|
*/
|
|
@@ -53,6 +56,7 @@ export {
|
|
|
53
56
|
/**
|
|
54
57
|
* Creates Bun socket cluster layers, configuring serialization, storage, runner health, and optional client-only mode.
|
|
55
58
|
*
|
|
59
|
+
* @stability unstable
|
|
56
60
|
* @category layers
|
|
57
61
|
* @since 4.0.0
|
|
58
62
|
*/
|
|
@@ -134,6 +138,7 @@ export const layer = <
|
|
|
134
138
|
/**
|
|
135
139
|
* Layer that provides `K8sHttpClient`, using the Kubernetes service-account CA certificate when it is available.
|
|
136
140
|
*
|
|
141
|
+
* @stability unstable
|
|
137
142
|
* @category layers
|
|
138
143
|
* @since 4.0.0
|
|
139
144
|
*/
|
package/src/BunCrypto.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* present for interoperability with existing protocols, not for new
|
|
10
10
|
* security-sensitive designs.
|
|
11
11
|
*
|
|
12
|
+
* @stability unstable
|
|
12
13
|
* @since 1.0.0
|
|
13
14
|
*/
|
|
14
15
|
import * as NodeCrypto from "@effect/platform-node-shared/NodeCrypto"
|
|
@@ -18,6 +19,7 @@ import type * as Layer from "effect/Layer"
|
|
|
18
19
|
/**
|
|
19
20
|
* Layer that provides the Bun Crypto service implementation.
|
|
20
21
|
*
|
|
22
|
+
* @stability unstable
|
|
21
23
|
* @category layers
|
|
22
24
|
* @since 1.0.0
|
|
23
25
|
*/
|
package/src/BunFileSystem.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* the shared Node file-system implementation. Once the layer is provided,
|
|
6
6
|
* programs use the standard `effect/FileSystem` service operations.
|
|
7
7
|
*
|
|
8
|
+
* @stability unstable
|
|
8
9
|
* @since 4.0.0
|
|
9
10
|
*/
|
|
10
11
|
import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem"
|
|
@@ -14,6 +15,7 @@ import type * as Layer from "effect/Layer"
|
|
|
14
15
|
/**
|
|
15
16
|
* Layer that provides the `FileSystem` service for Bun using the shared Node file-system implementation.
|
|
16
17
|
*
|
|
18
|
+
* @stability unstable
|
|
17
19
|
* @category layers
|
|
18
20
|
* @since 4.0.0
|
|
19
21
|
*/
|
package/src/BunHttpClient.ts
CHANGED
package/src/BunHttpPlatform.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* provides the Bun file-system layer and ETag generator required by
|
|
8
8
|
* `HttpPlatform`.
|
|
9
9
|
*
|
|
10
|
+
* @stability unstable
|
|
10
11
|
* @since 4.0.0
|
|
11
12
|
*/
|
|
12
13
|
import * as NodeHttpCompression from "@effect/platform-node-shared/NodeHttpCompression"
|
|
@@ -60,6 +61,7 @@ const make: Effect.Effect<
|
|
|
60
61
|
/**
|
|
61
62
|
* Layer that provides the Bun `HttpPlatform`, including file responses backed by `Bun.file`.
|
|
62
63
|
*
|
|
64
|
+
* @stability unstable
|
|
63
65
|
* @category layers
|
|
64
66
|
* @since 4.0.0
|
|
65
67
|
*/
|
package/src/BunHttpServer.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* for the server alone, the Bun HTTP support services, the combined server,
|
|
10
10
|
* configurable server options, and a test server with an HTTP client.
|
|
11
11
|
*
|
|
12
|
+
* @stability unstable
|
|
12
13
|
* @since 4.0.0
|
|
13
14
|
*/
|
|
14
15
|
import type { Server as BunServer, ServerWebSocket } from "bun"
|
|
@@ -60,6 +61,7 @@ import * as BunStream from "./BunStream.ts"
|
|
|
60
61
|
/**
|
|
61
62
|
* Bun serve options accepted by the HTTP server, extended with typed route definitions.
|
|
62
63
|
*
|
|
64
|
+
* @stability unstable
|
|
63
65
|
* @category options
|
|
64
66
|
* @since 4.0.0
|
|
65
67
|
*/
|
|
@@ -85,6 +87,7 @@ export type ServeOptions<R extends string> =
|
|
|
85
87
|
* that is compressed when per-message deflate is negotiated. It defaults to
|
|
86
88
|
* 1024, matching the default threshold of Node's `ws` server.
|
|
87
89
|
*
|
|
90
|
+
* @stability unstable
|
|
88
91
|
* @category options
|
|
89
92
|
* @since 4.0.0
|
|
90
93
|
*/
|
|
@@ -106,6 +109,7 @@ export type WebSocketOptions =
|
|
|
106
109
|
/**
|
|
107
110
|
* Creates a scoped Bun `HttpServer` from `Bun.serve` options, stopping the server on scope finalization with optional graceful shutdown settings.
|
|
108
111
|
*
|
|
112
|
+
* @stability unstable
|
|
109
113
|
* @category constructors
|
|
110
114
|
* @since 4.0.0
|
|
111
115
|
*/
|
|
@@ -189,7 +193,9 @@ export const make = Effect.fnUntraced(
|
|
|
189
193
|
|
|
190
194
|
const httpEffect = HttpEffect.toHandled(httpApp, (request, response) =>
|
|
191
195
|
Effect.sync(() => {
|
|
192
|
-
|
|
196
|
+
const bunRequest = request as BunServerRequest
|
|
197
|
+
bunRequest.resolve(makeResponse(request, response, services, scope))
|
|
198
|
+
if (upgradedSources.has(bunRequest.source)) return upgradedResponse
|
|
193
199
|
}), middleware)
|
|
194
200
|
|
|
195
201
|
function handler(request: Request, server: BunServer<WebSocketContext>) {
|
|
@@ -227,6 +233,12 @@ export const make = Effect.fnUntraced(
|
|
|
227
233
|
|
|
228
234
|
const MIN_COMPRESSIBLE_SIZE = 1024
|
|
229
235
|
|
|
236
|
+
// Reported to middleware in place of the handler's discarded response.
|
|
237
|
+
const upgradedResponse = ServerResponse.empty({ status: 101 })
|
|
238
|
+
|
|
239
|
+
// Keyed by source so request copies from `modify` share the upgrade state.
|
|
240
|
+
const upgradedSources = new WeakSet<Request>()
|
|
241
|
+
|
|
230
242
|
const makeResponse = (
|
|
231
243
|
request: ServerRequest.HttpServerRequest,
|
|
232
244
|
response: ServerResponse.HttpServerResponse,
|
|
@@ -294,6 +306,7 @@ const makeResponse = (
|
|
|
294
306
|
/**
|
|
295
307
|
* Layer that provides only `HttpServer` by constructing a scoped Bun server from the supplied serve options.
|
|
296
308
|
*
|
|
309
|
+
* @stability unstable
|
|
297
310
|
* @category layers
|
|
298
311
|
* @since 4.0.0
|
|
299
312
|
*/
|
|
@@ -308,6 +321,7 @@ export const layerServer: <R extends string>(
|
|
|
308
321
|
/**
|
|
309
322
|
* Layer that provides Bun HTTP support services: `HttpPlatform`, weak ETag generation, and `BunServices`.
|
|
310
323
|
*
|
|
324
|
+
* @stability unstable
|
|
311
325
|
* @category layers
|
|
312
326
|
* @since 4.0.0
|
|
313
327
|
*/
|
|
@@ -324,6 +338,7 @@ export const layerHttpServices: Layer.Layer<
|
|
|
324
338
|
/**
|
|
325
339
|
* Layer that provides a Bun `HttpServer` together with the Bun HTTP platform, ETag generator, and Bun services.
|
|
326
340
|
*
|
|
341
|
+
* @stability unstable
|
|
327
342
|
* @category layers
|
|
328
343
|
* @since 4.0.0
|
|
329
344
|
*/
|
|
@@ -344,6 +359,7 @@ export const layer = <R extends string>(
|
|
|
344
359
|
/**
|
|
345
360
|
* Layer that starts a Bun HTTP server on an ephemeral port for tests.
|
|
346
361
|
*
|
|
362
|
+
* @stability unstable
|
|
347
363
|
* @category testing
|
|
348
364
|
* @since 4.0.0
|
|
349
365
|
*/
|
|
@@ -359,6 +375,7 @@ export const layerTest: Layer.Layer<
|
|
|
359
375
|
/**
|
|
360
376
|
* Creates the Bun HTTP server and support-services layer from configurable serve options.
|
|
361
377
|
*
|
|
378
|
+
* @stability unstable
|
|
362
379
|
* @category layers
|
|
363
380
|
* @since 4.0.0
|
|
364
381
|
*/
|
|
@@ -613,6 +630,7 @@ class BunServerRequest extends Inspectable.Class implements ServerRequest.HttpSe
|
|
|
613
630
|
))
|
|
614
631
|
return
|
|
615
632
|
}
|
|
633
|
+
upgradedSources.add(this.source)
|
|
616
634
|
const compressionThreshold = this.compressionThreshold
|
|
617
635
|
resume(Effect.map(Deferred.await(deferred), (ws) => {
|
|
618
636
|
const write = (chunk: Uint8Array | string | Socket.CloseEvent) =>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* `Bun.BunRequest` stored inside a Bun-backed `HttpServerRequest`. It is meant
|
|
6
6
|
* for code that needs to interoperate with Bun-specific request APIs.
|
|
7
7
|
*
|
|
8
|
+
* @stability unstable
|
|
8
9
|
* @since 4.0.0
|
|
9
10
|
*/
|
|
10
11
|
import type { HttpServerRequest } from "effect/http/HttpServerRequest"
|
|
@@ -12,6 +13,7 @@ import type { HttpServerRequest } from "effect/http/HttpServerRequest"
|
|
|
12
13
|
/**
|
|
13
14
|
* Returns the underlying `Bun.BunRequest` from an Effect `HttpServerRequest`.
|
|
14
15
|
*
|
|
16
|
+
* @stability unstable
|
|
15
17
|
* @category accessors
|
|
16
18
|
* @since 4.0.0
|
|
17
19
|
*/
|
package/src/BunMultipart.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* `persisted` collects the form and writes file parts to scoped temporary files
|
|
7
7
|
* through the current `FileSystem`, `Path`, and `Scope` services.
|
|
8
8
|
*
|
|
9
|
+
* @stability unstable
|
|
9
10
|
* @since 4.0.0
|
|
10
11
|
*/
|
|
11
12
|
import type * as Effect from "effect/Effect"
|
|
@@ -19,6 +20,7 @@ import * as BunStream from "./BunStream.ts"
|
|
|
19
20
|
/**
|
|
20
21
|
* Parses a Bun `Request` body as multipart data and returns a stream of multipart parts.
|
|
21
22
|
*
|
|
23
|
+
* @stability unstable
|
|
22
24
|
* @category constructors
|
|
23
25
|
* @since 4.0.0
|
|
24
26
|
*/
|
|
@@ -39,6 +41,7 @@ export const stream = (source: Request): Stream.Stream<Multipart.Part, Multipart
|
|
|
39
41
|
/**
|
|
40
42
|
* Parses and persists multipart data from a Bun `Request`, requiring file-system, path, and scope services.
|
|
41
43
|
*
|
|
44
|
+
* @stability unstable
|
|
42
45
|
* @category constructors
|
|
43
46
|
* @since 4.0.0
|
|
44
47
|
*/
|
package/src/BunPath.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Bun code should receive path operations from the Effect environment instead
|
|
7
7
|
* of importing runtime path helpers directly.
|
|
8
8
|
*
|
|
9
|
+
* @stability unstable
|
|
9
10
|
* @since 4.0.0
|
|
10
11
|
*/
|
|
11
12
|
import * as NodePath from "@effect/platform-node-shared/NodePath"
|
|
@@ -15,6 +16,7 @@ import type { Path } from "effect/Path"
|
|
|
15
16
|
/**
|
|
16
17
|
* Layer that provides the default `Path` service for Bun using the shared Node path implementation.
|
|
17
18
|
*
|
|
19
|
+
* @stability unstable
|
|
18
20
|
* @category layers
|
|
19
21
|
* @since 4.0.0
|
|
20
22
|
*/
|
|
@@ -23,6 +25,7 @@ export const layer: Layer.Layer<Path> = NodePath.layer
|
|
|
23
25
|
/**
|
|
24
26
|
* Layer that provides the POSIX `Path` service for Bun using the shared Node path implementation.
|
|
25
27
|
*
|
|
28
|
+
* @stability unstable
|
|
26
29
|
* @category layers
|
|
27
30
|
* @since 4.0.0
|
|
28
31
|
*/
|
|
@@ -31,6 +34,7 @@ export const layerPosix: Layer.Layer<Path> = NodePath.layerPosix
|
|
|
31
34
|
/**
|
|
32
35
|
* Layer that provides the Win32 `Path` service for Bun using the shared Node path implementation.
|
|
33
36
|
*
|
|
37
|
+
* @stability unstable
|
|
34
38
|
* @category layers
|
|
35
39
|
* @since 4.0.0
|
|
36
40
|
*/
|
package/src/BunRuntime.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* fiber in Bun. It reuses the shared Node runtime runner, including its error
|
|
6
6
|
* reporting, signal handling, and optional teardown behavior.
|
|
7
7
|
*
|
|
8
|
+
* @stability unstable
|
|
8
9
|
* @since 4.0.0
|
|
9
10
|
*/
|
|
10
11
|
import * as NodeRuntime from "@effect/platform-node-shared/NodeRuntime"
|
|
@@ -32,6 +33,7 @@ import type { Teardown } from "effect/Runtime"
|
|
|
32
33
|
* - `disablePrettyLogger`: Avoid adding the pretty logger.
|
|
33
34
|
* - `teardown`: Provide custom finalization logic.
|
|
34
35
|
*
|
|
36
|
+
* @stability unstable
|
|
35
37
|
* @category running
|
|
36
38
|
* @since 4.0.0
|
|
37
39
|
*/
|
|
@@ -57,6 +59,7 @@ export const runMain: {
|
|
|
57
59
|
* - `disablePrettyLogger`: Avoid adding the pretty logger.
|
|
58
60
|
* - `teardown`: Provide custom finalization logic.
|
|
59
61
|
*
|
|
62
|
+
* @stability unstable
|
|
60
63
|
* @category running
|
|
61
64
|
* @since 4.0.0
|
|
62
65
|
*/
|
|
@@ -87,6 +90,7 @@ export const runMain: {
|
|
|
87
90
|
* - `disablePrettyLogger`: Avoid adding the pretty logger.
|
|
88
91
|
* - `teardown`: Provide custom finalization logic.
|
|
89
92
|
*
|
|
93
|
+
* @stability unstable
|
|
90
94
|
* @category running
|
|
91
95
|
* @since 4.0.0
|
|
92
96
|
*/
|