@effect/platform-node 0.19.8 → 0.20.0
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.cjs.dev.js +32 -32
- package/Command/dist/effect-platform-node-Command.cjs.prod.js +32 -32
- package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.dev.js +184 -16
- package/CommandExecutor/dist/effect-platform-node-CommandExecutor.cjs.prod.js +184 -16
- package/CommandExecutor/dist/effect-platform-node-CommandExecutor.esm.js +158 -13
- package/Effectify/dist/effect-platform-node-Effectify.cjs.dev.js +2 -2
- package/Effectify/dist/effect-platform-node-Effectify.cjs.prod.js +2 -2
- package/Error/dist/effect-platform-node-Error.cjs.dev.js +6 -14
- package/Error/dist/effect-platform-node-Error.cjs.mjs +1 -3
- package/Error/dist/effect-platform-node-Error.cjs.prod.js +6 -14
- package/Error/dist/effect-platform-node-Error.esm.js +1 -1
- package/FileSystem/dist/effect-platform-node-FileSystem.cjs.dev.js +423 -17
- package/FileSystem/dist/effect-platform-node-FileSystem.cjs.prod.js +423 -17
- package/FileSystem/dist/effect-platform-node-FileSystem.esm.js +395 -12
- package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.dev.js +3 -3
- package/Http/FormData/dist/effect-platform-node-Http-FormData.cjs.prod.js +3 -3
- package/Http/FormData/dist/effect-platform-node-Http-FormData.esm.js +3 -3
- package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.dev.js +4 -4
- package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.cjs.prod.js +4 -4
- package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.esm.js +4 -4
- package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.dev.js +2 -2
- package/Http/Platform/dist/effect-platform-node-Http-Platform.cjs.prod.js +2 -2
- package/Http/Platform/dist/effect-platform-node-Http-Platform.esm.js +2 -2
- package/Http/Server/dist/effect-platform-node-Http-Server.cjs.dev.js +8 -7
- package/Http/Server/dist/effect-platform-node-Http-Server.cjs.prod.js +8 -7
- package/Http/Server/dist/effect-platform-node-Http-Server.esm.js +8 -7
- package/HttpClient/dist/effect-platform-node-HttpClient.cjs.dev.js +19 -19
- package/HttpClient/dist/effect-platform-node-HttpClient.cjs.prod.js +19 -19
- package/HttpClient/dist/effect-platform-node-HttpClient.esm.js +4 -4
- package/HttpServer/dist/effect-platform-node-HttpServer.cjs.dev.js +23 -23
- package/HttpServer/dist/effect-platform-node-HttpServer.cjs.prod.js +23 -23
- package/HttpServer/dist/effect-platform-node-HttpServer.esm.js +8 -8
- package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.dev.js +39 -9
- package/KeyValueStore/dist/effect-platform-node-KeyValueStore.cjs.prod.js +39 -9
- package/KeyValueStore/dist/effect-platform-node-KeyValueStore.esm.js +18 -4
- package/NodeContext/dist/effect-platform-node-NodeContext.cjs.dev.js +39 -7
- package/NodeContext/dist/effect-platform-node-NodeContext.cjs.prod.js +39 -7
- package/NodeContext/dist/effect-platform-node-NodeContext.esm.js +22 -6
- package/Path/dist/effect-platform-node-Path.cjs.dev.js +91 -11
- package/Path/dist/effect-platform-node-Path.cjs.prod.js +91 -11
- package/Path/dist/effect-platform-node-Path.esm.js +68 -6
- package/Runtime/dist/effect-platform-node-Runtime.cjs.dev.js +57 -6
- package/Runtime/dist/effect-platform-node-Runtime.cjs.prod.js +57 -6
- package/Runtime/dist/effect-platform-node-Runtime.esm.js +38 -3
- package/Sink/dist/effect-platform-node-Sink.cjs.dev.js +15 -3
- package/Sink/dist/effect-platform-node-Sink.cjs.prod.js +15 -3
- package/Sink/dist/effect-platform-node-Sink.esm.js +18 -2
- package/Stream/dist/effect-platform-node-Stream.cjs.dev.js +29 -5
- package/Stream/dist/effect-platform-node-Stream.cjs.prod.js +29 -5
- package/Stream/dist/effect-platform-node-Stream.esm.js +30 -2
- package/dist/{FormData-053407d4.cjs.dev.js → FormData-15af6672.cjs.dev.js} +1 -1
- package/dist/{FormData-bafc0b9a.esm.js → FormData-5ea8a8b6.esm.js} +1 -1
- package/dist/{FormData-c7339a7b.cjs.prod.js → FormData-d91e8016.cjs.prod.js} +1 -1
- package/dist/{NodeClient-ea1a9ab0.cjs.prod.js → NodeClient-3432a6a8.cjs.prod.js} +2 -2
- package/dist/{NodeClient-e349733e.esm.js → NodeClient-cd56cae8.esm.js} +2 -2
- package/dist/{NodeClient-1df9d813.cjs.dev.js → NodeClient-ebd71893.cjs.dev.js} +2 -2
- package/dist/{Server-ea100887.cjs.prod.js → Server-33a0b014.cjs.prod.js} +17 -13
- package/dist/{Server-264c702d.cjs.dev.js → Server-cf266586.cjs.dev.js} +17 -13
- package/dist/{Server-5237fa52.esm.js → Server-eb4f8a51.esm.js} +16 -13
- package/dist/declarations/src/Error.d.ts +7 -6
- package/dist/declarations/src/Error.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/effect-platform-node.cjs.dev.js +58 -86
- package/dist/effect-platform-node.cjs.prod.js +58 -86
- package/dist/effect-platform-node.esm.js +26 -73
- package/dist/{formData-fac89256.cjs.dev.js → formData-632b1146.cjs.dev.js} +1 -1
- package/dist/{formData-4330f230.esm.js → formData-dd75bbe1.esm.js} +1 -1
- package/dist/{formData-09ad7f6d.cjs.prod.js → formData-ecf6742b.cjs.prod.js} +1 -1
- package/dist/{incomingMessage-12764c2c.esm.js → incomingMessage-11c9bea6.esm.js} +1 -1
- package/dist/{incomingMessage-8a9a29f7.cjs.prod.js → incomingMessage-86bcf94d.cjs.dev.js} +1 -1
- package/dist/{incomingMessage-d7f144e7.cjs.dev.js → incomingMessage-f56be93e.cjs.prod.js} +1 -1
- package/dist/{platform-f3d31bb1.esm.js → platform-2c00c2c5.esm.js} +1 -1
- package/dist/{platform-1c31462c.cjs.dev.js → platform-5b27475e.cjs.dev.js} +1 -1
- package/dist/{platform-d09ef04f.cjs.prod.js → platform-80b90f07.cjs.prod.js} +1 -1
- package/package.json +8 -5
- package/src/Error.ts +9 -6
- package/src/index.ts +13 -13
- package/src/internal/http/server.ts +24 -16
- package/dist/Command-15b84341.cjs.dev.js +0 -29
- package/dist/Command-2fc875e9.cjs.prod.js +0 -29
- package/dist/Command-56d67f13.esm.js +0 -27
- package/dist/CommandExecutor-b7cb55b8.cjs.dev.js +0 -195
- package/dist/CommandExecutor-bccc7563.cjs.prod.js +0 -195
- package/dist/CommandExecutor-cfc0af4b.esm.js +0 -165
- package/dist/Effectify-1676f59e.cjs.prod.js +0 -14
- package/dist/Effectify-24bba5b0.esm.js +0 -12
- package/dist/Effectify-c94620ca.cjs.dev.js +0 -14
- package/dist/Error-004c8162.cjs.prod.js +0 -18
- package/dist/Error-6b032e84.esm.js +0 -16
- package/dist/Error-6db0ba89.cjs.dev.js +0 -18
- package/dist/FileSystem-a207377d.cjs.prod.js +0 -433
- package/dist/FileSystem-d4a3521c.esm.js +0 -403
- package/dist/FileSystem-d7b8eeac.cjs.dev.js +0 -433
- package/dist/HttpClient-11e2237f.esm.js +0 -26
- package/dist/HttpClient-19998c5e.cjs.dev.js +0 -54
- package/dist/HttpClient-1ad217ea.cjs.prod.js +0 -54
- package/dist/HttpServer-08393436.esm.js +0 -34
- package/dist/HttpServer-6652ce27.cjs.dev.js +0 -64
- package/dist/HttpServer-d510f888.cjs.prod.js +0 -64
- package/dist/KeyValueStore-35cb6494.cjs.prod.js +0 -62
- package/dist/KeyValueStore-66bca5fd.esm.js +0 -38
- package/dist/KeyValueStore-af7495b6.cjs.dev.js +0 -62
- package/dist/NodeContext-3c96e955.cjs.dev.js +0 -50
- package/dist/NodeContext-4bca6ed4.esm.js +0 -27
- package/dist/NodeContext-dff7bc0b.cjs.prod.js +0 -50
- package/dist/Path-7a81561f.esm.js +0 -76
- package/dist/Path-bf4c3b07.cjs.prod.js +0 -104
- package/dist/Path-feae3dcf.cjs.dev.js +0 -104
- package/dist/Runtime-3bc7ee1e.esm.js +0 -44
- package/dist/Runtime-6aeac6f0.cjs.dev.js +0 -68
- package/dist/Runtime-e746c66d.cjs.prod.js +0 -68
- package/dist/Sink-536c2b16.cjs.dev.js +0 -26
- package/dist/Sink-554d2819.esm.js +0 -23
- package/dist/Sink-735101fa.cjs.prod.js +0 -26
- package/dist/Stream-2d5b1ece.esm.js +0 -37
- package/dist/Stream-53f57af5.cjs.dev.js +0 -42
- package/dist/Stream-7424efca.cjs.prod.js +0 -42
|
@@ -2,92 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
require('@effect/platform/Command');
|
|
19
|
-
require('@effect/platform/CommandExecutor');
|
|
20
|
-
require('@effect/platform/FileSystem');
|
|
21
|
-
require('effect/Effect');
|
|
22
|
-
require('effect/Function');
|
|
23
|
-
require('effect/Layer');
|
|
24
|
-
require('effect/Option');
|
|
25
|
-
require('effect/Sink');
|
|
26
|
-
require('effect/Stream');
|
|
27
|
-
require('node:child_process');
|
|
28
|
-
require('./error-4f074a3a.cjs.prod.js');
|
|
29
|
-
require('@effect/platform/Error');
|
|
30
|
-
require('./sink-da49e187.cjs.prod.js');
|
|
31
|
-
require('./stream-ef8b6a66.cjs.prod.js');
|
|
32
|
-
require('@effect/platform/Effectify');
|
|
33
|
-
require('node:crypto');
|
|
34
|
-
require('node:fs');
|
|
35
|
-
require('node:os');
|
|
36
|
-
require('node:path');
|
|
37
|
-
require('@effect/platform/Http/Body');
|
|
38
|
-
require('@effect/platform/Http/Client');
|
|
39
|
-
require('@effect/platform/Http/ClientError');
|
|
40
|
-
require('@effect/platform/Http/ClientRequest');
|
|
41
|
-
require('@effect/platform/Http/ClientResponse');
|
|
42
|
-
require('@effect/platform/Http/Headers');
|
|
43
|
-
require('@effect/platform/Http/UrlParams');
|
|
44
|
-
require('./NodeClient-ea1a9ab0.cjs.prod.js');
|
|
45
|
-
require('effect/Context');
|
|
46
|
-
require('node:http');
|
|
47
|
-
require('node:https');
|
|
48
|
-
require('node:stream');
|
|
49
|
-
require('node:stream/promises');
|
|
50
|
-
require('./incomingMessage-8a9a29f7.cjs.prod.js');
|
|
51
|
-
require('@effect/platform/Http/IncomingMessage');
|
|
52
|
-
require('effect/FiberRef');
|
|
53
|
-
require('@effect/platform/Http/App');
|
|
54
|
-
require('@effect/platform/Http/Middleware');
|
|
55
|
-
require('@effect/platform/Http/Router');
|
|
56
|
-
require('@effect/platform/Http/ServerError');
|
|
57
|
-
require('@effect/platform/Http/ServerRequest');
|
|
58
|
-
require('@effect/platform/Http/ServerResponse');
|
|
59
|
-
require('./Etag-7a3db878.cjs.prod.js');
|
|
60
|
-
require('@effect/platform/Http/Etag');
|
|
61
|
-
require('./FormData-c7339a7b.cjs.prod.js');
|
|
62
|
-
require('./formData-09ad7f6d.cjs.prod.js');
|
|
63
|
-
require('@effect/platform/Http/FormData');
|
|
64
|
-
require('@effect/platform/Path');
|
|
65
|
-
require('busboy');
|
|
66
|
-
require('effect/Chunk');
|
|
67
|
-
require('./Server-ea100887.cjs.prod.js');
|
|
68
|
-
require('@effect/platform/Http/Server');
|
|
69
|
-
require('effect/Config');
|
|
70
|
-
require('effect/Fiber');
|
|
71
|
-
require('effect/Runtime');
|
|
72
|
-
require('./platform-d09ef04f.cjs.prod.js');
|
|
73
|
-
require('@effect/platform/Http/Platform');
|
|
74
|
-
require('mime');
|
|
75
|
-
require('@effect/platform/KeyValueStore');
|
|
76
|
-
require('node:url');
|
|
77
|
-
require('@effect/platform/Runtime');
|
|
5
|
+
var Command = require('@effect/platform-node/Command');
|
|
6
|
+
var CommandExecutor = require('@effect/platform-node/CommandExecutor');
|
|
7
|
+
var Effectify = require('@effect/platform-node/Effectify');
|
|
8
|
+
var Error$1 = require('@effect/platform-node/Error');
|
|
9
|
+
var FileSystem = require('@effect/platform-node/FileSystem');
|
|
10
|
+
var HttpClient = require('@effect/platform-node/HttpClient');
|
|
11
|
+
var HttpServer = require('@effect/platform-node/HttpServer');
|
|
12
|
+
var KeyValueStore = require('@effect/platform-node/KeyValueStore');
|
|
13
|
+
var NodeContext = require('@effect/platform-node/NodeContext');
|
|
14
|
+
var Path = require('@effect/platform-node/Path');
|
|
15
|
+
var Runtime = require('@effect/platform-node/Runtime');
|
|
16
|
+
var Sink = require('@effect/platform-node/Sink');
|
|
17
|
+
var Stream = require('@effect/platform-node/Stream');
|
|
78
18
|
|
|
19
|
+
function _interopNamespace(e) {
|
|
20
|
+
if (e && e.__esModule) return e;
|
|
21
|
+
var n = Object.create(null);
|
|
22
|
+
if (e) {
|
|
23
|
+
Object.keys(e).forEach(function (k) {
|
|
24
|
+
if (k !== 'default') {
|
|
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
|
+
n["default"] = e;
|
|
34
|
+
return Object.freeze(n);
|
|
35
|
+
}
|
|
79
36
|
|
|
37
|
+
var Command__namespace = /*#__PURE__*/_interopNamespace(Command);
|
|
38
|
+
var CommandExecutor__namespace = /*#__PURE__*/_interopNamespace(CommandExecutor);
|
|
39
|
+
var Effectify__namespace = /*#__PURE__*/_interopNamespace(Effectify);
|
|
40
|
+
var Error__namespace = /*#__PURE__*/_interopNamespace(Error$1);
|
|
41
|
+
var FileSystem__namespace = /*#__PURE__*/_interopNamespace(FileSystem);
|
|
42
|
+
var HttpClient__namespace = /*#__PURE__*/_interopNamespace(HttpClient);
|
|
43
|
+
var HttpServer__namespace = /*#__PURE__*/_interopNamespace(HttpServer);
|
|
44
|
+
var KeyValueStore__namespace = /*#__PURE__*/_interopNamespace(KeyValueStore);
|
|
45
|
+
var NodeContext__namespace = /*#__PURE__*/_interopNamespace(NodeContext);
|
|
46
|
+
var Path__namespace = /*#__PURE__*/_interopNamespace(Path);
|
|
47
|
+
var Runtime__namespace = /*#__PURE__*/_interopNamespace(Runtime);
|
|
48
|
+
var Sink__namespace = /*#__PURE__*/_interopNamespace(Sink);
|
|
49
|
+
var Stream__namespace = /*#__PURE__*/_interopNamespace(Stream);
|
|
80
50
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
exports.
|
|
84
|
-
exports.
|
|
85
|
-
exports.
|
|
86
|
-
exports.
|
|
87
|
-
exports.
|
|
88
|
-
exports.
|
|
89
|
-
exports.
|
|
90
|
-
exports.
|
|
91
|
-
exports.
|
|
92
|
-
exports.
|
|
93
|
-
exports.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
exports.Command = Command__namespace;
|
|
54
|
+
exports.CommandExecutor = CommandExecutor__namespace;
|
|
55
|
+
exports.Effectify = Effectify__namespace;
|
|
56
|
+
exports.Error = Error__namespace;
|
|
57
|
+
exports.FileSystem = FileSystem__namespace;
|
|
58
|
+
exports.HttpClient = HttpClient__namespace;
|
|
59
|
+
exports.HttpServer = HttpServer__namespace;
|
|
60
|
+
exports.KeyValueStore = KeyValueStore__namespace;
|
|
61
|
+
exports.NodeContext = NodeContext__namespace;
|
|
62
|
+
exports.Path = Path__namespace;
|
|
63
|
+
exports.Runtime = Runtime__namespace;
|
|
64
|
+
exports.Sink = Sink__namespace;
|
|
65
|
+
exports.Stream = Stream__namespace;
|
|
@@ -1,73 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import '@effect/platform/
|
|
16
|
-
|
|
17
|
-
import 'effect/
|
|
18
|
-
|
|
19
|
-
import 'effect/
|
|
20
|
-
|
|
21
|
-
import 'effect/
|
|
22
|
-
|
|
23
|
-
import 'node
|
|
24
|
-
|
|
25
|
-
import '@effect/platform/
|
|
26
|
-
|
|
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-e349733e.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-12764c2c.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-5237fa52.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';
|
|
1
|
+
import * as Command from '@effect/platform-node/Command';
|
|
2
|
+
export { Command };
|
|
3
|
+
import * as CommandExecutor from '@effect/platform-node/CommandExecutor';
|
|
4
|
+
export { CommandExecutor };
|
|
5
|
+
import * as Effectify from '@effect/platform-node/Effectify';
|
|
6
|
+
export { Effectify };
|
|
7
|
+
import * as Error$1 from '@effect/platform-node/Error';
|
|
8
|
+
export { Error$1 as Error };
|
|
9
|
+
import * as FileSystem from '@effect/platform-node/FileSystem';
|
|
10
|
+
export { FileSystem };
|
|
11
|
+
import * as HttpClient from '@effect/platform-node/HttpClient';
|
|
12
|
+
export { HttpClient };
|
|
13
|
+
import * as HttpServer from '@effect/platform-node/HttpServer';
|
|
14
|
+
export { HttpServer };
|
|
15
|
+
import * as KeyValueStore from '@effect/platform-node/KeyValueStore';
|
|
16
|
+
export { KeyValueStore };
|
|
17
|
+
import * as NodeContext from '@effect/platform-node/NodeContext';
|
|
18
|
+
export { NodeContext };
|
|
19
|
+
import * as Path from '@effect/platform-node/Path';
|
|
20
|
+
export { Path };
|
|
21
|
+
import * as Runtime from '@effect/platform-node/Runtime';
|
|
22
|
+
export { Runtime };
|
|
23
|
+
import * as Sink from '@effect/platform-node/Sink';
|
|
24
|
+
export { Sink };
|
|
25
|
+
import * as Stream from '@effect/platform-node/Stream';
|
|
26
|
+
export { Stream };
|
|
@@ -12,7 +12,7 @@ var Option = require('effect/Option');
|
|
|
12
12
|
var Stream = require('effect/Stream');
|
|
13
13
|
var NFS = require('node:fs');
|
|
14
14
|
var NodeStreamP = require('node:stream/promises');
|
|
15
|
-
var Stream_dist_effectPlatformNodeStream = require('
|
|
15
|
+
var Stream_dist_effectPlatformNodeStream = require('../Stream/dist/effect-platform-node-Stream.cjs.dev.js');
|
|
16
16
|
|
|
17
17
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
18
18
|
|
|
@@ -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 {
|
|
13
|
+
import { fromReadable, toString } from '../Stream/dist/effect-platform-node-Stream.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,
|
|
@@ -12,7 +12,7 @@ var Option = require('effect/Option');
|
|
|
12
12
|
var Stream = require('effect/Stream');
|
|
13
13
|
var NFS = require('node:fs');
|
|
14
14
|
var NodeStreamP = require('node:stream/promises');
|
|
15
|
-
var Stream_dist_effectPlatformNodeStream = require('
|
|
15
|
+
var Stream_dist_effectPlatformNodeStream = require('../Stream/dist/effect-platform-node-Stream.cjs.prod.js');
|
|
16
16
|
|
|
17
17
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
18
18
|
|
|
@@ -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 {
|
|
7
|
+
import { toString, fromReadable, toUint8Array } from '../Stream/dist/effect-platform-node-Stream.esm.js';
|
|
8
8
|
|
|
9
9
|
/** @internal */
|
|
10
10
|
class IncomingMessageImpl {
|
|
@@ -6,7 +6,7 @@ var UrlParams = require('@effect/platform/Http/UrlParams');
|
|
|
6
6
|
var Effect = require('effect/Effect');
|
|
7
7
|
var FiberRef = require('effect/FiberRef');
|
|
8
8
|
var Option = require('effect/Option');
|
|
9
|
-
var Stream_dist_effectPlatformNodeStream = require('
|
|
9
|
+
var Stream_dist_effectPlatformNodeStream = require('../Stream/dist/effect-platform-node-Stream.cjs.dev.js');
|
|
10
10
|
|
|
11
11
|
function _interopNamespace(e) {
|
|
12
12
|
if (e && e.__esModule) return e;
|
|
@@ -6,7 +6,7 @@ var UrlParams = require('@effect/platform/Http/UrlParams');
|
|
|
6
6
|
var Effect = require('effect/Effect');
|
|
7
7
|
var FiberRef = require('effect/FiberRef');
|
|
8
8
|
var Option = require('effect/Option');
|
|
9
|
-
var Stream_dist_effectPlatformNodeStream = require('
|
|
9
|
+
var Stream_dist_effectPlatformNodeStream = require('../Stream/dist/effect-platform-node-Stream.cjs.prod.js');
|
|
10
10
|
|
|
11
11
|
function _interopNamespace(e) {
|
|
12
12
|
if (e && e.__esModule) return e;
|
|
@@ -5,7 +5,7 @@ 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 {
|
|
8
|
+
import { layer as layer$1 } from '../FileSystem/dist/effect-platform-node-FileSystem.esm.js';
|
|
9
9
|
import { l as layer$2 } from './Etag-6f08d5ed.esm.js';
|
|
10
10
|
|
|
11
11
|
/** @internal */
|
|
@@ -7,7 +7,7 @@ var Layer = require('effect/Layer');
|
|
|
7
7
|
var Mime = require('mime');
|
|
8
8
|
var NFS = require('node:fs');
|
|
9
9
|
var node_stream = require('node:stream');
|
|
10
|
-
var FileSystem_dist_effectPlatformNodeFileSystem = require('
|
|
10
|
+
var FileSystem_dist_effectPlatformNodeFileSystem = require('../FileSystem/dist/effect-platform-node-FileSystem.cjs.dev.js');
|
|
11
11
|
var Http_Etag_dist_effectPlatformNodeHttpEtag = require('./Etag-b38be81c.cjs.dev.js');
|
|
12
12
|
|
|
13
13
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -7,7 +7,7 @@ var Layer = require('effect/Layer');
|
|
|
7
7
|
var Mime = require('mime');
|
|
8
8
|
var NFS = require('node:fs');
|
|
9
9
|
var node_stream = require('node:stream');
|
|
10
|
-
var FileSystem_dist_effectPlatformNodeFileSystem = require('
|
|
10
|
+
var FileSystem_dist_effectPlatformNodeFileSystem = require('../FileSystem/dist/effect-platform-node-FileSystem.cjs.prod.js');
|
|
11
11
|
var Http_Etag_dist_effectPlatformNodeHttpEtag = require('./Etag-7a3db878.cjs.prod.js');
|
|
12
12
|
|
|
13
13
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/platform-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
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",
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
"importConditionDefaultExport": "default"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
+
"effect": {
|
|
18
|
+
"generateIndex": true
|
|
19
|
+
},
|
|
17
20
|
"publishConfig": {
|
|
18
21
|
"access": "public"
|
|
19
22
|
},
|
|
@@ -30,18 +33,18 @@
|
|
|
30
33
|
"license": "MIT",
|
|
31
34
|
"sideEffects": false,
|
|
32
35
|
"devDependencies": {
|
|
33
|
-
"@effect/schema": "^0.
|
|
36
|
+
"@effect/schema": "^0.40.0",
|
|
34
37
|
"@types/busboy": "^1.5.1",
|
|
35
38
|
"@types/mime": "^3.0.2",
|
|
36
|
-
"effect": "2.0.0-next.
|
|
39
|
+
"effect": "2.0.0-next.45"
|
|
37
40
|
},
|
|
38
41
|
"peerDependencies": {
|
|
39
|
-
"effect": "^2.0.0-next.
|
|
42
|
+
"effect": "^2.0.0-next.45"
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {
|
|
42
45
|
"busboy": "^1.6.0",
|
|
43
46
|
"mime": "^3.0.0",
|
|
44
|
-
"@effect/platform": "^0.
|
|
47
|
+
"@effect/platform": "^0.19.0"
|
|
45
48
|
},
|
|
46
49
|
"files": [
|
|
47
50
|
"src",
|
package/src/Error.ts
CHANGED
|
@@ -8,11 +8,6 @@ export {
|
|
|
8
8
|
* @category error
|
|
9
9
|
*/
|
|
10
10
|
BadArgument,
|
|
11
|
-
/**
|
|
12
|
-
* @since 1.0.0
|
|
13
|
-
* @category error
|
|
14
|
-
*/
|
|
15
|
-
PlatformError,
|
|
16
11
|
/**
|
|
17
12
|
* @since 1.0.0
|
|
18
13
|
* @category type id
|
|
@@ -22,7 +17,15 @@ export {
|
|
|
22
17
|
* @since 1.0.0
|
|
23
18
|
* @category error
|
|
24
19
|
*/
|
|
25
|
-
SystemError
|
|
20
|
+
SystemError
|
|
21
|
+
} from "@effect/platform/Error"
|
|
22
|
+
|
|
23
|
+
export type {
|
|
24
|
+
/**
|
|
25
|
+
* @since 1.0.0
|
|
26
|
+
* @category model
|
|
27
|
+
*/
|
|
28
|
+
PlatformError,
|
|
26
29
|
/**
|
|
27
30
|
* @since 1.0.0
|
|
28
31
|
* @category model
|
package/src/index.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
|
-
export * as Command from "
|
|
4
|
+
export * as Command from "@effect/platform-node/Command"
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @since 1.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * as CommandExecutor from "
|
|
9
|
+
export * as CommandExecutor from "@effect/platform-node/CommandExecutor"
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @since 1.0.0
|
|
13
13
|
*/
|
|
14
|
-
export * as Effectify from "
|
|
14
|
+
export * as Effectify from "@effect/platform-node/Effectify"
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @since 1.0.0
|
|
18
18
|
*/
|
|
19
|
-
export * as Error from "
|
|
19
|
+
export * as Error from "@effect/platform-node/Error"
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @since 1.0.0
|
|
23
23
|
*/
|
|
24
|
-
export * as FileSystem from "
|
|
24
|
+
export * as FileSystem from "@effect/platform-node/FileSystem"
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* @since 1.0.0
|
|
28
28
|
*/
|
|
29
|
-
export * as HttpClient from "
|
|
29
|
+
export * as HttpClient from "@effect/platform-node/HttpClient"
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* @since 1.0.0
|
|
33
33
|
*/
|
|
34
|
-
export * as HttpServer from "
|
|
34
|
+
export * as HttpServer from "@effect/platform-node/HttpServer"
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* @since 1.0.0
|
|
38
38
|
*
|
|
39
39
|
* Also includes exports from [`@effect/platform/KeyValueStore`](https://effect-ts.github.io/platform/platform/KeyValueStore.ts.html).
|
|
40
40
|
*/
|
|
41
|
-
export * as KeyValueStore from "
|
|
41
|
+
export * as KeyValueStore from "@effect/platform-node/KeyValueStore"
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* @since 1.0.0
|
|
45
45
|
*/
|
|
46
|
-
export * as NodeContext from "
|
|
46
|
+
export * as NodeContext from "@effect/platform-node/NodeContext"
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* @since 1.0.0
|
|
50
50
|
*/
|
|
51
|
-
export * as Path from "
|
|
51
|
+
export * as Path from "@effect/platform-node/Path"
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* @since 1.0.0
|
|
55
55
|
*/
|
|
56
|
-
export * as Runtime from "
|
|
56
|
+
export * as Runtime from "@effect/platform-node/Runtime"
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* @since 1.0.0
|
|
60
60
|
*/
|
|
61
|
-
export * as Sink from "
|
|
61
|
+
export * as Sink from "@effect/platform-node/Sink"
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* @since 1.0.0
|
|
65
65
|
*/
|
|
66
|
-
export * as Stream from "
|
|
66
|
+
export * as Stream from "@effect/platform-node/Stream"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as FileSystem from "@effect/platform/FileSystem"
|
|
2
|
+
import * as App from "@effect/platform/Http/App"
|
|
2
3
|
import type * as FormData from "@effect/platform/Http/FormData"
|
|
3
4
|
import type * as Headers from "@effect/platform/Http/Headers"
|
|
4
5
|
import * as IncomingMessage from "@effect/platform/Http/IncomingMessage"
|
|
@@ -112,22 +113,29 @@ export const make = (
|
|
|
112
113
|
)
|
|
113
114
|
)
|
|
114
115
|
|
|
115
|
-
const respond = Middleware.make((httpApp) =>
|
|
116
|
-
Effect.flatMap(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
(
|
|
120
|
-
Effect.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
116
|
+
const respond = Middleware.make((httpApp) => {
|
|
117
|
+
return Effect.flatMap(
|
|
118
|
+
App.preResponseHandler,
|
|
119
|
+
(preResponse) =>
|
|
120
|
+
Effect.flatMap(ServerRequest.ServerRequest, (request) =>
|
|
121
|
+
Effect.tapErrorCause(
|
|
122
|
+
Effect.tap(
|
|
123
|
+
Effect.flatMap(httpApp, (response) => preResponse(request, response)),
|
|
124
|
+
(response) => handleResponse(request, response)
|
|
125
|
+
),
|
|
126
|
+
(_cause) =>
|
|
127
|
+
Effect.sync(() => {
|
|
128
|
+
const nodeResponse = (request as ServerRequestImpl).response
|
|
129
|
+
if (!nodeResponse.headersSent) {
|
|
130
|
+
nodeResponse.writeHead(500)
|
|
131
|
+
}
|
|
132
|
+
if (!nodeResponse.writableEnded) {
|
|
133
|
+
nodeResponse.end()
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
))
|
|
137
|
+
)
|
|
138
|
+
})
|
|
131
139
|
|
|
132
140
|
class ServerRequestImpl extends IncomingMessageImpl<Error.RequestError> implements ServerRequest.ServerRequest {
|
|
133
141
|
readonly [ServerRequest.TypeId]: ServerRequest.TypeId
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Command$1 = require('@effect/platform/Command');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @since 1.0.0
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
var Command = /*#__PURE__*/Object.freeze({
|
|
10
|
-
__proto__: null,
|
|
11
|
-
env: Command$1.env,
|
|
12
|
-
exitCode: Command$1.exitCode,
|
|
13
|
-
feed: Command$1.feed,
|
|
14
|
-
flatten: Command$1.flatten,
|
|
15
|
-
isCommand: Command$1.isCommand,
|
|
16
|
-
lines: Command$1.lines,
|
|
17
|
-
make: Command$1.make,
|
|
18
|
-
pipeTo: Command$1.pipeTo,
|
|
19
|
-
start: Command$1.start,
|
|
20
|
-
stderr: Command$1.stderr,
|
|
21
|
-
stdin: Command$1.stdin,
|
|
22
|
-
stdout: Command$1.stdout,
|
|
23
|
-
stream: Command$1.stream,
|
|
24
|
-
streamLines: Command$1.streamLines,
|
|
25
|
-
string: Command$1.string,
|
|
26
|
-
workingDirectory: Command$1.workingDirectory
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
exports.Command = Command;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Command$1 = require('@effect/platform/Command');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @since 1.0.0
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
var Command = /*#__PURE__*/Object.freeze({
|
|
10
|
-
__proto__: null,
|
|
11
|
-
env: Command$1.env,
|
|
12
|
-
exitCode: Command$1.exitCode,
|
|
13
|
-
feed: Command$1.feed,
|
|
14
|
-
flatten: Command$1.flatten,
|
|
15
|
-
isCommand: Command$1.isCommand,
|
|
16
|
-
lines: Command$1.lines,
|
|
17
|
-
make: Command$1.make,
|
|
18
|
-
pipeTo: Command$1.pipeTo,
|
|
19
|
-
start: Command$1.start,
|
|
20
|
-
stderr: Command$1.stderr,
|
|
21
|
-
stdin: Command$1.stdin,
|
|
22
|
-
stdout: Command$1.stdout,
|
|
23
|
-
stream: Command$1.stream,
|
|
24
|
-
streamLines: Command$1.streamLines,
|
|
25
|
-
string: Command$1.string,
|
|
26
|
-
workingDirectory: Command$1.workingDirectory
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
exports.Command = Command;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { env, exitCode, feed, flatten, isCommand, lines, make, pipeTo, start, stderr, stdin, stdout, stream, streamLines, string, workingDirectory } from '@effect/platform/Command';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @since 1.0.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
var Command = /*#__PURE__*/Object.freeze({
|
|
8
|
-
__proto__: null,
|
|
9
|
-
env: env,
|
|
10
|
-
exitCode: exitCode,
|
|
11
|
-
feed: feed,
|
|
12
|
-
flatten: flatten,
|
|
13
|
-
isCommand: isCommand,
|
|
14
|
-
lines: lines,
|
|
15
|
-
make: make,
|
|
16
|
-
pipeTo: pipeTo,
|
|
17
|
-
start: start,
|
|
18
|
-
stderr: stderr,
|
|
19
|
-
stdin: stdin,
|
|
20
|
-
stdout: stdout,
|
|
21
|
-
stream: stream,
|
|
22
|
-
streamLines: streamLines,
|
|
23
|
-
string: string,
|
|
24
|
-
workingDirectory: workingDirectory
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export { Command as C };
|