@effect/platform-bun 0.15.3 → 0.15.5

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 (30) hide show
  1. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.dev.js +2 -1
  2. package/Http/Server/dist/effect-platform-bun-Http-Server.cjs.prod.js +2 -1
  3. package/Http/Server/dist/effect-platform-bun-Http-Server.esm.js +2 -1
  4. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.d.mts +2 -0
  5. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.d.mts.map +1 -0
  6. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.d.ts +2 -0
  7. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.d.ts.map +1 -0
  8. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.dev.js +48 -0
  9. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.js +7 -0
  10. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.mjs +1 -0
  11. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.prod.js +48 -0
  12. package/Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.esm.js +38 -0
  13. package/Http/ServerRequest/package.json +4 -0
  14. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.dev.js +6 -4
  15. package/HttpServer/dist/effect-platform-bun-HttpServer.cjs.prod.js +6 -4
  16. package/HttpServer/dist/effect-platform-bun-HttpServer.esm.js +5 -3
  17. package/dist/Server-20ce77d1.cjs.dev.js +75 -0
  18. package/dist/Server-567e4d4d.cjs.prod.js +75 -0
  19. package/dist/Server-7caed8e9.esm.js +50 -0
  20. package/dist/declarations/src/Http/ServerRequest.d.ts +17 -0
  21. package/dist/declarations/src/Http/ServerRequest.d.ts.map +1 -0
  22. package/dist/declarations/src/HttpServer.d.ts +3 -3
  23. package/dist/declarations/src/HttpServer.d.ts.map +1 -1
  24. package/dist/{Server-cba826b6.cjs.dev.js → server-0ebea3db.cjs.dev.js} +10 -51
  25. package/dist/{Server-f75b17b6.cjs.prod.js → server-2a10d1fb.cjs.prod.js} +10 -51
  26. package/dist/{Server-3f8ae40b.esm.js → server-ef916cce.esm.js} +10 -51
  27. package/package.json +9 -3
  28. package/src/Http/ServerRequest.ts +18 -0
  29. package/src/HttpServer.ts +3 -3
  30. package/src/internal/http/server.ts +4 -0
@@ -2,8 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Http_Server_dist_effectPlatformBunHttpServer = require('../../../dist/Server-cba826b6.cjs.dev.js');
5
+ require('../../../dist/server-0ebea3db.cjs.dev.js');
6
6
  var Server = require('@effect/platform/Http/Server');
7
+ var Http_Server_dist_effectPlatformBunHttpServer = require('../../../dist/Server-20ce77d1.cjs.dev.js');
7
8
  require('@effect/platform-node/Http/FormData');
8
9
  require('@effect/platform/Http/App');
9
10
  require('@effect/platform/Http/Headers');
@@ -2,8 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Http_Server_dist_effectPlatformBunHttpServer = require('../../../dist/Server-f75b17b6.cjs.prod.js');
5
+ require('../../../dist/server-2a10d1fb.cjs.prod.js');
6
6
  var Server = require('@effect/platform/Http/Server');
7
+ var Http_Server_dist_effectPlatformBunHttpServer = require('../../../dist/Server-567e4d4d.cjs.prod.js');
7
8
  require('@effect/platform-node/Http/FormData');
8
9
  require('@effect/platform/Http/App');
9
10
  require('@effect/platform/Http/Headers');
@@ -1,5 +1,6 @@
1
- export { l as layer, a as layerConfig, m as make } from '../../../dist/Server-3f8ae40b.esm.js';
1
+ import '../../../dist/server-ef916cce.esm.js';
2
2
  export * from '@effect/platform/Http/Server';
3
+ export { l as layer, a as layerConfig, m as make } from '../../../dist/Server-7caed8e9.esm.js';
3
4
  import '@effect/platform-node/Http/FormData';
4
5
  import '@effect/platform/Http/App';
5
6
  import '@effect/platform/Http/Headers';
