@effect/platform 0.18.4 → 0.18.6

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 (109) hide show
  1. package/Command/dist/effect-platform-Command.esm.js +12 -200
  2. package/CommandExecutor/dist/effect-platform-CommandExecutor.esm.js +9 -71
  3. package/Effectify/dist/effect-platform-Effectify.esm.js +2 -23
  4. package/Error/dist/effect-platform-Error.esm.js +2 -54
  5. package/FileSystem/dist/effect-platform-FileSystem.esm.js +10 -177
  6. package/Http/Body/dist/effect-platform-Http-Body.esm.js +13 -151
  7. package/Http/Client/dist/effect-platform-Http-Client.cjs.dev.js +2 -2
  8. package/Http/Client/dist/effect-platform-Http-Client.cjs.prod.js +2 -2
  9. package/Http/Client/dist/effect-platform-Http-Client.esm.js +28 -164
  10. package/Http/ClientError/dist/effect-platform-Http-ClientError.esm.js +3 -48
  11. package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.esm.js +20 -241
  12. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.dev.js +3 -2
  13. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.mjs +2 -1
  14. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.prod.js +3 -2
  15. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.esm.js +22 -35
  16. package/Http/Etag/dist/effect-platform-Http-Etag.esm.js +17 -1
  17. package/Http/FormData/dist/effect-platform-Http-FormData.esm.js +17 -155
  18. package/Http/Headers/dist/effect-platform-Http-Headers.esm.js +4 -74
  19. package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js +6 -1
  20. package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.dev.js +3 -3
  21. package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.prod.js +3 -3
  22. package/Http/Middleware/dist/effect-platform-Http-Middleware.esm.js +30 -52
  23. package/Http/Platform/dist/effect-platform-Http-Platform.esm.js +56 -1
  24. package/Http/Router/dist/effect-platform-Http-Router.esm.js +25 -224
  25. package/Http/Server/dist/effect-platform-Http-Server.esm.js +18 -1
  26. package/Http/ServerError/dist/effect-platform-Http-ServerError.esm.js +2 -70
  27. package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.esm.js +20 -65
  28. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.dev.js +2 -2
  29. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.prod.js +2 -2
  30. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.esm.js +21 -126
  31. package/Http/UrlParams/dist/effect-platform-Http-UrlParams.esm.js +4 -101
  32. package/HttpClient/dist/effect-platform-HttpClient.cjs.dev.js +3 -3
  33. package/HttpClient/dist/effect-platform-HttpClient.cjs.prod.js +3 -3
  34. package/HttpClient/dist/effect-platform-HttpClient.esm.js +32 -18
  35. package/HttpServer/dist/effect-platform-HttpServer.cjs.dev.js +2 -3
  36. package/HttpServer/dist/effect-platform-HttpServer.cjs.prod.js +2 -3
  37. package/HttpServer/dist/effect-platform-HttpServer.esm.js +35 -24
  38. package/KeyValueStore/dist/effect-platform-KeyValueStore.esm.js +15 -78
  39. package/Path/dist/effect-platform-Path.esm.js +8 -33
  40. package/Runtime/dist/effect-platform-Runtime.esm.js +3 -26
  41. package/dist/App-687366d8.esm.js +5 -0
  42. package/dist/Body-ec1353f9.esm.js +170 -0
  43. package/dist/{Client-15671ed6.cjs.dev.js → Client-440a1019.cjs.dev.js} +1 -1
  44. package/dist/Client-4659bda7.esm.js +346 -0
  45. package/dist/{Client-6b3e3de8.cjs.prod.js → Client-7b851481.cjs.prod.js} +1 -1
  46. package/dist/ClientError-98b5da8c.esm.js +55 -0
  47. package/dist/ClientRequest-fc429335.esm.js +281 -0
  48. package/dist/{ClientResponse-a1d64ab8.cjs.dev.js → ClientResponse-1476704c.cjs.dev.js} +9 -1
  49. package/dist/ClientResponse-4524e99e.esm.js +53 -0
  50. package/dist/{ClientResponse-8f65511e.cjs.prod.js → ClientResponse-fe4e69c8.cjs.prod.js} +9 -1
  51. package/dist/Command-d8ab0c8d.esm.js +403 -0
  52. package/dist/CommandExecutor-5807b66b.esm.js +80 -0
  53. package/dist/Effectify-e5a9d266.esm.js +43 -0
  54. package/dist/Error-3099667c.esm.js +75 -0
  55. package/dist/FileSystem-7e31dccd.esm.js +271 -0
  56. package/dist/FormData-f54de878.esm.js +270 -0
  57. package/dist/Headers-58b56a08.esm.js +85 -0
  58. package/dist/{HttpClient-cefc7da9.cjs.dev.js → HttpClient-4d23b1f5.cjs.dev.js} +2 -2
  59. package/dist/{HttpClient-d3c69877.cjs.prod.js → HttpClient-88775b8e.cjs.prod.js} +2 -2
  60. package/dist/HttpClient-9ca6050c.esm.js +24 -0
  61. package/dist/{HttpServer-5b9d992e.cjs.dev.js → HttpServer-16159c3a.cjs.dev.js} +2 -2
  62. package/dist/HttpServer-50f8df76.esm.js +30 -0
  63. package/dist/{HttpServer-60325fb0.cjs.prod.js → HttpServer-93c0fbb3.cjs.prod.js} +2 -2
  64. package/{internal/keyValueStore.esm.js → dist/KeyValueStore-2f9a70bf.esm.js} +102 -15
  65. package/dist/Middleware-240f91f6.esm.js +105 -0
  66. package/dist/{Middleware-8e7cd600.cjs.dev.js → Middleware-e2edf820.cjs.dev.js} +1 -1
  67. package/dist/{Middleware-d4f1a1cd.cjs.prod.js → Middleware-f9a073d7.cjs.prod.js} +1 -1
  68. package/{internal/path.esm.js → dist/Path-46f84ba7.esm.js} +40 -4
  69. package/dist/Router-bf32317a.esm.js +454 -0
  70. package/dist/Runtime-7265fb98.esm.js +31 -0
  71. package/dist/ServerError-04ad5b57.esm.js +99 -0
  72. package/dist/ServerRequest-03161edc.esm.js +125 -0
  73. package/dist/ServerResponse-93038062.esm.js +259 -0
  74. package/dist/{ServerResponse-7d60c7d1.cjs.dev.js → ServerResponse-b63b7192.cjs.dev.js} +15 -4
  75. package/dist/{ServerResponse-830f1052.cjs.prod.js → ServerResponse-eae85b08.cjs.prod.js} +15 -4
  76. package/dist/UrlParams-1286c728.esm.js +114 -0
  77. package/{internal/http/body.esm.js → dist/body-20d78ec1.esm.js} +2 -2
  78. package/{internal/http/clientError.esm.js → dist/clientError-c4e1466c.esm.js} +1 -1
  79. package/{internal/http/clientRequest.esm.js → dist/clientRequest-1e9e0b0d.esm.js} +4 -4
  80. package/dist/{clientResponse-c58a116c.cjs.dev.js → clientResponse-79c84a64.cjs.dev.js} +10 -0
  81. package/{internal/http/clientResponse.esm.js → dist/clientResponse-8c2ec6a3.esm.js} +14 -5
  82. package/dist/{clientResponse-2c6a83f1.cjs.prod.js → clientResponse-f9c57e83.cjs.prod.js} +10 -0
  83. package/{internal/commandExecutor.esm.js → dist/commandExecutor-d6457489.esm.js} +1 -1
  84. package/dist/declarations/src/Http/ClientResponse.d.ts +8 -0
  85. package/dist/declarations/src/Http/ClientResponse.d.ts.map +1 -1
  86. package/dist/declarations/src/Http/ServerResponse.d.ts +1 -2
  87. package/dist/declarations/src/Http/ServerResponse.d.ts.map +1 -1
  88. package/dist/effect-platform.cjs.dev.js +8 -8
  89. package/dist/effect-platform.cjs.prod.js +8 -8
  90. package/dist/effect-platform.esm.js +58 -20
  91. package/package.json +1 -2
  92. package/src/Http/ClientResponse.ts +10 -0
  93. package/src/Http/ServerResponse.ts +1 -2
  94. package/src/internal/http/clientResponse.ts +16 -0
  95. package/src/internal/http/serverResponse.ts +18 -4
  96. package/internal/command.esm.js +0 -185
  97. package/internal/effectify.esm.js +0 -18
  98. package/internal/error.esm.js +0 -17
  99. package/internal/fileSystem.esm.js +0 -82
  100. package/internal/http/client.esm.js +0 -157
  101. package/internal/http/etag.esm.js +0 -19
  102. package/internal/http/formData.esm.js +0 -95
  103. package/internal/http/middleware.esm.js +0 -46
  104. package/internal/http/platform.esm.js +0 -52
  105. package/internal/http/router.esm.js +0 -199
  106. package/internal/http/server.esm.js +0 -20
  107. package/internal/http/serverError.esm.js +0 -23
  108. package/internal/http/serverRequest.esm.js +0 -50
  109. package/internal/http/serverResponse.esm.js +0 -105
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../dist/clientResponse-c58a116c.cjs.dev.js');
5
+ require('../../../dist/clientResponse-79c84a64.cjs.dev.js');
6
6
  var Http_IncomingMessage_dist_effectPlatformHttpIncomingMessage = require('../../IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.dev.js');
