@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/BunPath.d.ts CHANGED
@@ -1,18 +1,24 @@
1
1
  import type * as Layer from "effect/Layer";
2
2
  import type { Path } from "effect/Path";
3
3
  /**
4
- * @since 1.0.0
5
- * @category layer
4
+ * Layer that provides the default `Path` service for Bun using the shared Node path implementation.
5
+ *
6
+ * @category layers
7
+ * @since 4.0.0
6
8
  */
7
9
  export declare const layer: Layer.Layer<Path>;
8
10
  /**
9
- * @since 1.0.0
10
- * @category layer
11
+ * Layer that provides the POSIX `Path` service for Bun using the shared Node path implementation.
12
+ *
13
+ * @category layers
14
+ * @since 4.0.0
11
15
  */
12
16
  export declare const layerPosix: Layer.Layer<Path>;
13
17
  /**
14
- * @since 1.0.0
15
- * @category layer
18
+ * Layer that provides the Win32 `Path` service for Bun using the shared Node path implementation.
19
+ *
20
+ * @category layers
21
+ * @since 4.0.0
16
22
  */
17
23
  export declare const layerWin32: Layer.Layer<Path>;
18
24
  //# sourceMappingURL=BunPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BunPath.d.ts","sourceRoot":"","sources":["../src/BunPath.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAkB,CAAA;AAEtD;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAA;AAEhE;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAA"}
