@smthrs/platform-bun 0.0.0-stage → 1.0.0-rc.12

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 (429) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/LICENSE +21 -0
  3. package/README.md +110 -2
  4. package/dist/cjs/BunFileSystem.d.ts +44 -0
  5. package/dist/cjs/BunFileSystem.d.ts.map +1 -0
  6. package/dist/cjs/BunFileSystem.js +38 -0
  7. package/dist/cjs/BunFileSystem.js.map +7 -0
  8. package/dist/cjs/BunHost.d.ts +205 -0
  9. package/dist/cjs/BunHost.d.ts.map +1 -0
  10. package/dist/cjs/BunHost.js +148 -0
  11. package/dist/cjs/BunHost.js.map +7 -0
  12. package/dist/cjs/index.d.ts +26 -0
  13. package/dist/cjs/index.d.ts.map +1 -0
  14. package/dist/cjs/index.js +37 -0
  15. package/dist/cjs/index.js.map +7 -0
  16. package/dist/cjs/package.json +1 -0
  17. package/dist/esm/BunFileSystem.d.ts +44 -0
  18. package/dist/esm/BunFileSystem.d.ts.map +1 -0
  19. package/dist/esm/BunFileSystem.js +35 -0
  20. package/dist/esm/BunFileSystem.js.map +1 -0
  21. package/dist/esm/BunHost.d.ts +205 -0
  22. package/dist/esm/BunHost.d.ts.map +1 -0
  23. package/dist/esm/BunHost.js +248 -0
  24. package/dist/esm/BunHost.js.map +1 -0
  25. package/dist/esm/index.d.ts +26 -0
  26. package/dist/esm/index.d.ts.map +1 -0
  27. package/dist/esm/index.js +26 -0
  28. package/dist/esm/index.js.map +1 -0
  29. package/dist/vendor/adapters.json +3067 -0
  30. package/dist/vendor/bun/BunAddressResolver.d.ts +15 -0
  31. package/dist/vendor/bun/BunAddressResolver.js +8 -0
  32. package/dist/vendor/bun/BunChildProcessSpawner.d.ts +8 -0
  33. package/dist/vendor/bun/BunChildProcessSpawner.js +14 -0
  34. package/dist/vendor/bun/BunClusterHttp.d.ts +76 -0
  35. package/dist/vendor/bun/BunClusterHttp.js +39 -0
  36. package/dist/vendor/bun/BunClusterSocket.d.ts +70 -0
  37. package/dist/vendor/bun/BunClusterSocket.js +22 -0
  38. package/dist/vendor/bun/BunCrypto.d.ts +11 -0
  39. package/dist/vendor/bun/BunCrypto.js +8 -0
  40. package/dist/vendor/bun/BunDatagramSocket.d.ts +227 -0
  41. package/dist/vendor/bun/BunDatagramSocket.js +11 -0
  42. package/dist/vendor/bun/BunDns.d.ts +72 -0
  43. package/dist/vendor/bun/BunDns.js +12 -0
  44. package/dist/vendor/bun/BunFileSystem.d.ts +11 -0
  45. package/dist/vendor/bun/BunFileSystem.js +9 -0
  46. package/dist/vendor/bun/BunHttpClient.d.ts +10 -0
  47. package/dist/vendor/bun/BunHttpClient.js +1 -0
  48. package/dist/vendor/bun/BunHttpPlatform.d.ts +11 -0
  49. package/dist/vendor/bun/BunHttpPlatform.js +11 -0
  50. package/dist/vendor/bun/BunHttpServer.d.ts +151 -0
  51. package/dist/vendor/bun/BunHttpServer.js +38 -0
  52. package/dist/vendor/bun/BunHttpServerRequest.d.ts +20 -0
  53. package/dist/vendor/bun/BunHttpServerRequest.js +7 -0
  54. package/dist/vendor/bun/BunMultipart.d.ts +34 -0
  55. package/dist/vendor/bun/BunMultipart.js +12 -0
  56. package/dist/vendor/bun/BunPath.d.ts +27 -0
  57. package/dist/vendor/bun/BunPath.js +12 -0
  58. package/dist/vendor/bun/BunRedis.d.ts +53 -0
  59. package/dist/vendor/bun/BunRedis.js +11 -0
  60. package/dist/vendor/bun/BunRuntime.d.ts +88 -0
  61. package/dist/vendor/bun/BunRuntime.js +8 -0
  62. package/dist/vendor/bun/BunServices.d.ts +37 -0
  63. package/dist/vendor/bun/BunServices.js +23 -0
  64. package/dist/vendor/bun/BunSink.d.ts +9 -0
  65. package/dist/vendor/bun/BunSink.js +12 -0
  66. package/dist/vendor/bun/BunSocket.d.ts +45 -0
  67. package/dist/vendor/bun/BunSocket.js +29 -0
  68. package/dist/vendor/bun/BunSocketServer.d.ts +9 -0
  69. package/dist/vendor/bun/BunSocketServer.js +21 -0
  70. package/dist/vendor/bun/BunStdio.d.ts +12 -0
  71. package/dist/vendor/bun/BunStdio.js +10 -0
  72. package/dist/vendor/bun/BunStream.d.ts +20 -0
  73. package/dist/vendor/bun/BunStream.js +30 -0
  74. package/dist/vendor/bun/BunTerminal.d.ts +24 -0
  75. package/dist/vendor/bun/BunTerminal.js +10 -0
  76. package/dist/vendor/bun/BunWorker.d.ts +22 -0
  77. package/dist/vendor/bun/BunWorker.js +9 -0
  78. package/dist/vendor/bun/BunWorkerRunner.d.ts +13 -0
  79. package/dist/vendor/bun/BunWorkerRunner.js +7 -0
  80. package/dist/vendor/bun/LICENSE +21 -0
  81. package/dist/vendor/bun/index.d.ts +130 -0
  82. package/dist/vendor/bun/index.js +121 -0
  83. package/dist/vendor/chunk-2ZAGBWTH.js +40 -0
  84. package/dist/vendor/chunk-3SL3HKQA.js +118 -0
  85. package/dist/vendor/chunk-3WUGYBFU.js +0 -0
  86. package/dist/vendor/chunk-4WIQ2XN7.js +28 -0
  87. package/dist/vendor/chunk-5ET7NHI7.js +15 -0
  88. package/dist/vendor/chunk-6FSJ2PMW.js +53 -0
  89. package/dist/vendor/chunk-6L2NJEOV.js +62 -0
  90. package/dist/vendor/chunk-72X6VEVD.js +62 -0
  91. package/dist/vendor/chunk-7NMJM44J.js +26 -0
  92. package/dist/vendor/chunk-A7AY2JP7.js +71 -0
  93. package/dist/vendor/chunk-A7UXCEJA.js +81 -0
  94. package/dist/vendor/chunk-ADP5LRUF.js +274 -0
  95. package/dist/vendor/chunk-ASGOJ3XA.js +0 -0
  96. package/dist/vendor/chunk-AWNTTSHL.js +34 -0
  97. package/dist/vendor/chunk-BUKVIAEM.js +20 -0
  98. package/dist/vendor/chunk-BY3SDXID.js +501 -0
  99. package/dist/vendor/chunk-C3PGUWW5.js +414 -0
  100. package/dist/vendor/chunk-CL4EIDIY.js +7 -0
  101. package/dist/vendor/chunk-D2ZL4PLZ.js +93 -0
  102. package/dist/vendor/chunk-D4HEMNGU.js +22 -0
  103. package/dist/vendor/chunk-F4V5TRY7.js +85 -0
  104. package/dist/vendor/chunk-F772LLZ5.js +31 -0
  105. package/dist/vendor/chunk-FFD6R5JZ.js +104 -0
  106. package/dist/vendor/chunk-G4HOH7GK.js +65 -0
  107. package/dist/vendor/chunk-GJN7MEBF.js +18 -0
  108. package/dist/vendor/chunk-HDV6VIRM.js +48 -0
  109. package/dist/vendor/chunk-IHV7Z4SW.js +34 -0
  110. package/dist/vendor/chunk-IWSDM4CG.js +16 -0
  111. package/dist/vendor/chunk-JOQDB2HC.js +26 -0
  112. package/dist/vendor/chunk-KABHKTVG.js +18 -0
  113. package/dist/vendor/chunk-KFDBU6RR.js +60 -0
  114. package/dist/vendor/chunk-KHPN5DWT.js +20 -0
  115. package/dist/vendor/chunk-LNWGIDIG.js +20 -0
  116. package/dist/vendor/chunk-MLKGABMK.js +9 -0
  117. package/dist/vendor/chunk-MUEED3C3.js +144 -0
  118. package/dist/vendor/chunk-N6TK35N5.js +18 -0
  119. package/dist/vendor/chunk-NQO6V4KI.js +580 -0
  120. package/dist/vendor/chunk-NUJQMLJP.js +325 -0
  121. package/dist/vendor/chunk-OF3N2FN4.js +61 -0
  122. package/dist/vendor/chunk-OGZJACUS.js +57 -0
  123. package/dist/vendor/chunk-PCEVZYXO.js +63 -0
  124. package/dist/vendor/chunk-PECOFLCU.js +85 -0
  125. package/dist/vendor/chunk-PU7QVYND.js +18 -0
  126. package/dist/vendor/chunk-QGPZPULA.js +51 -0
  127. package/dist/vendor/chunk-QHR2RC5M.js +109 -0
  128. package/dist/vendor/chunk-R2YON4A6.js +28 -0
  129. package/dist/vendor/chunk-R327POEZ.js +18 -0
  130. package/dist/vendor/chunk-REFJNBQR.js +18 -0
  131. package/dist/vendor/chunk-RHJ6LV32.js +43 -0
  132. package/dist/vendor/chunk-RKVXYKHJ.js +29 -0
  133. package/dist/vendor/chunk-RP3EWS4C.js +0 -0
  134. package/dist/vendor/chunk-RQH5DSBA.js +249 -0
  135. package/dist/vendor/chunk-RQQ5TSCD.js +374 -0
  136. package/dist/vendor/chunk-S6QUQLBV.js +229 -0
  137. package/dist/vendor/chunk-SCXQLSNW.js +34 -0
  138. package/dist/vendor/chunk-SD4X5NGU.js +515 -0
  139. package/dist/vendor/chunk-T332WJRS.js +128 -0
  140. package/dist/vendor/chunk-T5FQGISI.js +18 -0
  141. package/dist/vendor/chunk-TBPDCAMH.js +70 -0
  142. package/dist/vendor/chunk-UFWLKG4I.js +16 -0
  143. package/dist/vendor/chunk-UPIQ52FQ.js +426 -0
  144. package/dist/vendor/chunk-UUQXJRMK.js +14 -0
  145. package/dist/vendor/chunk-UUYTTEDH.js +36 -0
  146. package/dist/vendor/chunk-V2EB7FHY.js +129 -0
  147. package/dist/vendor/chunk-VIWU4EBF.js +18 -0
  148. package/dist/vendor/chunk-WPZDL2D7.js +21 -0
  149. package/dist/vendor/chunk-X4YPHWAE.js +22 -0
  150. package/dist/vendor/chunk-XACFQJY7.js +93 -0
  151. package/dist/vendor/chunk-Y7V6ISZS.js +418 -0
  152. package/dist/vendor/chunk-YDY5P7GL.js +20 -0
  153. package/dist/vendor/chunk-ZNKZXDUD.js +18 -0
  154. package/dist/vendor/chunk-ZS3VW5QR.js +63 -0
  155. package/dist/vendor/chunk-ZUUCLHBP.js +18 -0
  156. package/dist/vendor/chunk-ZVJCBTJG.js +131 -0
  157. package/dist/vendor/cjs/bun/BunAddressResolver.d.ts +15 -0
  158. package/dist/vendor/cjs/bun/BunAddressResolver.js +1 -0
  159. package/dist/vendor/cjs/bun/BunChildProcessSpawner.d.ts +8 -0
  160. package/dist/vendor/cjs/bun/BunChildProcessSpawner.js +1 -0
  161. package/dist/vendor/cjs/bun/BunClusterHttp.d.ts +76 -0
  162. package/dist/vendor/cjs/bun/BunClusterHttp.js +1 -0
  163. package/dist/vendor/cjs/bun/BunClusterSocket.d.ts +70 -0
  164. package/dist/vendor/cjs/bun/BunClusterSocket.js +1 -0
  165. package/dist/vendor/cjs/bun/BunCrypto.d.ts +11 -0
  166. package/dist/vendor/cjs/bun/BunCrypto.js +1 -0
  167. package/dist/vendor/cjs/bun/BunDatagramSocket.d.ts +227 -0
  168. package/dist/vendor/cjs/bun/BunDatagramSocket.js +1 -0
  169. package/dist/vendor/cjs/bun/BunDns.d.ts +72 -0
  170. package/dist/vendor/cjs/bun/BunDns.js +1 -0
  171. package/dist/vendor/cjs/bun/BunFileSystem.d.ts +11 -0
  172. package/dist/vendor/cjs/bun/BunFileSystem.js +1 -0
  173. package/dist/vendor/cjs/bun/BunHttpClient.d.ts +10 -0
  174. package/dist/vendor/cjs/bun/BunHttpClient.js +1 -0
  175. package/dist/vendor/cjs/bun/BunHttpPlatform.d.ts +11 -0
  176. package/dist/vendor/cjs/bun/BunHttpPlatform.js +1 -0
  177. package/dist/vendor/cjs/bun/BunHttpServer.d.ts +151 -0
  178. package/dist/vendor/cjs/bun/BunHttpServer.js +1 -0
  179. package/dist/vendor/cjs/bun/BunHttpServerRequest.d.ts +20 -0
  180. package/dist/vendor/cjs/bun/BunHttpServerRequest.js +1 -0
  181. package/dist/vendor/cjs/bun/BunMultipart.d.ts +34 -0
  182. package/dist/vendor/cjs/bun/BunMultipart.js +1 -0
  183. package/dist/vendor/cjs/bun/BunPath.d.ts +27 -0
  184. package/dist/vendor/cjs/bun/BunPath.js +1 -0
  185. package/dist/vendor/cjs/bun/BunRedis.d.ts +53 -0
  186. package/dist/vendor/cjs/bun/BunRedis.js +1 -0
  187. package/dist/vendor/cjs/bun/BunRuntime.d.ts +88 -0
  188. package/dist/vendor/cjs/bun/BunRuntime.js +1 -0
  189. package/dist/vendor/cjs/bun/BunServices.d.ts +37 -0
  190. package/dist/vendor/cjs/bun/BunServices.js +1 -0
  191. package/dist/vendor/cjs/bun/BunSink.d.ts +9 -0
  192. package/dist/vendor/cjs/bun/BunSink.js +1 -0
  193. package/dist/vendor/cjs/bun/BunSocket.d.ts +45 -0
  194. package/dist/vendor/cjs/bun/BunSocket.js +1 -0
  195. package/dist/vendor/cjs/bun/BunSocketServer.d.ts +9 -0
  196. package/dist/vendor/cjs/bun/BunSocketServer.js +1 -0
  197. package/dist/vendor/cjs/bun/BunStdio.d.ts +12 -0
  198. package/dist/vendor/cjs/bun/BunStdio.js +1 -0
  199. package/dist/vendor/cjs/bun/BunStream.d.ts +20 -0
  200. package/dist/vendor/cjs/bun/BunStream.js +1 -0
  201. package/dist/vendor/cjs/bun/BunTerminal.d.ts +24 -0
  202. package/dist/vendor/cjs/bun/BunTerminal.js +1 -0
  203. package/dist/vendor/cjs/bun/BunWorker.d.ts +22 -0
  204. package/dist/vendor/cjs/bun/BunWorker.js +1 -0
  205. package/dist/vendor/cjs/bun/BunWorkerRunner.d.ts +13 -0
  206. package/dist/vendor/cjs/bun/BunWorkerRunner.js +1 -0
  207. package/dist/vendor/cjs/bun/index.d.ts +130 -0
  208. package/dist/vendor/cjs/bun/index.js +1 -0
  209. package/dist/vendor/cjs/node/NodeAddressResolver.d.ts +16 -0
  210. package/dist/vendor/cjs/node/NodeAddressResolver.js +1 -0
  211. package/dist/vendor/cjs/node/NodeChildProcessSpawner.d.ts +8 -0
  212. package/dist/vendor/cjs/node/NodeChildProcessSpawner.js +1 -0
  213. package/dist/vendor/cjs/node/NodeClusterHttp.d.ts +54 -0
  214. package/dist/vendor/cjs/node/NodeClusterHttp.js +1 -0
  215. package/dist/vendor/cjs/node/NodeClusterSocket.d.ts +85 -0
  216. package/dist/vendor/cjs/node/NodeClusterSocket.js +1 -0
  217. package/dist/vendor/cjs/node/NodeCrypto.d.ts +11 -0
  218. package/dist/vendor/cjs/node/NodeCrypto.js +1 -0
  219. package/dist/vendor/cjs/node/NodeDatagramSocket.d.ts +10 -0
  220. package/dist/vendor/cjs/node/NodeDatagramSocket.js +1 -0
  221. package/dist/vendor/cjs/node/NodeDns.d.ts +51 -0
  222. package/dist/vendor/cjs/node/NodeDns.js +1 -0
  223. package/dist/vendor/cjs/node/NodeFileSystem.d.ts +11 -0
  224. package/dist/vendor/cjs/node/NodeFileSystem.js +1 -0
  225. package/dist/vendor/cjs/node/NodeHttpClient.d.ts +198 -0
  226. package/dist/vendor/cjs/node/NodeHttpClient.js +1 -0
  227. package/dist/vendor/cjs/node/NodeHttpIncomingMessage.d.ts +64 -0
  228. package/dist/vendor/cjs/node/NodeHttpIncomingMessage.js +1 -0
  229. package/dist/vendor/cjs/node/NodeHttpPlatform.d.ts +38 -0
  230. package/dist/vendor/cjs/node/NodeHttpPlatform.js +1 -0
  231. package/dist/vendor/cjs/node/NodeHttpServer.d.ts +131 -0
  232. package/dist/vendor/cjs/node/NodeHttpServer.js +1 -0
  233. package/dist/vendor/cjs/node/NodeHttpServerRequest.d.ts +32 -0
  234. package/dist/vendor/cjs/node/NodeHttpServerRequest.js +1 -0
  235. package/dist/vendor/cjs/node/NodeMultipart.d.ts +50 -0
  236. package/dist/vendor/cjs/node/NodeMultipart.js +1 -0
  237. package/dist/vendor/cjs/node/NodeMultipartParser.d.ts +105 -0
  238. package/dist/vendor/cjs/node/NodeMultipartParser.js +1 -0
  239. package/dist/vendor/cjs/node/NodePath.d.ts +30 -0
  240. package/dist/vendor/cjs/node/NodePath.js +1 -0
  241. package/dist/vendor/cjs/node/NodeRedis.d.ts +78 -0
  242. package/dist/vendor/cjs/node/NodeRedis.js +1 -0
  243. package/dist/vendor/cjs/node/NodeRuntime.d.ts +88 -0
  244. package/dist/vendor/cjs/node/NodeRuntime.js +1 -0
  245. package/dist/vendor/cjs/node/NodeServices.d.ts +37 -0
  246. package/dist/vendor/cjs/node/NodeServices.js +1 -0
  247. package/dist/vendor/cjs/node/NodeSink.d.ts +9 -0
  248. package/dist/vendor/cjs/node/NodeSink.js +1 -0
  249. package/dist/vendor/cjs/node/NodeSocket.d.ts +45 -0
  250. package/dist/vendor/cjs/node/NodeSocket.js +1 -0
  251. package/dist/vendor/cjs/node/NodeSocketServer.d.ts +9 -0
  252. package/dist/vendor/cjs/node/NodeSocketServer.js +1 -0
  253. package/dist/vendor/cjs/node/NodeStdio.d.ts +12 -0
  254. package/dist/vendor/cjs/node/NodeStdio.js +1 -0
  255. package/dist/vendor/cjs/node/NodeStream.d.ts +9 -0
  256. package/dist/vendor/cjs/node/NodeStream.js +1 -0
  257. package/dist/vendor/cjs/node/NodeTerminal.d.ts +24 -0
  258. package/dist/vendor/cjs/node/NodeTerminal.js +1 -0
  259. package/dist/vendor/cjs/node/NodeWorker.d.ts +24 -0
  260. package/dist/vendor/cjs/node/NodeWorker.js +1 -0
  261. package/dist/vendor/cjs/node/NodeWorkerRunner.d.ts +13 -0
  262. package/dist/vendor/cjs/node/NodeWorkerRunner.js +1 -0
  263. package/dist/vendor/cjs/node/Undici.d.ts +31 -0
  264. package/dist/vendor/cjs/node/Undici.js +1 -0
  265. package/dist/vendor/cjs/node/index.d.ts +140 -0
  266. package/dist/vendor/cjs/node/index.js +1 -0
  267. package/dist/vendor/cjs/node-shared/NodeAddressResolver.d.ts +13 -0
  268. package/dist/vendor/cjs/node-shared/NodeAddressResolver.js +1 -0
  269. package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.d.ts +66 -0
  270. package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.js +1 -0
  271. package/dist/vendor/cjs/node-shared/NodeClusterSocket.d.ts +35 -0
  272. package/dist/vendor/cjs/node-shared/NodeClusterSocket.js +1 -0
  273. package/dist/vendor/cjs/node-shared/NodeCrypto.d.ts +30 -0
  274. package/dist/vendor/cjs/node-shared/NodeCrypto.js +1 -0
  275. package/dist/vendor/cjs/node-shared/NodeDatagramSocket.d.ts +246 -0
  276. package/dist/vendor/cjs/node-shared/NodeDatagramSocket.js +1 -0
  277. package/dist/vendor/cjs/node-shared/NodeDns.d.ts +221 -0
  278. package/dist/vendor/cjs/node-shared/NodeDns.js +1 -0
  279. package/dist/vendor/cjs/node-shared/NodeFileSystem.d.ts +12 -0
  280. package/dist/vendor/cjs/node-shared/NodeFileSystem.js +1 -0
  281. package/dist/vendor/cjs/node-shared/NodeHttpCompression.d.ts +40 -0
  282. package/dist/vendor/cjs/node-shared/NodeHttpCompression.js +1 -0
  283. package/dist/vendor/cjs/node-shared/NodePath.d.ts +30 -0
  284. package/dist/vendor/cjs/node-shared/NodePath.js +1 -0
  285. package/dist/vendor/cjs/node-shared/NodeRuntime.d.ts +51 -0
  286. package/dist/vendor/cjs/node-shared/NodeRuntime.js +1 -0
  287. package/dist/vendor/cjs/node-shared/NodeSink.d.ts +73 -0
  288. package/dist/vendor/cjs/node-shared/NodeSink.js +1 -0
  289. package/dist/vendor/cjs/node-shared/NodeSocket.d.ts +144 -0
  290. package/dist/vendor/cjs/node-shared/NodeSocket.js +1 -0
  291. package/dist/vendor/cjs/node-shared/NodeSocketServer.d.ts +87 -0
  292. package/dist/vendor/cjs/node-shared/NodeSocketServer.js +1 -0
  293. package/dist/vendor/cjs/node-shared/NodeStdio.d.ts +13 -0
  294. package/dist/vendor/cjs/node-shared/NodeStdio.js +1 -0
  295. package/dist/vendor/cjs/node-shared/NodeStream.d.ts +194 -0
  296. package/dist/vendor/cjs/node-shared/NodeStream.js +1 -0
  297. package/dist/vendor/cjs/node-shared/NodeTerminal.d.ts +24 -0
  298. package/dist/vendor/cjs/node-shared/NodeTerminal.js +1 -0
  299. package/dist/vendor/cjs/node-shared/index.d.ts +85 -0
  300. package/dist/vendor/cjs/node-shared/index.js +1 -0
  301. package/dist/vendor/cjs/node-shared/internal/nodeChildProcessSpawner.d.ts +4 -0
  302. package/dist/vendor/cjs/node-shared/internal/nodeChildProcessSpawner.js +1 -0
  303. package/dist/vendor/cjs/node-shared/internal/utils.d.ts +2 -0
  304. package/dist/vendor/cjs/node-shared/internal/utils.js +1 -0
  305. package/dist/vendor/cjs/package.json +1 -0
  306. package/dist/vendor/cjs/platform-bun.d.ts +130 -0
  307. package/dist/vendor/cjs/platform-bun.js +1 -0
  308. package/dist/vendor/cjs/platform-node-shared.d.ts +85 -0
  309. package/dist/vendor/cjs/platform-node-shared.js +1 -0
  310. package/dist/vendor/cjs/platform-node.d.ts +140 -0
  311. package/dist/vendor/cjs/platform-node.js +1 -0
  312. package/dist/vendor/node/LICENSE +21 -0
  313. package/dist/vendor/node/NodeAddressResolver.d.ts +16 -0
  314. package/dist/vendor/node/NodeAddressResolver.js +8 -0
  315. package/dist/vendor/node/NodeChildProcessSpawner.d.ts +8 -0
  316. package/dist/vendor/node/NodeChildProcessSpawner.js +14 -0
  317. package/dist/vendor/node/NodeClusterHttp.d.ts +54 -0
  318. package/dist/vendor/node/NodeClusterHttp.js +43 -0
  319. package/dist/vendor/node/NodeClusterSocket.d.ts +85 -0
  320. package/dist/vendor/node/NodeClusterSocket.js +30 -0
  321. package/dist/vendor/node/NodeCrypto.d.ts +11 -0
  322. package/dist/vendor/node/NodeCrypto.js +8 -0
  323. package/dist/vendor/node/NodeDatagramSocket.d.ts +10 -0
  324. package/dist/vendor/node/NodeDatagramSocket.js +12 -0
  325. package/dist/vendor/node/NodeDns.d.ts +51 -0
  326. package/dist/vendor/node/NodeDns.js +12 -0
  327. package/dist/vendor/node/NodeFileSystem.d.ts +11 -0
  328. package/dist/vendor/node/NodeFileSystem.js +9 -0
  329. package/dist/vendor/node/NodeHttpClient.d.ts +198 -0
  330. package/dist/vendor/node/NodeHttpClient.js +46 -0
  331. package/dist/vendor/node/NodeHttpIncomingMessage.d.ts +64 -0
  332. package/dist/vendor/node/NodeHttpIncomingMessage.js +10 -0
  333. package/dist/vendor/node/NodeHttpPlatform.d.ts +38 -0
  334. package/dist/vendor/node/NodeHttpPlatform.js +16 -0
  335. package/dist/vendor/node/NodeHttpServer.d.ts +131 -0
  336. package/dist/vendor/node/NodeHttpServer.js +46 -0
  337. package/dist/vendor/node/NodeHttpServerRequest.d.ts +32 -0
  338. package/dist/vendor/node/NodeHttpServerRequest.js +9 -0
  339. package/dist/vendor/node/NodeMultipart.d.ts +50 -0
  340. package/dist/vendor/node/NodeMultipart.js +15 -0
  341. package/dist/vendor/node/NodeMultipartParser.d.ts +105 -0
  342. package/dist/vendor/node/NodeMultipartParser.js +11 -0
  343. package/dist/vendor/node/NodePath.d.ts +30 -0
  344. package/dist/vendor/node/NodePath.js +12 -0
  345. package/dist/vendor/node/NodeRedis.d.ts +78 -0
  346. package/dist/vendor/node/NodeRedis.js +11 -0
  347. package/dist/vendor/node/NodeRuntime.d.ts +88 -0
  348. package/dist/vendor/node/NodeRuntime.js +8 -0
  349. package/dist/vendor/node/NodeServices.d.ts +37 -0
  350. package/dist/vendor/node/NodeServices.js +23 -0
  351. package/dist/vendor/node/NodeSink.d.ts +9 -0
  352. package/dist/vendor/node/NodeSink.js +12 -0
  353. package/dist/vendor/node/NodeSocket.d.ts +45 -0
  354. package/dist/vendor/node/NodeSocket.js +31 -0
  355. package/dist/vendor/node/NodeSocketServer.d.ts +9 -0
  356. package/dist/vendor/node/NodeSocketServer.js +21 -0
  357. package/dist/vendor/node/NodeStdio.d.ts +12 -0
  358. package/dist/vendor/node/NodeStdio.js +10 -0
  359. package/dist/vendor/node/NodeStream.d.ts +9 -0
  360. package/dist/vendor/node/NodeStream.js +27 -0
  361. package/dist/vendor/node/NodeTerminal.d.ts +24 -0
  362. package/dist/vendor/node/NodeTerminal.js +10 -0
  363. package/dist/vendor/node/NodeWorker.d.ts +24 -0
  364. package/dist/vendor/node/NodeWorker.js +9 -0
  365. package/dist/vendor/node/NodeWorkerRunner.d.ts +13 -0
  366. package/dist/vendor/node/NodeWorkerRunner.js +7 -0
  367. package/dist/vendor/node/Undici.d.ts +31 -0
  368. package/dist/vendor/node/Undici.js +9 -0
  369. package/dist/vendor/node/index.d.ts +140 -0
  370. package/dist/vendor/node/index.js +130 -0
  371. package/dist/vendor/node-shared/LICENSE +21 -0
  372. package/dist/vendor/node-shared/NodeAddressResolver.d.ts +13 -0
  373. package/dist/vendor/node-shared/NodeAddressResolver.js +7 -0
  374. package/dist/vendor/node-shared/NodeChildProcessSpawner.d.ts +66 -0
  375. package/dist/vendor/node-shared/NodeChildProcessSpawner.js +13 -0
  376. package/dist/vendor/node-shared/NodeClusterSocket.d.ts +35 -0
  377. package/dist/vendor/node-shared/NodeClusterSocket.js +11 -0
  378. package/dist/vendor/node-shared/NodeCrypto.d.ts +30 -0
  379. package/dist/vendor/node-shared/NodeCrypto.js +9 -0
  380. package/dist/vendor/node-shared/NodeDatagramSocket.d.ts +246 -0
  381. package/dist/vendor/node-shared/NodeDatagramSocket.js +11 -0
  382. package/dist/vendor/node-shared/NodeDns.d.ts +221 -0
  383. package/dist/vendor/node-shared/NodeDns.js +31 -0
  384. package/dist/vendor/node-shared/NodeFileSystem.d.ts +12 -0
  385. package/dist/vendor/node-shared/NodeFileSystem.js +8 -0
  386. package/dist/vendor/node-shared/NodeHttpCompression.d.ts +40 -0
  387. package/dist/vendor/node-shared/NodeHttpCompression.js +13 -0
  388. package/dist/vendor/node-shared/NodePath.d.ts +30 -0
  389. package/dist/vendor/node-shared/NodePath.js +11 -0
  390. package/dist/vendor/node-shared/NodeRuntime.d.ts +51 -0
  391. package/dist/vendor/node-shared/NodeRuntime.js +7 -0
  392. package/dist/vendor/node-shared/NodeSink.d.ts +73 -0
  393. package/dist/vendor/node-shared/NodeSink.js +11 -0
  394. package/dist/vendor/node-shared/NodeSocket.d.ts +144 -0
  395. package/dist/vendor/node-shared/NodeSocket.js +23 -0
  396. package/dist/vendor/node-shared/NodeSocketServer.d.ts +87 -0
  397. package/dist/vendor/node-shared/NodeSocketServer.js +20 -0
  398. package/dist/vendor/node-shared/NodeStdio.d.ts +13 -0
  399. package/dist/vendor/node-shared/NodeStdio.js +9 -0
  400. package/dist/vendor/node-shared/NodeStream.d.ts +194 -0
  401. package/dist/vendor/node-shared/NodeStream.js +26 -0
  402. package/dist/vendor/node-shared/NodeTerminal.d.ts +24 -0
  403. package/dist/vendor/node-shared/NodeTerminal.js +9 -0
  404. package/dist/vendor/node-shared/index.d.ts +85 -0
  405. package/dist/vendor/node-shared/index.js +70 -0
  406. package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.d.ts +4 -0
  407. package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.js +7 -0
  408. package/dist/vendor/node-shared/internal/utils.d.ts +2 -0
  409. package/dist/vendor/node-shared/internal/utils.js +7 -0
  410. package/dist/vendor/platform-bun.d.ts +130 -0
  411. package/dist/vendor/platform-bun.js +121 -0
  412. package/dist/vendor/platform-node-shared.d.ts +85 -0
  413. package/dist/vendor/platform-node-shared.js +70 -0
  414. package/dist/vendor/platform-node.d.ts +140 -0
  415. package/dist/vendor/platform-node.js +130 -0
  416. package/docs/README.md +135 -0
  417. package/docs/api.md +264 -0
  418. package/docs/concepts/host-surface.md +152 -0
  419. package/docs/concepts/runtime-parity.md +80 -0
  420. package/docs/guides/bind-a-repository-root.md +109 -0
  421. package/docs/guides/configure-the-filesystem-helper.md +113 -0
  422. package/docs/guides/contain-child-processes.md +178 -0
  423. package/docs/installation.md +131 -0
  424. package/docs/quickstart.md +163 -0
  425. package/docs/troubleshooting.md +163 -0
  426. package/package.json +146 -3
  427. package/src/BunFileSystem.ts +47 -0
  428. package/src/BunHost.ts +345 -0
  429. package/src/index.ts +27 -0