7
- var Http_ClientResponse_dist_effectPlatformHttpClientResponse = require('../../../dist/ClientResponse-a1d64ab8.cjs.dev.js');
7
+ var Http_ClientResponse_dist_effectPlatformHttpClientResponse = require('../../../dist/ClientResponse-1476704c.cjs.dev.js');
8
8
  require('@effect/schema/Schema');
9
9
  require('effect/Effect');
10
10
  require('effect/Option');
@@ -34,3 +34,4 @@ exports.schemaHeaders = Http_IncomingMessage_dist_effectPlatformHttpIncomingMess
34
34
  exports.TypeId = Http_ClientResponse_dist_effectPlatformHttpClientResponse.TypeId;
35
35
  exports.fromWeb = Http_ClientResponse_dist_effectPlatformHttpClientResponse.fromWeb;
36
36
  exports.schemaJson = Http_ClientResponse_dist_effectPlatformHttpClientResponse.schemaJson;
37
+ exports.schemaNoBody = Http_ClientResponse_dist_effectPlatformHttpClientResponse.schemaNoBody;
@@ -4,5 +4,6 @@ export {
4
4
  schemaBodyJson,
5
5
  schemaBodyUrlParams,
6
6
  schemaHeaders,
7
- schemaJson
7
+ schemaJson,
8
+ schemaNoBody
8
9
  } from "./effect-platform-Http-ClientResponse.cjs.js";
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../dist/clientResponse-2c6a83f1.cjs.prod.js');
5
+ require('../../../dist/clientResponse-f9c57e83.cjs.prod.js');
6
6
  var Http_IncomingMessage_dist_effectPlatformHttpIncomingMessage = require('../../IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.prod.js');