1
+ {"version":3,"file":"BunPath.d.ts","sourceRoot":"","sources":["../src/BunPath.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAkB,CAAA;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAA;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAA"}
package/dist/BunPath.js CHANGED
@@ -1,20 +1,55 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * Bun-backed layers for Effect's {@link Path} service.
3
+ *
4
+ * This module provides the `Path` service for Bun programs by reusing the
5
+ * shared Node-compatible path implementation. Provide one of these layers when
6
+ * Bun code should receive path operations from the Effect environment instead
7
+ * of importing runtime path helpers directly.
8
+ *
9
+ * **Mental model**
10
+ *
11
+ * Bun exposes Node-compatible path and file URL behavior, so the default
12
+ * {@link layer} follows the host operating system's rules. The
13
+ * {@link layerPosix} and {@link layerWin32} variants pin parsing and formatting
14
+ * to POSIX or Windows semantics for portable tests, generated paths, and
15
+ * cross-platform tooling.
16
+ *
17
+ * **Common tasks**
18
+ *
19
+ * Use {@link layer} for normal Bun applications and CLIs. Use
20
+ * {@link layerPosix} or {@link layerWin32} when code must produce stable path
21
+ * syntax regardless of the machine running Bun. `BunServices.layer` already
22
+ * includes {@link layer}, so import this module directly when only `Path` or a
23
+ * fixed platform variant is needed.
24
+ *
25
+ * **Gotchas**
26
+ *
27
+ * Path operations are syntactic. They normalize and convert strings and
28
+ * `file:` URLs, but they do not read the filesystem, check permissions, confirm
29
+ * that a path exists, or make request URLs safe to use as local paths.
30
+ *
31
+ * @since 4.0.0
3
32
  */
4
33
  import * as NodePath from "@effect/platform-node-shared/NodePath";
5
34
  /**
6
- * @since 1.0.0
7
- * @category layer
35
+ * Layer that provides the default `Path` service for Bun using the shared Node path implementation.
36
+ *
37
+ * @category layers
38
+ * @since 4.0.0
8
39
  */
9
40
  export const layer = NodePath.layer;
10
41
  /**
11
- * @since 1.0.0
12
- * @category layer
42
+ * Layer that provides the POSIX `Path` service for Bun using the shared Node path implementation.
43
+ *
44
+ * @category layers
45
+ * @since 4.0.0
13
46
  */
14
47
  export const layerPosix = NodePath.layerPosix;
15
48
  /**
16
- * @since 1.0.0
17
- * @category layer
49
+ * Layer that provides the Win32 `Path` service for Bun using the shared Node path implementation.
50
+ *
51
+ * @category layers
52
+ * @since 4.0.0
18
53
  */
19
54
  export const layerWin32 = NodePath.layerWin32;
20
55
  //# sourceMappingURL=BunPath.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BunPath.js","names":["NodePath","layer","layerPosix","layerWin32"],"sources":["../src/BunPath.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,uCAAuC;AAIjE;;;;AAIA,OAAO,MAAMC,KAAK,GAAsBD,QAAQ,CAACC,KAAK;AAEtD;;;;AAIA,OAAO,MAAMC,UAAU,GAAsBF,QAAQ,CAACE,UAAU;AAEhE;;;;AAIA,OAAO,MAAMC,UAAU,GAAsBH,QAAQ,CAACG,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"BunPath.js","names":["NodePath","layer","layerPosix","layerWin32"],"sources":["../src/BunPath.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,KAAKA,QAAQ,MAAM,uCAAuC;AAIjE;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAsBD,QAAQ,CAACC,KAAK;AAEtD;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAsBF,QAAQ,CAACE,UAAU;AAEhE;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAsBH,QAAQ,CAACG,UAAU","ignoreList":[]}
@@ -1,32 +1,71 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * Bun Redis integration backed by Bun's built-in `RedisClient`.
3
+ *
4
+ * This module creates scoped Bun `RedisClient` connections and exposes them as
5
+ * both the portable `Redis` service used by Effect persistence modules and the
6
+ * Bun-specific `BunRedis` service for direct access to the raw client. Use it in
7
+ * Bun applications that need Redis-backed persistence, persisted queues,
8
+ * distributed rate limiting, custom Redis commands, or Bun Redis features such
9
+ * as pub/sub.
10
+ *
11
+ * **Mental model**
12
+ *
13
+ * `layer` and `layerConfig` acquire one `RedisClient` for the layer scope. The
14
+ * same client backs the portable `Redis.Redis` command interface and the
15
+ * `BunRedis` service, and it is closed with `close` when the scope finalizes.
16
+ * Install the layer at the lifetime you want for that connection.
17
+ *
18
+ * **Common tasks**
19
+ *
20
+ * Pass a Redis URL or Bun `RedisOptions` to `layer` for direct configuration,
21
+ * or use `layerConfig` when connection settings should come from Effect
22
+ * configuration. Depend on `Redis.Redis` for persistence and rate limiter
23
+ * stores. Depend on `BunRedis` when you need `RedisClient` features that are
24
+ * not exposed by the portable service, including custom commands and pub/sub.
25
+ *
26
+ * **Gotchas**
27
+ *
28
+ * Pub/sub should normally use a separately scoped client so a subscription does
29
+ * not interfere with ordinary command traffic. Persistence and rate limiter
30
+ * stores build keys and Lua scripts on top of this service, so choose stable
31
+ * prefixes and store ids, account for persisted values that may fail to decode
32
+ * after schema changes, and avoid unbounded high-cardinality rate-limit keys
33
+ * without a cleanup or bounding strategy.
34
+ *
35
+ * @since 4.0.0
3
36
  */
4
37
  import { RedisClient, type RedisOptions } from "bun";
5
38
  import * as Config from "effect/Config";
39
+ import * as Context from "effect/Context";
6
40
  import * as Effect from "effect/Effect";
7
41
  import * as Layer from "effect/Layer";
8
- import * as ServiceMap from "effect/ServiceMap";
9
42
  import * as Redis from "effect/unstable/persistence/Redis";
10
- declare const BunRedis_base: ServiceMap.ServiceClass<BunRedis, "@effect/platform-bun/BunRedis", {
43
+ declare const BunRedis_base: Context.ServiceClass<BunRedis, "@effect/platform-bun/BunRedis", {
11
44
  readonly client: RedisClient;
12
45
  readonly use: <A>(f: (client: RedisClient) => Promise<A>) => Effect.Effect<A, Redis.RedisError>;
13
46
  }>;
14
47
  /**
15
- * @since 1.0.0
16
- * @category Service
48
+ * Service tag for Bun Redis integration, exposing the raw `RedisClient` and a `use` helper that maps client promise failures to `RedisError`.
49
+ *
50
+ * @category services
51
+ * @since 4.0.0
17
52
  */
18
53
  export declare class BunRedis extends BunRedis_base {
19
54
  }
20
55
  /**
21
- * @since 1.0.0
22
- * @category Layers
56
+ * Creates scoped Bun Redis layers for `Redis.Redis` and `BunRedis`, closing the underlying client when the scope finalizes.
57
+ *
58
+ * @category layers
59
+ * @since 4.0.0
23
60
  */
24
61
  export declare const layer: (options?: ({
25
62
  readonly url?: string;
26
63
  } & RedisOptions) | undefined) => Layer.Layer<Redis.Redis | BunRedis>;
27
64
  /**
28
- * @since 1.0.0
29
- * @category Layers
65
+ * Creates scoped Bun Redis layers from configurable Redis options, closing the underlying client when the scope finalizes.
66
+ *
67
+ * @category layers
68
+ * @since 4.0.0
30
69
  */
31
70
  export declare const layerConfig: (options: Config.Wrap<{
32
71
  readonly url?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BunRedis.d.ts","sourceRoot":"","sources":["../src/BunRedis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;;qBAOvC,WAAW;kBACd,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;;AANjG;;;GAGG;AACH,qBAAa,QAAS,SAAQ,aAGO;CAAG;AAmCxC;;;GAGG;AACH,eAAO,MAAM,KAAK,GAChB,UAAU,CAAC;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,GAAG,SAAS,KAC/D,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAwC,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,WAAW,GACtB,SAAS,MAAM,CAAC,IAAI,CAAC;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,KAC7D,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,EAAE,MAAM,CAAC,WAAW,CAKtD,CAAA"}
1
+ {"version":3,"file":"BunRedis.d.ts","sourceRoot":"","sources":["../src/BunRedis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;;qBASvC,WAAW;kBACd,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;;AARjG;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,aAGO;CAAG;AAmCxC;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAChB,UAAU,CAAC;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,GAAG,SAAS,KAC/D,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAuC,CAAA;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GACtB,SAAS,MAAM,CAAC,IAAI,CAAC;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,KAC7D,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,EAAE,MAAM,CAAC,WAAW,CAKtD,CAAA"}
package/dist/BunRedis.js CHANGED
@@ -1,19 +1,54 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * Bun Redis integration backed by Bun's built-in `RedisClient`.
3
+ *
4
+ * This module creates scoped Bun `RedisClient` connections and exposes them as
5
+ * both the portable `Redis` service used by Effect persistence modules and the
6
+ * Bun-specific `BunRedis` service for direct access to the raw client. Use it in
7
+ * Bun applications that need Redis-backed persistence, persisted queues,
8
+ * distributed rate limiting, custom Redis commands, or Bun Redis features such
9
+ * as pub/sub.
10
+ *
11
+ * **Mental model**
12
+ *
13
+ * `layer` and `layerConfig` acquire one `RedisClient` for the layer scope. The
14
+ * same client backs the portable `Redis.Redis` command interface and the
15
+ * `BunRedis` service, and it is closed with `close` when the scope finalizes.
16
+ * Install the layer at the lifetime you want for that connection.
17
+ *
18
+ * **Common tasks**
19
+ *
20
+ * Pass a Redis URL or Bun `RedisOptions` to `layer` for direct configuration,
21
+ * or use `layerConfig` when connection settings should come from Effect
22
+ * configuration. Depend on `Redis.Redis` for persistence and rate limiter
23
+ * stores. Depend on `BunRedis` when you need `RedisClient` features that are
24
+ * not exposed by the portable service, including custom commands and pub/sub.
25
+ *
26
+ * **Gotchas**
27
+ *
28
+ * Pub/sub should normally use a separately scoped client so a subscription does
29
+ * not interfere with ordinary command traffic. Persistence and rate limiter
30
+ * stores build keys and Lua scripts on top of this service, so choose stable
31
+ * prefixes and store ids, account for persisted values that may fail to decode
32
+ * after schema changes, and avoid unbounded high-cardinality rate-limit keys
33
+ * without a cleanup or bounding strategy.
34
+ *
35
+ * @since 4.0.0
3
36
  */
4
37
  import { RedisClient } from "bun";
5
38
  import * as Config from "effect/Config";
39
+ import * as Context from "effect/Context";
6
40
  import * as Effect from "effect/Effect";
7
41
  import * as Fn from "effect/Function";
8
42
  import * as Layer from "effect/Layer";
9
43
  import * as Scope from "effect/Scope";
10
- import * as ServiceMap from "effect/ServiceMap";
11
44
  import * as Redis from "effect/unstable/persistence/Redis";
12
45
  /**
13
- * @since 1.0.0
14
- * @category Service
46
+ * Service tag for Bun Redis integration, exposing the raw `RedisClient` and a `use` helper that maps client promise failures to `RedisError`.
47
+ *
48
+ * @category services
49
+ * @since 4.0.0
15
50
  */
16
- export class BunRedis extends /*#__PURE__*/ServiceMap.Service()("@effect/platform-bun/BunRedis") {}
51
+ export class BunRedis extends /*#__PURE__*/Context.Service()("@effect/platform-bun/BunRedis") {}
17
52
  const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
18
53
  const scope = yield* Effect.scope;
19
54
  yield* Scope.addFinalizer(scope, Effect.sync(() => client.close()));
@@ -36,16 +71,20 @@ const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
36
71
  client,
37
72
  use
38
73
  });
39
- return ServiceMap.make(BunRedis, bunRedis).pipe(ServiceMap.add(Redis.Redis, redis));
74
+ return Context.make(BunRedis, bunRedis).pipe(Context.add(Redis.Redis, redis));
40
75
  });
41
76
  /**
42
- * @since 1.0.0
43
- * @category Layers
77
+ * Creates scoped Bun Redis layers for `Redis.Redis` and `BunRedis`, closing the underlying client when the scope finalizes.
78
+ *
79
+ * @category layers
80
+ * @since 4.0.0
44
81
  */
45
- export const layer = options => Layer.effectServices(make(options));
82
+ export const layer = options => Layer.effectContext(make(options));
46
83
  /**
47
- * @since 1.0.0
48
- * @category Layers
84
+ * Creates scoped Bun Redis layers from configurable Redis options, closing the underlying client when the scope finalizes.
85
+ *
86
+ * @category layers
87
+ * @since 4.0.0
49
88
  */
50
- export const layerConfig = options => Layer.effectServices(Config.unwrap(options).asEffect().pipe(Effect.flatMap(make)));
89
+ export const layerConfig = options => Layer.effectContext(Config.unwrap(options).pipe(Effect.flatMap(make)));
51
90
  //# sourceMappingURL=BunRedis.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BunRedis.js","names":["RedisClient","Config","Effect","Fn","Layer","Scope","ServiceMap","Redis","BunRedis","Service","make","fnUntraced","options","scope","addFinalizer","sync","client","close","url","use","f","tryPromise","try","catch","cause","RedisError","redis","send","command","args","bunRedis","identity","pipe","add","layer","effectServices","layerConfig","unwrap","asEffect","flatMap"],"sources":["../src/BunRedis.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,SAASA,WAAW,QAA2B,KAAK;AACpD,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,EAAE,MAAM,iBAAiB;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,UAAU,MAAM,mBAAmB;AAC/C,OAAO,KAAKC,KAAK,MAAM,mCAAmC;AAE1D;;;;AAIA,OAAM,MAAOC,QAAS,sBAAQF,UAAU,CAACG,OAAO,EAG5C,CAAC,+BAA+B,CAAC;AAErC,MAAMC,IAAI,gBAAGR,MAAM,CAACS,UAAU,CAAC,WAC7BC,OAEgB;EAEhB,MAAMC,KAAK,GAAG,OAAOX,MAAM,CAACW,KAAK;EACjC,OAAOR,KAAK,CAACS,YAAY,CAACD,KAAK,EAAEX,MAAM,CAACa,IAAI,CAAC,MAAMC,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC;EACnE,MAAMD,MAAM,GAAG,IAAIhB,WAAW,CAACY,OAAO,EAAEM,GAAG,EAAEN,OAAO,CAAC;EAErD,MAAMO,GAAG,GAAOC,CAAsC,IACpDlB,MAAM,CAACmB,UAAU,CAAC;IAChBC,GAAG,EAAEA,CAAA,KAAMF,CAAC,CAACJ,MAAM,CAAC;IACpBO,KAAK,EAAGC,KAAK,IAAK,IAAIjB,KAAK,CAACkB,UAAU,CAAC;MAAED;IAAK,CAAE;GACjD,CAAC;EAEJ,MAAME,KAAK,GAAG,OAAOnB,KAAK,CAACG,IAAI,CAAC;IAC9BiB,IAAI,EAAEA,CAAcC,OAAe,EAAE,GAAGC,IAA2B,KACjE3B,MAAM,CAACmB,UAAU,CAAC;MAChBC,GAAG,EAAEA,CAAA,KAAMN,MAAM,CAACW,IAAI,CAACC,OAAO,EAAEC,IAAqB,CAAe;MACpEN,KAAK,EAAGC,KAAK,IAAK,IAAIjB,KAAK,CAACkB,UAAU,CAAC;QAAED;MAAK,CAAE;KACjD;GACJ,CAAC;EAEF,MAAMM,QAAQ,GAAG3B,EAAE,CAAC4B,QAAQ,CAAsB;IAChDf,MAAM;IACNG;GACD,CAAC;EAEF,OAAOb,UAAU,CAACI,IAAI,CAACF,QAAQ,EAAEsB,QAAQ,CAAC,CAACE,IAAI,CAC7C1B,UAAU,CAAC2B,GAAG,CAAC1B,KAAK,CAACA,KAAK,EAAEmB,KAAK,CAAC,CACnC;AACH,CAAC,CAAC;AAEF;;;;AAIA,OAAO,MAAMQ,KAAK,GAChBtB,OAAgE,IACxBR,KAAK,CAAC+B,cAAc,CAACzB,IAAI,CAACE,OAAO,CAAC,CAAC;AAE7E;;;;AAIA,OAAO,MAAMwB,WAAW,GACtBxB,OAA8D,IAE9DR,KAAK,CAAC+B,cAAc,CAClBlC,MAAM,CAACoC,MAAM,CAACzB,OAAO,CAAC,CAAC0B,QAAQ,EAAE,CAACN,IAAI,CACpC9B,MAAM,CAACqC,OAAO,CAAC7B,IAAI,CAAC,CACrB,CACF","ignoreList":[]}
1
+ {"version":3,"file":"BunRedis.js","names":["RedisClient","Config","Context","Effect","Fn","Layer","Scope","Redis","BunRedis","Service","make","fnUntraced","options","scope","addFinalizer","sync","client","close","url","use","f","tryPromise","try","catch","cause","RedisError","redis","send","command","args","bunRedis","identity","pipe","add","layer","effectContext","layerConfig","unwrap","flatMap"],"sources":["../src/BunRedis.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAASA,WAAW,QAA2B,KAAK;AACpD,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,EAAE,MAAM,iBAAiB;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,mCAAmC;AAE1D;;;;;;AAMA,OAAM,MAAOC,QAAS,sBAAQN,OAAO,CAACO,OAAO,EAGzC,CAAC,+BAA+B,CAAC;AAErC,MAAMC,IAAI,gBAAGP,MAAM,CAACQ,UAAU,CAAC,WAC7BC,OAEgB;EAEhB,MAAMC,KAAK,GAAG,OAAOV,MAAM,CAACU,KAAK;EACjC,OAAOP,KAAK,CAACQ,YAAY,CAACD,KAAK,EAAEV,MAAM,CAACY,IAAI,CAAC,MAAMC,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC;EACnE,MAAMD,MAAM,GAAG,IAAIhB,WAAW,CAACY,OAAO,EAAEM,GAAG,EAAEN,OAAO,CAAC;EAErD,MAAMO,GAAG,GAAOC,CAAsC,IACpDjB,MAAM,CAACkB,UAAU,CAAC;IAChBC,GAAG,EAAEA,CAAA,KAAMF,CAAC,CAACJ,MAAM,CAAC;IACpBO,KAAK,EAAGC,KAAK,IAAK,IAAIjB,KAAK,CAACkB,UAAU,CAAC;MAAED;IAAK,CAAE;GACjD,CAAC;EAEJ,MAAME,KAAK,GAAG,OAAOnB,KAAK,CAACG,IAAI,CAAC;IAC9BiB,IAAI,EAAEA,CAAcC,OAAe,EAAE,GAAGC,IAA2B,KACjE1B,MAAM,CAACkB,UAAU,CAAC;MAChBC,GAAG,EAAEA,CAAA,KAAMN,MAAM,CAACW,IAAI,CAACC,OAAO,EAAEC,IAAqB,CAAe;MACpEN,KAAK,EAAGC,KAAK,IAAK,IAAIjB,KAAK,CAACkB,UAAU,CAAC;QAAED;MAAK,CAAE;KACjD;GACJ,CAAC;EAEF,MAAMM,QAAQ,GAAG1B,EAAE,CAAC2B,QAAQ,CAAsB;IAChDf,MAAM;IACNG;GACD,CAAC;EAEF,OAAOjB,OAAO,CAACQ,IAAI,CAACF,QAAQ,EAAEsB,QAAQ,CAAC,CAACE,IAAI,CAC1C9B,OAAO,CAAC+B,GAAG,CAAC1B,KAAK,CAACA,KAAK,EAAEmB,KAAK,CAAC,CAChC;AACH,CAAC,CAAC;AAEF;;;;;;AAMA,OAAO,MAAMQ,KAAK,GAChBtB,OAAgE,IACxBP,KAAK,CAAC8B,aAAa,CAACzB,IAAI,CAACE,OAAO,CAAC,CAAC;AAE5E;;;;;;AAMA,OAAO,MAAMwB,WAAW,GACtBxB,OAA8D,IAE9DP,KAAK,CAAC8B,aAAa,CACjBlC,MAAM,CAACoC,MAAM,CAACzB,OAAO,CAAC,CAACoB,IAAI,CACzB7B,MAAM,CAACmC,OAAO,CAAC5B,IAAI,CAAC,CACrB,CACF","ignoreList":[]}
@@ -3,6 +3,12 @@ import type { Teardown } from "effect/Runtime";
3
3
  /**
4
4
  * Helps you run a main effect with built-in error handling, logging, and signal management.
5
5
  *
6
+ * **When to use**
7
+ *
8
+ * Use to run an Effect as your application's main program,
9
+ * especially when you need structured error handling, log management,
10
+ * interrupt support, or advanced teardown capabilities.
11
+ *
6
12
  * **Details**
7
13
  *
8
14
  * This function launches an Effect as the main entry point, setting exit codes
@@ -11,26 +17,24 @@ import type { Teardown } from "effect/Runtime";
11
17
  * behaviors can be turned off. You can also provide custom teardown logic to
12
18
  * finalize resources or produce different exit codes.
13
19
  *
14
- * **Options**
15
- *
16
20
  * An optional object that can include:
17
21
  * - `disableErrorReporting`: Turn off automatic error logging.
18
22
  * - `disablePrettyLogger`: Avoid adding the pretty logger.
19
23
  * - `teardown`: Provide custom finalization logic.
20
24
  *
21
- * **When to Use**
22
- *
23
- * Use this function to run an Effect as your application’s main program, especially
24
- * when you need structured error handling, log management, interrupt support,
25
- * or advanced teardown capabilities.
26
- *
27
- * @since 1.0.0
28
- * @category Run main
25
+ * @category running
26
+ * @since 4.0.0
29
27
  */
30
28
  export declare const runMain: {
31
29
  /**
32
30
  * Helps you run a main effect with built-in error handling, logging, and signal management.
33
31
  *
32
+ * **When to use**
33
+ *
34
+ * Use to run an Effect as your application's main program,
35
+ * especially when you need structured error handling, log management,
36
+ * interrupt support, or advanced teardown capabilities.
37
+ *
34
38
  * **Details**
35
39
  *
36
40
  * This function launches an Effect as the main entry point, setting exit codes
@@ -39,21 +43,13 @@ export declare const runMain: {
39
43
  * behaviors can be turned off. You can also provide custom teardown logic to
40
44
  * finalize resources or produce different exit codes.
41
45
  *
42
- * **Options**
43
- *
44
46
  * An optional object that can include:
45
47
  * - `disableErrorReporting`: Turn off automatic error logging.
46
48
  * - `disablePrettyLogger`: Avoid adding the pretty logger.
47
49
  * - `teardown`: Provide custom finalization logic.
48
50
  *
49
- * **When to Use**
50
- *
51
- * Use this function to run an Effect as your application’s main program, especially
52
- * when you need structured error handling, log management, interrupt support,
53
- * or advanced teardown capabilities.
54
- *
55
- * @since 1.0.0
56
- * @category Run main
51
+ * @category running
52
+ * @since 4.0.0
57
53
  */
58
54
  (options?: {
59
55
  readonly disableErrorReporting?: boolean | undefined;
@@ -62,6 +58,12 @@ export declare const runMain: {
62
58
  /**
63
59
  * Helps you run a main effect with built-in error handling, logging, and signal management.
64
60
  *
61
+ * **When to use**
62
+ *
63
+ * Use to run an Effect as your application's main program,
64
+ * especially when you need structured error handling, log management,
65
+ * interrupt support, or advanced teardown capabilities.
66
+ *
65
67
  * **Details**
66
68
  *
67
69
  * This function launches an Effect as the main entry point, setting exit codes
@@ -70,21 +72,13 @@ export declare const runMain: {
70
72
  * behaviors can be turned off. You can also provide custom teardown logic to
71
73
  * finalize resources or produce different exit codes.
72
74
  *
73
- * **Options**
74
- *
75
75
  * An optional object that can include:
76
76
  * - `disableErrorReporting`: Turn off automatic error logging.
77
77
  * - `disablePrettyLogger`: Avoid adding the pretty logger.
78
78
  * - `teardown`: Provide custom finalization logic.
79
79
  *
80
- * **When to Use**
81
- *
82
- * Use this function to run an Effect as your application’s main program, especially
83
- * when you need structured error handling, log management, interrupt support,
84
- * or advanced teardown capabilities.
85
- *
86
- * @since 1.0.0
87
- * @category Run main
80
+ * @category running
81
+ * @since 4.0.0
88
82
  */
89
83
  <E, A>(effect: Effect<A, E>, options?: {
90
84
  readonly disableErrorReporting?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"BunRuntime.d.ts","sourceRoot":"","sources":["../src/BunRuntime.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,CACE,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KACzC,GACA,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAA;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,CAAC,CAAC,EAAE,CAAC,EACH,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KACzC,GACA,IAAI,CAAA;CACc,CAAA"}
1
+ {"version":3,"file":"BunRuntime.d.ts","sourceRoot":"","sources":["../src/BunRuntime.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,CACE,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KACzC,GACA,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAA;IACvC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,CAAC,CAAC,EAAE,CAAC,EACH,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KACzC,GACA,IAAI,CAAA;CACc,CAAA"}
@@ -1,10 +1,45 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * Bun process runner for Effect programs.
3
+ *
4
+ * This module exposes Bun's `runMain` entry point. It is the function to call
5
+ * at the outer edge of a Bun CLI, script, server, or worker when a single
6
+ * Effect should become the process main fiber and use Bun's Node-compatible
7
+ * process, signal, and teardown behavior.
8
+ *
9
+ * **Mental model**
10
+ *
11
+ * `runMain` delegates to the shared Node-compatible runner. It starts the
12
+ * supplied Effect as the process root, reports failures through the configured
13
+ * runtime reporting, and translates `SIGINT` or `SIGTERM` into interruption so
14
+ * scoped resources can finalize before teardown chooses an exit code.
15
+ *
16
+ * **Common tasks**
17
+ *
18
+ * - Launch a Bun CLI or one-off script from an Effect.
19
+ * - Start a long-running Bun server or worker under an Effect scope.
20
+ * - Customize error reporting or teardown with `runMain` options.
21
+ * - Provide `BunServices.layer` or narrower layers before calling `runMain`.
22
+ *
23
+ * **Gotchas**
24
+ *
25
+ * This module runs the program; it does not provide filesystem, network,
26
+ * terminal, or other platform services. Long-lived servers, subscriptions, and
27
+ * worker loops should be acquired in Effect scopes so interruption from process
28
+ * signals can release them. Finalizers that never complete can keep shutdown
29
+ * waiting.
30
+ *
31
+ * @since 4.0.0
3
32
  */
4
33
  import * as NodeRuntime from "@effect/platform-node-shared/NodeRuntime";
5
34
  /**
6
35
  * Helps you run a main effect with built-in error handling, logging, and signal management.
7
36
  *
37
+ * **When to use**
38
+ *
39
+ * Use to run an Effect as your application's main program,
40
+ * especially when you need structured error handling, log management,
41
+ * interrupt support, or advanced teardown capabilities.
42
+ *
8
43
  * **Details**
9
44
  *
10
45
  * This function launches an Effect as the main entry point, setting exit codes
@@ -13,21 +48,13 @@ import * as NodeRuntime from "@effect/platform-node-shared/NodeRuntime";
13
48
  * behaviors can be turned off. You can also provide custom teardown logic to
14
49
  * finalize resources or produce different exit codes.
15
50
  *
16
- * **Options**
17
- *
18
51
  * An optional object that can include:
19
52
  * - `disableErrorReporting`: Turn off automatic error logging.
20
53
  * - `disablePrettyLogger`: Avoid adding the pretty logger.
21
54
  * - `teardown`: Provide custom finalization logic.
22
55
  *
23
- * **When to Use**
24
- *
25
- * Use this function to run an Effect as your application’s main program, especially
26
- * when you need structured error handling, log management, interrupt support,
27
- * or advanced teardown capabilities.
28
- *
29
- * @since 1.0.0
30
- * @category Run main
56
+ * @category running
57
+ * @since 4.0.0
31
58
  */
32
59
  export const runMain = NodeRuntime.runMain;
33
60
  //# sourceMappingURL=BunRuntime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BunRuntime.js","names":["NodeRuntime","runMain"],"sources":["../src/BunRuntime.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,WAAW,MAAM,0CAA0C;AAIvE;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMC,OAAO,GAoEhBD,WAAW,CAACC,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"BunRuntime.js","names":["NodeRuntime","runMain"],"sources":["../src/BunRuntime.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,KAAKA,WAAW,MAAM,0CAA0C;AAIvE;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMC,OAAO,GAgEhBD,WAAW,CAACC,OAAO","ignoreList":[]}
@@ -1,6 +1,27 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * Provides the aggregate Bun platform services layer for applications that run
3
+ * on the Bun runtime.
4
+ *
5
+ * This module is useful when an application needs the standard Bun-backed
6
+ * implementations of filesystem access, path operations, stdio, terminal
7
+ * interaction, and child process spawning from a single layer. Provide
8
+ * `BunServices.layer` near the edge of a program to satisfy effects that read
9
+ * or write files, resolve paths, interact with stdin/stdout/stderr or a
10
+ * terminal, or launch subprocesses.
11
+ *
12
+ * The layer only supplies the runtime services listed by `BunServices`; it does
13
+ * not provide unrelated platform services such as HTTP clients, HTTP servers,
14
+ * sockets, workers, or Redis. Several of these core Bun services are backed by
15
+ * the shared Node-compatible implementations used by the Bun adapters, so the
16
+ * default path, stdio, terminal, and subprocess behavior follows the current
17
+ * process and host platform. Libraries should continue to depend on the
18
+ * individual service tags they use, while Bun applications, CLIs, and tests can
19
+ * choose this layer or narrower service-specific layers depending on how much
20
+ * of the Bun runtime they want to expose.
21
+ *
22
+ * @since 4.0.0
3
23
  */
24
+ import type { Crypto } from "effect/Crypto";
4
25
  import type { FileSystem } from "effect/FileSystem";
5
26
  import * as Layer from "effect/Layer";
6
27
  import type { Path } from "effect/Path";
@@ -8,13 +29,19 @@ import type { Stdio } from "effect/Stdio";
8
29
  import type { Terminal } from "effect/Terminal";
9
30
  import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
10
31
  /**
11
- * @since 1.0.0
32
+ * The union of core services provided by the Bun platform layer, including child
33
+ * process spawning, filesystem, path, stdio, and terminal services.
34
+ *
12
35
  * @category models
36
+ * @since 4.0.0
13
37
  */
14
- export type BunServices = ChildProcessSpawner | FileSystem | Path | Terminal | Stdio;
38
+ export type BunServices = ChildProcessSpawner | Crypto | FileSystem | Path | Terminal | Stdio;
15
39
  /**
16
- * @since 1.0.0
17
- * @category layer
40
+ * Provides the default Bun implementations for child process spawning,
41
+ * filesystem, path, stdio, and terminal services.
42
+ *
43
+ * @category layers
44
+ * @since 4.0.0
18
45
  */
19
46
  export declare const layer: Layer.Layer<BunServices>;
20
47
  //# sourceMappingURL=BunServices.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BunServices.d.ts","sourceRoot":"","sources":["../src/BunServices.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAA;AAOtF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAA;AAEpF;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAO1C,CAAA"}
1
+ {"version":3,"file":"BunServices.d.ts","sourceRoot":"","sources":["../src/BunServices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAA;AAQtF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE7F;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAQ1C,CAAA"}
@@ -1,12 +1,16 @@
1
1
  import * as Layer from "effect/Layer";
2
2
  import * as BunChildProcessSpawner from "./BunChildProcessSpawner.js";
3
+ import * as BunCrypto from "./BunCrypto.js";
3
4
  import * as BunFileSystem from "./BunFileSystem.js";
4
5
  import * as BunPath from "./BunPath.js";
5
6
  import * as BunStdio from "./BunStdio.js";
6
7
  import * as BunTerminal from "./BunTerminal.js";
7
8
  /**
8
- * @since 1.0.0
9
- * @category layer
9
+ * Provides the default Bun implementations for child process spawning,
10
+ * filesystem, path, stdio, and terminal services.
11
+ *
12
+ * @category layers
13
+ * @since 4.0.0
10
14
  */
11
- export const layer = /*#__PURE__*/BunChildProcessSpawner.layer.pipe(/*#__PURE__*/Layer.provideMerge(/*#__PURE__*/Layer.mergeAll(BunFileSystem.layer, BunPath.layer, BunStdio.layer, BunTerminal.layer)));
15
+ export const layer = /*#__PURE__*/BunChildProcessSpawner.layer.pipe(/*#__PURE__*/Layer.provideMerge(/*#__PURE__*/Layer.mergeAll(BunFileSystem.layer, BunCrypto.layer, BunPath.layer, BunStdio.layer, BunTerminal.layer)));
12
16
  //# sourceMappingURL=BunServices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BunServices.js","names":["Layer","BunChildProcessSpawner","BunFileSystem","BunPath","BunStdio","BunTerminal","layer","pipe","provideMerge","mergeAll"],"sources":["../src/BunServices.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,KAAK,MAAM,cAAc;AAKrC,OAAO,KAAKC,sBAAsB,MAAM,6BAA6B;AACrE,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AACnD,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAQ/C;;;;AAIA,OAAO,MAAMC,KAAK,gBAA6BL,sBAAsB,CAACK,KAAK,CAACC,IAAI,cAC9EP,KAAK,CAACQ,YAAY,cAACR,KAAK,CAACS,QAAQ,CAC/BP,aAAa,CAACI,KAAK,EACnBH,OAAO,CAACG,KAAK,EACbF,QAAQ,CAACE,KAAK,EACdD,WAAW,CAACC,KAAK,CAClB,CAAC,CACH","ignoreList":[]}
1
+ {"version":3,"file":"BunServices.js","names":["Layer","BunChildProcessSpawner","BunCrypto","BunFileSystem","BunPath","BunStdio","BunTerminal","layer","pipe","provideMerge","mergeAll"],"sources":["../src/BunServices.ts"],"sourcesContent":[null],"mappings":"AAyBA,OAAO,KAAKA,KAAK,MAAM,cAAc;AAKrC,OAAO,KAAKC,sBAAsB,MAAM,6BAA6B;AACrE,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,aAAa,MAAM,oBAAoB;AACnD,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAW/C;;;;;;;AAOA,OAAO,MAAMC,KAAK,gBAA6BN,sBAAsB,CAACM,KAAK,CAACC,IAAI,cAC9ER,KAAK,CAACS,YAAY,cAACT,KAAK,CAACU,QAAQ,CAC/BP,aAAa,CAACI,KAAK,EACnBL,SAAS,CAACK,KAAK,EACfH,OAAO,CAACG,KAAK,EACbF,QAAQ,CAACE,KAAK,EACdD,WAAW,CAACC,KAAK,CAClB,CAAC,CACH","ignoreList":[]}
package/dist/BunSink.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * @since 4.0.0
3
3
  */
4
4
  /**
5
- * @since 1.0.0
5
+ * @since 4.0.0
6
6
  */
7
7
  export * from "@effect/platform-node-shared/NodeSink";
8
8
  //# sourceMappingURL=BunSink.d.ts.map
package/dist/BunSink.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @since 1.0.0
2
+ * @since 4.0.0
3
3
  */
4
4
  /**
5
- * @since 1.0.0
5
+ * @since 4.0.0
6
6
  */
7
7
  export * from "@effect/platform-node-shared/NodeSink";
8
8
  //# sourceMappingURL=BunSink.js.map