@effect/platform-bun 4.0.0-beta.7 → 4.0.0-beta.71

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 (108) hide show
  1. package/dist/BunChildProcessSpawner.d.ts +1 -1
  2. package/dist/BunChildProcessSpawner.js +1 -1
  3. package/dist/BunClusterHttp.d.ts +70 -7
  4. package/dist/BunClusterHttp.d.ts.map +1 -1
  5. package/dist/BunClusterHttp.js +41 -10
  6. package/dist/BunClusterHttp.js.map +1 -1
  7. package/dist/BunClusterSocket.d.ts +54 -9
  8. package/dist/BunClusterSocket.d.ts.map +1 -1
  9. package/dist/BunClusterSocket.js +54 -9
  10. package/dist/BunClusterSocket.js.map +1 -1
  11. package/dist/BunCrypto.d.ts +10 -0
  12. package/dist/BunCrypto.d.ts.map +1 -0
  13. package/dist/BunCrypto.js +22 -0
  14. package/dist/BunCrypto.js.map +1 -0
  15. package/dist/BunFileSystem.d.ts +4 -2
  16. package/dist/BunFileSystem.d.ts.map +1 -1
  17. package/dist/BunFileSystem.js +27 -3
  18. package/dist/BunFileSystem.js.map +1 -1
  19. package/dist/BunHttpClient.d.ts +2 -2
  20. package/dist/BunHttpClient.js +2 -2
  21. package/dist/BunHttpPlatform.d.ts +4 -2
  22. package/dist/BunHttpPlatform.d.ts.map +1 -1
  23. package/dist/BunHttpPlatform.js +5 -3
  24. package/dist/BunHttpPlatform.js.map +1 -1
  25. package/dist/BunHttpServer.d.ts +77 -19
  26. package/dist/BunHttpServer.d.ts.map +1 -1
  27. package/dist/BunHttpServer.js +63 -36
  28. package/dist/BunHttpServer.js.map +1 -1
  29. package/dist/BunHttpServerRequest.d.ts +26 -2
  30. package/dist/BunHttpServerRequest.d.ts.map +1 -1
  31. package/dist/BunHttpServerRequest.js +3 -1
  32. package/dist/BunHttpServerRequest.js.map +1 -1
  33. package/dist/BunMultipart.d.ts +28 -5
  34. package/dist/BunMultipart.d.ts.map +1 -1
  35. package/dist/BunMultipart.js +15 -5
  36. package/dist/BunMultipart.js.map +1 -1
  37. package/dist/BunPath.d.ts +12 -6
  38. package/dist/BunPath.d.ts.map +1 -1
  39. package/dist/BunPath.js +42 -7
  40. package/dist/BunPath.js.map +1 -1
  41. package/dist/BunRedis.d.ts +48 -9
  42. package/dist/BunRedis.d.ts.map +1 -1
  43. package/dist/BunRedis.js +51 -12
  44. package/dist/BunRedis.js.map +1 -1
  45. package/dist/BunRuntime.d.ts +24 -30
  46. package/dist/BunRuntime.d.ts.map +1 -1
  47. package/dist/BunRuntime.js +38 -11
  48. package/dist/BunRuntime.js.map +1 -1
  49. package/dist/BunServices.d.ts +32 -5
  50. package/dist/BunServices.d.ts.map +1 -1
  51. package/dist/BunServices.js +7 -3
  52. package/dist/BunServices.js.map +1 -1
  53. package/dist/BunSink.d.ts +2 -2
  54. package/dist/BunSink.js +2 -2
  55. package/dist/BunSocket.d.ts +30 -4
  56. package/dist/BunSocket.d.ts.map +1 -1
  57. package/dist/BunSocket.js +10 -3
  58. package/dist/BunSocket.js.map +1 -1
  59. package/dist/BunSocketServer.d.ts +2 -2
  60. package/dist/BunSocketServer.js +2 -2
  61. package/dist/BunStdio.d.ts +5 -2
  62. package/dist/BunStdio.d.ts.map +1 -1
  63. package/dist/BunStdio.js +36 -3
  64. package/dist/BunStdio.js.map +1 -1
  65. package/dist/BunStream.d.ts +3 -2
  66. package/dist/BunStream.d.ts.map +1 -1
  67. package/dist/BunStream.js +34 -3
  68. package/dist/BunStream.js.map +1 -1
  69. package/dist/BunTerminal.d.ts +8 -2
  70. package/dist/BunTerminal.d.ts.map +1 -1
  71. package/dist/BunTerminal.js +41 -3
  72. package/dist/BunTerminal.js.map +1 -1
  73. package/dist/BunWorker.d.ts +9 -2
  74. package/dist/BunWorker.d.ts.map +1 -1
  75. package/dist/BunWorker.js +46 -4
  76. package/dist/BunWorker.js.map +1 -1
  77. package/dist/BunWorkerRunner.d.ts +5 -1
  78. package/dist/BunWorkerRunner.d.ts.map +1 -1
  79. package/dist/BunWorkerRunner.js +41 -5
  80. package/dist/BunWorkerRunner.js.map +1 -1
  81. package/dist/index.d.ts +25 -23
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +25 -23
  84. package/dist/index.js.map +1 -1
  85. package/package.json +5 -5
  86. package/src/BunChildProcessSpawner.ts +1 -1
  87. package/src/BunClusterHttp.ts +75 -11
  88. package/src/BunClusterSocket.ts +54 -9
  89. package/src/BunCrypto.ts +24 -0
  90. package/src/BunFileSystem.ts +27 -3
  91. package/src/BunHttpClient.ts +2 -2
  92. package/src/BunHttpPlatform.ts +28 -4
  93. package/src/BunHttpServer.ts +128 -56
  94. package/src/BunHttpServerRequest.ts +26 -2
  95. package/src/BunMultipart.ts +36 -6
  96. package/src/BunPath.ts +42 -7
  97. package/src/BunRedis.ts +53 -14
  98. package/src/BunRuntime.ts +54 -31
  99. package/src/BunServices.ts +34 -5
  100. package/src/BunSink.ts +2 -2
  101. package/src/BunSocket.ts +30 -4
  102. package/src/BunSocketServer.ts +2 -2
  103. package/src/BunStdio.ts +36 -3
  104. package/src/BunStream.ts +34 -3
  105. package/src/BunTerminal.ts +41 -3
  106. package/src/BunWorker.ts +46 -4
  107. package/src/BunWorkerRunner.ts +41 -5
  108. package/src/index.ts +26 -23