7
- var Http_ClientResponse_dist_effectPlatformHttpClientResponse = require('../../../dist/ClientResponse-8f65511e.cjs.prod.js');
7
+ var Http_ClientResponse_dist_effectPlatformHttpClientResponse = require('../../../dist/ClientResponse-fe4e69c8.cjs.prod.js');
8
8
  require('@effect/schema/Schema');
9
9
  require('effect/Effect');
10
10
  require('effect/Option');
@@ -34,3 +34,4 @@ exports.schemaHeaders = Http_IncomingMessage_dist_effectPlatformHttpIncomingMess
34
34
  exports.TypeId = Http_ClientResponse_dist_effectPlatformHttpClientResponse.TypeId;
35
35
  exports.fromWeb = Http_ClientResponse_dist_effectPlatformHttpClientResponse.fromWeb;
36
36
  exports.schemaJson = Http_ClientResponse_dist_effectPlatformHttpClientResponse.schemaJson;
37
+ exports.schemaNoBody = Http_ClientResponse_dist_effectPlatformHttpClientResponse.schemaNoBody;
@@ -1,36 +1,23 @@
1
- import { TypeId as TypeId$1, fromWeb as fromWeb$1, schemaJson as schemaJson$1 } from '../../../../internal/http/clientResponse.esm.js';
1
+ import '../../../dist/clientResponse-8c2ec6a3.esm.js';
2
2
  export { schemaBodyJson, schemaBodyUrlParams, schemaHeaders } from '../../IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js';