@@ -0,0 +1,248 @@
1
+ /**
2
+ * Aggregate Bun Host bundle.
3
+ *
4
+ * Runtime-specific dependencies stay inside this package; callers get the same
5
+ * closed five-service Host surface every other bundle provides, plus native
6
+ * `ProcessConfinement` for guarded commands.
7
+ *
8
+ * There is no Bun shell module: running a command is Effect's
9
+ * `ChildProcessSpawner`, and `@effect/platform-bun`'s implementation is
10
+ * `@effect/platform-node-shared`'s re-exported: the same code on both
11
+ * runtimes, so no runtime detection is needed here.
12
+ *
13
+ * Outgoing HTTP uses the shared EgressHttpClient on both runtimes. Web
14
+ * requests pin approved addresses; ordinary requests retain the shared pool.
15
+ * Redirects remain visible to the capability kernel, and proxy routing follows
16
+ * the host environment.
17
+ *
18
+ * The filesystem slot is `@smthrs/platform-node`'s `AtomicFileSystem`, byte for
19
+ * byte the layer `NodeHost` uses, so a guarded path operation is
20
+ * descriptor-relative and no-follow on both runtimes.
21
+ *
22
+ * @since 1.0.0-rc.0
23
+ */
24
+ import * as BunChildProcessSpawner from "../vendor/bun/BunChildProcessSpawner.js";
25
+ import * as BunCrypto from "../vendor/bun/BunCrypto.js";
26
+ import * as BunPath from "../vendor/bun/BunPath.js";
27
+ import * as BunJj from "@smthrs/jj/bun/BunJj";
28
+ import * as AtomicFileSystem from "@smthrs/platform-node/AtomicFileSystem";
29
+ import * as EgressHttpClient from "@smthrs/platform-node/EgressHttpClient";
30
+ import * as HostLiveness from "@smthrs/platform-node/HostLiveness";
31
+ import * as ProcessConfinement from "@smthrs/platform-node/ProcessConfinement";
32
+ import * as ProcessReaper from "@smthrs/platform-node/ProcessReaper";
33
+ import * as Layer from "effect/Layer";
34
+ import * as Schema from "effect/Schema";
35
+ import { isAbsolute } from "node:path";
36
+ import * as BunFileSystem from "./BunFileSystem.js";
37
+ /**
38
+ * Bun platform modules for selectively providing individual services.
39
+ *
40
+ * `AtomicFileSystem` is here for the same reason `NodeHost` re-exports it: it
41
+ * owns the only configuration escape hatch the filesystem slot has, and a Bun
42
+ * program with a different packaged helper path needs to reach
43
+ * `AtomicFileSystem.layerWith` without hand-composing the other four tags.
44
+ *
45
+ * `BunJj` is deliberately absent: it belongs to `@smthrs/jj` and is imported
46
+ * from there, never re-exported here. So is `@effect/platform-bun/BunHttpClient`:
47
+ * its `layer` follows redirects to origins the capability kernel never
48
+ * authorized. The network slot on its own is {@link layerHttpClient}.
49
+ *
50
+ * @category re-exports
51
+ * @since 1.0.0-rc.0
52
+ * @slop
53
+ */
54
+ export { AtomicFileSystem, BunChildProcessSpawner, BunCrypto, BunFileSystem, HostLiveness, ProcessReaper };
55
+ /**
56
+ * The refusal a `BunHost` factory throws before it builds a layer.
57
+ *
58
+ * It is thrown rather than failed because a factory is called while a program
59
+ * composes its layers, where there is no fiber to fail yet and a wrong root is
60
+ * a composition mistake, not a runtime outcome. It is this package's class,
61
+ * not the `Jj` adapter's, because a Bun caller composes `BunHost` and should
62
+ * learn nothing about the adapter behind the `Jj` slot from an error message.
63
+ *
64
+ * @category errors
65
+ * @since 1.0.0-rc.0
66
+ */
67
+ export class BunHostError extends Schema.TaggedError()("@smthrs/platform-bun/BunHostError", {
68
+ code: Schema.Literal("invalid_repository_root"),
69
+ message: Schema.String
70
+ }) {
71
+ name = "BunHostError";
72
+ }
73
+ /** The longest message a factory refuses with, in UTF-16 code units. */
74
+ const messageLimit = 255;
75
+ /** How many code points of a refused root the message repeats at most. */
76
+ const previewLimit = 64;
77
+ /**
78
+ * A bounded, quoted excerpt of a refused root that fits in `budget` code
79
+ * units of the message.
80
+ *
81
+ * Counted in code points rather than UTF-16 units so a cut never splits a
82
+ * surrogate pair, and passed through `JSON.stringify` so a newline in the root
83
+ * cannot break the log line the message lands on. Each code point is encoded
84
+ * on its own and admitted only while the quoted excerpt plus the length
85
+ * suffix still fit, so a control character that widens to a `\u0001` escape
86
+ * shortens the excerpt instead of lengthening the message, and a cut never
87
+ * lands inside an escape.
88
+ */
89
+ const preview = (root, budget) => {
90
+ const points = Array.from(root);
91
+ const whole = JSON.stringify(root);
92
+ if (points.length <= previewLimit && whole.length <= budget)
93
+ return whole;
94
+ const suffix = `... (${points.length} characters)`;
95
+ const room = budget - suffix.length - 2;
96
+ let excerpt = "";
97
+ for (const point of points.slice(0, previewLimit)) {
98
+ const encoded = JSON.stringify(point).slice(1, -1);
99
+ if (excerpt.length + encoded.length > room)
100
+ break;
101
+ excerpt += encoded;
102
+ }
103
+ return `"${excerpt}"${suffix}`;
104
+ };
105
+ /**
106
+ * Refuses a root the `Jj` adapter underneath would refuse, here and in this
107
+ * package's name.
108
+ *
109
+ * `BunJj.layerAt` and `BunJj.layerSpawnerAt` are `NodeJj`'s, and those throw a
110
+ * bare `TypeError` that names `NodeJj`, carries no code, and echoes the whole
111
+ * string. The predicate includes the same `isAbsolute` the adapter applies, so
112
+ * a root that passes this check cannot reach that throw. An absolute root
113
+ * containing NUL is refused too: no filesystem or process API can represent it.
114
+ */
115
+ const absoluteRoot = (factory, root) => {
116
+ // An absolute root with NUL names that defect, not absoluteness it already has.
117
+ const requirement = !isAbsolute(root)
118
+ ? "an absolute repository root"
119
+ : root.includes("\0")
120
+ ? "a repository root without NUL"
121
+ : undefined;
122
+ if (requirement === undefined)
123
+ return root;
124
+ const prefix = `BunHost.${factory} requires ${requirement}, got `;
125
+ throw new BunHostError({
126
+ code: "invalid_repository_root",
127
+ message: `${prefix}${preview(root, messageLimit - prefix.length)}`
128
+ });
129
+ };
130
+ /**
131
+ * Stable implementation identities keyed by the closed Host service slots.
132
+ *
133
+ * Each value names the module behind that slot in the raw host bundle.
134
+ * Contained POSIX factories replace the spawner with {@link ProcessReaper.layerSpawner}.
135
+ * These are identity
136
+ * tokens rather than import specifiers: the filesystem entry is
137
+ * `@smthrs/platform-node/AtomicFileSystem` because that is the implementation,
138
+ * even though a consumer reaches it through `@smthrs/platform-bun`.
139
+ *
140
+ * Nothing digests them yet. `@smthrs/plan`'s step key carries a `layers`
141
+ * component these values are meant to feed, but no planner derives it from a
142
+ * host bundle today, so changing one invalidates no cached step.
143
+ *
144
+ * The keys are written as literals rather than `HostServiceIds` positions so
145
+ * that reordering the closed list cannot silently pair a slot with another
146
+ * slot's implementation.
147
+ *
148
+ * @category models
149
+ * @since 1.0.0-rc.0
150
+ * @slop
151
+ */
152
+ export const implementationIds = {
153
+ "effect/FileSystem": "@smthrs/platform-node/AtomicFileSystem",
154
+ "effect/Path": "@effect/platform-bun/BunPath",
155
+ "effect/process/ChildProcessSpawner": "@effect/platform-bun/BunChildProcessSpawner",
156
+ "@smthrs/jj/Jj": "@smthrs/jj/bun/BunJj",
157
+ "effect/HttpClient": "@smthrs/platform-node/EgressHttpClient"
158
+ };
159
+ /** The reaper half of {@link ContainedOptions}. */
160
+ const reaping = (options) => ({
161
+ ownerPid: options?.ownerPid,
162
+ system: options?.system
163
+ });
164
+ /** The two services `BunChildProcessSpawner` resolves paths and files with. */
165
+ const platform = Layer.mergeAll(BunFileSystem.layer, BunPath.layer, BunCrypto.layer);
166
+ /**
167
+ * The network slot on its own: the shared egress client, which never follows a
168
+ * redirect. A `3xx` comes back to the caller with its `location` intact and the
169
+ * second origin uncontacted; following a redirect is `@smthrs/kernel`'s guarded
170
+ * `HttpClient.layer`, which rechecks every hop.
171
+ *
172
+ * @category layers
173
+ * @since 1.0.0-rc.0
174
+ */
175
+ export const layerHttpClient = EgressHttpClient.layer(process.env);
176
+ /**
177
+ * Provides all five Bun Host services, including the runtime-independent Path
178
+ * service.
179
+ *
180
+ * Builds on a host without jj. The `Jj` slot probes `jj --version` on its
181
+ * first operation and fails that operation with `JjError` carrying
182
+ * `not_installed` or `unsupported_version`; a program that never calls `Jj`
183
+ * runs without jj. `Jj` requires jj 0.39.0 or later.
184
+ *
185
+ * @category layers
186
+ * @since 1.0.0-rc.0
187
+ * @slop
188
+ */
189
+ export const layer = Layer.mergeAll(ProcessConfinement.layer(), platform, Layer.provide(BunChildProcessSpawner.layer, platform), BunJj.layer, layerHttpClient);
190
+ /**
191
+ * Provides all five Bun Host services bound to one absolute repository root.
192
+ *
193
+ * Throws {@link BunHostError} with code `invalid_repository_root` when `root`
194
+ * is not absolute or contains NUL; the empty string counts. The check runs
195
+ * when the factory is called, before any layer exists.
196
+ *
197
+ * Builds without jj exactly as {@link layer} does: the `Jj` slot probes
198
+ * `jj --version` on its first operation.
199
+ *
200
+ * @category layers
201
+ * @since 1.0.0-rc.0
202
+ */
203
+ export const layerAt = (root) => {
204
+ const repositoryRoot = absoluteRoot("layerAt", root);
205
+ return Layer.mergeAll(ProcessConfinement.layer(), platform, Layer.provide(BunChildProcessSpawner.layer, platform), BunJj.layerAt(repositoryRoot), layerHttpClient);
206
+ };
207
+ /**
208
+ * Provides the Bun host with process containment turned on.
209
+ *
210
+ * Bun uses the same prepared native process lifecycle as Node on POSIX, while
211
+ * preserving its underlying runtime spawner on Windows. `ContainedSpawner` gives
212
+ * every child an escalation deadline and a ledger entry, and
213
+ * `ProcessReaper` sweeps the entries a crashed incarnation of this host left
214
+ * behind. The reaper module lives in `@smthrs/platform-node` because the calls
215
+ * it makes, `process.kill` and `taskkill`, are Node's, and Bun implements
216
+ * them unchanged.
217
+ *
218
+ * Builds without jj exactly as {@link layer} does; here the first
219
+ * operation's `jj --version` probe runs through the contained spawner, so its
220
+ * record enters and leaves the ledger like any other child.
221
+ *
222
+ * @category layers
223
+ * @since 1.0.0-rc.0
224
+ */
225
+ export const layerContained = (options) => {
226
+ const spawner = Layer.provide(ProcessReaper.layerSpawner({ graceMs: options?.graceMs }), Layer.provide(BunChildProcessSpawner.layer, platform));
227
+ return Layer.mergeAll(ProcessConfinement.layer(), platform, layerHttpClient,
228
+ // jj goes through the CONTAINED spawner here, not around it, exactly as in
229
+ // `NodeHost.layerContained`: a jj child that starts its own process leads
230
+ // no recorded group, is in no ledger, and outlives the host that ran it.
231
+ Layer.provideMerge(BunJj.layerSpawner, spawner)).pipe(Layer.provideMerge(ProcessReaper.layer(reaping(options))));
232
+ };
233
+ /**
234
+ * Provides the contained Bun host bound to one absolute repository root.
235
+ *
236
+ * Refuses a root exactly as {@link layerAt} does: {@link BunHostError} with
237
+ * code `invalid_repository_root`, thrown when the factory is called.
238
+ * Builds without jj exactly as {@link layerContained} does.
239
+ *
240
+ * @category layers
241
+ * @since 1.0.0-rc.0
242
+ */
243
+ export const layerContainedAt = (root, options) => {
244
+ const repositoryRoot = absoluteRoot("layerContainedAt", root);
245
+ const spawner = Layer.provide(ProcessReaper.layerSpawner({ graceMs: options?.graceMs }), Layer.provide(BunChildProcessSpawner.layer, platform));
246
+ return Layer.mergeAll(ProcessConfinement.layer(), platform, layerHttpClient, Layer.provideMerge(BunJj.layerSpawnerAt(repositoryRoot), spawner)).pipe(Layer.provideMerge(ProcessReaper.layer(reaping(options))));
247
+ };
248
+ //# sourceMappingURL=BunHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BunHost.js","sourceRoot":"","sources":["../../src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AC,QAAQ,CACnB,kBAAkB,CAAC,KAAK,EAAE,EAC1B,QAAQ,EACR,eAAe,EACf,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAClE,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AACnE,CAAC,CAAA","sourcesContent":["/**\n * Aggregate Bun Host bundle.\n *\n * Runtime-specific dependencies stay inside this package; callers get the same\n * closed five-service Host surface every other bundle provides, plus native\n * `ProcessConfinement` for guarded commands.\n *\n * There is no Bun shell module: running a command is Effect's\n * `ChildProcessSpawner`, and `@effect/platform-bun`'s implementation is\n * `@effect/platform-node-shared`'s re-exported: the same code on both\n * runtimes, so no runtime detection is needed here.\n *\n * Outgoing HTTP uses the shared EgressHttpClient on both runtimes. Web\n * requests pin approved addresses; ordinary requests retain the shared pool.\n * Redirects remain visible to the capability kernel, and proxy routing follows\n * the host environment.\n *\n * The filesystem slot is `@smthrs/platform-node`'s `AtomicFileSystem`, byte for\n * byte the layer `NodeHost` uses, so a guarded path operation is\n * descriptor-relative and no-follow on both runtimes.\n *\n * @since 1.0.0-rc.0\n */\n\nimport * as BunChildProcessSpawner from \"@effect/platform-bun/BunChildProcessSpawner\"\nimport * as BunCrypto from \"@effect/platform-bun/BunCrypto\"\nimport * as BunPath from \"@effect/platform-bun/BunPath\"\nimport type { Jj } from \"@smthrs/jj\"\nimport * as BunJj from \"@smthrs/jj/bun/BunJj\"\nimport type { HostServiceIds } from \"@smthrs/kernel/HostServices\"\nimport type * as KernelProcessConfinement from \"@smthrs/kernel/ProcessConfinement\"\nimport type * as ProcessLedger from \"@smthrs/kernel/ProcessLedger\"\nimport * as AtomicFileSystem from \"@smthrs/platform-node/AtomicFileSystem\"\nimport * as EgressHttpClient from \"@smthrs/platform-node/EgressHttpClient\"\nimport * as HostLiveness from \"@smthrs/platform-node/HostLiveness\"\nimport * as ProcessConfinement from \"@smthrs/platform-node/ProcessConfinement\"\nimport * as ProcessReaper from \"@smthrs/platform-node/ProcessReaper\"\nimport type * as Crypto from \"effect/Crypto\"\nimport type { FileSystem } from \"effect/FileSystem\"\nimport type { HttpClient } from \"effect/http/HttpClient\"\nimport * as Layer from \"effect/Layer\"\nimport type * as Path from \"effect/Path\"\nimport type { ChildProcessSpawner } from \"effect/process/ChildProcessSpawner\"\nimport * as Schema from \"effect/Schema\"\nimport { isAbsolute } from \"node:path\"\nimport * as BunFileSystem from \"./BunFileSystem.ts\"\n\n/**\n * Bun platform modules for selectively providing individual services.\n *\n * `AtomicFileSystem` is here for the same reason `NodeHost` re-exports it: it\n * owns the only configuration escape hatch the filesystem slot has, and a Bun\n * program with a different packaged helper path needs to reach\n * `AtomicFileSystem.layerWith` without hand-composing the other four tags.\n *\n * `BunJj` is deliberately absent: it belongs to `@smthrs/jj` and is imported\n * from there, never re-exported here. So is `@effect/platform-bun/BunHttpClient`:\n * its `layer` follows redirects to origins the capability kernel never\n * authorized. The network slot on its own is {@link layerHttpClient}.\n *\n * @category re-exports\n * @since 1.0.0-rc.0\n * @slop\n */\nexport { AtomicFileSystem, BunChildProcessSpawner, BunCrypto, BunFileSystem, HostLiveness, ProcessReaper }\n\n/**\n * The complete closed Host service union provided by Bun.\n *\n * @category models\n * @since 1.0.0-rc.0\n * @slop\n */\nexport type BunHost =\n | FileSystem\n | Path.Path\n | ChildProcessSpawner\n | Jj\n | HttpClient\n | KernelProcessConfinement.ProcessConfinement\n\n/**\n * The stable codes a `BunHost` factory refuses with.\n *\n * A code is the contract a caller branches on; the message beside it is for a\n * person. `invalid_repository_root` is the root handed to {@link layerAt} or\n * {@link layerContainedAt} not being absolute or containing NUL, the empty\n * string included.\n *\n * @category models\n * @since 1.0.0-rc.0\n */\nexport type BunHostErrorCode = \"invalid_repository_root\"\n\n/**\n * The refusal a `BunHost` factory throws before it builds a layer.\n *\n * It is thrown rather than failed because a factory is called while a program\n * composes its layers, where there is no fiber to fail yet and a wrong root is\n * a composition mistake, not a runtime outcome. It is this package's class,\n * not the `Jj` adapter's, because a Bun caller composes `BunHost` and should\n * learn nothing about the adapter behind the `Jj` slot from an error message.\n *\n * @category errors\n * @since 1.0.0-rc.0\n */\nexport class BunHostError extends Schema.TaggedError<BunHostError>()(\"@smthrs/platform-bun/BunHostError\", {\n code: Schema.Literal(\"invalid_repository_root\"),\n message: Schema.String\n}) {\n override readonly name = \"BunHostError\"\n}\n\n/** The longest message a factory refuses with, in UTF-16 code units. */\nconst messageLimit = 255\n\n/** How many code points of a refused root the message repeats at most. */\nconst previewLimit = 64\n\n/**\n * A bounded, quoted excerpt of a refused root that fits in `budget` code\n * units of the message.\n *\n * Counted in code points rather than UTF-16 units so a cut never splits a\n * surrogate pair, and passed through `JSON.stringify` so a newline in the root\n * cannot break the log line the message lands on. Each code point is encoded\n * on its own and admitted only while the quoted excerpt plus the length\n * suffix still fit, so a control character that widens to a `\\u0001` escape\n * shortens the excerpt instead of lengthening the message, and a cut never\n * lands inside an escape.\n */\nconst preview = (root: string, budget: number): string => {\n const points = Array.from(root)\n const whole = JSON.stringify(root)\n if (points.length <= previewLimit && whole.length <= budget) return whole\n const suffix = `... (${points.length} characters)`\n const room = budget - suffix.length - 2\n let excerpt = \"\"\n for (const point of points.slice(0, previewLimit)) {\n const encoded = JSON.stringify(point).slice(1, -1)\n if (excerpt.length + encoded.length > room) break\n excerpt += encoded\n }\n return `\"${excerpt}\"${suffix}`\n}\n\n/**\n * Refuses a root the `Jj` adapter underneath would refuse, here and in this\n * package's name.\n *\n * `BunJj.layerAt` and `BunJj.layerSpawnerAt` are `NodeJj`'s, and those throw a\n * bare `TypeError` that names `NodeJj`, carries no code, and echoes the whole\n * string. The predicate includes the same `isAbsolute` the adapter applies, so\n * a root that passes this check cannot reach that throw. An absolute root\n * containing NUL is refused too: no filesystem or process API can represent it.\n */\nconst absoluteRoot = (factory: \"layerAt\" | \"layerContainedAt\", root: string): string => {\n // An absolute root with NUL names that defect, not absoluteness it already has.\n const requirement = !isAbsolute(root)\n ? \"an absolute repository root\"\n : root.includes(\"\\0\")\n ? \"a repository root without NUL\"\n : undefined\n if (requirement === undefined) return root\n const prefix = `BunHost.${factory} requires ${requirement}, got `\n throw new BunHostError({\n code: \"invalid_repository_root\",\n message: `${prefix}${preview(root, messageLimit - prefix.length)}`\n })\n}\n\n/**\n * Stable implementation identities keyed by the closed Host service slots.\n *\n * Each value names the module behind that slot in the raw host bundle.\n * Contained POSIX factories replace the spawner with {@link ProcessReaper.layerSpawner}.\n * These are identity\n * tokens rather than import specifiers: the filesystem entry is\n * `@smthrs/platform-node/AtomicFileSystem` because that is the implementation,\n * even though a consumer reaches it through `@smthrs/platform-bun`.\n *\n * Nothing digests them yet. `@smthrs/plan`'s step key carries a `layers`\n * component these values are meant to feed, but no planner derives it from a\n * host bundle today, so changing one invalidates no cached step.\n *\n * The keys are written as literals rather than `HostServiceIds` positions so\n * that reordering the closed list cannot silently pair a slot with another\n * slot's implementation.\n *\n * @category models\n * @since 1.0.0-rc.0\n * @slop\n */\nexport const implementationIds: Readonly<Record<(typeof HostServiceIds)[number], string>> = {\n \"effect/FileSystem\": \"@smthrs/platform-node/AtomicFileSystem\",\n \"effect/Path\": \"@effect/platform-bun/BunPath\",\n \"effect/process/ChildProcessSpawner\": \"@effect/platform-bun/BunChildProcessSpawner\",\n \"@smthrs/jj/Jj\": \"@smthrs/jj/bun/BunJj\",\n \"effect/HttpClient\": \"@smthrs/platform-node/EgressHttpClient\"\n}\n\n/**\n * What a caller may configure about containment.\n *\n * `ContainedSpawner.Options.platform` is deliberately not part of it. It\n * decides one thing, whether a command that names no `detached` option gets a\n * process group of its own, and this native host detaches by `process.platform`\n * whatever a record claims. A\n * caller-supplied `\"win32\"` on a POSIX host would therefore record\n * `pgid: null` for a child that really does lead a group, and\n * {@link ProcessReaper.reap} would retire that record as `no-group` and leave\n * the orphan running forever: a durable lie rather than a compile error.\n *\n * @category models\n * @since 1.0.0-rc.0\n */\nexport type ContainedOptions = ProcessReaper.SpawnerOptions & ProcessReaper.Options\n\n/** The reaper half of {@link ContainedOptions}. */\nconst reaping = (options?: ContainedOptions): ProcessReaper.Options => ({\n ownerPid: options?.ownerPid,\n system: options?.system\n})\n\n/** The two services `BunChildProcessSpawner` resolves paths and files with. */\nconst platform = Layer.mergeAll(BunFileSystem.layer, BunPath.layer, BunCrypto.layer)\n\n/**\n * The network slot on its own: the shared egress client, which never follows a\n * redirect. A `3xx` comes back to the caller with its `location` intact and the\n * second origin uncontacted; following a redirect is `@smthrs/kernel`'s guarded\n * `HttpClient.layer`, which rechecks every hop.\n *\n * @category layers\n * @since 1.0.0-rc.0\n */\nexport const layerHttpClient: Layer.Layer<HttpClient> = EgressHttpClient.layer(process.env)\n\n/**\n * Provides all five Bun Host services, including the runtime-independent Path\n * service.\n *\n * Builds on a host without jj. The `Jj` slot probes `jj --version` on its\n * first operation and fails that operation with `JjError` carrying\n * `not_installed` or `unsupported_version`; a program that never calls `Jj`\n * runs without jj. `Jj` requires jj 0.39.0 or later.\n *\n * @category layers\n * @since 1.0.0-rc.0\n * @slop\n */\nexport const layer: Layer.Layer<BunHost | Crypto.Crypto> = Layer.mergeAll(\n ProcessConfinement.layer(),\n platform,\n Layer.provide(BunChildProcessSpawner.layer, platform),\n BunJj.layer,\n layerHttpClient\n)\n\n/**\n * Provides all five Bun Host services bound to one absolute repository root.\n *\n * Throws {@link BunHostError} with code `invalid_repository_root` when `root`\n * is not absolute or contains NUL; the empty string counts. The check runs\n * when the factory is called, before any layer exists.\n *\n * Builds without jj exactly as {@link layer} does: the `Jj` slot probes\n * `jj --version` on its first operation.\n *\n * @category layers\n * @since 1.0.0-rc.0\n */\nexport const layerAt = (root: string): Layer.Layer<BunHost | Crypto.Crypto> => {\n const repositoryRoot = absoluteRoot(\"layerAt\", root)\n return Layer.mergeAll(\n ProcessConfinement.layer(),\n platform,\n Layer.provide(BunChildProcessSpawner.layer, platform),\n BunJj.layerAt(repositoryRoot),\n layerHttpClient\n )\n}\n\n/**\n * Provides the Bun host with process containment turned on.\n *\n * Bun uses the same prepared native process lifecycle as Node on POSIX, while\n * preserving its underlying runtime spawner on Windows. `ContainedSpawner` gives\n * every child an escalation deadline and a ledger entry, and\n * `ProcessReaper` sweeps the entries a crashed incarnation of this host left\n * behind. The reaper module lives in `@smthrs/platform-node` because the calls\n * it makes, `process.kill` and `taskkill`, are Node's, and Bun implements\n * them unchanged.\n *\n * Builds without jj exactly as {@link layer} does; here the first\n * operation's `jj --version` probe runs through the contained spawner, so its\n * record enters and leaves the ledger like any other child.\n *\n * @category layers\n * @since 1.0.0-rc.0\n */\nexport const layerContained = (\n options?: ContainedOptions\n): Layer.Layer<BunHost | Crypto.Crypto, never, ProcessLedger.ProcessLedger> => {\n const spawner = Layer.provide(\n ProcessReaper.layerSpawner({ graceMs: options?.graceMs }),\n Layer.provide(BunChildProcessSpawner.layer, platform)\n )\n return Layer.mergeAll(\n ProcessConfinement.layer(),\n platform,\n layerHttpClient,\n // jj goes through the CONTAINED spawner here, not around it, exactly as in\n // `NodeHost.layerContained`: a jj child that starts its own process leads\n // no recorded group, is in no ledger, and outlives the host that ran it.\n Layer.provideMerge(BunJj.layerSpawner, spawner)\n ).pipe(Layer.provideMerge(ProcessReaper.layer(reaping(options))))\n}\n\n/**\n * Provides the contained Bun host bound to one absolute repository root.\n *\n * Refuses a root exactly as {@link layerAt} does: {@link BunHostError} with\n * code `invalid_repository_root`, thrown when the factory is called.\n * Builds without jj exactly as {@link layerContained} does.\n *\n * @category layers\n * @since 1.0.0-rc.0\n */\nexport const layerContainedAt = (\n root: string,\n options?: ContainedOptions\n): Layer.Layer<BunHost | Crypto.Crypto, never, ProcessLedger.ProcessLedger> => {\n const repositoryRoot = absoluteRoot(\"layerContainedAt\", root)\n const spawner = Layer.provide(\n ProcessReaper.layerSpawner({ graceMs: options?.graceMs }),\n Layer.provide(BunChildProcessSpawner.layer, platform)\n )\n return Layer.mergeAll(\n ProcessConfinement.layer(),\n platform,\n layerHttpClient,\n Layer.provideMerge(BunJj.layerSpawnerAt(repositoryRoot), spawner)\n ).pipe(Layer.provideMerge(ProcessReaper.layer(reaping(options))))\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `@smthrs/platform-bun`, the Bun Host bundle.
3
+ *
4
+ * `BunHost.layer` composes the closed five-tag Host surface for Bun out of
5
+ * `@effect/platform-bun`'s child-process spawner and the shared egress `HttpClient`,
6
+ * Effect's runtime-independent `Path`, the Bun `Jj` adapter from
7
+ * `@smthrs/jj`, and `@smthrs/platform-node`'s `AtomicFileSystem`, which is the
8
+ * very layer the Node bundle puts in its own filesystem slot.
9
+ *
10
+ * Two host prerequisites come with it: `@effect/platform-bun`, which both this
11
+ * barrel and `@smthrs/platform-bun/BunHost` import at module load, and the
12
+ * `smithers-jj-export` native helper for the filesystem slot.
13
+ *
14
+ * @since 1.0.0-rc.0
15
+ */
16
+ /**
17
+ * Bun's `FileSystem`, which is `@smthrs/platform-node`'s atomic filesystem.
18
+ * @slop
19
+ */
20
+ export * as BunFileSystem from "./BunFileSystem.ts";
21
+ /**
22
+ * The complete closed Host bundle for Bun.
23
+ * @slop
24
+ */
25
+ export * as BunHost from "./BunHost.ts";
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;GAGG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `@smthrs/platform-bun`, the Bun Host bundle.
3
+ *
4
+ * `BunHost.layer` composes the closed five-tag Host surface for Bun out of
5
+ * `@effect/platform-bun`'s child-process spawner and the shared egress `HttpClient`,
6
+ * Effect's runtime-independent `Path`, the Bun `Jj` adapter from
7
+ * `@smthrs/jj`, and `@smthrs/platform-node`'s `AtomicFileSystem`, which is the
8
+ * very layer the Node bundle puts in its own filesystem slot.
9
+ *
10
+ * Two host prerequisites come with it: `@effect/platform-bun`, which both this
11
+ * barrel and `@smthrs/platform-bun/BunHost` import at module load, and the
12
+ * `smithers-jj-export` native helper for the filesystem slot.
13
+ *
14
+ * @since 1.0.0-rc.0
15
+ */
16
+ /**
17
+ * Bun's `FileSystem`, which is `@smthrs/platform-node`'s atomic filesystem.
18
+ * @slop
19
+ */
20
+ export * as BunFileSystem from "./BunFileSystem.js";
21
+ /**
22
+ * The complete closed Host bundle for Bun.
23
+ * @slop
24
+ */
25
+ export * as BunHost from "./BunHost.js";
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;GAGG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA","sourcesContent":["/**\n * `@smthrs/platform-bun`, the Bun Host bundle.\n *\n * `BunHost.layer` composes the closed five-tag Host surface for Bun out of\n * `@effect/platform-bun`'s child-process spawner and the shared egress `HttpClient`,\n * Effect's runtime-independent `Path`, the Bun `Jj` adapter from\n * `@smthrs/jj`, and `@smthrs/platform-node`'s `AtomicFileSystem`, which is the\n * very layer the Node bundle puts in its own filesystem slot.\n *\n * Two host prerequisites come with it: `@effect/platform-bun`, which both this\n * barrel and `@smthrs/platform-bun/BunHost` import at module load, and the\n * `smithers-jj-export` native helper for the filesystem slot.\n *\n * @since 1.0.0-rc.0\n */\n\n/**\n * Bun's `FileSystem`, which is `@smthrs/platform-node`'s atomic filesystem.\n * @slop\n */\nexport * as BunFileSystem from \"./BunFileSystem.ts\"\n\n/**\n * The complete closed Host bundle for Bun.\n * @slop\n */\nexport * as BunHost from \"./BunHost.ts\"\n"]}