package/dist/index.d.ts CHANGED
@@ -1,90 +1,92 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * @since 4.0.0
3
3
  */
4
4
  /**
5
- * Node.js implementation of `ChildProcessSpawner`.
6
- *
7
- * @since 1.0.0
5
+ * @since 4.0.0
8
6
  */
9
7
  export * as BunChildProcessSpawner from "./BunChildProcessSpawner.ts";
10
8
  /**
11
- * @since 1.0.0
9
+ * @since 4.0.0
12
10
  */
13
11
  export * as BunClusterHttp from "./BunClusterHttp.ts";
14
12
  /**
15
- * @since 1.0.0
13
+ * @since 4.0.0
16
14
  */
17
15
  export * as BunClusterSocket from "./BunClusterSocket.ts";
18
16
  /**
19
17
  * @since 1.0.0
20
18
  */
19
+ export * as BunCrypto from "./BunCrypto.ts";
20
+ /**
21
+ * @since 4.0.0
22
+ */
21
23
  export * as BunFileSystem from "./BunFileSystem.ts";
22
24
  /**
23
- * @since 1.0.0
25
+ * @since 4.0.0
24
26
  */
25
27
  export * as BunHttpClient from "./BunHttpClient.ts";
26
28
  /**
27
- * @since 1.0.0
29
+ * @since 4.0.0
28
30
  */
29
31
  export * as BunHttpPlatform from "./BunHttpPlatform.ts";
30
32
  /**
31
- * @since 1.0.0
33
+ * @since 4.0.0
32
34
  */
33
35
  export * as BunHttpServer from "./BunHttpServer.ts";
34
36
  /**
35
- * @since 1.0.0
37
+ * @since 4.0.0
36
38
  */
37
39
  export * as BunHttpServerRequest from "./BunHttpServerRequest.ts";
38
40
  /**
39
- * @since 1.0.0
41
+ * @since 4.0.0
40
42
  */
41
43
  export * as BunMultipart from "./BunMultipart.ts";
