@effect/platform-node 0.19.4 → 0.19.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-node-Command.esm.js +0 -4
- package/CommandExecutor/dist/effect-platform-node-CommandExecutor.esm.js +14 -13
- package/Effectify/dist/effect-platform-node-Effectify.esm.js +0 -4
- package/Error/dist/effect-platform-node-Error.esm.js +0 -4
- package/FileSystem/dist/effect-platform-node-FileSystem.esm.js +12 -13
- package/Http/Etag/dist/effect-platform-node-Http-Etag.esm.js +3 -22
- package/Http/FormData/dist/effect-platform-node-Http-FormData.esm.js +15 -22
- package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.esm.js +24 -65
- package/Http/Platform/dist/effect-platform-node-Http-Platform.esm.js +19 -1
- package/Http/Server/dist/effect-platform-node-Http-Server.esm.js +44 -28
- package/HttpClient/dist/effect-platform-node-HttpClient.esm.js +19 -6
- package/HttpServer/dist/effect-platform-node-HttpServer.esm.js +40 -10
- package/KeyValueStore/dist/effect-platform-node-KeyValueStore.esm.js +17 -18
- package/NodeContext/dist/effect-platform-node-NodeContext.esm.js +25 -22
- package/Path/dist/effect-platform-node-Path.esm.js +6 -25
- package/Runtime/dist/effect-platform-node-Runtime.esm.js +3 -13
- package/Sink/dist/effect-platform-node-Sink.esm.js +5 -18
- package/Stream/dist/effect-platform-node-Stream.esm.js +6 -30
- package/dist/Command-56d67f13.esm.js +27 -0
- package/{internal/commandExecutor.esm.js → dist/CommandExecutor-cfc0af4b.esm.js} +27 -10
- package/dist/Effectify-24bba5b0.esm.js +12 -0
- package/dist/Error-6b032e84.esm.js +16 -0
- package/dist/Etag-6f08d5ed.esm.js +86 -0
- package/{internal/fileSystem.esm.js → dist/FileSystem-d4a3521c.esm.js} +30 -12
- package/dist/FormData-bafc0b9a.esm.js +43 -0
- package/dist/HttpClient-3e1bd3e7.esm.js +26 -0
- package/dist/HttpServer-331621bd.esm.js +34 -0
- package/dist/KeyValueStore-66bca5fd.esm.js +38 -0
- package/{internal/http/nodeClient.esm.js → dist/NodeClient-4070cde3.esm.js} +86 -12
- package/dist/NodeContext-4bca6ed4.esm.js +27 -0
- package/{internal/path.esm.js → dist/Path-7a81561f.esm.js} +35 -5
- package/{internal/runtime.esm.js → dist/Runtime-3bc7ee1e.esm.js} +18 -2
- package/{internal/http/server.esm.js → dist/Server-3a9f4a90.esm.js} +56 -10
- package/dist/Sink-554d2819.esm.js +23 -0
- package/dist/Stream-2d5b1ece.esm.js +37 -0
- package/dist/effect-platform-node.esm.js +73 -26
- package/{internal/error.esm.js → dist/error-4865cb95.esm.js} +1 -1
- package/{internal/http/formData.esm.js → dist/formData-4330f230.esm.js} +2 -2
- package/{internal/http/incomingMessage.esm.js → dist/incomingMessage-309eb6a5.esm.js} +2 -2
- package/{internal/http/platform.esm.js → dist/platform-f3d31bb1.esm.js} +3 -3
- package/{internal/sink.esm.js → dist/sink-bd7ef408.esm.js} +1 -1
- package/{internal/stream.esm.js → dist/stream-860139d3.esm.js} +1 -1
- package/package.json +2 -3
- package/internal/http/etag.esm.js +0 -47
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BadArgument } from '@effect/platform/Error';
|
|
2
|
-
import { Path } from '@effect/platform/Path';
|
|
2
|
+
import { Path as Path$1 } from '@effect/platform/Path';
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
import * as Layer from 'effect/Layer';
|
|
5
5
|
import * as NodePath from 'node:path';
|
|
@@ -23,24 +23,54 @@ const toFileUrl = path => Effect.try({
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
/** @internal */
|
|
26
|
-
const layerPosix = /*#__PURE__*/Layer.succeed(Path, /*#__PURE__*/Path.of({
|
|
26
|
+
const layerPosix$1 = /*#__PURE__*/Layer.succeed(Path$1, /*#__PURE__*/Path$1.of({
|
|
27
27
|
...NodePath.posix,
|
|
28
28
|
fromFileUrl,
|
|
29
29
|
toFileUrl
|
|
30
30
|
}));
|
|
31
31
|
|
|
32
32
|
/** @internal */
|
|
33
|
-
const layerWin32 = /*#__PURE__*/Layer.succeed(Path, /*#__PURE__*/Path.of({
|
|
33
|
+
const layerWin32$1 = /*#__PURE__*/Layer.succeed(Path$1, /*#__PURE__*/Path$1.of({
|
|
34
34
|
...NodePath.win32,
|
|
35
35
|
fromFileUrl,
|
|
36
36
|
toFileUrl
|
|
37
37
|
}));
|
|
38
38
|
|
|
39
39
|
/** @internal */
|
|
40
|
-
const layer = /*#__PURE__*/Layer.succeed(Path, /*#__PURE__*/Path.of({
|
|
40
|
+
const layer$1 = /*#__PURE__*/Layer.succeed(Path$1, /*#__PURE__*/Path$1.of({
|
|
41
41
|
...NodePath,
|
|
42
42
|
fromFileUrl,
|
|
43
43
|
toFileUrl
|
|
44
44
|
}));
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
|
+
* @since 1.0.0
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @since 1.0.0
|
|
52
|
+
* @category layer
|
|
53
|
+
*/
|
|
54
|
+
const layer = layer$1;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @since 1.0.0
|
|
58
|
+
* @category layer
|
|
59
|
+
*/
|
|
60
|
+
const layerPosix = layerPosix$1;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @since 1.0.0
|
|
64
|
+
* @category layer
|
|
65
|
+
*/
|
|
66
|
+
const layerWin32 = layerWin32$1;
|
|
67
|
+
|
|
68
|
+
var Path = /*#__PURE__*/Object.freeze({
|
|
69
|
+
__proto__: null,
|
|
70
|
+
layer: layer,
|
|
71
|
+
layerPosix: layerPosix,
|
|
72
|
+
layerWin32: layerWin32,
|
|
73
|
+
Path: Path$1
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export { Path as P, layerPosix as a, layerWin32 as b, layer as l };
|
|
@@ -3,7 +3,7 @@ import * as Effect from 'effect/Effect';
|
|
|
3
3
|
import * as Fiber from 'effect/Fiber';
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
|
-
const runMain = (effect, teardown = defaultTeardown) => {
|
|
6
|
+
const runMain$1 = (effect, teardown = defaultTeardown) => {
|
|
7
7
|
const fiber = Effect.runFork(effect);
|
|
8
8
|
fiber.addObserver(exit => teardown(exit, code => {
|
|
9
9
|
Effect.runCallback(interruptAll(fiber.id()), () => {
|
|
@@ -25,4 +25,20 @@ const interruptAll = id => Effect.flatMap(Fiber.roots, roots => {
|
|
|
25
25
|
return Fiber.interruptAllAs(roots, id);
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @since 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @since 1.0.0
|
|
34
|
+
* @category runtime
|
|
35
|
+
*/
|
|
36
|
+
const runMain = runMain$1;
|
|
37
|
+
|
|
38
|
+
var Runtime = /*#__PURE__*/Object.freeze({
|
|
39
|
+
__proto__: null,
|
|
40
|
+
runMain: runMain,
|
|
41
|
+
defaultTeardown: defaultTeardown
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export { Runtime as R, runMain as r };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as FileSystem from '@effect/platform/FileSystem';
|
|
2
2
|
import * as IncomingMessage from '@effect/platform/Http/IncomingMessage';
|
|
3
3
|
import * as Middleware from '@effect/platform/Http/Middleware';
|
|
4
|
-
import * as Server from '@effect/platform/Http/Server';
|
|
4
|
+
import * as Server$1 from '@effect/platform/Http/Server';
|
|
5
5
|
import * as Error from '@effect/platform/Http/ServerError';
|
|
6
6
|
import * as ServerRequest from '@effect/platform/Http/ServerRequest';
|
|
7
7
|
import * as Config from 'effect/Config';
|
|
@@ -13,13 +13,28 @@ import * as Runtime from 'effect/Runtime';
|
|
|
13
13
|
import * as Stream from 'effect/Stream';
|
|
14
14
|
import { Readable } from 'node:stream';
|
|
15
15
|
import { pipeline } from 'node:stream/promises';
|
|
16
|
-
import { fromWritable } from '
|
|
17
|
-
import { formData, stream } from './formData.esm.js';
|
|
18
|
-
import { IncomingMessageImpl } from './incomingMessage.esm.js';
|
|
19
|
-
import {
|
|
16
|
+
import { f as fromWritable } from './Sink-554d2819.esm.js';
|
|
17
|
+
import { f as formData, s as stream } from './formData-4330f230.esm.js';
|
|
18
|
+
import { I as IncomingMessageImpl } from './incomingMessage-309eb6a5.esm.js';
|
|
19
|
+
import { l as layer$2 } from './platform-f3d31bb1.esm.js';
|
|
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
|
+
}
|
|
20
35
|
|
|
21
36
|
/** @internal */
|
|
22
|
-
const make = (evaluate, options) => Effect.gen(function* (_) {
|
|
37
|
+
const make$1 = (evaluate, options) => Effect.gen(function* (_) {
|
|
23
38
|
const server = evaluate();
|
|
24
39
|
const serverFiber = yield* _(Effect.addFinalizer(() => Effect.async(resume => {
|
|
25
40
|
server.close(error => {
|
|
@@ -42,7 +57,7 @@ const make = (evaluate, options) => Effect.gen(function* (_) {
|
|
|
42
57
|
});
|
|
43
58
|
}));
|
|
44
59
|
const address = server.address();
|
|
45
|
-
return Server.make({
|
|
60
|
+
return Server$1.make({
|
|
46
61
|
address: typeof address === "string" ? {
|
|
47
62
|
_tag: "UnixAddress",
|
|
48
63
|
path: address
|
|
@@ -131,10 +146,10 @@ class ServerRequestImpl extends IncomingMessageImpl {
|
|
|
131
146
|
}
|
|
132
147
|
|
|
133
148
|
/** @internal */
|
|
134
|
-
const layer = (evaluate, options) => Layer.merge(Layer.scoped(Server.Server, make(evaluate, options)), layer$
|
|
149
|
+
const layer$1 = (evaluate, options) => Layer.merge(Layer.scoped(Server$1.Server, make$1(evaluate, options)), layer$2);
|
|
135
150
|
|
|
136
151
|
/** @internal */
|
|
137
|
-
const layerConfig = (evaluate, options) => Layer.merge(Layer.scoped(Server.Server, Effect.flatMap(Effect.config(Config.unwrap(options)), options => make(evaluate, options))), layer$
|
|
152
|
+
const layerConfig$1 = (evaluate, options) => Layer.merge(Layer.scoped(Server$1.Server, Effect.flatMap(Effect.config(Config.unwrap(options)), options => make$1(evaluate, options))), layer$2);
|
|
138
153
|
const handleResponse = (request, response) => Effect.suspend(() => {
|
|
139
154
|
const nodeResponse = request.response;
|
|
140
155
|
if (request.method === "HEAD") {
|
|
@@ -215,4 +230,35 @@ const handleResponse = (request, response) => Effect.suspend(() => {
|
|
|
215
230
|
}
|
|
216
231
|
});
|
|
217
232
|
|
|
218
|
-
|
|
233
|
+
/**
|
|
234
|
+
* @since 1.0.0
|
|
235
|
+
*
|
|
236
|
+
* Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @since 1.0.0
|
|
241
|
+
* @category constructors
|
|
242
|
+
*/
|
|
243
|
+
const make = make$1;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @since 1.0.0
|
|
247
|
+
* @category layers
|
|
248
|
+
*/
|
|
249
|
+
const layer = layer$1;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @since 1.0.0
|
|
253
|
+
* @category layers
|
|
254
|
+
*/
|
|
255
|
+
const layerConfig = layerConfig$1;
|
|
256
|
+
|
|
257
|
+
var Server = /*#__PURE__*/_mergeNamespaces({
|
|
258
|
+
__proto__: null,
|
|
259
|
+
make: make,
|
|
260
|
+
layer: layer,
|
|
261
|
+
layerConfig: layerConfig
|
|
262
|
+
}, [Server$1]);
|
|
263
|
+
|
|
264
|
+
export { Server as S, layerConfig as a, layer as l, make as m };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { f as fromWritable$1 } from './sink-bd7ef408.esm.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @since 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @category model
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @category constructor
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
const fromWritable = fromWritable$1;
|
|
17
|
+
|
|
18
|
+
var Sink = /*#__PURE__*/Object.freeze({
|
|
19
|
+
__proto__: null,
|
|
20
|
+
fromWritable: fromWritable
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { Sink as S, fromWritable as f };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { f as fromReadable$1, t as toString$1, a as toUint8Array$1 } from './stream-860139d3.esm.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @since 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @category models
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @category constructors
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
const fromReadable = fromReadable$1;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @since 1.0.0
|
|
20
|
+
* @category conversions
|
|
21
|
+
*/
|
|
22
|
+
const toString = toString$1;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @since 1.0.0
|
|
26
|
+
* @category conversions
|
|
27
|
+
*/
|
|
28
|
+
const toUint8Array = toUint8Array$1;
|
|
29
|
+
|
|
30
|
+
var Stream = /*#__PURE__*/Object.freeze({
|
|
31
|
+
__proto__: null,
|
|
32
|
+
fromReadable: fromReadable,
|
|
33
|
+
toString: toString,
|
|
34
|
+
toUint8Array: toUint8Array
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export { Stream as S, toUint8Array as a, fromReadable as f, toString as t };
|
|
@@ -1,26 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
import
|
|
24
|
-
|
|
25
|
-
import
|
|
26
|
-
|
|
1
|
+
export { C as Command } from './Command-56d67f13.esm.js';
|
|
2
|
+
export { C as CommandExecutor } from './CommandExecutor-cfc0af4b.esm.js';
|
|
3
|
+
export { E as Effectify } from './Effectify-24bba5b0.esm.js';
|
|
4
|
+
export { E as Error } from './Error-6b032e84.esm.js';
|
|
5
|
+
export { F as FileSystem } from './FileSystem-d4a3521c.esm.js';
|
|
6
|
+
export { H as HttpClient } from './HttpClient-3e1bd3e7.esm.js';
|
|
7
|
+
export { H as HttpServer } from './HttpServer-331621bd.esm.js';
|
|
8
|
+
export { K as KeyValueStore } from './KeyValueStore-66bca5fd.esm.js';
|
|
9
|
+
export { N as NodeContext } from './NodeContext-4bca6ed4.esm.js';
|
|
10
|
+
export { P as Path } from './Path-7a81561f.esm.js';
|
|
11
|
+
export { R as Runtime } from './Runtime-3bc7ee1e.esm.js';
|
|
12
|
+
export { S as Sink } from './Sink-554d2819.esm.js';
|
|
13
|
+
export { S as Stream } from './Stream-2d5b1ece.esm.js';
|
|
14
|
+
import '@effect/platform/Command';
|
|
15
|
+
import '@effect/platform/CommandExecutor';
|
|
16
|
+
import '@effect/platform/FileSystem';
|
|
17
|
+
import 'effect/Effect';
|
|
18
|
+
import 'effect/Function';
|
|
19
|
+
import 'effect/Layer';
|
|
20
|
+
import 'effect/Option';
|
|
21
|
+
import 'effect/Sink';
|
|
22
|
+
import 'effect/Stream';
|
|
23
|
+
import 'node:child_process';
|
|
24
|
+
import './error-4865cb95.esm.js';
|
|
25
|
+
import '@effect/platform/Error';
|
|
26
|
+
import './sink-bd7ef408.esm.js';
|
|
27
|
+
import './stream-860139d3.esm.js';
|
|
28
|
+
import '@effect/platform/Effectify';
|
|
29
|
+
import 'node:crypto';
|
|
30
|
+
import 'node:fs';
|
|
31
|
+
import 'node:os';
|
|
32
|
+
import 'node:path';
|
|
33
|
+
import '@effect/platform/Http/Body';
|
|
34
|
+
import '@effect/platform/Http/Client';
|
|
35
|
+
import '@effect/platform/Http/ClientError';
|
|
36
|
+
import '@effect/platform/Http/ClientRequest';
|
|
37
|
+
import '@effect/platform/Http/ClientResponse';
|
|
38
|
+
import '@effect/platform/Http/Headers';
|
|
39
|
+
import '@effect/platform/Http/UrlParams';
|
|
40
|
+
import './NodeClient-4070cde3.esm.js';
|
|
41
|
+
import 'effect/Context';
|
|
42
|
+
import 'node:http';
|
|
43
|
+
import 'node:https';
|
|
44
|
+
import 'node:stream';
|
|
45
|
+
import 'node:stream/promises';
|
|
46
|
+
import './incomingMessage-309eb6a5.esm.js';
|
|
47
|
+
import '@effect/platform/Http/IncomingMessage';
|
|
48
|
+
import 'effect/FiberRef';
|
|
49
|
+
import '@effect/platform/Http/App';
|
|
50
|
+
import '@effect/platform/Http/Middleware';
|
|
51
|
+
import '@effect/platform/Http/Router';
|
|
52
|
+
import '@effect/platform/Http/ServerError';
|
|
53
|
+
import '@effect/platform/Http/ServerRequest';
|
|
54
|
+
import '@effect/platform/Http/ServerResponse';
|
|
55
|
+
import './Etag-6f08d5ed.esm.js';
|
|
56
|
+
import '@effect/platform/Http/Etag';
|
|
57
|
+
import './FormData-bafc0b9a.esm.js';
|
|
58
|
+
import './formData-4330f230.esm.js';
|
|
59
|
+
import '@effect/platform/Http/FormData';
|
|
60
|
+
import '@effect/platform/Path';
|
|
61
|
+
import 'busboy';
|
|
62
|
+
import 'effect/Chunk';
|
|
63
|
+
import './Server-3a9f4a90.esm.js';
|
|
64
|
+
import '@effect/platform/Http/Server';
|
|
65
|
+
import 'effect/Config';
|
|
66
|
+
import 'effect/Fiber';
|
|
67
|
+
import 'effect/Runtime';
|
|
68
|
+
import './platform-f3d31bb1.esm.js';
|
|
69
|
+
import '@effect/platform/Http/Platform';
|
|
70
|
+
import 'mime';
|
|
71
|
+
import '@effect/platform/KeyValueStore';
|
|
72
|
+
import 'node:url';
|
|
73
|
+
import '@effect/platform/Runtime';
|
|
@@ -10,7 +10,7 @@ import * as Option from 'effect/Option';
|
|
|
10
10
|
import * as Stream from 'effect/Stream';
|
|
11
11
|
import * as NFS from 'node:fs';
|
|
12
12
|
import * as NodeStreamP from 'node:stream/promises';
|
|
13
|
-
import { fromReadable, toString } from '
|
|
13
|
+
import { f as fromReadable, t as toString } from './Stream-2d5b1ece.esm.js';
|
|
14
14
|
|
|
15
15
|
const stream = (source, headers) => pipe(Effect.Do, Effect.bind("maxParts", () => FiberRef.get(FormData.maxParts)), Effect.bind("maxFields", () => FiberRef.get(FormData.maxFields)), Effect.bind("maxFiles", () => FiberRef.get(FormData.maxFiles)), Effect.bind("fieldMimeTypes", () => FiberRef.get(FormData.fieldMimeTypes)), Effect.bind("maxFieldSize", () => FiberRef.get(FormData.maxFieldSize)), Effect.bind("maxFileSize", () => FiberRef.get(FormData.maxFileSize)), Effect.bind("busboy", ({
|
|
16
16
|
maxFieldSize,
|
|
@@ -103,4 +103,4 @@ const formData = (source, headers) => Effect.flatMap(Effect.all([Effect.mapError
|
|
|
103
103
|
}), formData);
|
|
104
104
|
}));
|
|
105
105
|
|
|
106
|
-
export { formData, stream };
|
|
106
|
+
export { formData as f, stream as s };
|
|
@@ -4,7 +4,7 @@ import * as UrlParams from '@effect/platform/Http/UrlParams';
|
|
|
4
4
|
import * as Effect from 'effect/Effect';
|
|
5
5
|
import * as FiberRef from 'effect/FiberRef';
|
|
6
6
|
import * as Option from 'effect/Option';
|
|
7
|
-
import { toString, fromReadable, toUint8Array } from '
|
|
7
|
+
import { t as toString, f as fromReadable, a as toUint8Array } from './Stream-2d5b1ece.esm.js';
|
|
8
8
|
|
|
9
9
|
/** @internal */
|
|
10
10
|
class IncomingMessageImpl {
|
|
@@ -55,4 +55,4 @@ class IncomingMessageImpl {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export { IncomingMessageImpl };
|
|
58
|
+
export { IncomingMessageImpl as I };
|
|
@@ -5,8 +5,8 @@ import * as Layer from 'effect/Layer';
|
|
|
5
5
|
import Mime from 'mime';
|
|
6
6
|
import * as NFS from 'node:fs';
|
|
7
7
|
import { Readable } from 'node:stream';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { l as layer$1 } from './FileSystem-d4a3521c.esm.js';
|
|
9
|
+
import { l as layer$2 } from './Etag-6f08d5ed.esm.js';
|
|
10
10
|
|
|
11
11
|
/** @internal */
|
|
12
12
|
const make = /*#__PURE__*/Platform.make({
|
|
@@ -41,4 +41,4 @@ const make = /*#__PURE__*/Platform.make({
|
|
|
41
41
|
/** @internal */
|
|
42
42
|
const layer = /*#__PURE__*/pipe( /*#__PURE__*/Layer.effect(Platform.Platform, make), /*#__PURE__*/Layer.use(layer$1), /*#__PURE__*/Layer.use(layer$2));
|
|
43
43
|
|
|
44
|
-
export { layer, make };
|
|
44
|
+
export { layer as l, make as m };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/platform-node",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.5",
|
|
4
4
|
"description": "Unified interfaces for common platform-specific services",
|
|
5
5
|
"main": "dist/effect-platform-node.cjs.js",
|
|
6
6
|
"module": "dist/effect-platform-node.esm.js",
|
|
@@ -41,12 +41,11 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"busboy": "^1.6.0",
|
|
43
43
|
"mime": "^3.0.0",
|
|
44
|
-
"@effect/platform": "^0.18.
|
|
44
|
+
"@effect/platform": "^0.18.5"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
47
|
"src",
|
|
48
48
|
"dist",
|
|
49
|
-
"internal",
|
|
50
49
|
"Command",
|
|
51
50
|
"CommandExecutor",
|
|
52
51
|
"Effectify",
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as Etag from '@effect/platform/Http/Etag';
|
|
2
|
-
import * as Effect from 'effect/Effect';
|
|
3
|
-
import * as Layer from 'effect/Layer';
|
|
4
|
-
|
|
5
|
-
const fromFileInfo = info => {
|
|
6
|
-
const mtime = info.mtime._tag === "Some" ? info.mtime.value.getTime().toString(16) : "0";
|
|
7
|
-
return `${info.size.toString(16)}-${mtime}`;
|
|
8
|
-
};
|
|
9
|
-
const fromFileWeb = file => {
|
|
10
|
-
return `${file.size.toString(16)}-${file.lastModified.toString(16)}`;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/** @internal */
|
|
14
|
-
const layer = /*#__PURE__*/Layer.succeed(Etag.Generator, /*#__PURE__*/Etag.Generator.of({
|
|
15
|
-
[Etag.GeneratorTypeId]: Etag.GeneratorTypeId,
|
|
16
|
-
fromFileInfo(info) {
|
|
17
|
-
return Effect.sync(() => ({
|
|
18
|
-
_tag: "Strong",
|
|
19
|
-
value: fromFileInfo(info)
|
|
20
|
-
}));
|
|
21
|
-
},
|
|
22
|
-
fromFileWeb(file) {
|
|
23
|
-
return Effect.sync(() => ({
|
|
24
|
-
_tag: "Strong",
|
|
25
|
-
value: fromFileWeb(file)
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
/** @internal */
|
|
31
|
-
const layerWeak = /*#__PURE__*/Layer.succeed(Etag.Generator, /*#__PURE__*/Etag.Generator.of({
|
|
32
|
-
[Etag.GeneratorTypeId]: Etag.GeneratorTypeId,
|
|
33
|
-
fromFileInfo(info) {
|
|
34
|
-
return Effect.sync(() => ({
|
|
35
|
-
_tag: "Weak",
|
|
36
|
-
value: fromFileInfo(info)
|
|
37
|
-
}));
|
|
38
|
-
},
|
|
39
|
-
fromFileWeb(file) {
|
|
40
|
-
return Effect.sync(() => ({
|
|
41
|
-
_tag: "Weak",
|
|
42
|
-
value: fromFileWeb(file)
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
}));
|
|
46
|
-
|
|
47
|
-
export { layer, layerWeak };
|