3
-
4
- /**
5
- * @since 1.0.0
6
- */
7
-
8
- /**
9
- * @since 1.0.0
10
- * @category type ids
11
- */
12
- const TypeId = TypeId$1;
13
-
14
- /**
15
- * @since 1.0.0
16
- * @category type ids
17
- */
18
-
19
- /**
20
- * @since 1.0.0
21
- * @category models
22
- */
23
-
24
- /**
25
- * @since 1.0.0
26
- * @category constructors
27
- */
28
- const fromWeb = fromWeb$1;
29
-
30
- /**
31
- * @since 1.0.0
32
- * @category schema
33
- */
34
- const schemaJson = schemaJson$1;
35
-
36
- export { TypeId, fromWeb, schemaJson };
3
+ export { T as TypeId, f as fromWeb, s as schemaJson, a as schemaNoBody } from '../../../dist/ClientResponse-4524e99e.esm.js';
4
+ import '@effect/schema/Schema';
5
+ import 'effect/Effect';
6
+ import 'effect/Option';
7
+ import 'effect/Stream';
8
+ import '../../../dist/Headers-58b56a08.esm.js';
9
+ import 'effect/Function';
10
+ import 'effect/ReadonlyArray';
11
+ import 'effect/ReadonlyRecord';
12
+ import '../../../dist/UrlParams-1286c728.esm.js';
13
+ import 'effect/Chunk';
14
+ import '../../../dist/clientError-c4e1466c.esm.js';
15
+ import 'effect/Data';
16
+ import '@effect/schema/ParseResult';
17
+ import 'effect/Context';
18
+ import 'effect/FiberRef';
19
+ import 'effect/GlobalValue';
20
+ import '../../../dist/FileSystem-7e31dccd.esm.js';
21
+ import 'effect/Brand';
22
+ import 'effect/Sink';
23
+ import '../../../dist/Error-3099667c.esm.js';
@@ -1,4 +1,20 @@
1
- import { toString as toString$1, GeneratorTypeId as GeneratorTypeId$1, tag } from '../../../../internal/http/etag.esm.js';
1
+ import * as Context from 'effect/Context';
2
+
3
+ /** @internal */
4
+ const GeneratorTypeId$1 = /*#__PURE__*/Symbol.for("@effect/platform/Http/Etag/Generator");
5
+
6
+ /** @internal */
7
+ const tag = /*#__PURE__*/Context.Tag(GeneratorTypeId$1);
8
+
9
+ /** @internal */
10
+ const toString$1 = self => {
11
+ switch (self._tag) {
12
+ case "Weak":
13
+ return `W/"${self.value}"`;
14
+ case "Strong":
15
+ return `"${self.value}"`;
16
+ }
17
+ };
2
18
 