@@ -0,0 +1,2 @@
1
+ export * from "../../../dist/declarations/src/Http/ServerRequest.js";
2
+ //# sourceMappingURL=effect-platform-bun-Http-ServerRequest.cjs.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effect-platform-bun-Http-ServerRequest.cjs.d.mts","sourceRoot":"","sources":["../../../dist/declarations/src/Http/ServerRequest.d.ts"],"names":[],"mappings":"AAAA"}
@@ -0,0 +1,2 @@
1
+ export * from "../../../dist/declarations/src/Http/ServerRequest";
2
+ //# sourceMappingURL=effect-platform-bun-Http-ServerRequest.cjs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effect-platform-bun-Http-ServerRequest.cjs.d.ts","sourceRoot":"","sources":["../../../dist/declarations/src/Http/ServerRequest.d.ts"],"names":[],"mappings":"AAAA"}
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var server = require('../../../dist/server-0ebea3db.cjs.dev.js');
6
+ var ServerRequest = require('@effect/platform/Http/ServerRequest');
7
+ require('@effect/platform-node/Http/FormData');
8
+ require('@effect/platform/Http/App');
9
+ require('@effect/platform/Http/Headers');
10
+ require('@effect/platform/Http/IncomingMessage');
11
+ require('@effect/platform/Http/Middleware');
12
+ require('@effect/platform/Http/Server');
13
+ require('@effect/platform/Http/ServerError');
14
+ require('@effect/platform/Http/UrlParams');
15
+ require('effect/Cause');
16
+ require('effect/Config');
17
+ require('effect/Effect');
18
+ require('effect/Function');
19
+ require('effect/Layer');
20
+ require('effect/Option');
21
+ require('effect/Runtime');
22
+ require('effect/Stream');
23
+ require('node:stream');
24
+ require('../../Platform/dist/effect-platform-bun-Http-Platform.cjs.dev.js');
25
+ require('@effect/platform-node/Http/Etag');
26
+ require('@effect/platform/Http/Platform');
27
+ require('@effect/platform/Http/ServerResponse');
28
+ require('@effect/platform-node/FileSystem');
29
+
30
+ /**
31
+ * @since 1.0.0
32
+ *
33
+ * Also includes exports from [`@effect/platform/Http/ServerRequest`](https://effect-ts.github.io/platform/platform/Http/ServerRequest.ts.html).
34
+ */
35
+
36
+ /**
37
+ * @category conversions
38
+ * @since 1.0.0
39
+ */
40
+ const toRequest = server.requestSource;
41
+
42
+ exports.toRequest = toRequest;
43
+ Object.keys(ServerRequest).forEach(function (k) {
44
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
45
+ enumerable: true,
46
+ get: function () { return ServerRequest[k]; }
47
+ });
48
+ });
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./effect-platform-bun-Http-ServerRequest.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./effect-platform-bun-Http-ServerRequest.cjs.dev.js");
7
+ }
@@ -0,0 +1 @@
1
+ export * from "./effect-platform-bun-Http-ServerRequest.cjs.js";
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var server = require('../../../dist/server-2a10d1fb.cjs.prod.js');
6
+ var ServerRequest = require('@effect/platform/Http/ServerRequest');
7
+ require('@effect/platform-node/Http/FormData');
8
+ require('@effect/platform/Http/App');
9
+ require('@effect/platform/Http/Headers');
10
+ require('@effect/platform/Http/IncomingMessage');
11
+ require('@effect/platform/Http/Middleware');
12
+ require('@effect/platform/Http/Server');
13
+ require('@effect/platform/Http/ServerError');
14
+ require('@effect/platform/Http/UrlParams');
15
+ require('effect/Cause');
16
+ require('effect/Config');
17
+ require('effect/Effect');
18
+ require('effect/Function');
19
+ require('effect/Layer');
20
+ require('effect/Option');
21
+ require('effect/Runtime');
22
+ require('effect/Stream');
23
+ require('node:stream');
24
+ require('../../Platform/dist/effect-platform-bun-Http-Platform.cjs.prod.js');
25
+ require('@effect/platform-node/Http/Etag');
26
+ require('@effect/platform/Http/Platform');
27
+ require('@effect/platform/Http/ServerResponse');
28
+ require('@effect/platform-node/FileSystem');
29
+
30
+ /**
31
+ * @since 1.0.0
32
+ *
33
+ * Also includes exports from [`@effect/platform/Http/ServerRequest`](https://effect-ts.github.io/platform/platform/Http/ServerRequest.ts.html).
34
+ */
35
+
36
+ /**
37
+ * @category conversions
38
+ * @since 1.0.0
39
+ */
40
+ const toRequest = server.requestSource;
41
+
42
+ exports.toRequest = toRequest;
43
+ Object.keys(ServerRequest).forEach(function (k) {
44
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
45
+ enumerable: true,
46
+ get: function () { return ServerRequest[k]; }
47
+ });
48
+ });
@@ -0,0 +1,38 @@
1
+ import { r as requestSource } from '../../../dist/server-ef916cce.esm.js';
2
+ export * from '@effect/platform/Http/ServerRequest';
3
+ import '@effect/platform-node/Http/FormData';
4
+ import '@effect/platform/Http/App';
5
+ import '@effect/platform/Http/Headers';
6
+ import '@effect/platform/Http/IncomingMessage';
7
+ import '@effect/platform/Http/Middleware';
8
+ import '@effect/platform/Http/Server';
9
+ import '@effect/platform/Http/ServerError';
10
+ import '@effect/platform/Http/UrlParams';
11
+ import 'effect/Cause';
12
+ import 'effect/Config';
13
+ import 'effect/Effect';
14
+ import 'effect/Function';
15
+ import 'effect/Layer';
16
+ import 'effect/Option';
17
+ import 'effect/Runtime';
18
+ import 'effect/Stream';
19
+ import 'node:stream';
20
+ import '../../Platform/dist/effect-platform-bun-Http-Platform.esm.js';
21
+ import '@effect/platform-node/Http/Etag';
22
+ import '@effect/platform/Http/Platform';
23
+ import '@effect/platform/Http/ServerResponse';
24
+ import '@effect/platform-node/FileSystem';
25
+
26
+ /**
27
+ * @since 1.0.0
28
+ *
29
+ * Also includes exports from [`@effect/platform/Http/ServerRequest`](https://effect-ts.github.io/platform/platform/Http/ServerRequest.ts.html).
30
+ */
31
+
32
+ /**
33
+ * @category conversions
34
+ * @since 1.0.0
35
+ */
36
+ const toRequest = requestSource;
37
+
38
+ export { toRequest };
@@ -0,0 +1,4 @@
1
+ {
2
+ "main": "dist/effect-platform-bun-Http-ServerRequest.cjs.js",
3
+ "module": "dist/effect-platform-bun-Http-ServerRequest.esm.js"
4
+ }
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var ServerRequest = require('@effect/platform-bun/Http/ServerRequest');
5
6
  var Etag = require('@effect/platform-node/Http/Etag');
6
7
  var FormData = require('@effect/platform-node/Http/FormData');
7
8
  var App = require('@effect/platform/Http/App');
@@ -10,12 +11,13 @@ var Headers = require('@effect/platform/Http/Headers');
10
11
  var Middleware = require('@effect/platform/Http/Middleware');
11
12
  var Router = require('@effect/platform/Http/Router');
12
13
  var Error = require('@effect/platform/Http/ServerError');
13
- var ServerRequest = require('@effect/platform/Http/ServerRequest');
14
14
  var ServerResponse = require('@effect/platform/Http/ServerResponse');
15
15
  var UrlParams = require('@effect/platform/Http/UrlParams');