42
44
  /**
43
- * @since 1.0.0
45
+ * @since 4.0.0
44
46
  */
45
47
  export * as BunPath from "./BunPath.ts";
46
48
  /**
47
- * @since 1.0.0
49
+ * @since 4.0.0
48
50
  */
49
51
  export * as BunRedis from "./BunRedis.ts";
50
52
  /**
51
- * @since 1.0.0
53
+ * @since 4.0.0
52
54
  */
53
55
  export * as BunRuntime from "./BunRuntime.ts";
54
56
  /**
55
- * @since 1.0.0
57
+ * @since 4.0.0
56
58
  */
57
59
  export * as BunServices from "./BunServices.ts";
58
60
  /**
59
- * @since 1.0.0
61
+ * @since 4.0.0
60
62
  */
61
63
  export * as BunSink from "./BunSink.ts";
62
64
  /**
63
- * @since 1.0.0
65
+ * @since 4.0.0
64
66
  */
65
67
  export * as BunSocket from "./BunSocket.ts";
66
68
  /**
67
- * @since 1.0.0
69
+ * @since 4.0.0
68
70
  */
69
71
  export * as BunSocketServer from "./BunSocketServer.ts";
70
72
  /**
71
- * @since 1.0.0
73
+ * @since 4.0.0
72
74
  */
73
75
  export * as BunStdio from "./BunStdio.ts";
74
76
  /**
75
- * @since 1.0.0
77
+ * @since 4.0.0
76
78
  */
77
79
  export * as BunStream from "./BunStream.ts";
78
80
  /**
79
- * @since 1.0.0
81
+ * @since 4.0.0
80
82
  */
81
83
  export * as BunTerminal from "./BunTerminal.ts";
82
84
  /**
83
- * @since 1.0.0
85
+ * @since 4.0.0
84
86
  */
85
87
  export * as BunWorker from "./BunWorker.ts";
86
88
  /**
87
- * @since 1.0.0
89
+ * @since 4.0.0
88
90
  */
89
91
  export * as BunWorkerRunner from "./BunWorkerRunner.ts";
90
92
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;GAIG;AACH,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAA;AAErE;;GAEG;AACH,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAA;AAErD;;GAEG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AAEzD;;GAEG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD;;GAEG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD;;GAEG;AACH,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AAEvD;;GAEG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD;;GAEG;AACH,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAA;AAEjE;;GAEG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAEjD;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC;;GAEG;AACH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C;;GAEG;AACH,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AAEvD;;GAEG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAA;AAErE;;GAEG;AACH,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAA;AAErD;;GAEG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AAEzD;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD;;GAEG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD;;GAEG;AACH,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AAEvD;;GAEG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD;;GAEG;AACH,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAA;AAEjE;;GAEG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAEjD;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC;;GAEG;AACH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C;;GAEG;AACH,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AAEvD;;GAEG;AACH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA"}
package/dist/index.js CHANGED
@@ -1,91 +1,93 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * @since 4.0.0
3
3
  */
4
4
  // @barrel: Auto-generated exports. Do not edit manually.
5
5
  /**
6
- * Node.js implementation of `ChildProcessSpawner`.
7
- *
8
- * @since 1.0.0
6
+ * @since 4.0.0
9
7
  */
10
8
  export * as BunChildProcessSpawner from "./BunChildProcessSpawner.js";
11
9
  /**
12
- * @since 1.0.0
10
+ * @since 4.0.0
13
11
  */
14
12
  export * as BunClusterHttp from "./BunClusterHttp.js";
15
13
  /**
16
- * @since 1.0.0
14
+ * @since 4.0.0
17
15
  */
18
16
  export * as BunClusterSocket from "./BunClusterSocket.js";
19
17
  /**
20
18
  * @since 1.0.0
21
19
  */
20
+ export * as BunCrypto from "./BunCrypto.js";
21
+ /**
22
+ * @since 4.0.0
23
+ */
22
24
  export * as BunFileSystem from "./BunFileSystem.js";
23
25
  /**
24
- * @since 1.0.0
26
+ * @since 4.0.0
25
27
  */
26
28
  export * as BunHttpClient from "./BunHttpClient.js";
27
29
  /**
28
- * @since 1.0.0
30
+ * @since 4.0.0
29
31
  */
30
32
  export * as BunHttpPlatform from "./BunHttpPlatform.js";