3
19
  /**
4
20
  * @since 1.0.0
@@ -1,155 +1,17 @@
1
- import { TypeId as TypeId$1, ErrorTypeId as ErrorTypeId$1, FormDataError as FormDataError$1, maxParts as maxParts$1, withMaxParts as withMaxParts$1, maxFields as maxFields$1, withMaxFields as withMaxFields$1, maxFieldSize as maxFieldSize$1, withMaxFieldSize as withMaxFieldSize$1, maxFiles as maxFiles$1, withMaxFiles as withMaxFiles$1, maxFileSize as maxFileSize$1, withMaxFileSize as withMaxFileSize$1, fieldMimeTypes as fieldMimeTypes$1, withFieldMimeTypes as withFieldMimeTypes$1, toRecord as toRecord$1, filesSchema as filesSchema$1, schemaJson as schemaJson$1, schemaRecord as schemaRecord$1 } from '../../../../internal/http/formData.esm.js';
2
-
3
- /**
4
- * @since 1.0.0
5
- */
6
-
7
- /**
8
- * @since 1.0.0
9
- * @category type ids
10
- */
11
- const TypeId = TypeId$1;
12
-
13
- /**
14
- * @since 1.0.0
15
- * @category type ids
16
- */
17
-
18
- /**
19
- * @since 1.0.0
20
- * @category models
21
- */
22
-
23
- /**
24
- * @since 1.0.0
25
- */
26
-
27
- /**
28
- * @since 1.0.0
29
- * @category models
30
- */
31
-
32
- /**
33
- * @since 1.0.0
34
- * @category models
35
- */
36
-
37
- /**
38
- * @since 1.0.0
39
- * @category type ids
40
- */
41
- const ErrorTypeId = ErrorTypeId$1;
42
-
43
- /**
44
- * @since 1.0.0
45
- * @category type ids
46
- */
47
-
48
- /**
49
- * @since 1.0.0
50
- * @category errors
51
- */
52
-
53
- /**
54
- * @since 1.0.0
55
- * @category errors
56
- */
57
- const FormDataError = FormDataError$1;
58
-
59
- /**
60
- * @since 1.0.0
61
- * @category fiber refs
62
- */
63
- const maxParts = maxParts$1;
64
-
65
- /**
66
- * @since 1.0.0
67
- * @category fiber refs
68
- */
69
- const withMaxParts = withMaxParts$1;
70
-
71
- /**
72
- * @since 1.0.0
73
- * @category fiber refs
74
- */
75
- const maxFields = maxFields$1;
76
-
77
- /**
78
- * @since 1.0.0
79
- * @category fiber refs
80
- */
81
- const withMaxFields = withMaxFields$1;
82
-
83
- /**
84
- * @since 1.0.0
85
- * @category fiber refs
86
- */
87
- const maxFieldSize = maxFieldSize$1;
88
-
89
- /**
90
- * @since 1.0.0
91
- * @category fiber refs
92
- */
93
- const withMaxFieldSize = withMaxFieldSize$1;
94
-
95
- /**
96
- * @since 1.0.0
97
- * @category fiber refs
98
- */
99
- const maxFiles = maxFiles$1;
100
-
101
- /**
102
- * @since 1.0.0
103
- * @category fiber refs
104
- */
105
- const withMaxFiles = withMaxFiles$1;
106
-
107
- /**
108
- * @since 1.0.0
109
- * @category fiber refs
110
- */
111
- const maxFileSize = maxFileSize$1;
112
-
113
- /**
114
- * @since 1.0.0
115
- * @category fiber refs
116
- */
117
- const withMaxFileSize = withMaxFileSize$1;
118
-
119
- /**
120
- * @since 1.0.0
121
- * @category fiber refs
122
- */
123
- const fieldMimeTypes = fieldMimeTypes$1;
124
-
125
- /**
126
- * @since 1.0.0
127
- * @category fiber refs
128
- */
129
- const withFieldMimeTypes = withFieldMimeTypes$1;
130
-
131
- /**
132
- * @since 1.0.0
133
- * @category conversions
134
- */
135
- const toRecord = toRecord$1;
136
-
137
- /**
138
- * @since 1.0.0
139
- * @category schema
140
- */
141
- const filesSchema = filesSchema$1;
142
-
143
- /**
144
- * @since 1.0.0
145
- * @category schema
146
- */
147
- const schemaJson = schemaJson$1;
148
-
149
- /**
150
- * @since 1.0.0
151
- * @category schema
152
- */
153
- const schemaRecord = schemaRecord$1;
154
-
155
- export { ErrorTypeId, FormDataError, TypeId, fieldMimeTypes, filesSchema, maxFieldSize, maxFields, maxFileSize, maxFiles, maxParts, schemaJson, schemaRecord, toRecord, withFieldMimeTypes, withMaxFieldSize, withMaxFields, withMaxFileSize, withMaxFiles, withMaxParts };
1
+ export { E as ErrorTypeId, b as FormDataError, T as TypeId, k as fieldMimeTypes, n as filesSchema, e as maxFieldSize, c as maxFields, i as maxFileSize, g as maxFiles, m as maxParts, a as schemaJson, s as schemaRecord, t as toRecord, l as withFieldMimeTypes, f as withMaxFieldSize, d as withMaxFields, j as withMaxFileSize, h as withMaxFiles, w as withMaxParts } from '../../../dist/FormData-f54de878.esm.js';
2
+ import '@effect/schema/Schema';
3
+ import 'effect/Chunk';
4
+ import 'effect/Data';
5
+ import 'effect/Effect';
6
+ import 'effect/FiberRef';
7
+ import 'effect/Function';
8
+ import 'effect/GlobalValue';
9
+ import 'effect/Option';
10
+ import 'effect/Predicate';
11
+ import 'effect/ReadonlyArray';
12
+ import '../../../dist/FileSystem-7e31dccd.esm.js';
13
+ import 'effect/Brand';
14
+ import 'effect/Context';
15
+ import 'effect/Sink';
16
+ import 'effect/Stream';
17
+ import '../../../dist/Error-3099667c.esm.js';
@@ -1,74 +1,4 @@
1
- import { dual } from 'effect/Function';
2
- import * as ReadonlyArray from 'effect/ReadonlyArray';
3
- import * as ReadonlyRecord from 'effect/ReadonlyRecord';
4
-
5
- /**
6
- * @since 1.0.0
7
- */
8
-
9
- /**
10
- * @since 1.0.0
11
- * @category models
12
- */
13
-
14
- /**
15
- * @since 1.0.0
16
- * @category models
17
- */
18
-
19
- /**
20
- * @since 1.0.0
21
- * @category constructors
22
- */
23
- const empty = /*#__PURE__*/ReadonlyRecord.empty();
24
-
25
- /**
26
- * @since 1.0.0
27
- * @category constructors
28
- */
29
- const fromInput = input => {
30
- if (input === undefined) {
31
- return empty;
32
- } else if (Symbol.iterator in input) {
33
- return ReadonlyRecord.fromEntries(ReadonlyArray.map(ReadonlyArray.fromIterable(input), ([k, v]) => [k.toLowerCase(), v]));
34
- }
35
- return ReadonlyRecord.fromEntries(Object.entries(input).map(([k, v]) => [k.toLowerCase(), v]));
36
- };
37
-
38
- /**
39
- * @since 1.0.0
40
- * @category combinators
41
- */
42
- const has = /*#__PURE__*/dual(2, (self, key) => ReadonlyRecord.has(self, key.toLowerCase()));
43
-
44
- /**
45
- * @since 1.0.0
46
- * @category combinators
47
- */
48
- const get = /*#__PURE__*/dual(2, (self, key) => ReadonlyRecord.get(self, key.toLowerCase()));
49
-
50
- /**
51
- * @since 1.0.0
52
- * @category combinators
53
- */
54
- const set = /*#__PURE__*/dual(3, (self, key, value) => ({
55
- ...self,
56
- [key.toLowerCase()]: value
57
- }));
58
-
59
- /**
60
- * @since 1.0.0
61
- * @category combinators
62
- */
63
- const setAll = /*#__PURE__*/dual(2, (self, headers) => ({
64
- ...self,
65
- ...fromInput(headers)
66
- }));
67
-
68
- /**
69
- * @since 1.0.0
70
- * @category combinators
71
- */
72
- const remove = /*#__PURE__*/dual(2, (self, key) => ReadonlyRecord.remove(self, key.toLowerCase()));
73
-
74
- export { empty, fromInput, get, has, remove, set, setAll };
1
+ import 'effect/Function';
2
+ import 'effect/ReadonlyArray';
3
+ import 'effect/ReadonlyRecord';
4
+ export { e as empty, f as fromInput, g as get, h as has, r as remove, s as set, a as setAll } from '../../../dist/Headers-58b56a08.esm.js';
@@ -6,7 +6,12 @@ import * as FiberRef from 'effect/FiberRef';
6
6
  import { flow, dual } from 'effect/Function';