16
- var Http_Server_dist_effectPlatformBunHttpServer = require('../../dist/Server-cba826b6.cjs.dev.js');
16
+ var Http_Server_dist_effectPlatformBunHttpServer = require('../../dist/Server-20ce77d1.cjs.dev.js');
17
+ require('../../dist/server-0ebea3db.cjs.dev.js');
17
18
  require('@effect/platform/Http/IncomingMessage');
18
19
  require('@effect/platform/Http/Server');
20
+ require('@effect/platform/Http/ServerRequest');
19
21
  require('effect/Cause');
20
22
  require('effect/Config');
21
23
  require('effect/Effect');
@@ -47,6 +49,7 @@ function _interopNamespace(e) {
47
49
  return Object.freeze(n);
48
50
  }
49
51
 
52
+ var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
50
53
  var Etag__namespace = /*#__PURE__*/_interopNamespace(Etag);
51
54
  var FormData__namespace = /*#__PURE__*/_interopNamespace(FormData);
52
55
  var App__namespace = /*#__PURE__*/_interopNamespace(App);
@@ -55,12 +58,12 @@ var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
55
58
  var Middleware__namespace = /*#__PURE__*/_interopNamespace(Middleware);
56
59
  var Router__namespace = /*#__PURE__*/_interopNamespace(Router);
57
60
  var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
58
- var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
59
61
  var ServerResponse__namespace = /*#__PURE__*/_interopNamespace(ServerResponse);
60
62
  var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
61
63
 
62
64
 
63
65
 
66
+ exports.request = ServerRequest__namespace;
64
67
  exports.etag = Etag__namespace;
65
68
  exports.formData = FormData__namespace;
66
69
  exports.app = App__namespace;
@@ -69,7 +72,6 @@ exports.headers = Headers__namespace;
69
72
  exports.middleware = Middleware__namespace;
70
73
  exports.router = Router__namespace;
71
74
  exports.error = Error__namespace;
72
- exports.request = ServerRequest__namespace;
73
75
  exports.response = ServerResponse__namespace;
74
76
  exports.urlParams = UrlParams__namespace;
75
77
  exports.server = Http_Server_dist_effectPlatformBunHttpServer.Server;
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var ServerRequest = require('@effect/platform-bun/Http/ServerRequest');
5
6
  var Etag = require('@effect/platform-node/Http/Etag');
6
7
  var FormData = require('@effect/platform-node/Http/FormData');
7
8
  var App = require('@effect/platform/Http/App');
@@ -10,12 +11,13 @@ var Headers = require('@effect/platform/Http/Headers');
10
11
  var Middleware = require('@effect/platform/Http/Middleware');
11
12
  var Router = require('@effect/platform/Http/Router');
12
13
  var Error = require('@effect/platform/Http/ServerError');
13
- var ServerRequest = require('@effect/platform/Http/ServerRequest');
14
14
  var ServerResponse = require('@effect/platform/Http/ServerResponse');
15
15
  var UrlParams = require('@effect/platform/Http/UrlParams');
16
- var Http_Server_dist_effectPlatformBunHttpServer = require('../../dist/Server-f75b17b6.cjs.prod.js');
16
+ var Http_Server_dist_effectPlatformBunHttpServer = require('../../dist/Server-567e4d4d.cjs.prod.js');
17
+ require('../../dist/server-2a10d1fb.cjs.prod.js');
17
18
  require('@effect/platform/Http/IncomingMessage');
18
19
  require('@effect/platform/Http/Server');
20
+ require('@effect/platform/Http/ServerRequest');
19
21
  require('effect/Cause');
20
22
  require('effect/Config');
21
23
  require('effect/Effect');
@@ -47,6 +49,7 @@ function _interopNamespace(e) {
47
49
  return Object.freeze(n);
48
50
  }
49
51
 
52
+ var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
50
53
  var Etag__namespace = /*#__PURE__*/_interopNamespace(Etag);
51
54
  var FormData__namespace = /*#__PURE__*/_interopNamespace(FormData);
52
55
  var App__namespace = /*#__PURE__*/_interopNamespace(App);
@@ -55,12 +58,12 @@ var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
55
58
  var Middleware__namespace = /*#__PURE__*/_interopNamespace(Middleware);
56
59
  var Router__namespace = /*#__PURE__*/_interopNamespace(Router);
57
60
  var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
58
- var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
59
61
  var ServerResponse__namespace = /*#__PURE__*/_interopNamespace(ServerResponse);
60
62
  var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
61
63
 
62
64
 
63
65
 
66
+ exports.request = ServerRequest__namespace;
64
67
  exports.etag = Etag__namespace;
65
68
  exports.formData = FormData__namespace;
66
69
  exports.app = App__namespace;
@@ -69,7 +72,6 @@ exports.headers = Headers__namespace;
69
72
  exports.middleware = Middleware__namespace;
70
73
  exports.router = Router__namespace;
71
74
  exports.error = Error__namespace;
72
- exports.request = ServerRequest__namespace;
73
75
  exports.response = ServerResponse__namespace;
74
76
  exports.urlParams = UrlParams__namespace;
75
77
  exports.server = Http_Server_dist_effectPlatformBunHttpServer.Server;
@@ -1,3 +1,5 @@
1
+ import * as ServerRequest from '@effect/platform-bun/Http/ServerRequest';
2
+ export { ServerRequest as request };
1
3
  import * as Etag from '@effect/platform-node/Http/Etag';
2
4
  export { Etag as etag };
3
5
  import * as FormData from '@effect/platform-node/Http/FormData';
@@ -14,15 +16,15 @@ import * as Router from '@effect/platform/Http/Router';
14
16
  export { Router as router };
15
17
  import * as Error from '@effect/platform/Http/ServerError';
16
18
  export { Error as error };
17
- import * as ServerRequest from '@effect/platform/Http/ServerRequest';
18
- export { ServerRequest as request };
19
19
  import * as ServerResponse from '@effect/platform/Http/ServerResponse';