31
33
  /**
32
- * @since 1.0.0
34
+ * @since 4.0.0
33
35
  */
34
36
  export * as BunHttpServer from "./BunHttpServer.js";
35
37
  /**
36
- * @since 1.0.0
38
+ * @since 4.0.0
37
39
  */
38
40
  export * as BunHttpServerRequest from "./BunHttpServerRequest.js";
39
41
  /**
40
- * @since 1.0.0
42
+ * @since 4.0.0
41
43
  */
42
44
  export * as BunMultipart from "./BunMultipart.js";
43
45
  /**
44
- * @since 1.0.0
46
+ * @since 4.0.0
45
47
  */
46
48
  export * as BunPath from "./BunPath.js";
47
49
  /**
48
- * @since 1.0.0
50
+ * @since 4.0.0
49
51
  */
50
52
  export * as BunRedis from "./BunRedis.js";
51
53
  /**
52
- * @since 1.0.0
54
+ * @since 4.0.0
53
55
  */
54
56
  export * as BunRuntime from "./BunRuntime.js";
55
57
  /**
56
- * @since 1.0.0
58
+ * @since 4.0.0
57
59
  */
58
60
  export * as BunServices from "./BunServices.js";
59
61
  /**
60
- * @since 1.0.0
62
+ * @since 4.0.0
61
63
  */
62
64
  export * as BunSink from "./BunSink.js";
63
65
  /**
64
- * @since 1.0.0
66
+ * @since 4.0.0
65
67
  */
66
68
  export * as BunSocket from "./BunSocket.js";
67
69
  /**
68
- * @since 1.0.0
70
+ * @since 4.0.0
69
71
  */
70
72
  export * as BunSocketServer from "./BunSocketServer.js";
71
73
  /**
72
- * @since 1.0.0
74
+ * @since 4.0.0
73
75
  */
74
76
  export * as BunStdio from "./BunStdio.js";
75
77
  /**
76
- * @since 1.0.0
78
+ * @since 4.0.0
77
79
  */
78
80
  export * as BunStream from "./BunStream.js";
79
81
  /**
80
- * @since 1.0.0
82
+ * @since 4.0.0
81
83
  */
82
84
  export * as BunTerminal from "./BunTerminal.js";
83
85
  /**
84
- * @since 1.0.0
86
+ * @since 4.0.0
85
87
  */
86
88
  export * as BunWorker from "./BunWorker.js";
87
89
  /**
88
- * @since 1.0.0
90
+ * @since 4.0.0
89
91
  */
90
92
  export * as BunWorkerRunner from "./BunWorkerRunner.js";