7
7
  import * as Global from 'effect/GlobalValue';
8
8
  import * as Option from 'effect/Option';
9
- import { Size } from '../../../../FileSystem/dist/effect-platform-FileSystem.esm.js';
9
+ import { S as Size } from '../../../dist/FileSystem-7e31dccd.esm.js';
10
+ import 'effect/Brand';
11
+ import 'effect/Sink';
12
+ import 'effect/Stream';
13
+ import '../../../dist/Error-3099667c.esm.js';
14
+ import 'effect/Data';
10
15
 
11
16
  /**
12
17
  * @since 1.0.0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Http_Middleware_dist_effectPlatformHttpMiddleware = require('../../../dist/Middleware-8e7cd600.cjs.dev.js');
5
+ var Http_Middleware_dist_effectPlatformHttpMiddleware = require('../../../dist/Middleware-e2edf820.cjs.dev.js');
6
6
  require('effect/Effect');
7
7
  require('effect/Function');
8
8
  require('../../../dist/Headers-f56bc667.cjs.dev.js');
@@ -26,8 +26,8 @@ require('../../../dist/FormData-ee0b1cf2.cjs.dev.js');
26
26
  require('effect/Chunk');
27
27
  require('effect/Predicate');
28
28
  require('../../../dist/ServerError-55c5e24b.cjs.dev.js');
29
- require('../../../dist/ServerResponse-7d60c7d1.cjs.dev.js');
30
- require('effect/Pipeable');
29
+ require('../../../dist/ServerResponse-b63b7192.cjs.dev.js');
30
+ require('effect/Effectable');
31
31
  require('../../Platform/dist/effect-platform-Http-Platform.cjs.dev.js');
32
32
  require('../../Etag/dist/effect-platform-Http-Etag.cjs.dev.js');
33
33
  require('../../../dist/UrlParams-5e0910f1.cjs.dev.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Http_Middleware_dist_effectPlatformHttpMiddleware = require('../../../dist/Middleware-d4f1a1cd.cjs.prod.js');
5
+ var Http_Middleware_dist_effectPlatformHttpMiddleware = require('../../../dist/Middleware-f9a073d7.cjs.prod.js');
6
6
  require('effect/Effect');
7
7
  require('effect/Function');
8
8
  require('../../../dist/Headers-122cb877.cjs.prod.js');
@@ -26,8 +26,8 @@ require('../../../dist/FormData-902afd18.cjs.prod.js');
26
26
  require('effect/Chunk');
27
27
  require('effect/Predicate');
28
28
  require('../../../dist/ServerError-605b2fa2.cjs.prod.js');
29
- require('../../../dist/ServerResponse-830f1052.cjs.prod.js');
30
- require('effect/Pipeable');
29
+ require('../../../dist/ServerResponse-eae85b08.cjs.prod.js');
30
+ require('effect/Effectable');
31
31
  require('../../Platform/dist/effect-platform-Http-Platform.cjs.prod.js');
32
32
  require('../../Etag/dist/effect-platform-Http-Etag.cjs.prod.js');
33
33
  require('../../../dist/UrlParams-1228a686.cjs.prod.js');
@@ -1,52 +1,30 @@
1
- import { make as make$1, b3Response as b3Response$1, logger as logger$1, tracer as tracer$1, loggerTracer as loggerTracer$1, xForwardedHeaders as xForwardedHeaders$1 } from '../../../../internal/http/middleware.esm.js';
2
-
3
- /**
4
- * @since 1.0.0
5
- */
6
-
7
- /**
8
- * @since 1.0.0
9
- * @category models
10
- */
11
-
12
- /**
13
- * @since 1.0.0
14
- */
15
-
16
- /**
17
- * @since 1.0.0
18
- * @category constructors
19
- */
20
- const make = make$1;
21
-
22
- /**
23
- * @since 1.0.0
24
- * @category constructors
25
- */
26
- const b3Response = b3Response$1;
27
-
28
- /**
29
- * @since 1.0.0
30
- * @category constructors
31
- */
32
- const logger = logger$1;
33
-
34
- /**
35
- * @since 1.0.0
36
- * @category constructors
37
- */
38
- const tracer = tracer$1;
39
-
40
- /**
41
- * @since 1.0.0
42
- * @category constructors
43
- */
44
- const loggerTracer = loggerTracer$1;
45
-
46
- /**
47
- * @since 1.0.0
48
- * @category constructors
49
- */
50
- const xForwardedHeaders = xForwardedHeaders$1;
51
-
52
- export { b3Response, logger, loggerTracer, make, tracer, xForwardedHeaders };
1
+ export { b as b3Response, l as logger, a as loggerTracer, m as make, t as tracer, x as xForwardedHeaders } from '../../../dist/Middleware-240f91f6.esm.js';
2
+ import 'effect/Effect';
3
+ import 'effect/Function';
4
+ import '../../../dist/Headers-58b56a08.esm.js';
5
+ import 'effect/ReadonlyArray';
6
+ import 'effect/ReadonlyRecord';
7
+ import '../../IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js';
8
+ import '@effect/schema/ParseResult';
9
+ import '@effect/schema/Schema';
10
+ import 'effect/Context';
11
+ import 'effect/FiberRef';
12
+ import 'effect/GlobalValue';
13
+ import 'effect/Option';
14
+ import '../../../dist/FileSystem-7e31dccd.esm.js';
15
+ import 'effect/Brand';
16
+ import 'effect/Sink';
17
+ import 'effect/Stream';
18
+ import '../../../dist/Error-3099667c.esm.js';
19
+ import 'effect/Data';
20
+ import '../../../dist/ServerRequest-03161edc.esm.js';
21
+ import '../../../dist/FormData-f54de878.esm.js';
22
+ import 'effect/Chunk';
23
+ import 'effect/Predicate';
24
+ import '../../../dist/ServerError-04ad5b57.esm.js';
25
+ import '../../../dist/ServerResponse-93038062.esm.js';
26
+ import 'effect/Effectable';
27
+ import '../../Platform/dist/effect-platform-Http-Platform.esm.js';
28
+ import '../../Etag/dist/effect-platform-Http-Etag.esm.js';
29
+ import '../../../dist/UrlParams-1286c728.esm.js';
30
+ import '../../../dist/body-20d78ec1.esm.js';
@@ -1,4 +1,59 @@
1
- import { TypeId as TypeId$1, tag, make as make$1 } from '../../../../internal/http/platform.esm.js';
1
+ import * as Context from 'effect/Context';
2
+ import * as Effect from 'effect/Effect';
3
+ import { pipe } from 'effect/Function';
4
+ import { a as FileSystem } from '../../../dist/FileSystem-7e31dccd.esm.js';
5
+ import { Generator, toString } from '../../Etag/dist/effect-platform-Http-Etag.esm.js';
6
+ import 'effect/Brand';
7
+ import 'effect/Option';
8
+ import 'effect/Sink';
9
+ import 'effect/Stream';
10
+ import '../../../dist/Error-3099667c.esm.js';
11
+ import 'effect/Data';
12
+
13
+ /** @internal */
14
+ const TypeId$1 = /*#__PURE__*/Symbol.for("@effect/platform/Http/Platform");
15
+
16
+ /** @internal */
17
+ const tag = /*#__PURE__*/Context.Tag(TypeId$1);
18
+
19
+ /** @internal */
20
+ const make$1 = impl => Effect.gen(function* (_) {
21
+ const fs = yield* _(FileSystem);
22
+ const etagGen = yield* _(Generator);
23
+ return tag.of({
24
+ [TypeId$1]: TypeId$1,
25
+ fileResponse(path, options) {
26
+ return pipe(Effect.bindTo(fs.stat(path), "info"), Effect.bind("etag", ({
27
+ info
28
+ }) => etagGen.fromFileInfo(info)), Effect.map(({
29
+ etag,
30
+ info
31
+ }) => {
32
+ const start = Number(options?.offset ?? 0);
33
+ const end = options?.bytesToRead !== undefined ? start + Number(options.bytesToRead) : undefined;
34
+ const headers = {
35
+ ...(options?.headers ?? {}),
36
+ etag: toString(etag)
37
+ };
38
+ if (info.mtime._tag === "Some") {
39
+ headers["last-modified"] = info.mtime.value.toUTCString();
40
+ }
41
+ const contentLength = end !== undefined ? end - start : Number(info.size) - start;
42
+ return impl.fileResponse(path, options?.status ?? 200, options?.statusText, headers, start, end, contentLength);
43
+ }));
44
+ },
45
+ fileWebResponse(file, options) {
46
+ return Effect.map(etagGen.fromFileWeb(file), etag => {
47
+ const headers = {
48
+ ...(options?.headers ?? {}),
49
+ etag: toString(etag),
50
+ "last-modified": new Date(file.lastModified).toUTCString()
51
+ };
52
+ return impl.fileWebResponse(file, options?.status ?? 200, options?.statusText, headers, options);
53
+ });
54
+ }
55
+ });
56
+ });
2
57
 
3
58
  /**
4
59
  * @since 1.0.0