@effect/platform 0.18.3 → 0.18.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.
- package/Command/dist/effect-platform-Command.esm.js +12 -200
- package/CommandExecutor/dist/effect-platform-CommandExecutor.esm.js +9 -71
- package/Effectify/dist/effect-platform-Effectify.esm.js +2 -23
- package/Error/dist/effect-platform-Error.esm.js +2 -54
- package/FileSystem/dist/effect-platform-FileSystem.esm.js +10 -177
- package/Http/Body/dist/effect-platform-Http-Body.esm.js +13 -0
- package/Http/Client/dist/effect-platform-Http-Client.esm.js +28 -0
- package/Http/ClientError/dist/effect-platform-Http-ClientError.esm.js +3 -0
- package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.esm.js +20 -0
- package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.esm.js +23 -0
- package/Http/{Http/Etag → Etag}/dist/effect-platform-Http-Etag.esm.js +17 -1
- package/Http/FormData/dist/effect-platform-Http-FormData.esm.js +17 -0
- package/Http/Headers/dist/effect-platform-Http-Headers.esm.js +4 -0
- package/Http/{Http/IncomingMessage → IncomingMessage}/dist/effect-platform-Http-IncomingMessage.esm.js +6 -1
- package/Http/Middleware/dist/effect-platform-Http-Middleware.esm.js +30 -0
- package/{internal/http/platform.esm.js → Http/Platform/dist/effect-platform-Http-Platform.esm.js} +44 -7
- package/Http/Router/dist/effect-platform-Http-Router.esm.js +25 -0
- package/Http/{Http/Server → Server}/dist/effect-platform-Http-Server.esm.js +18 -1
- package/Http/ServerError/dist/effect-platform-Http-ServerError.esm.js +2 -0
- package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.esm.js +21 -0
- package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.esm.js +21 -0
- package/Http/UrlParams/dist/effect-platform-Http-UrlParams.esm.js +4 -0
- package/HttpClient/dist/effect-platform-HttpClient.esm.js +32 -18
- package/HttpServer/dist/effect-platform-HttpServer.esm.js +36 -24
- package/KeyValueStore/dist/effect-platform-KeyValueStore.esm.js +15 -78
- package/Path/dist/effect-platform-Path.esm.js +8 -33
- package/Runtime/dist/effect-platform-Runtime.esm.js +3 -26
- package/dist/App-687366d8.esm.js +5 -0
- package/{Http/Http/Body/dist/effect-platform-Http-Body.esm.js → dist/Body-ec1353f9.esm.js} +21 -2
- package/dist/Client-52ebd74a.esm.js +346 -0
- package/{Http/Http/ClientError/dist/effect-platform-Http-ClientError.esm.js → dist/ClientError-98b5da8c.esm.js} +9 -2
- package/{Http/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.esm.js → dist/ClientRequest-fc429335.esm.js} +42 -2
- package/dist/ClientResponse-9f276554.esm.js +46 -0
- package/dist/Command-d8ab0c8d.esm.js +403 -0
- package/dist/CommandExecutor-5807b66b.esm.js +80 -0
- package/dist/Effectify-e5a9d266.esm.js +43 -0
- package/dist/Error-3099667c.esm.js +75 -0
- package/dist/FileSystem-7e31dccd.esm.js +271 -0
- package/dist/FormData-f54de878.esm.js +270 -0
- package/{Http/Http/Headers/dist/effect-platform-Http-Headers.esm.js → dist/Headers-58b56a08.esm.js} +12 -1
- package/dist/HttpClient-27710864.esm.js +24 -0
- package/dist/HttpServer-e1d88a1c.esm.js +30 -0
- package/{internal/keyValueStore.esm.js → dist/KeyValueStore-2f9a70bf.esm.js} +102 -15
- package/dist/Middleware-27760041.esm.js +105 -0
- package/{internal/path.esm.js → dist/Path-46f84ba7.esm.js} +40 -4
- package/dist/Router-bf32317a.esm.js +454 -0
- package/dist/Runtime-7265fb98.esm.js +31 -0
- package/dist/ServerError-04ad5b57.esm.js +99 -0
- package/dist/ServerRequest-03161edc.esm.js +125 -0
- package/dist/ServerResponse-675e9456.esm.js +249 -0
- package/{Http/Http/UrlParams/dist/effect-platform-Http-UrlParams.esm.js → dist/UrlParams-1286c728.esm.js} +14 -1
- package/{internal/http/body.esm.js → dist/body-20d78ec1.esm.js} +2 -2
- package/{internal/http/clientError.esm.js → dist/clientError-c4e1466c.esm.js} +1 -1
- package/{internal/http/clientRequest.esm.js → dist/clientRequest-1e9e0b0d.esm.js} +4 -4
- package/{internal/http/clientResponse.esm.js → dist/clientResponse-ce25dbf3.esm.js} +5 -5
- package/{internal/commandExecutor.esm.js → dist/commandExecutor-d6457489.esm.js} +1 -1
- package/dist/effect-platform.esm.js +58 -20
- package/package.json +1 -2
- package/Http/Http/Client/dist/effect-platform-Http-Client.esm.js +0 -164
- package/Http/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.esm.js +0 -36
- package/Http/Http/FormData/dist/effect-platform-Http-FormData.esm.js +0 -155
- package/Http/Http/Middleware/dist/effect-platform-Http-Middleware.esm.js +0 -52
- package/Http/Http/Platform/dist/effect-platform-Http-Platform.esm.js +0 -34
- package/Http/Http/Router/dist/effect-platform-Http-Router.esm.js +0 -224
- package/Http/Http/ServerError/dist/effect-platform-Http-ServerError.esm.js +0 -70
- package/Http/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.esm.js +0 -66
- package/Http/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.esm.js +0 -126
- package/internal/command.esm.js +0 -185
- package/internal/effectify.esm.js +0 -18
- package/internal/error.esm.js +0 -17
- package/internal/fileSystem.esm.js +0 -82
- package/internal/http/client.esm.js +0 -157
- package/internal/http/etag.esm.js +0 -19
- package/internal/http/formData.esm.js +0 -95
- package/internal/http/middleware.esm.js +0 -46
- package/internal/http/router.esm.js +0 -199
- package/internal/http/server.esm.js +0 -20
- package/internal/http/serverError.esm.js +0 -23
- package/internal/http/serverRequest.esm.js +0 -50
- package/internal/http/serverResponse.esm.js +0 -105
- /package/Http/{Http/App → App}/dist/effect-platform-Http-App.esm.js +0 -0
- /package/Http/{Http/Method → Method}/dist/effect-platform-Http-Method.esm.js +0 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { dual } from 'effect/Function';
|
|
3
|
+
import { pipeArguments } from 'effect/Pipeable';
|
|
4
|
+
import { e as empty$2, s as set, a as setAll, r as remove } from './Headers-58b56a08.esm.js';
|
|
5
|
+
import { Platform } from '../Http/Platform/dist/effect-platform-Http-Platform.esm.js';
|
|
6
|
+
import { t as toString, f as fromInput } from './UrlParams-1286c728.esm.js';
|
|
7
|
+
import { e as empty$3, u as uint8Array$2, t as text$2, j as json$2, a as unsafeJson$2, b as jsonSchema, r as raw$2, f as formData$2, s as stream$2 } from './body-20d78ec1.esm.js';
|
|
8
|
+
|
|
9
|
+
/** @internal */
|
|
10
|
+
const TypeId$1 = /*#__PURE__*/Symbol.for("@effect/platform/Http/ServerResponse");
|
|
11
|
+
class ServerResponseImpl {
|
|
12
|
+
constructor(status, statusText, headers, body) {
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.statusText = statusText;
|
|
15
|
+
this.body = body;
|
|
16
|
+
this[TypeId$1] = TypeId$1;
|
|
17
|
+
if (body.contentType || body.contentLength) {
|
|
18
|
+
const newHeaders = {
|
|
19
|
+
...headers
|
|
20
|
+
};
|
|
21
|
+
if (body.contentType) {
|
|
22
|
+
newHeaders["content-type"] = body.contentType;
|
|
23
|
+
}
|
|
24
|
+
if (body.contentLength) {
|
|
25
|
+
newHeaders["content-length"] = body.contentLength.toString();
|
|
26
|
+
}
|
|
27
|
+
this.headers = newHeaders;
|
|
28
|
+
} else {
|
|
29
|
+
this.headers = headers;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
pipe() {
|
|
33
|
+
return pipeArguments(this, arguments);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
const isServerResponse$1 = u => typeof u === "object" && u !== null && TypeId$1 in u;
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
const empty$1 = options => new ServerResponseImpl(options?.status ?? 204, options?.statusText, options?.headers ?? empty$2, empty$3);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
const uint8Array$1 = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, uint8Array$2(body, getContentType(options)));
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
const text$1 = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, text$2(body, getContentType(options)));
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
const json$1 = (body, options) => Effect.map(json$2(body), body => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, body));
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
const unsafeJson$1 = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, unsafeJson$2(body));
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
const schemaJson$1 = schema => {
|
|
57
|
+
const encode = jsonSchema(schema);
|
|
58
|
+
return (body, options) => Effect.map(encode(body), body => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, body));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
const file$1 = (path, options) => Effect.flatMap(Platform, platform => platform.fileResponse(path, options));
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
const fileWeb$1 = (file, options) => Effect.flatMap(Platform, platform => platform.fileWebResponse(file, options));
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
const urlParams$1 = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, text$2(toString(fromInput(body)), "application/x-www-form-urlencoded"));
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
const raw$1 = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, raw$2(body));
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
const formData$1 = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, formData$2(body));
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
const stream$1 = (body, options) => new ServerResponseImpl(options?.status ?? 200, options?.statusText, options?.headers ?? empty$2, stream$2(body, getContentType(options), options?.contentLength));
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
const getContentType = options => {
|
|
81
|
+
if (options?.contentType) {
|
|
82
|
+
return options.contentType;
|
|
83
|
+
} else if (options?.headers) {
|
|
84
|
+
return options.headers["content-type"];
|
|
85
|
+
} else {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
const setHeader$1 = /*#__PURE__*/dual(3, (self, key, value) => new ServerResponseImpl(self.status, self.statusText, set(self.headers, key, value), self.body));
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
const setHeaders$1 = /*#__PURE__*/dual(2, (self, input) => new ServerResponseImpl(self.status, self.statusText, setAll(self.headers, input), self.body));
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
const setBody$1 = /*#__PURE__*/dual(2, (self, body) => {
|
|
98
|
+
let headers = self.headers;
|
|
99
|
+
if (body._tag === "Empty") {
|
|
100
|
+
headers = remove(remove(headers, "Content-Type"), "Content-length");
|
|
101
|
+
}
|
|
102
|
+
return new ServerResponseImpl(self.status, self.statusText, headers, body);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @since 1.0.0
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* @since 1.0.0
|
|
110
|
+
* @category type ids
|
|
111
|
+
*/
|
|
112
|
+
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/ServerResponse");
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @since 1.0.0
|
|
116
|
+
* @category type ids
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @since 1.0.0
|
|
121
|
+
* @category models
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @since 1.0.0
|
|
126
|
+
* @category models
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @since 1.0.0
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @since 1.0.0
|
|
135
|
+
*/
|
|
136
|
+
const isServerResponse = isServerResponse$1;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @since 1.0.0
|
|
140
|
+
* @category constructors
|
|
141
|
+
*/
|
|
142
|
+
const empty = empty$1;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @since 1.0.0
|
|
146
|
+
* @category constructors
|
|
147
|
+
*/
|
|
148
|
+
const uint8Array = uint8Array$1;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @since 1.0.0
|
|
152
|
+
* @category constructors
|
|
153
|
+
*/
|
|
154
|
+
const text = text$1;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @since 1.0.0
|
|
158
|
+
* @category constructors
|
|
159
|
+
*/
|
|
160
|
+
const json = json$1;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @since 1.0.0
|
|
164
|
+
* @category constructors
|
|
165
|
+
*/
|
|
166
|
+
const schemaJson = schemaJson$1;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @since 1.0.0
|
|
170
|
+
* @category constructors
|
|
171
|
+
*/
|
|
172
|
+
const unsafeJson = unsafeJson$1;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @since 1.0.0
|
|
176
|
+
* @category constructors
|
|
177
|
+
*/
|
|
178
|
+
const urlParams = urlParams$1;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @since 1.0.0
|
|
182
|
+
* @category constructors
|
|
183
|
+
*/
|
|
184
|
+
const raw = raw$1;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @since 1.0.0
|
|
188
|
+
* @category constructors
|
|
189
|
+
*/
|
|
190
|
+
const formData = formData$1;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @since 1.0.0
|
|
194
|
+
* @category constructors
|
|
195
|
+
*/
|
|
196
|
+
const stream = stream$1;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @since 1.0.0
|
|
200
|
+
* @category constructors
|
|
201
|
+
*/
|
|
202
|
+
const file = file$1;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @since 1.0.0
|
|
206
|
+
* @category constructors
|
|
207
|
+
*/
|
|
208
|
+
const fileWeb = fileWeb$1;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* @since 1.0.0
|
|
212
|
+
* @category combinators
|
|
213
|
+
*/
|
|
214
|
+
const setHeader = setHeader$1;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @since 1.0.0
|
|
218
|
+
* @category combinators
|
|
219
|
+
*/
|
|
220
|
+
const setHeaders = setHeaders$1;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @since 1.0.0
|
|
224
|
+
* @category combinators
|
|
225
|
+
*/
|
|
226
|
+
const setBody = setBody$1;
|
|
227
|
+
|
|
228
|
+
var ServerResponse = /*#__PURE__*/Object.freeze({
|
|
229
|
+
__proto__: null,
|
|
230
|
+
TypeId: TypeId,
|
|
231
|
+
isServerResponse: isServerResponse,
|
|
232
|
+
empty: empty,
|
|
233
|
+
uint8Array: uint8Array,
|
|
234
|
+
text: text,
|
|
235
|
+
json: json,
|
|
236
|
+
schemaJson: schemaJson,
|
|
237
|
+
unsafeJson: unsafeJson,
|
|
238
|
+
urlParams: urlParams,
|
|
239
|
+
raw: raw,
|
|
240
|
+
formData: formData,
|
|
241
|
+
stream: stream,
|
|
242
|
+
file: file,
|
|
243
|
+
fileWeb: fileWeb,
|
|
244
|
+
setHeader: setHeader,
|
|
245
|
+
setHeaders: setHeaders,
|
|
246
|
+
setBody: setBody
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
export { ServerResponse as S, TypeId as T, schemaJson as a, unsafeJson as b, urlParams as c, stream as d, empty as e, formData as f, file as g, fileWeb as h, isServerResponse as i, json as j, setHeaders as k, setBody as l, raw as r, setHeader as s, text as t, uint8Array as u };
|
|
@@ -98,4 +98,17 @@ const baseUrl = () => {
|
|
|
98
98
|
return undefined;
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
var UrlParams = /*#__PURE__*/Object.freeze({
|
|
102
|
+
__proto__: null,
|
|
103
|
+
fromInput: fromInput,
|
|
104
|
+
empty: empty,
|
|
105
|
+
set: set,
|
|
106
|
+
setAll: setAll,
|
|
107
|
+
append: append,
|
|
108
|
+
appendAll: appendAll,
|
|
109
|
+
remove: remove,
|
|
110
|
+
toString: toString,
|
|
111
|
+
makeUrl: makeUrl
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export { UrlParams as U, append as a, appendAll as b, setAll as c, empty as e, fromInput as f, makeUrl as m, remove as r, set as s, toString as t };
|
|
@@ -3,7 +3,7 @@ import * as Data from 'effect/Data';
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
import { identity } from 'effect/Function';
|
|
5
5
|
import * as Stream from 'effect/Stream';
|
|
6
|
-
import { FileSystem } from '
|
|
6
|
+
import { a as FileSystem } from './FileSystem-7e31dccd.esm.js';
|
|
7
7
|
|
|
8
8
|
/** @internal */
|
|
9
9
|
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/Body");
|
|
@@ -108,4 +108,4 @@ class StreamImpl {
|
|
|
108
108
|
/** @internal */
|
|
109
109
|
const stream = (body, contentType, contentLength) => new StreamImpl(body, contentType ?? "application/octet-stream", contentLength);
|
|
110
110
|
|
|
111
|
-
export { BodyError, ErrorTypeId, TypeId,
|
|
111
|
+
export { BodyError as B, ErrorTypeId as E, TypeId as T, unsafeJson as a, jsonSchema as b, file as c, fileInfo as d, empty as e, formData as f, fileWeb as g, json as j, raw as r, stream as s, text as t, uint8Array as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { dual } from 'effect/Function';
|
|
3
3
|
import { pipeArguments } from 'effect/Pipeable';
|
|
4
|
-
import { set, setAll, remove,
|
|
5
|
-
import { append, appendAll,
|
|
6
|
-
import { uint8Array, text, json, unsafeJson, file, fileWeb, jsonSchema, formData, stream,
|
|
4
|
+
import { s as set, a as setAll, r as remove, e as empty$2 } from './Headers-58b56a08.esm.js';
|
|
5
|
+
import { a as append, b as appendAll, s as set$1, c as setAll$1, t as toString, f as fromInput, e as empty$1 } from './UrlParams-1286c728.esm.js';
|
|
6
|
+
import { u as uint8Array, t as text, j as json, a as unsafeJson, c as file, g as fileWeb, b as jsonSchema, f as formData, s as stream, e as empty$3 } from './body-20d78ec1.esm.js';
|
|
7
7
|
|
|
8
8
|
/** @internal */
|
|
9
9
|
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/ClientRequest");
|
|
@@ -181,4 +181,4 @@ const streamBody = /*#__PURE__*/dual(args => isClientRequest(args[0]), (self, bo
|
|
|
181
181
|
contentType = "application/octet-stream"
|
|
182
182
|
} = {}) => setBody(self, stream(body, contentType, contentLength)));
|
|
183
183
|
|
|
184
|
-
export {
|
|
184
|
+
export { textBody as A, jsonBody as B, unsafeJsonBody as C, schemaBody as D, urlParamsBody as E, formDataBody as F, streamBody as G, fileBody as H, fileWebBody as I, setBody as a, patch as b, put as c, del as d, modify as e, setMethod as f, get as g, head as h, setHeaders as i, basicAuth as j, bearerToken as k, accept as l, make as m, acceptJson as n, options as o, post as p, setUrl as q, prependUrl as r, setHeader as s, appendUrl as t, updateUrl as u, setUrlParam as v, setUrlParams as w, appendUrlParam as x, appendUrlParams as y, uint8ArrayBody as z };
|
|
@@ -2,10 +2,10 @@ import * as Schema from '@effect/schema/Schema';
|
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
3
|
import * as Option from 'effect/Option';
|
|
4
4
|
import * as Stream from 'effect/Stream';
|
|
5
|
-
import { fromInput } from '
|
|
6
|
-
import { TypeId as TypeId$1 } from '
|
|
7
|
-
import {
|
|
8
|
-
import { responseError } from './clientError.esm.js';
|
|
5
|
+
import { f as fromInput } from './Headers-58b56a08.esm.js';
|
|
6
|
+
import { TypeId as TypeId$1 } from '../Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js';
|
|
7
|
+
import { f as fromInput$1 } from './UrlParams-1286c728.esm.js';
|
|
8
|
+
import { a as responseError } from './clientError-c4e1466c.esm.js';
|
|
9
9
|
|
|
10
10
|
/** @internal */
|
|
11
11
|
const TypeId = /*#__PURE__*/Symbol.for("@effect/platform/Http/ClientResponse");
|
|
@@ -108,4 +108,4 @@ const schemaJson = schema => {
|
|
|
108
108
|
}));
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
export { TypeId, fromWeb, schemaJson };
|
|
111
|
+
export { TypeId as T, fromWeb as f, schemaJson as s };
|
|
@@ -46,4 +46,4 @@ const collectUint8Array = /*#__PURE__*/Sink.foldLeftChunks( /*#__PURE__*/new Uin
|
|
|
46
46
|
return newArray;
|
|
47
47
|
}));
|
|
48
48
|
|
|
49
|
-
export { CommandExecutor, ExitCode
|
|
49
|
+
export { CommandExecutor as C, ExitCode as E, ProcessTypeId as P, ProcessId as a, makeExecutor as m };
|
|
@@ -1,20 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
import
|
|
20
|
-
|
|
1
|
+
export { C as Command } from './Command-d8ab0c8d.esm.js';
|
|
2
|
+
export { C as CommandExecutor } from './CommandExecutor-5807b66b.esm.js';
|
|
3
|
+
export { E as Effectify } from './Effectify-e5a9d266.esm.js';
|
|
4
|
+
export { E as Error } from './Error-3099667c.esm.js';
|
|
5
|
+
export { F as FileSystem } from './FileSystem-7e31dccd.esm.js';
|
|
6
|
+
export { H as HttpClient } from './HttpClient-27710864.esm.js';
|
|
7
|
+
export { H as HttpServer } from './HttpServer-e1d88a1c.esm.js';
|
|
8
|
+
export { K as KeyValueStore } from './KeyValueStore-2f9a70bf.esm.js';
|
|
9
|
+
export { P as Path } from './Path-46f84ba7.esm.js';
|
|
10
|
+
export { R as Runtime } from './Runtime-7265fb98.esm.js';
|
|
11
|
+
import 'effect/Chunk';
|
|
12
|
+
import 'effect/Effect';
|
|
13
|
+
import 'effect/Function';
|
|
14
|
+
import 'effect/HashMap';
|
|
15
|
+
import 'effect/Option';
|
|
16
|
+
import 'effect/Pipeable';
|
|
17
|
+
import 'effect/Stream';
|
|
18
|
+
import './commandExecutor-d6457489.esm.js';
|
|
19
|
+
import 'effect/Brand';
|
|
20
|
+
import 'effect/Context';
|
|
21
|
+
import 'effect/Sink';
|
|
22
|
+
import 'effect/Data';
|
|
23
|
+
import './Body-ec1353f9.esm.js';
|
|
24
|
+
import './body-20d78ec1.esm.js';
|
|
25
|
+
import '@effect/schema/Schema';
|
|
26
|
+
import './Client-52ebd74a.esm.js';
|
|
27
|
+
import 'effect/Layer';
|
|
28
|
+
import '../Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js';
|
|
29
|
+
import '@effect/schema/ParseResult';
|
|
30
|
+
import 'effect/FiberRef';
|
|
31
|
+
import 'effect/GlobalValue';
|
|
32
|
+
import '../Http/Method/dist/effect-platform-Http-Method.esm.js';
|
|
33
|
+
import './UrlParams-1286c728.esm.js';
|
|
34
|
+
import './clientError-c4e1466c.esm.js';
|
|
35
|
+
import './clientRequest-1e9e0b0d.esm.js';
|
|
36
|
+
import './Headers-58b56a08.esm.js';
|
|
37
|
+
import 'effect/ReadonlyArray';
|
|
38
|
+
import 'effect/ReadonlyRecord';
|
|
39
|
+
import './clientResponse-ce25dbf3.esm.js';
|
|
40
|
+
import './ClientError-98b5da8c.esm.js';
|
|
41
|
+
import './ClientRequest-fc429335.esm.js';
|
|
42
|
+
import './ClientResponse-9f276554.esm.js';
|
|
43
|
+
import './App-687366d8.esm.js';
|
|
44
|
+
import './FormData-f54de878.esm.js';
|
|
45
|
+
import 'effect/Predicate';
|
|
46
|
+
import './Middleware-27760041.esm.js';
|
|
47
|
+
import './ServerRequest-03161edc.esm.js';
|
|
48
|
+
import './ServerError-04ad5b57.esm.js';
|
|
49
|
+
import './ServerResponse-675e9456.esm.js';
|
|
50
|
+
import '../Http/Platform/dist/effect-platform-Http-Platform.esm.js';
|
|
51
|
+
import '../Http/Etag/dist/effect-platform-Http-Etag.esm.js';
|
|
52
|
+
import './Router-bf32317a.esm.js';
|
|
53
|
+
import 'effect/Effectable';
|
|
54
|
+
import 'effect/Inspectable';
|
|
55
|
+
import 'find-my-way';
|
|
56
|
+
import 'path-browserify';
|
|
57
|
+
import 'effect/Cause';
|
|
58
|
+
import 'effect/Exit';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/platform",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.5",
|
|
4
4
|
"description": "Unified interfaces for common platform-specific services",
|
|
5
5
|
"main": "dist/effect-platform.cjs.js",
|
|
6
6
|
"module": "dist/effect-platform.esm.js",
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"files": [
|
|
43
43
|
"src",
|
|
44
44
|
"dist",
|
|
45
|
-
"internal",
|
|
46
45
|
"Command",
|
|
47
46
|
"CommandExecutor",
|
|
48
47
|
"Effectify",
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { TypeId as TypeId$1, tag, layer as layer$1, fetch as fetch$1, fetchOk as fetchOk$1, catchAll as catchAll$1, catchTag as catchTag$1, catchTags as catchTags$1, filterOrElse as filterOrElse$1, filterOrFail as filterOrFail$1, filterStatus as filterStatus$1, filterStatusOk as filterStatusOk$1, make as make$1, transform as transform$1, transformResponse as transformResponse$1, map as map$1, mapEffect as mapEffect$1, mapRequest as mapRequest$1, mapRequestEffect as mapRequestEffect$1, retry as retry$1, schemaFunction as schemaFunction$1, withB3Propagation as withB3Propagation$1, tap as tap$1, tapRequest as tapRequest$1 } from '../../../../internal/http/client.esm.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @since 1.0.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* @since 1.0.0
|
|
8
|
-
* @category type ids
|
|
9
|
-
*/
|
|
10
|
-
const TypeId = TypeId$1;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @since 1.0.0
|
|
14
|
-
* @category type ids
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @since 1.0.0
|
|
19
|
-
* @category models
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @since 1.0.0
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @since 1.0.0
|
|
28
|
-
* @category tags
|
|
29
|
-
*/
|
|
30
|
-
const Client = tag;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @since 1.0.0
|
|
34
|
-
* @category layers
|
|
35
|
-
*/
|
|
36
|
-
const layer = layer$1;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @since 1.0.0
|
|
40
|
-
* @category constructors
|
|
41
|
-
*/
|
|
42
|
-
const fetch = fetch$1;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @since 1.0.0
|
|
46
|
-
* @category constructors
|
|
47
|
-
*/
|
|
48
|
-
const fetchOk = fetchOk$1;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @since 1.0.0
|
|
52
|
-
* @category error handling
|
|
53
|
-
*/
|
|
54
|
-
const catchAll = catchAll$1;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @since 1.0.0
|
|
58
|
-
* @category error handling
|
|
59
|
-
*/
|
|
60
|
-
const catchTag = catchTag$1;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @since 1.0.0
|
|
64
|
-
* @category error handling
|
|
65
|
-
*/
|
|
66
|
-
const catchTags = catchTags$1;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @since 1.0.0
|
|
70
|
-
* @category filters
|
|
71
|
-
*/
|
|
72
|
-
const filterOrElse = filterOrElse$1;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @since 1.0.0
|
|
76
|
-
* @category filters
|
|
77
|
-
*/
|
|
78
|
-
const filterOrFail = filterOrFail$1;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @since 1.0.0
|
|
82
|
-
* @category filters
|
|
83
|
-
*/
|
|
84
|
-
const filterStatus = filterStatus$1;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @since 1.0.0
|
|
88
|
-
* @category filters
|
|
89
|
-
*/
|
|
90
|
-
const filterStatusOk = filterStatusOk$1;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* @since 1.0.0
|
|
94
|
-
* @category constructors
|
|
95
|
-
*/
|
|
96
|
-
const make = make$1;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @since 1.0.0
|
|
100
|
-
* @category mapping & sequencing
|
|
101
|
-
*/
|
|
102
|
-
const transform = transform$1;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* @since 1.0.0
|
|
106
|
-
* @category mapping & sequencing
|
|
107
|
-
*/
|
|
108
|
-
const transformResponse = transformResponse$1;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @since 1.0.0
|
|
112
|
-
* @category mapping & sequencing
|
|
113
|
-
*/
|
|
114
|
-
const map = map$1;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* @since 1.0.0
|
|
118
|
-
* @category mapping & sequencing
|
|
119
|
-
*/
|
|
120
|
-
const mapEffect = mapEffect$1;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @since 1.0.0
|
|
124
|
-
* @category mapping & sequencing
|
|
125
|
-
*/
|
|
126
|
-
const mapRequest = mapRequest$1;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @since 1.0.0
|
|
130
|
-
* @category mapping & sequencing
|
|
131
|
-
*/
|
|
132
|
-
const mapRequestEffect = mapRequestEffect$1;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* @since 1.0.0
|
|
136
|
-
* @category error handling
|
|
137
|
-
*/
|
|
138
|
-
const retry = retry$1;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* @since 1.0.0
|
|
142
|
-
* @category schema
|
|
143
|
-
*/
|
|
144
|
-
const schemaFunction = schemaFunction$1;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @since 1.0.0
|
|
148
|
-
* @category tracing
|
|
149
|
-
*/
|
|
150
|
-
const withB3Propagation = withB3Propagation$1;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @since 1.0.0
|
|
154
|
-
* @category mapping & sequencing
|
|
155
|
-
*/
|
|
156
|
-
const tap = tap$1;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* @since 1.0.0
|
|
160
|
-
* @category mapping & sequencing
|
|
161
|
-
*/
|
|
162
|
-
const tapRequest = tapRequest$1;
|
|
163
|
-
|
|
164
|
-
export { Client, TypeId, catchAll, catchTag, catchTags, fetch, fetchOk, filterOrElse, filterOrFail, filterStatus, filterStatusOk, layer, make, map, mapEffect, mapRequest, mapRequestEffect, retry, schemaFunction, tap, tapRequest, transform, transformResponse, withB3Propagation };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { TypeId as TypeId$1, fromWeb as fromWeb$1, schemaJson as schemaJson$1 } from '../../../../internal/http/clientResponse.esm.js';
|
|
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 };
|