20
20
  export { ServerResponse as response };
21
21
  import * as UrlParams from '@effect/platform/Http/UrlParams';
22
22
  export { UrlParams as urlParams };
23
- export { S as server } from '../../dist/Server-3f8ae40b.esm.js';
23
+ export { S as server } from '../../dist/Server-7caed8e9.esm.js';
24
+ import '../../dist/server-ef916cce.esm.js';
24
25
  import '@effect/platform/Http/IncomingMessage';
25
26
  import '@effect/platform/Http/Server';
27
+ import '@effect/platform/Http/ServerRequest';
26
28
  import 'effect/Cause';
27
29
  import 'effect/Config';
28
30
  import 'effect/Effect';
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ var server = require('./server-0ebea3db.cjs.dev.js');
4
+ var Server$1 = require('@effect/platform/Http/Server');
5
+
6
+ function _interopNamespace(e) {
7
+ if (e && e.__esModule) return e;
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n["default"] = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ function _mergeNamespaces(n, m) {
25
+ m.forEach(function (e) {
26
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
27
+ if (k !== 'default' && !(k in n)) {
28
+ var d = Object.getOwnPropertyDescriptor(e, k);
29
+ Object.defineProperty(n, k, d.get ? d : {
30
+ enumerable: true,
31
+ get: function () { return e[k]; }
32
+ });
33
+ }
34
+ });
35
+ });
36
+ return Object.freeze(n);
37
+ }
38
+
39
+ var Server__namespace = /*#__PURE__*/_interopNamespace(Server$1);
40
+
41
+ /**
42
+ * @since 1.0.0
43
+ *
44
+ * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
45
+ */
46
+
47
+ /**
48
+ * @since 1.0.0
49
+ * @category constructors
50
+ */
51
+ const make = server.make;
52
+
53
+ /**
54
+ * @since 1.0.0
55
+ * @category layers
56
+ */
57
+ const layer = server.layer;
58
+
59
+ /**
60
+ * @since 1.0.0
61
+ * @category layers
62
+ */
63
+ const layerConfig = server.layerConfig;
64
+
65
+ var Server = /*#__PURE__*/_mergeNamespaces({
66
+ __proto__: null,
67
+ make: make,
68
+ layer: layer,
69
+ layerConfig: layerConfig
70
+ }, [Server__namespace]);
71
+
72
+ exports.Server = Server;
73
+ exports.layer = layer;
74
+ exports.layerConfig = layerConfig;
75
+ exports.make = make;
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ var server = require('./server-2a10d1fb.cjs.prod.js');
4
+ var Server$1 = require('@effect/platform/Http/Server');
5
+
6
+ function _interopNamespace(e) {
7
+ if (e && e.__esModule) return e;
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n["default"] = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ function _mergeNamespaces(n, m) {
25
+ m.forEach(function (e) {
26
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
27
+ if (k !== 'default' && !(k in n)) {
28
+ var d = Object.getOwnPropertyDescriptor(e, k);
29
+ Object.defineProperty(n, k, d.get ? d : {
30
+ enumerable: true,
31
+ get: function () { return e[k]; }
32
+ });
33
+ }
34
+ });
35
+ });
36
+ return Object.freeze(n);
37
+ }
38
+
39
+ var Server__namespace = /*#__PURE__*/_interopNamespace(Server$1);
40
+
41
+ /**
42
+ * @since 1.0.0
43
+ *
44
+ * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
45
+ */
46
+
47
+ /**
48
+ * @since 1.0.0
49
+ * @category constructors
50
+ */
51
+ const make = server.make;
52
+
53
+ /**
54
+ * @since 1.0.0
55
+ * @category layers
56
+ */
57
+ const layer = server.layer;
58
+
59
+ /**
60
+ * @since 1.0.0
61
+ * @category layers
62
+ */
63
+ const layerConfig = server.layerConfig;
64
+
65
+ var Server = /*#__PURE__*/_mergeNamespaces({
66
+ __proto__: null,
67
+ make: make,
68
+ layer: layer,
69
+ layerConfig: layerConfig
70
+ }, [Server__namespace]);
71
+
72
+ exports.Server = Server;
73
+ exports.layer = layer;
74
+ exports.layerConfig = layerConfig;
75
+ exports.make = make;
@@ -0,0 +1,50 @@
1
+ import { m as make$1, l as layer$1, a as layerConfig$1 } from './server-ef916cce.esm.js';
2
+ import * as Server$1 from '@effect/platform/Http/Server';
3
+
4
+ function _mergeNamespaces(n, m) {
5
+ m.forEach(function (e) {
6
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
7
+ if (k !== 'default' && !(k in n)) {
8
+ var d = Object.getOwnPropertyDescriptor(e, k);
9
+ Object.defineProperty(n, k, d.get ? d : {
10
+ enumerable: true,
11
+ get: function () { return e[k]; }
12
+ });
13
+ }
14
+ });
15
+ });
16
+ return Object.freeze(n);
17
+ }
18
+
19
+ /**
20
+ * @since 1.0.0
21
+ *
22
+ * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
23
+ */
24
+
25
+ /**
26
+ * @since 1.0.0
27
+ * @category constructors
28
+ */
29
+ const make = make$1;
30
+
31
+ /**
32
+ * @since 1.0.0
33
+ * @category layers
34
+ */
35
+ const layer = layer$1;
36
+
37
+ /**
38
+ * @since 1.0.0
39
+ * @category layers
40
+ */
41
+ const layerConfig = layerConfig$1;
42
+
43
+ var Server = /*#__PURE__*/_mergeNamespaces({
44
+ __proto__: null,
45
+ make: make,
46
+ layer: layer,
47
+ layerConfig: layerConfig
48
+ }, [Server$1]);
49
+
50
+ export { Server as S, layerConfig as a, layer as l, make as m };
@@ -0,0 +1,17 @@
1
+ /// <reference types="bun-types" />
2
+ /**
3
+ * @since 1.0.0
4
+ *
5
+ * Also includes exports from [`@effect/platform/Http/ServerRequest`](https://effect-ts.github.io/platform/platform/Http/ServerRequest.ts.html).
6
+ */
7
+ import type * as ServerRequest from "@effect/platform/Http/ServerRequest";
8
+ /**
9
+ * @since 1.0.0
10
+ */
11
+ export * from "@effect/platform/Http/ServerRequest";
12
+ /**
13
+ * @category conversions
14
+ * @since 1.0.0
15
+ */
16
+ export declare const toRequest: (self: ServerRequest.ServerRequest) => Request;
17
+ //# sourceMappingURL=ServerRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServerRequest.d.ts","sourceRoot":"../../../../src/Http","sources":["ServerRequest.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,OAAO,KAAK,KAAK,aAAa,MAAM,qCAAqC,CAAA;AAGzE;;GAEG;AACH,cAAc,qCAAqC,CAAA;AAEnD;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,aAAa,KAAK,OAAgC,CAAA"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @since 1.0.0
3
3
  */