91
93
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["BunChildProcessSpawner","BunClusterHttp","BunClusterSocket","BunFileSystem","BunHttpClient","BunHttpPlatform","BunHttpServer","BunHttpServerRequest","BunMultipart","BunPath","BunRedis","BunRuntime","BunServices","BunSink","BunSocket","BunSocketServer","BunStdio","BunStream","BunTerminal","BunWorker","BunWorkerRunner"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA;AAEA;;;;;AAKA,OAAO,KAAKA,sBAAsB,MAAM,6BAA6B;AAErE;;;AAGA,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD;;;AAGA,OAAO,KAAKC,gBAAgB,MAAM,uBAAuB;AAEzD;;;AAGA,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AAEnD;;;AAGA,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AAEnD;;;AAGA,OAAO,KAAKC,eAAe,MAAM,sBAAsB;AAEvD;;;AAGA,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AAEnD;;;AAGA,OAAO,KAAKC,oBAAoB,MAAM,2BAA2B;AAEjE;;;AAGA,OAAO,KAAKC,YAAY,MAAM,mBAAmB;AAEjD;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC;;;AAGA,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,eAAe,MAAM,sBAAsB;AAEvD;;;AAGA,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,eAAe,MAAM,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["BunChildProcessSpawner","BunClusterHttp","BunClusterSocket","BunCrypto","BunFileSystem","BunHttpClient","BunHttpPlatform","BunHttpServer","BunHttpServerRequest","BunMultipart","BunPath","BunRedis","BunRuntime","BunServices","BunSink","BunSocket","BunSocketServer","BunStdio","BunStream","BunTerminal","BunWorker","BunWorkerRunner"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA;AAEA;;;AAGA,OAAO,KAAKA,sBAAsB,MAAM,6BAA6B;AAErE;;;AAGA,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD;;;AAGA,OAAO,KAAKC,gBAAgB,MAAM,uBAAuB;AAEzD;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AAEnD;;;AAGA,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AAEnD;;;AAGA,OAAO,KAAKC,eAAe,MAAM,sBAAsB;AAEvD;;;AAGA,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AAEnD;;;AAGA,OAAO,KAAKC,oBAAoB,MAAM,2BAA2B;AAEjE;;;AAGA,OAAO,KAAKC,YAAY,MAAM,mBAAmB;AAEjD;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC;;;AAGA,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,eAAe,MAAM,sBAAsB;AAEvD;;;AAGA,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,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.0-beta.7",
4
+ "version": "4.0.0-beta.71",
5
5
  "license": "MIT",
6
6
  "description": "Platform specific implementations for the Bun runtime",
7
7
  "homepage": "https://effect.website",
@@ -45,14 +45,14 @@
45
45
  "provenance": true
46
46
  },
47
47
  "peerDependencies": {
48
- "effect": "^4.0.0-beta.7"
48
+ "effect": "^4.0.0-beta.71"
49
49
  },
50
50
  "dependencies": {
51
- "@effect/platform-node-shared": "^4.0.0-beta.7"
51
+ "@effect/platform-node-shared": "^4.0.0-beta.71"
52
52
  },
53
53
  "devDependencies": {
54
- "@types/bun": "^1.3.8",
55
- "effect": "^4.0.0-beta.7"
54
+ "@types/bun": "^1.3.13",
55
+ "effect": "^4.0.0-beta.71"
56
56
  },
57
57
  "scripts": {
58
58
  "codegen": "effect-utils codegen",
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Node.js implementation of `ChildProcessSpawner`.
3
3
  *
4
- * @since 1.0.0
4
+ * @since 4.0.0
5
5
  */
6
6
  export * from "@effect/platform-node-shared/NodeChildProcessSpawner"
@@ -1,9 +1,43 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * The `BunClusterHttp` module provides the Bun HTTP and WebSocket transports
3
+ * for Effect Cluster runners. It wires `HttpRunner` to the Bun HTTP server,
4
+ * supplies Fetch and Bun WebSocket client protocols, and builds a complete
5
+ * sharding layer with serialization, runner health, runner storage, and message
6
+ * storage.
7
+ *
8
+ * **Common tasks**
9
+ *
10
+ * - Run a Bun process as a cluster runner over HTTP or WebSocket with
11
+ * {@link layer}
12
+ * - Connect a client-only process to an existing HTTP cluster without starting
13
+ * a runner server
14
+ * - Use SQL-backed storage for durable multi-process clusters, `local` storage
15
+ * for short-lived development, or `byo` storage when the deployment owns the
16
+ * persistence boundary
17
+ * - Check runner health with protocol pings or Kubernetes pod readiness through
18
+ * {@link layerK8sHttpClient}
19
+ *
20
+ * **Gotchas**
21
+ *
22
+ * - `runnerAddress` is the host and port advertised to other runners; set
23
+ * `runnerListenAddress` when the local bind address differs from the
24
+ * externally reachable address
25
+ * - The HTTP and WebSocket transports serve runner RPCs at the default
26
+ * `HttpRunner` route, so proxies and load balancers must preserve the path
27
+ * and allow WebSocket upgrades when `transport` is `"websocket"`
28
+ * - `clientOnly` does not start an HTTP server or receive shard assignments
29
+ * - SQL storage is the default; `local` storage is in-memory/noop and `byo`
30
+ * requires the surrounding application to provide both runner and message
31
+ * storage services
32
+ * - Ping health checks use the selected transport and serialization, so route,
33
+ * port, proxy, or codec mismatches can make a runner appear unhealthy
34
+ *
35
+ * @since 4.0.0
3
36
  */
4
37
  import type * as Config from "effect/Config"
5
38
  import * as Effect from "effect/Effect"
6
39
  import * as Layer from "effect/Layer"
40
+ import * as Option from "effect/Option"
7
41
  import * as HttpRunner from "effect/unstable/cluster/HttpRunner"
8
42
  import * as MessageStorage from "effect/unstable/cluster/MessageStorage"
9
43
  import * as RunnerHealth from "effect/unstable/cluster/RunnerHealth"
@@ -28,15 +62,19 @@ import * as BunSocket from "./BunSocket.ts"
28
62
 
29
63
  export {
30
64
  /**
31
- * @since 1.0.0
32
- * @category Re-exports
65
+ * Kubernetes HTTP client layer used for runner health checks.
66
+ *
67
+ * @category re-exports
68
+ * @since 4.0.0
33
69
  */
34
70
  layerK8sHttpClient
35
71
  }
36
72
 
37
73
  /**
38
- * @since 1.0.0
39
- * @category Layers
74
+ * Bun HTTP server layer for cluster runners, using `ShardingConfig.runnerListenAddress` or `runnerAddress` as the listen address.
75
+ *
76
+ * @category layers
77
+ * @since 4.0.0
40
78
  */
41
79
  export const layerHttpServer: Layer.Layer<
42
80
  | HttpPlatform
@@ -47,16 +85,42 @@ export const layerHttpServer: Layer.Layer<
47
85
  ShardingConfig.ShardingConfig
48
86
  > = Effect.gen(function*() {
49
87
  const config = yield* ShardingConfig.ShardingConfig
50
- const listenAddress = config.runnerListenAddress ?? config.runnerAddress
51
- if (listenAddress === undefined) {
52
- return yield* Effect.die("BunClusterHttp.layerHttpServer: ShardingConfig.runnerAddress is undefined")
88
+ const listenAddress = Option.orElse(config.runnerListenAddress, () => config.runnerAddress)
89
+ if (Option.isNone(listenAddress)) {
90
+ return yield* Effect.die("BunClusterHttp.layerHttpServer: ShardingConfig.runnerAddress is None")
53
91
  }
54
- return BunHttpServer.layer(listenAddress)
92
+ return BunHttpServer.layer(listenAddress.value)
55
93
  }).pipe(Layer.unwrap)
56
94
 
57
95
  /**
58
- * @since 1.0.0
59
- * @category Layers
96
+ * Creates Bun cluster layers for HTTP or WebSocket transport, configuring serialization, storage, runner health, and optional client-only mode.
97
+ *
98
+ * **When to use**
99
+ *
100
+ * Use to install the complete Bun HTTP or WebSocket cluster layer, including
101
+ * client-only cluster access when a process should connect without serving
102
+ * runner RPCs.
103
+ *
104
+ * **Details**
105
+ *
106
+ * `serialization` defaults to MessagePack, `runnerHealth` defaults to ping
107
+ * checks, SQL-backed storage is used by default, and `shardingConfig` is
108
+ * overlaid on environment-loaded sharding configuration. `local` storage uses
109
+ * no-op message storage plus in-memory runner storage, while `byo` leaves both
110
+ * message and runner storage for the caller to provide.
111
+ *
112
+ * **Gotchas**
113
+ *
114
+ * `clientOnly` does not start the HTTP server or receive shard assignments.
115
+ * Non-client-only mode listens with `runnerListenAddress` when present, falling
116
+ * back to `runnerAddress`. HTTP and WebSocket runner RPCs use the default
117
+ * `HttpRunner` route.
118
+ *
119
+ * @see {@link layerHttpServer} for the server layer used by non-client-only transports
120
+ * @see {@link layerK8sHttpClient} for Kubernetes runner health support
121
+ *
122
+ * @category layers
123
+ * @since 4.0.0
60
124
  */
61
125
  export const layer = <
62
126
  const ClientOnly extends boolean = false,
@@ -1,5 +1,40 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * The `BunClusterSocket` module provides the Bun socket transport for Effect
3
+ * Cluster runners. It wires `SocketRunner` to Bun-compatible TCP sockets,
4
+ * supplies RPC client and server protocol layers, and builds a complete
5
+ * sharding layer with serialization, runner health, runner storage, and message
6
+ * storage.
7
+ *
8
+ * **Common tasks**
9
+ *
10
+ * - Run a Bun process as a cluster runner over raw TCP sockets with
11
+ * {@link layer}
12
+ * - Connect a client-only process to an existing socket cluster without
13
+ * starting a runner server
14
+ * - Use SQL-backed storage for durable multi-process clusters, `local` storage
15
+ * for short-lived development, or `byo` storage when the deployment owns the
16
+ * persistence boundary
17
+ * - Check runner health with socket pings or Kubernetes pod readiness through
18
+ * {@link layerK8sHttpClient}
19
+ *
20
+ * **Gotchas**
21
+ *
22
+ * - `runnerAddress` is the host and port advertised to other runners; set
23
+ * `runnerListenAddress` when the local bind address differs from the
24
+ * externally reachable address
25
+ * - The socket transport is point-to-point RPC, not cluster gossip: runner
26
+ * membership, shard ownership, and persisted delivery are coordinated through
27
+ * `RunnerStorage`, `MessageStorage`, and `RunnerHealth`
28
+ * - `clientOnly` does not start a socket server or receive shard assignments
29
+ * - SQL storage is the default; `local` storage is in-memory/noop and `byo`
30
+ * requires the surrounding application to provide both runner and message
31
+ * storage services
32
+ * - Ping health checks use the same socket protocol, so unreachable ports,
33
+ * firewalls, or serialization mismatches can make a runner appear unhealthy
34
+ * - Kubernetes health checks use Bun's Fetch-backed HTTP client and the service
35
+ * account CA certificate when it is available
36
+ *
37
+ * @since 4.0.0
3
38
  */
4
39
  import { layerClientProtocol, layerSocketServer } from "@effect/platform-node-shared/NodeClusterSocket"
5
40
  import type * as Config from "effect/Config"
@@ -24,20 +59,28 @@ import * as BunFileSystem from "./BunFileSystem.ts"
24
59
 
25
60
  export {
26
61
  /**
27
- * @since 1.0.0
28
- * @category Re-exports
62
+ * Provides the cluster `RpcClientProtocol` using the shared socket client
63
+ * implementation.
64
+ *
65
+ * @category re-exports
66
+ * @since 4.0.0
29
67
  */
30
68
  layerClientProtocol,
31
69
  /**
32
- * @since 1.0.0
33
- * @category Re-exports
70
+ * Provides the socket server used by Bun cluster runners through the shared
71
+ * socket server implementation.
72
+ *
73
+ * @category re-exports
74
+ * @since 4.0.0
34
75
  */
35
76
  layerSocketServer
36
77
  }
37
78
 
38
79
  /**
39
- * @since 1.0.0
40
- * @category Layers
80
+ * Creates Bun socket cluster layers, configuring serialization, storage, runner health, and optional client-only mode.
81
+ *
82
+ * @category layers
83
+ * @since 4.0.0
41
84
  */
42
85
  export const layer = <
43
86
  const ClientOnly extends boolean = false,
@@ -110,8 +153,10 @@ export const layer = <
110
153
  }
111
154
 
112
155
  /**
113
- * @since 1.0.0
114
- * @category Layers
156
+ * Layer that provides `K8sHttpClient`, using the Kubernetes service-account CA certificate when it is available.
157
+ *
158
+ * @category layers
159
+ * @since 4.0.0
115
160
  */
116
161
  export const layerK8sHttpClient: Layer.Layer<K8sHttpClient.K8sHttpClient> = K8sHttpClient.layer.pipe(
117
162
  Layer.provide(Layer.unwrap(Effect.gen(function*() {
@@ -0,0 +1,24 @@
1
+ /**
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.
11
+ *
12
+ * @since 1.0.0
13
+ */
14
+ import * as NodeCrypto from "@effect/platform-node-shared/NodeCrypto"
15
+ import type * as Crypto from "effect/Crypto"
16
+ import type * as Layer from "effect/Layer"
17
+
18
+ /**
19
+ * A layer that provides the Bun Crypto service implementation.
20
+ *
21
+ * @category layers
22
+ * @since 1.0.0
23
+ */
24
+ export const layer: Layer.Layer<Crypto.Crypto> = NodeCrypto.layer
@@ -1,12 +1,36 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * Bun layer for Effect's `FileSystem` service.
3
+ *
4
+ * Use this module at the edge of Bun applications, CLIs, scripts, and tests
5
+ * that need real local filesystem access through `effect/FileSystem`: reading
6
+ * and writing files, creating directories and temporary files, inspecting
7
+ * metadata, managing links, or watching paths for changes. It exposes only the
8
+ * Bun `FileSystem` layer; the operations themselves are accessed from the
9
+ * `FileSystem` service once the layer is provided, or from `BunServices.layer`
10
+ * when the program also needs the standard Bun path, stdio, terminal, and child
11
+ * process services.
12
+ *
13
+ * Bun supports Node-compatible filesystem APIs, so this layer reuses the shared
14
+ * Node filesystem implementation. Paths therefore follow the current process and
15
+ * host platform rules: relative paths are resolved from the current working
16
+ * directory, separators and drive/UNC behavior are platform-dependent, and
17
+ * request URLs should be decoded and validated before being mapped to local
18
+ * paths. The service works with bytes, scoped file handles, and Effect
19
+ * streams/sinks; use `FileSystem.stream` for large files instead of
20
+ * `readFile`, and remember that stream offsets and lengths are byte positions.
21
+ * Bun `File` and `Blob` values are not filesystem handles here; path-based HTTP
22
+ * file responses are handled by the Bun HTTP platform adapter with `Bun.file`.
23
+ *
24
+ * @since 4.0.0
3
25
  */
4
26
  import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem"
5
27
  import type { FileSystem } from "effect/FileSystem"
6
28
  import type * as Layer from "effect/Layer"
7
29
 
8
30
  /**
9
- * @since 1.0.0
10
- * @category layer
31
+ * Layer that provides the `FileSystem` service for Bun using the shared Node file-system implementation.
32
+ *
33
+ * @category layers
34
+ * @since 4.0.0
11
35
  */
12
36
  export const layer: Layer.Layer<FileSystem, never, never> = NodeFileSystem.layer
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * @since 4.0.0
3
3
  */
4
4
 
5
5
  /**
6
- * @since 1.0.0
7
6
  * @category re-exports
7
+ * @since 4.0.0
8
8
  */
9
9
  export * from "effect/unstable/http/FetchHttpClient"
@@ -1,5 +1,27 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * Bun implementation of the Effect HTTP platform service.
3
+ *
4
+ * This module connects the portable `HttpPlatform` file response helpers to
5
+ * Bun's Web-compatible runtime. `BunHttpServer` provides this layer when
6
+ * applications serve local files, public assets, downloads, byte ranges, or
7
+ * Web `File` values from Effect `HttpServerResponse` constructors.
8
+ *
9
+ * Path-based responses are backed by `Bun.file`, and Web `File` responses are
10
+ * returned directly as raw response bodies. The shared `HttpPlatform` service
11
+ * still computes file metadata such as ETags and last-modified headers, while
12
+ * this adapter lets Bun's `Response` implementation handle the platform body.
13
+ *
14
+ * Because the Bun server adapter sits on top of Web `Request` and `Response`,
15
+ * request bodies follow the usual single-consumption rules: choose the
16
+ * streamed, text, URL-encoded, or multipart view that matches the route. For
17
+ * `FormData` responses, let the `Response` constructor create the multipart
18
+ * content type and boundary unless you intentionally override it. File
19
+ * responses take filesystem paths, not request URLs; Bun request URLs are
20
+ * absolute at the runtime edge, and route paths are normalized by
21
+ * `BunHttpServer`, so decode and validate URL pathnames before mapping them to
22
+ * files.
23
+ *
24
+ * @since 4.0.0
3
25
  */
4
26
  import type { Effect } from "effect"
5
27
  import type { FileSystem } from "effect/FileSystem"
@@ -10,8 +32,8 @@ import * as Response from "effect/unstable/http/HttpServerResponse"
10
32
  import * as BunFileSystem from "./BunFileSystem.ts"
11
33
 
12
34
  /**
13
- * @since 1.0.0
14
35
  * @category constructors
36
+ * @since 4.0.0
15
37
  */
16
38
  const make: Effect.Effect<
17
39
  Platform.HttpPlatform["Service"],
@@ -31,8 +53,10 @@ const make: Effect.Effect<
31
53
  })
32
54
 
33
55
  /**
34
- * @since 1.0.0
35
- * @category Layers
56
+ * Layer that provides the Bun `HttpPlatform`, including file responses backed by `Bun.file`.
57
+ *
58
+ * @category layers
59
+ * @since 4.0.0
36
60
  */
37
61
  export const layer = Layer.effect(Platform.HttpPlatform)(make).pipe(
38
62
  Layer.provide(BunFileSystem.layer),