4
+ import * as request from "./Http/ServerRequest.js";
4
5
  import * as etag from "@effect/platform-node/Http/Etag";
5
6
  import * as formData from "@effect/platform-node/Http/FormData";
6
7
  import * as app from "@effect/platform/Http/App";
@@ -9,7 +10,6 @@ import * as headers from "@effect/platform/Http/Headers";
9
10
  import * as middleware from "@effect/platform/Http/Middleware";
10
11
  import * as router from "@effect/platform/Http/Router";
11
12
  import * as error from "@effect/platform/Http/ServerError";
12
- import * as request from "@effect/platform/Http/ServerRequest";
13
13
  import * as response from "@effect/platform/Http/ServerResponse";
14
14
  import * as urlParams from "@effect/platform/Http/UrlParams";
15
15
  import * as server from "./Http/Server.js";
@@ -66,8 +66,8 @@ middleware,
66
66
  /**
67
67
  * @since 1.0.0
68
68
  *
69
- * - Docs: [Http/ServerRequest](https://effect-ts.github.io/platform/platform/Http/ServerRequest.ts.html)
70
- * - Module: `@effect/platform/Http/ServerRequest`
69
+ * - Docs: [Http/ServerRequest](https://effect-ts.github.io/platform/platform-bun/Http/ServerRequest.ts.html)
70
+ * - Module: `@effect/platform-bun/Http/ServerRequest`
71
71
  */
72
72
  request,
73
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"HttpServer.d.ts","sourceRoot":"../../../src","sources":["HttpServer.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,IAAI,MAAM,iCAAiC,CAAA;AACvD,OAAO,KAAK,QAAQ,MAAM,qCAAqC,CAAA;AAC/D,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAA;AAChD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAA;AAClD,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAA;AACxD,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;AAC1D,OAAO,KAAK,OAAO,MAAM,qCAAqC,CAAA;AAC9D,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,SAAS,MAAM,iCAAiC,CAAA;AAC5D,OAAO,KAAK,MAAM,yBAAqB;AAEvC,OAAO;AACL;;;;;GAKG;AACH,GAAG;AACH;;;;;GAKG;AACH,IAAI;AACJ;;;;;GAKG;AACH,KAAK;AACL;;;;;GAKG;AACH,IAAI;AACJ;;;;;GAKG;AACH,QAAQ;AACR;;;;;GAKG;AACH,OAAO;AACP;;;;;GAKG;AACH,UAAU;AACV;;;;;GAKG;AACH,OAAO;AACP;;;;;GAKG;AACH,QAAQ;AACR;;;;;GAKG;AACH,MAAM;AACN;;;;;GAKG;AACH,MAAM;AACN;;;;;GAKG;AACH,SAAS,EACV,CAAA"}
1
+ {"version":3,"file":"HttpServer.d.ts","sourceRoot":"../../../src","sources":["HttpServer.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,gCAA+C;AAClE,OAAO,KAAK,IAAI,MAAM,iCAAiC,CAAA;AACvD,OAAO,KAAK,QAAQ,MAAM,qCAAqC,CAAA;AAC/D,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAA;AAChD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAA;AAClD,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAA;AACxD,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;AAC1D,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,SAAS,MAAM,iCAAiC,CAAA;AAC5D,OAAO,KAAK,MAAM,yBAAqB;AAEvC,OAAO;AACL;;;;;GAKG;AACH,GAAG;AACH;;;;;GAKG;AACH,IAAI;AACJ;;;;;GAKG;AACH,KAAK;AACL;;;;;GAKG;AACH,IAAI;AACJ;;;;;GAKG;AACH,QAAQ;AACR;;;;;GAKG;AACH,OAAO;AACP;;;;;GAKG;AACH,UAAU;AACV;;;;;GAKG;AACH,OAAO;AACP;;;;;GAKG;AACH,QAAQ;AACR;;;;;GAKG;AACH,MAAM;AACN;;;;;GAKG;AACH,MAAM;AACN;;;;;GAKG;AACH,SAAS,EACV,CAAA"}
@@ -5,7 +5,7 @@ var App = require('@effect/platform/Http/App');
5
5
  var Headers = require('@effect/platform/Http/Headers');
6
6
  var IncomingMessage = require('@effect/platform/Http/IncomingMessage');
7
7
  var Middleware = require('@effect/platform/Http/Middleware');
8
- var Server$1 = require('@effect/platform/Http/Server');
8
+ var Server = require('@effect/platform/Http/Server');
9
9
  var Error = require('@effect/platform/Http/ServerError');
10
10
  var ServerRequest = require('@effect/platform/Http/ServerRequest');
11
11
  var UrlParams = require('@effect/platform/Http/UrlParams');
@@ -38,27 +38,12 @@ function _interopNamespace(e) {
38
38
  return Object.freeze(n);
39
39
  }
40
40
 
41
- function _mergeNamespaces(n, m) {
42
- m.forEach(function (e) {
43
- e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
44
- if (k !== 'default' && !(k in n)) {
45
- var d = Object.getOwnPropertyDescriptor(e, k);
46
- Object.defineProperty(n, k, d.get ? d : {
47
- enumerable: true,
48
- get: function () { return e[k]; }
49
- });
50
- }
51
- });
52
- });
53
- return Object.freeze(n);
54
- }
55
-
56
41
  var FormData__namespace = /*#__PURE__*/_interopNamespace(FormData);
57
42
  var App__namespace = /*#__PURE__*/_interopNamespace(App);
58
43
  var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
59
44
  var IncomingMessage__namespace = /*#__PURE__*/_interopNamespace(IncomingMessage);
60
45
  var Middleware__namespace = /*#__PURE__*/_interopNamespace(Middleware);
61
- var Server__namespace = /*#__PURE__*/_interopNamespace(Server$1);
46
+ var Server__namespace = /*#__PURE__*/_interopNamespace(Server);
62
47
  var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
63
48
  var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
64
49
  var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
@@ -70,8 +55,10 @@ var Option__namespace = /*#__PURE__*/_interopNamespace(Option);
70
55
  var Runtime__namespace = /*#__PURE__*/_interopNamespace(Runtime);
71
56
  var Stream__namespace = /*#__PURE__*/_interopNamespace(Stream);
72
57
 
58
+ /// <reference types="bun-types" />
59
+
73
60
  /** @internal */
74
- const make$1 = options => Effect__namespace.gen(function* (_) {
61
+ const make = options => Effect__namespace.gen(function* (_) {
75
62
  const handlerStack = [function (_request, _server) {
76
63
  return new Response("not found", {
77
64
  status: 404
@@ -169,10 +156,10 @@ const respond = /*#__PURE__*/Middleware__namespace.make(httpApp => Effect__names
169
156
  }))));
170
157
 
171
158
  /** @internal */
172
- const layer$1 = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, make$1(options)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
159
+ const layer = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, make(options)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
173
160
 
174
161
  /** @internal */
175
- const layerConfig$1 = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, Effect__namespace.flatMap(Effect__namespace.config(Config__namespace.unwrap(options)), make$1)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
162
+ const layerConfig = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, Effect__namespace.flatMap(Effect__namespace.config(Config__namespace.unwrap(options)), make)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
176
163
  class ServerRequestImpl {
177
164
  constructor(source, resolve, reject, url, headersOverride, remoteAddressOverride) {
178
165
  this.source = source;
@@ -278,38 +265,10 @@ const removeHost = url => {
278
265
  return index === -1 ? "/" : url.slice(index);
279
266
  };
280
267
 
281
- /**
282
- * @since 1.0.0
283
- *
284
- * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
285
- */
286
-
287
- /**
288
- * @since 1.0.0
289
- * @category constructors
290
- */
291
- const make = make$1;
292
-
293
- /**
294
- * @since 1.0.0
295
- * @category layers
296
- */
297
- const layer = layer$1;
298
-
299
- /**
300
- * @since 1.0.0
301
- * @category layers
302
- */
303
- const layerConfig = layerConfig$1;
304
-
305
- var Server = /*#__PURE__*/_mergeNamespaces({
306
- __proto__: null,
307
- make: make,
308
- layer: layer,
309
- layerConfig: layerConfig
310
- }, [Server__namespace]);
268
+ /** @internal */
269
+ const requestSource = self => self.source;
311
270
 
312
- exports.Server = Server;
313
271
  exports.layer = layer;
314
272
  exports.layerConfig = layerConfig;
315
273
  exports.make = make;
274
+ exports.requestSource = requestSource;
@@ -5,7 +5,7 @@ var App = require('@effect/platform/Http/App');
5
5
  var Headers = require('@effect/platform/Http/Headers');
6
6
  var IncomingMessage = require('@effect/platform/Http/IncomingMessage');
7
7
  var Middleware = require('@effect/platform/Http/Middleware');
8
- var Server$1 = require('@effect/platform/Http/Server');
8
+ var Server = require('@effect/platform/Http/Server');
9
9
  var Error = require('@effect/platform/Http/ServerError');
10
10
  var ServerRequest = require('@effect/platform/Http/ServerRequest');
11
11
  var UrlParams = require('@effect/platform/Http/UrlParams');
@@ -38,27 +38,12 @@ function _interopNamespace(e) {
38
38
  return Object.freeze(n);
39
39
  }
40
40
 
41
- function _mergeNamespaces(n, m) {
42
- m.forEach(function (e) {
43
- e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
44
- if (k !== 'default' && !(k in n)) {
45
- var d = Object.getOwnPropertyDescriptor(e, k);
46
- Object.defineProperty(n, k, d.get ? d : {
47
- enumerable: true,
48
- get: function () { return e[k]; }
49
- });
50
- }
51
- });
52
- });
53
- return Object.freeze(n);
54
- }
55
-
56
41
  var FormData__namespace = /*#__PURE__*/_interopNamespace(FormData);
57
42
  var App__namespace = /*#__PURE__*/_interopNamespace(App);
58
43
  var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
59
44
  var IncomingMessage__namespace = /*#__PURE__*/_interopNamespace(IncomingMessage);
60
45
  var Middleware__namespace = /*#__PURE__*/_interopNamespace(Middleware);
61
- var Server__namespace = /*#__PURE__*/_interopNamespace(Server$1);
46
+ var Server__namespace = /*#__PURE__*/_interopNamespace(Server);
62
47
  var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
63
48
  var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
64
49
  var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
@@ -70,8 +55,10 @@ var Option__namespace = /*#__PURE__*/_interopNamespace(Option);
70
55
  var Runtime__namespace = /*#__PURE__*/_interopNamespace(Runtime);
71
56
  var Stream__namespace = /*#__PURE__*/_interopNamespace(Stream);
72
57
 
58
+ /// <reference types="bun-types" />
59
+
73
60
  /** @internal */
74
- const make$1 = options => Effect__namespace.gen(function* (_) {
61
+ const make = options => Effect__namespace.gen(function* (_) {
75
62
  const handlerStack = [function (_request, _server) {
76
63
  return new Response("not found", {
77
64
  status: 404
@@ -169,10 +156,10 @@ const respond = /*#__PURE__*/Middleware__namespace.make(httpApp => Effect__names
169
156
  }))));
170
157
 
171
158
  /** @internal */
172
- const layer$1 = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, make$1(options)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
159
+ const layer = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, make(options)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
173
160
 
174
161
  /** @internal */
175
- const layerConfig$1 = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, Effect__namespace.flatMap(Effect__namespace.config(Config__namespace.unwrap(options)), make$1)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
162
+ const layerConfig = options => Layer__namespace.merge(Layer__namespace.scoped(Server__namespace.Server, Effect__namespace.flatMap(Effect__namespace.config(Config__namespace.unwrap(options)), make)), Http_Platform_dist_effectPlatformBunHttpPlatform.layer);
176
163
  class ServerRequestImpl {
177
164
  constructor(source, resolve, reject, url, headersOverride, remoteAddressOverride) {
178
165
  this.source = source;
@@ -278,38 +265,10 @@ const removeHost = url => {
278
265
  return index === -1 ? "/" : url.slice(index);
279
266
  };
280
267
 
281
- /**
282
- * @since 1.0.0
283
- *
284
- * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
285
- */
286
-
287
- /**
288
- * @since 1.0.0
289
- * @category constructors
290
- */
291
- const make = make$1;
292
-
293
- /**
294
- * @since 1.0.0
295
- * @category layers
296
- */
297
- const layer = layer$1;
298
-
299
- /**
300
- * @since 1.0.0
301
- * @category layers
302
- */
303
- const layerConfig = layerConfig$1;
304
-
305
- var Server = /*#__PURE__*/_mergeNamespaces({
306
- __proto__: null,
307
- make: make,
308
- layer: layer,
309
- layerConfig: layerConfig
310
- }, [Server__namespace]);
268
+ /** @internal */
269
+ const requestSource = self => self.source;
311
270
 
312
- exports.Server = Server;
313
271
  exports.layer = layer;
314
272
  exports.layerConfig = layerConfig;
315
273
  exports.make = make;
274
+ exports.requestSource = requestSource;
@@ -3,7 +3,7 @@ import * as App from '@effect/platform/Http/App';
3
3
  import * as Headers from '@effect/platform/Http/Headers';
4
4
  import * as IncomingMessage from '@effect/platform/Http/IncomingMessage';
5
5
  import * as Middleware from '@effect/platform/Http/Middleware';
6
- import * as Server$1 from '@effect/platform/Http/Server';
6
+ import * as Server from '@effect/platform/Http/Server';
7
7
  import * as Error from '@effect/platform/Http/ServerError';
8
8
  import * as ServerRequest from '@effect/platform/Http/ServerRequest';
9
9
  import * as UrlParams from '@effect/platform/Http/UrlParams';
@@ -16,25 +16,12 @@ import * as Option from 'effect/Option';
16
16
  import * as Runtime from 'effect/Runtime';
17
17
  import * as Stream from 'effect/Stream';
18
18
  import { Readable } from 'node:stream';
19
- import { layer as layer$2 } from '../Http/Platform/dist/effect-platform-bun-Http-Platform.esm.js';
19
+ import { layer as layer$1 } from '../Http/Platform/dist/effect-platform-bun-Http-Platform.esm.js';
20
20
 
21
- function _mergeNamespaces(n, m) {
22
- m.forEach(function (e) {
23
- e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
24
- if (k !== 'default' && !(k in n)) {
25
- var d = Object.getOwnPropertyDescriptor(e, k);
26
- Object.defineProperty(n, k, d.get ? d : {
27
- enumerable: true,
28
- get: function () { return e[k]; }
29
- });
30
- }
31
- });
32
- });
33
- return Object.freeze(n);
34
- }
21
+ /// <reference types="bun-types" />
35
22
 
36
23
  /** @internal */
37
- const make$1 = options => Effect.gen(function* (_) {
24
+ const make = options => Effect.gen(function* (_) {
38
25
  const handlerStack = [function (_request, _server) {
39
26
  return new Response("not found", {
40
27
  status: 404
@@ -47,7 +34,7 @@ const make$1 = options => Effect.gen(function* (_) {
47
34
  yield* _(Effect.addFinalizer(() => Effect.sync(() => {
48
35
  server.stop();
49
36
  })));
50
- return Server$1.make({
37
+ return Server.make({
51
38
  address: {
52
39
  _tag: "TcpAddress",
53
40
  port: server.port,
@@ -132,10 +119,10 @@ const respond = /*#__PURE__*/Middleware.make(httpApp => Effect.flatMap(ServerReq
132
119
  }))));
133
120
 
134
121
  /** @internal */
135
- const layer$1 = options => Layer.merge(Layer.scoped(Server$1.Server, make$1(options)), layer$2);
122
+ const layer = options => Layer.merge(Layer.scoped(Server.Server, make(options)), layer$1);
136
123
 
137
124
  /** @internal */
138
- const layerConfig$1 = options => Layer.merge(Layer.scoped(Server$1.Server, Effect.flatMap(Effect.config(Config.unwrap(options)), make$1)), layer$2);
125
+ const layerConfig = options => Layer.merge(Layer.scoped(Server.Server, Effect.flatMap(Effect.config(Config.unwrap(options)), make)), layer$1);
139
126
  class ServerRequestImpl {
140
127
  constructor(source, resolve, reject, url, headersOverride, remoteAddressOverride) {
141
128
  this.source = source;
@@ -241,35 +228,7 @@ const removeHost = url => {
241
228
  return index === -1 ? "/" : url.slice(index);
242
229
  };
243
230
 
244
- /**
245
- * @since 1.0.0
246
- *
247
- * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
248
- */
249
-
250
- /**
251
- * @since 1.0.0
252
- * @category constructors
253
- */
254
- const make = make$1;
255
-
256
- /**
257
- * @since 1.0.0
258
- * @category layers
259
- */
260
- const layer = layer$1;
261
-
262
- /**
263
- * @since 1.0.0
264
- * @category layers
265
- */
266
- const layerConfig = layerConfig$1;
267
-
268
- var Server = /*#__PURE__*/_mergeNamespaces({
269
- __proto__: null,
270
- make: make,
271
- layer: layer,
272
- layerConfig: layerConfig
273
- }, [Server$1]);
231
+ /** @internal */
232
+ const requestSource = self => self.source;
274
233
 
275
- export { Server as S, layerConfig as a, layer as l, make as m };
234
+ export { layerConfig as a, layer as l, make as m, requestSource as r };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/platform-bun",
3
- "version": "0.15.3",
3
+ "version": "0.15.5",
4
4
  "description": "Unified interfaces for common platform-specific services",
5
5
  "main": "dist/effect-platform-bun.cjs.js",
6
6
  "module": "dist/effect-platform-bun.esm.js",
@@ -30,8 +30,8 @@
30
30
  "license": "MIT",
31
31
  "sideEffects": false,
32
32
  "dependencies": {
33
- "@effect/platform": "^0.26.2",
34
- "@effect/platform-node": "^0.27.3"
33
+ "@effect/platform": "^0.26.3",
34
+ "@effect/platform-node": "^0.27.5"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@effect/schema": "^0.46.1",
@@ -117,6 +117,12 @@
117
117
  "import": "./Http/Server/dist/effect-platform-bun-Http-Server.cjs.mjs",
118
118
  "default": "./Http/Server/dist/effect-platform-bun-Http-Server.cjs.js"
119
119
  },
120
+ "./Http/ServerRequest": {
121
+ "types": "./dist/declarations/src/Http/ServerRequest.d.ts",
122
+ "module": "./Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.esm.js",
123
+ "import": "./Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.mjs",
124
+ "default": "./Http/ServerRequest/dist/effect-platform-bun-Http-ServerRequest.cjs.js"
125
+ },
120
126
  "./HttpClient": {
121
127
  "types": "./dist/declarations/src/HttpClient.d.ts",
122
128
  "module": "./HttpClient/dist/effect-platform-bun-HttpClient.esm.js",
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @since 1.0.0
3
+ *
4
+ * Also includes exports from [`@effect/platform/Http/ServerRequest`](https://effect-ts.github.io/platform/platform/Http/ServerRequest.ts.html).
5
+ */
6
+ import type * as ServerRequest from "@effect/platform/Http/ServerRequest"
7
+ import * as internal from "../internal/http/server"
8
+
9
+ /**
10
+ * @since 1.0.0
11
+ */
12
+ export * from "@effect/platform/Http/ServerRequest"
13
+
14
+ /**
15
+ * @category conversions
16
+ * @since 1.0.0
17
+ */
18
+ export const toRequest: (self: ServerRequest.ServerRequest) => Request = internal.requestSource
package/src/HttpServer.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @since 1.0.0
3
3
  */
4
+ import * as request from "@effect/platform-bun/Http/ServerRequest"
4
5
  import * as etag from "@effect/platform-node/Http/Etag"
5
6
  import * as formData from "@effect/platform-node/Http/FormData"
6
7
  import * as app from "@effect/platform/Http/App"
@@ -9,7 +10,6 @@ import * as headers from "@effect/platform/Http/Headers"
9
10
  import * as middleware from "@effect/platform/Http/Middleware"
10
11
  import * as router from "@effect/platform/Http/Router"
11
12
  import * as error from "@effect/platform/Http/ServerError"
12
- import * as request from "@effect/platform/Http/ServerRequest"
13
13
  import * as response from "@effect/platform/Http/ServerResponse"
14
14
  import * as urlParams from "@effect/platform/Http/UrlParams"
15
15
  import * as server from "./Http/Server"
@@ -67,8 +67,8 @@ export {
67
67
  /**
68
68
  * @since 1.0.0
69
69
  *
70
- * - Docs: [Http/ServerRequest](https://effect-ts.github.io/platform/platform/Http/ServerRequest.ts.html)
71
- * - Module: `@effect/platform/Http/ServerRequest`
70
+ * - Docs: [Http/ServerRequest](https://effect-ts.github.io/platform/platform-bun/Http/ServerRequest.ts.html)
71
+ * - Module: `@effect/platform-bun/Http/ServerRequest`
72
72
  */
73
73
  request,
74
74
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="bun-types" />
1
2
  import * as FormData from "@effect/platform-node/Http/FormData"
2
3
  import type * as FileSystem from "@effect/platform/FileSystem"
3
4
  import * as App from "@effect/platform/Http/App"
@@ -321,3 +322,6 @@ const removeHost = (url: string) => {
321
322
  const index = url.indexOf("/", url.indexOf("//") + 2)
322
323
  return index === -1 ? "/" : url.slice(index)
323
324
  }
325
+
326
+ /** @internal */
327
+ export const requestSource = (self: ServerRequest.ServerRequest) => (self as ServerRequestImpl).source