@effect/platform-node 0.19.9 → 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 -6
- package/Error/dist/effect-platform-node-Error.cjs.prod.js +6 -6
- 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/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/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-1e8c05fb.esm.js +0 -14
- package/dist/Error-243639ac.cjs.dev.js +0 -16
- package/dist/Error-eaa907c8.cjs.prod.js +0 -16
- 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
|
@@ -1,433 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Effectify = require('@effect/platform/Effectify');
|
|
4
|
-
var Error = require('@effect/platform/Error');
|
|
5
|
-
var FileSystem$1 = require('@effect/platform/FileSystem');
|
|
6
|
-
var Effect = require('effect/Effect');
|
|
7
|
-
var Function = require('effect/Function');
|
|
8
|
-
var Layer = require('effect/Layer');
|
|
9
|
-
var Option = require('effect/Option');
|
|
10
|
-
var Crypto = require('node:crypto');
|
|
11
|
-
var NFS = require('node:fs');
|
|
12
|
-
var OS = require('node:os');
|
|
13
|
-
var NodePath = require('node:path');
|
|
14
|
-
var error = require('./error-e477c10b.cjs.dev.js');
|
|
15
|
-
|
|
16
|
-
function _interopNamespace(e) {
|
|
17
|
-
if (e && e.__esModule) return e;
|
|
18
|
-
var n = Object.create(null);
|
|
19
|
-
if (e) {
|
|
20
|
-
Object.keys(e).forEach(function (k) {
|
|
21
|
-
if (k !== 'default') {
|
|
22
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
23
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () { return e[k]; }
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
n["default"] = e;
|
|
31
|
-
return Object.freeze(n);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
|
|
35
|
-
var FileSystem__namespace = /*#__PURE__*/_interopNamespace(FileSystem$1);
|
|
36
|
-
var Effect__namespace = /*#__PURE__*/_interopNamespace(Effect);
|
|
37
|
-
var Layer__namespace = /*#__PURE__*/_interopNamespace(Layer);
|
|
38
|
-
var Option__namespace = /*#__PURE__*/_interopNamespace(Option);
|
|
39
|
-
var Crypto__namespace = /*#__PURE__*/_interopNamespace(Crypto);
|
|
40
|
-
var NFS__namespace = /*#__PURE__*/_interopNamespace(NFS);
|
|
41
|
-
var OS__namespace = /*#__PURE__*/_interopNamespace(OS);
|
|
42
|
-
var NodePath__namespace = /*#__PURE__*/_interopNamespace(NodePath);
|
|
43
|
-
|
|
44
|
-
const handleBadArgument = method => err => Error__namespace.BadArgument({
|
|
45
|
-
module: "FileSystem",
|
|
46
|
-
method,
|
|
47
|
-
message: err.message ?? String(err)
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// == access
|
|
51
|
-
|
|
52
|
-
const access = /*#__PURE__*/(() => {
|
|
53
|
-
const nodeAccess = /*#__PURE__*/Effectify.effectify(NFS__namespace.access, /*#__PURE__*/error.handleErrnoException("FileSystem", "access"), /*#__PURE__*/handleBadArgument("access"));
|
|
54
|
-
return (path, options) => {
|
|
55
|
-
let mode = NFS__namespace.constants.F_OK;
|
|
56
|
-
if (options?.readable) {
|
|
57
|
-
mode |= NFS__namespace.constants.R_OK;
|
|
58
|
-
}
|
|
59
|
-
if (options?.writable) {
|
|
60
|
-
mode |= NFS__namespace.constants.W_OK;
|
|
61
|
-
}
|
|
62
|
-
return nodeAccess(path, mode);
|
|
63
|
-
};
|
|
64
|
-
})();
|
|
65
|
-
|
|
66
|
-
// == copy
|
|
67
|
-
|
|
68
|
-
const copy = /*#__PURE__*/(() => {
|
|
69
|
-
const nodeCp = /*#__PURE__*/Effectify.effectify(NFS__namespace.cp, /*#__PURE__*/error.handleErrnoException("FileSystem", "copy"), /*#__PURE__*/handleBadArgument("copy"));
|
|
70
|
-
return (fromPath, toPath, options) => nodeCp(fromPath, toPath, {
|
|
71
|
-
force: options?.overwrite ?? false,
|
|
72
|
-
preserveTimestamps: options?.preserveTimestamps ?? false,
|
|
73
|
-
recursive: true
|
|
74
|
-
});
|
|
75
|
-
})();
|
|
76
|
-
|
|
77
|
-
// == copyFile
|
|
78
|
-
|
|
79
|
-
const copyFile = /*#__PURE__*/(() => {
|
|
80
|
-
const nodeCopyFile = /*#__PURE__*/Effectify.effectify(NFS__namespace.copyFile, /*#__PURE__*/error.handleErrnoException("FileSystem", "copyFile"), /*#__PURE__*/handleBadArgument("copyFile"));
|
|
81
|
-
return (fromPath, toPath) => nodeCopyFile(fromPath, toPath);
|
|
82
|
-
})();
|
|
83
|
-
|
|
84
|
-
// == chmod
|
|
85
|
-
|
|
86
|
-
const chmod = /*#__PURE__*/(() => {
|
|
87
|
-
const nodeChmod = /*#__PURE__*/Effectify.effectify(NFS__namespace.chmod, /*#__PURE__*/error.handleErrnoException("FileSystem", "chmod"), /*#__PURE__*/handleBadArgument("chmod"));
|
|
88
|
-
return (path, mode) => nodeChmod(path, mode);
|
|
89
|
-
})();
|
|
90
|
-
|
|
91
|
-
// == chown
|
|
92
|
-
|
|
93
|
-
const chown = /*#__PURE__*/(() => {
|
|
94
|
-
const nodeChown = /*#__PURE__*/Effectify.effectify(NFS__namespace.chown, /*#__PURE__*/error.handleErrnoException("FileSystem", "chown"), /*#__PURE__*/handleBadArgument("chown"));
|
|
95
|
-
return (path, uid, gid) => nodeChown(path, uid, gid);
|
|
96
|
-
})();
|
|
97
|
-
|
|
98
|
-
// == link
|
|
99
|
-
|
|
100
|
-
const link = /*#__PURE__*/(() => {
|
|
101
|
-
const nodeLink = /*#__PURE__*/Effectify.effectify(NFS__namespace.link, /*#__PURE__*/error.handleErrnoException("FileSystem", "link"), /*#__PURE__*/handleBadArgument("link"));
|
|
102
|
-
return (existingPath, newPath) => nodeLink(existingPath, newPath);
|
|
103
|
-
})();
|
|
104
|
-
|
|
105
|
-
// == makeDirectory
|
|
106
|
-
|
|
107
|
-
const makeDirectory = /*#__PURE__*/(() => {
|
|
108
|
-
const nodeMkdir = /*#__PURE__*/Effectify.effectify(NFS__namespace.mkdir, /*#__PURE__*/error.handleErrnoException("FileSystem", "makeDirectory"), /*#__PURE__*/handleBadArgument("makeDirectory"));
|
|
109
|
-
return (path, options) => nodeMkdir(path, {
|
|
110
|
-
recursive: options?.recursive ?? false,
|
|
111
|
-
mode: options?.mode
|
|
112
|
-
});
|
|
113
|
-
})();
|
|
114
|
-
|
|
115
|
-
// == makeTempDirectory
|
|
116
|
-
|
|
117
|
-
const makeTempDirectoryFactory = method => {
|
|
118
|
-
const nodeMkdtemp = Effectify.effectify(NFS__namespace.mkdtemp, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
119
|
-
return options => Effect__namespace.suspend(() => {
|
|
120
|
-
const prefix = options?.prefix ?? "";
|
|
121
|
-
const directory = typeof options?.directory === "string" ? NodePath__namespace.join(options.directory, ".") : OS__namespace.tmpdir();
|
|
122
|
-
return nodeMkdtemp(prefix ? NodePath__namespace.join(directory, prefix) : directory + "/");
|
|
123
|
-
});
|
|
124
|
-
};
|
|
125
|
-
const makeTempDirectory = /*#__PURE__*/makeTempDirectoryFactory("makeTempDirectory");
|
|
126
|
-
|
|
127
|
-
// == remove
|
|
128
|
-
|
|
129
|
-
const removeFactory = method => {
|
|
130
|
-
const nodeRm = Effectify.effectify(NFS__namespace.rm, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
131
|
-
return (path, options) => nodeRm(path, {
|
|
132
|
-
recursive: options?.recursive ?? false
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
|
-
const remove = /*#__PURE__*/removeFactory("remove");
|
|
136
|
-
|
|
137
|
-
// == makeTempDirectoryScoped
|
|
138
|
-
|
|
139
|
-
const makeTempDirectoryScoped = /*#__PURE__*/(() => {
|
|
140
|
-
const makeDirectory = /*#__PURE__*/makeTempDirectoryFactory("makeTempDirectoryScoped");
|
|
141
|
-
const removeDirectory = /*#__PURE__*/removeFactory("makeTempDirectoryScoped");
|
|
142
|
-
return options => Effect__namespace.acquireRelease(makeDirectory(options), directory => Effect__namespace.orDie(removeDirectory(directory, {
|
|
143
|
-
recursive: true
|
|
144
|
-
})));
|
|
145
|
-
})();
|
|
146
|
-
|
|
147
|
-
// == open
|
|
148
|
-
|
|
149
|
-
const openFactory = method => {
|
|
150
|
-
const nodeOpen = Effectify.effectify(NFS__namespace.open, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
151
|
-
const nodeClose = Effectify.effectify(NFS__namespace.close, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
152
|
-
return (path, options) => Function.pipe(Effect__namespace.acquireRelease(nodeOpen(path, options?.flag ?? "r", options?.mode), fd => Effect__namespace.orDie(nodeClose(fd))), Effect__namespace.map(fd => makeFile(FileSystem__namespace.FileDescriptor(fd), options?.flag?.startsWith("a") ?? false)));
|
|
153
|
-
};
|
|
154
|
-
const open = /*#__PURE__*/openFactory("open");
|
|
155
|
-
const makeFile = /*#__PURE__*/(() => {
|
|
156
|
-
const nodeReadFactory = method => Effectify.effectify(NFS__namespace.read, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
157
|
-
const nodeRead = /*#__PURE__*/nodeReadFactory("read");
|
|
158
|
-
const nodeReadAlloc = /*#__PURE__*/nodeReadFactory("readAlloc");
|
|
159
|
-
const nodeStat = /*#__PURE__*/Effectify.effectify(NFS__namespace.fstat, /*#__PURE__*/error.handleErrnoException("FileSystem", "stat"), /*#__PURE__*/handleBadArgument("stat"));
|
|
160
|
-
const nodeTruncate = /*#__PURE__*/Effectify.effectify(NFS__namespace.ftruncate, /*#__PURE__*/error.handleErrnoException("FileSystem", "truncate"), /*#__PURE__*/handleBadArgument("truncate"));
|
|
161
|
-
const nodeWriteFactory = method => Effectify.effectify(NFS__namespace.write, error.handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
162
|
-
const nodeWrite = /*#__PURE__*/nodeWriteFactory("write");
|
|
163
|
-
const nodeWriteAll = /*#__PURE__*/nodeWriteFactory("writeAll");
|
|
164
|
-
class FileImpl {
|
|
165
|
-
semaphore = Effect__namespace.unsafeMakeSemaphore(1);
|
|
166
|
-
position = 0n;
|
|
167
|
-
constructor(fd, append) {
|
|
168
|
-
this.fd = fd;
|
|
169
|
-
this.append = append;
|
|
170
|
-
this[FileSystem__namespace.FileTypeId] = FileSystem__namespace.FileTypeId;
|
|
171
|
-
}
|
|
172
|
-
get stat() {
|
|
173
|
-
return Effect__namespace.map(nodeStat(this.fd), makeFileInfo);
|
|
174
|
-
}
|
|
175
|
-
seek(offset, from) {
|
|
176
|
-
const offsetSize = FileSystem__namespace.Size(offset);
|
|
177
|
-
return this.semaphore.withPermits(1)(Effect__namespace.sync(() => {
|
|
178
|
-
if (from === "start") {
|
|
179
|
-
this.position = offsetSize;
|
|
180
|
-
} else if (from === "current") {
|
|
181
|
-
this.position = this.position + offsetSize;
|
|
182
|
-
}
|
|
183
|
-
return this.position;
|
|
184
|
-
}));
|
|
185
|
-
}
|
|
186
|
-
read(buffer) {
|
|
187
|
-
return this.semaphore.withPermits(1)(Effect__namespace.map(Effect__namespace.suspend(() => nodeRead(this.fd, {
|
|
188
|
-
buffer,
|
|
189
|
-
position: this.position
|
|
190
|
-
})), bytesRead => {
|
|
191
|
-
const sizeRead = FileSystem__namespace.Size(bytesRead);
|
|
192
|
-
this.position = this.position + sizeRead;
|
|
193
|
-
return sizeRead;
|
|
194
|
-
}));
|
|
195
|
-
}
|
|
196
|
-
readAlloc(size) {
|
|
197
|
-
const sizeNumber = Number(size);
|
|
198
|
-
return this.semaphore.withPermits(1)(Effect__namespace.flatMap(Effect__namespace.sync(() => Buffer.allocUnsafeSlow(sizeNumber)), buffer => Effect__namespace.map(nodeReadAlloc(this.fd, {
|
|
199
|
-
buffer,
|
|
200
|
-
position: this.position
|
|
201
|
-
}), bytesRead => {
|
|
202
|
-
if (bytesRead === 0) {
|
|
203
|
-
return Option__namespace.none();
|
|
204
|
-
}
|
|
205
|
-
this.position = this.position + BigInt(bytesRead);
|
|
206
|
-
if (bytesRead === sizeNumber) {
|
|
207
|
-
return Option__namespace.some(buffer);
|
|
208
|
-
}
|
|
209
|
-
const dst = Buffer.allocUnsafeSlow(bytesRead);
|
|
210
|
-
buffer.copy(dst, 0, 0, bytesRead);
|
|
211
|
-
return Option__namespace.some(dst);
|
|
212
|
-
})));
|
|
213
|
-
}
|
|
214
|
-
truncate(length) {
|
|
215
|
-
return this.semaphore.withPermits(1)(Effect__namespace.map(nodeTruncate(this.fd, length ? Number(length) : undefined), () => {
|
|
216
|
-
if (!this.append) {
|
|
217
|
-
const len = BigInt(length ?? 0);
|
|
218
|
-
if (this.position > len) {
|
|
219
|
-
this.position = len;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}));
|
|
223
|
-
}
|
|
224
|
-
write(buffer) {
|
|
225
|
-
return this.semaphore.withPermits(1)(Effect__namespace.map(Effect__namespace.suspend(() => nodeWrite(this.fd, buffer, undefined, undefined, this.append ? undefined : Number(this.position))), bytesWritten => {
|
|
226
|
-
const sizeWritten = FileSystem__namespace.Size(bytesWritten);
|
|
227
|
-
if (!this.append) {
|
|
228
|
-
this.position = this.position + sizeWritten;
|
|
229
|
-
}
|
|
230
|
-
return sizeWritten;
|
|
231
|
-
}));
|
|
232
|
-
}
|
|
233
|
-
writeAllChunk(buffer) {
|
|
234
|
-
return Effect__namespace.flatMap(Effect__namespace.suspend(() => nodeWriteAll(this.fd, buffer, undefined, undefined, this.append ? undefined : Number(this.position))), bytesWritten => {
|
|
235
|
-
if (bytesWritten === 0) {
|
|
236
|
-
return Effect__namespace.fail(Error__namespace.SystemError({
|
|
237
|
-
module: "FileSystem",
|
|
238
|
-
method: "writeAll",
|
|
239
|
-
reason: "WriteZero",
|
|
240
|
-
pathOrDescriptor: this.fd,
|
|
241
|
-
message: "write returned 0 bytes written"
|
|
242
|
-
}));
|
|
243
|
-
}
|
|
244
|
-
if (!this.append) {
|
|
245
|
-
this.position = this.position + BigInt(bytesWritten);
|
|
246
|
-
}
|
|
247
|
-
return bytesWritten < buffer.length ? this.writeAllChunk(buffer.subarray(bytesWritten)) : Effect__namespace.unit;
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
writeAll(buffer) {
|
|
251
|
-
return this.semaphore.withPermits(1)(this.writeAllChunk(buffer));
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return (fd, append) => new FileImpl(fd, append);
|
|
255
|
-
})();
|
|
256
|
-
|
|
257
|
-
// == makeTempFile
|
|
258
|
-
|
|
259
|
-
const makeTempFileFactory = method => {
|
|
260
|
-
const makeDirectory = makeTempDirectoryFactory(method);
|
|
261
|
-
const open = openFactory(method);
|
|
262
|
-
const randomHexString = bytes => Effect__namespace.sync(() => Crypto__namespace.randomBytes(bytes).toString("hex"));
|
|
263
|
-
return options => Function.pipe(Effect__namespace.zip(makeDirectory(options), randomHexString(6)), Effect__namespace.map(([directory, random]) => NodePath__namespace.join(directory, random)), Effect__namespace.tap(path => Effect__namespace.scoped(open(path, {
|
|
264
|
-
flag: "w+"
|
|
265
|
-
}))));
|
|
266
|
-
};
|
|
267
|
-
const makeTempFile = /*#__PURE__*/makeTempFileFactory("makeTempFile");
|
|
268
|
-
|
|
269
|
-
// == makeTempFileScoped
|
|
270
|
-
|
|
271
|
-
const makeTempFileScoped = /*#__PURE__*/(() => {
|
|
272
|
-
const makeFile = /*#__PURE__*/makeTempFileFactory("makeTempFileScoped");
|
|
273
|
-
const removeFile = /*#__PURE__*/removeFactory("makeTempFileScoped");
|
|
274
|
-
return options => Effect__namespace.acquireRelease(makeFile(options), file => Effect__namespace.orDie(removeFile(file)));
|
|
275
|
-
})();
|
|
276
|
-
|
|
277
|
-
// == readDirectory
|
|
278
|
-
|
|
279
|
-
const readDirectory = /*#__PURE__*/(() => {
|
|
280
|
-
const nodeReadDirectory = /*#__PURE__*/Effectify.effectify(NFS__namespace.readdir, /*#__PURE__*/error.handleErrnoException("FileSystem", "readDirectory"), /*#__PURE__*/handleBadArgument("readDirectory"));
|
|
281
|
-
return (path, options) => nodeReadDirectory(path, options);
|
|
282
|
-
})();
|
|
283
|
-
|
|
284
|
-
// == readFile
|
|
285
|
-
|
|
286
|
-
const readFile = path => Effect__namespace.async((resume, signal) => {
|
|
287
|
-
try {
|
|
288
|
-
NFS__namespace.readFile(path, {
|
|
289
|
-
signal
|
|
290
|
-
}, (err, data) => {
|
|
291
|
-
if (err) {
|
|
292
|
-
resume(Effect__namespace.fail(error.handleErrnoException("FileSystem", "readFile")(err, [path])));
|
|
293
|
-
} else {
|
|
294
|
-
resume(Effect__namespace.succeed(data));
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
} catch (err) {
|
|
298
|
-
resume(Effect__namespace.fail(handleBadArgument("readFile")(err)));
|
|
299
|
-
}
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
// == readLink
|
|
303
|
-
|
|
304
|
-
const readLink = /*#__PURE__*/(() => {
|
|
305
|
-
const nodeReadLink = /*#__PURE__*/Effectify.effectify(NFS__namespace.readlink, /*#__PURE__*/error.handleErrnoException("FileSystem", "readLink"), /*#__PURE__*/handleBadArgument("readLink"));
|
|
306
|
-
return path => nodeReadLink(path);
|
|
307
|
-
})();
|
|
308
|
-
|
|
309
|
-
// == realPath
|
|
310
|
-
|
|
311
|
-
const realPath = /*#__PURE__*/(() => {
|
|
312
|
-
const nodeRealPath = /*#__PURE__*/Effectify.effectify(NFS__namespace.realpath, /*#__PURE__*/error.handleErrnoException("FileSystem", "realPath"), /*#__PURE__*/handleBadArgument("realPath"));
|
|
313
|
-
return path => nodeRealPath(path);
|
|
314
|
-
})();
|
|
315
|
-
|
|
316
|
-
// == rename
|
|
317
|
-
|
|
318
|
-
const rename = /*#__PURE__*/(() => {
|
|
319
|
-
const nodeRename = /*#__PURE__*/Effectify.effectify(NFS__namespace.rename, /*#__PURE__*/error.handleErrnoException("FileSystem", "rename"), /*#__PURE__*/handleBadArgument("rename"));
|
|
320
|
-
return (oldPath, newPath) => nodeRename(oldPath, newPath);
|
|
321
|
-
})();
|
|
322
|
-
|
|
323
|
-
// == stat
|
|
324
|
-
|
|
325
|
-
const makeFileInfo = stat => ({
|
|
326
|
-
type: stat.isFile() ? "File" : stat.isDirectory() ? "Directory" : stat.isSymbolicLink() ? "SymbolicLink" : stat.isBlockDevice() ? "BlockDevice" : stat.isCharacterDevice() ? "CharacterDevice" : stat.isFIFO() ? "FIFO" : stat.isSocket() ? "Socket" : "Unknown",
|
|
327
|
-
mtime: Option__namespace.fromNullable(stat.mtime),
|
|
328
|
-
atime: Option__namespace.fromNullable(stat.atime),
|
|
329
|
-
birthtime: Option__namespace.fromNullable(stat.birthtime),
|
|
330
|
-
dev: stat.dev,
|
|
331
|
-
rdev: Option__namespace.fromNullable(stat.rdev),
|
|
332
|
-
ino: Option__namespace.fromNullable(stat.ino),
|
|
333
|
-
mode: stat.mode,
|
|
334
|
-
nlink: Option__namespace.fromNullable(stat.nlink),
|
|
335
|
-
uid: Option__namespace.fromNullable(stat.uid),
|
|
336
|
-
gid: Option__namespace.fromNullable(stat.gid),
|
|
337
|
-
size: FileSystem__namespace.Size(stat.size),
|
|
338
|
-
blksize: Option__namespace.fromNullable(FileSystem__namespace.Size(stat.blksize)),
|
|
339
|
-
blocks: Option__namespace.fromNullable(stat.blocks)
|
|
340
|
-
});
|
|
341
|
-
const stat = /*#__PURE__*/(() => {
|
|
342
|
-
const nodeStat = /*#__PURE__*/Effectify.effectify(NFS__namespace.stat, /*#__PURE__*/error.handleErrnoException("FileSystem", "stat"), /*#__PURE__*/handleBadArgument("stat"));
|
|
343
|
-
return path => Effect__namespace.map(nodeStat(path), makeFileInfo);
|
|
344
|
-
})();
|
|
345
|
-
|
|
346
|
-
// == symlink
|
|
347
|
-
|
|
348
|
-
const symlink = /*#__PURE__*/(() => {
|
|
349
|
-
const nodeSymlink = /*#__PURE__*/Effectify.effectify(NFS__namespace.symlink, /*#__PURE__*/error.handleErrnoException("FileSystem", "symlink"), /*#__PURE__*/handleBadArgument("symlink"));
|
|
350
|
-
return (target, path) => nodeSymlink(target, path);
|
|
351
|
-
})();
|
|
352
|
-
|
|
353
|
-
// == truncate
|
|
354
|
-
|
|
355
|
-
const truncate = /*#__PURE__*/(() => {
|
|
356
|
-
const nodeTruncate = /*#__PURE__*/Effectify.effectify(NFS__namespace.truncate, /*#__PURE__*/error.handleErrnoException("FileSystem", "truncate"), /*#__PURE__*/handleBadArgument("truncate"));
|
|
357
|
-
return (path, length) => nodeTruncate(path, length !== undefined ? Number(length) : undefined);
|
|
358
|
-
})();
|
|
359
|
-
|
|
360
|
-
// == utimes
|
|
361
|
-
|
|
362
|
-
const utimes = /*#__PURE__*/(() => {
|
|
363
|
-
const nodeUtimes = /*#__PURE__*/Effectify.effectify(NFS__namespace.utimes, /*#__PURE__*/error.handleErrnoException("FileSystem", "utime"), /*#__PURE__*/handleBadArgument("utime"));
|
|
364
|
-
return (path, atime, mtime) => nodeUtimes(path, atime, mtime);
|
|
365
|
-
})();
|
|
366
|
-
|
|
367
|
-
// == writeFile
|
|
368
|
-
|
|
369
|
-
const writeFile = (path, data, options) => Effect__namespace.async((resume, signal) => {
|
|
370
|
-
try {
|
|
371
|
-
NFS__namespace.writeFile(path, data, {
|
|
372
|
-
signal,
|
|
373
|
-
flag: options?.flag,
|
|
374
|
-
mode: options?.mode
|
|
375
|
-
}, err => {
|
|
376
|
-
if (err) {
|
|
377
|
-
resume(Effect__namespace.fail(error.handleErrnoException("FileSystem", "writeFile")(err, [path])));
|
|
378
|
-
} else {
|
|
379
|
-
resume(Effect__namespace.unit);
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
} catch (err) {
|
|
383
|
-
resume(Effect__namespace.fail(handleBadArgument("writeFile")(err)));
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
const fileSystemImpl = /*#__PURE__*/FileSystem__namespace.make({
|
|
387
|
-
access,
|
|
388
|
-
chmod,
|
|
389
|
-
chown,
|
|
390
|
-
copy,
|
|
391
|
-
copyFile,
|
|
392
|
-
link,
|
|
393
|
-
makeDirectory,
|
|
394
|
-
makeTempDirectory,
|
|
395
|
-
makeTempDirectoryScoped,
|
|
396
|
-
makeTempFile,
|
|
397
|
-
makeTempFileScoped,
|
|
398
|
-
open,
|
|
399
|
-
readDirectory,
|
|
400
|
-
readFile,
|
|
401
|
-
readLink,
|
|
402
|
-
realPath,
|
|
403
|
-
remove,
|
|
404
|
-
rename,
|
|
405
|
-
stat,
|
|
406
|
-
symlink,
|
|
407
|
-
truncate,
|
|
408
|
-
utimes,
|
|
409
|
-
writeFile
|
|
410
|
-
});
|
|
411
|
-
|
|
412
|
-
/** @internal */
|
|
413
|
-
const layer$1 = /*#__PURE__*/Layer__namespace.succeed(FileSystem__namespace.FileSystem, fileSystemImpl);
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* @since 1.0.0
|
|
417
|
-
*/
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* @since 1.0.0
|
|
421
|
-
* @category layer
|
|
422
|
-
*/
|
|
423
|
-
const layer = layer$1;
|
|
424
|
-
|
|
425
|
-
var FileSystem = /*#__PURE__*/Object.freeze({
|
|
426
|
-
__proto__: null,
|
|
427
|
-
layer: layer,
|
|
428
|
-
FileSystem: FileSystem$1.FileSystem,
|
|
429
|
-
Size: FileSystem$1.Size
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
exports.FileSystem = FileSystem;
|
|
433
|
-
exports.layer = layer;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as Body from '@effect/platform/Http/Body';
|
|
2
|
-
import * as Client from '@effect/platform/Http/Client';
|
|
3
|
-
import * as Error from '@effect/platform/Http/ClientError';
|
|
4
|
-
import * as ClientRequest from '@effect/platform/Http/ClientRequest';
|
|
5
|
-
import * as ClientResponse from '@effect/platform/Http/ClientResponse';
|
|
6
|
-
import * as Headers from '@effect/platform/Http/Headers';
|
|
7
|
-
import * as UrlParams from '@effect/platform/Http/UrlParams';
|
|
8
|
-
import { N as NodeClient } from './NodeClient-e349733e.esm.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @since 1.0.0
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
var HttpClient = /*#__PURE__*/Object.freeze({
|
|
15
|
-
__proto__: null,
|
|
16
|
-
body: Body,
|
|
17
|
-
client: Client,
|
|
18
|
-
error: Error,
|
|
19
|
-
headers: Headers,
|
|
20
|
-
nodeClient: NodeClient,
|
|
21
|
-
request: ClientRequest,
|
|
22
|
-
response: ClientResponse,
|
|
23
|
-
urlParams: UrlParams
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export { HttpClient as H };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Body = require('@effect/platform/Http/Body');
|
|
4
|
-
var Client = require('@effect/platform/Http/Client');
|
|
5
|
-
var Error = require('@effect/platform/Http/ClientError');
|
|
6
|
-
var ClientRequest = require('@effect/platform/Http/ClientRequest');
|
|
7
|
-
var ClientResponse = require('@effect/platform/Http/ClientResponse');
|
|
8
|
-
var Headers = require('@effect/platform/Http/Headers');
|
|
9
|
-
var UrlParams = require('@effect/platform/Http/UrlParams');
|
|
10
|
-
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('./NodeClient-1df9d813.cjs.dev.js');
|
|
11
|
-
|
|
12
|
-
function _interopNamespace(e) {
|
|
13
|
-
if (e && e.__esModule) return e;
|
|
14
|
-
var n = Object.create(null);
|
|
15
|
-
if (e) {
|
|
16
|
-
Object.keys(e).forEach(function (k) {
|
|
17
|
-
if (k !== 'default') {
|
|
18
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return e[k]; }
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
n["default"] = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var Body__namespace = /*#__PURE__*/_interopNamespace(Body);
|
|
31
|
-
var Client__namespace = /*#__PURE__*/_interopNamespace(Client);
|
|
32
|
-
var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
|
|
33
|
-
var ClientRequest__namespace = /*#__PURE__*/_interopNamespace(ClientRequest);
|
|
34
|
-
var ClientResponse__namespace = /*#__PURE__*/_interopNamespace(ClientResponse);
|
|
35
|
-
var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
|
|
36
|
-
var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @since 1.0.0
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
var HttpClient = /*#__PURE__*/Object.freeze({
|
|
43
|
-
__proto__: null,
|
|
44
|
-
body: Body__namespace,
|
|
45
|
-
client: Client__namespace,
|
|
46
|
-
error: Error__namespace,
|
|
47
|
-
headers: Headers__namespace,
|
|
48
|
-
nodeClient: Http_NodeClient_dist_effectPlatformNodeHttpNodeClient.NodeClient,
|
|
49
|
-
request: ClientRequest__namespace,
|
|
50
|
-
response: ClientResponse__namespace,
|
|
51
|
-
urlParams: UrlParams__namespace
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
exports.HttpClient = HttpClient;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Body = require('@effect/platform/Http/Body');
|
|
4
|
-
var Client = require('@effect/platform/Http/Client');
|
|
5
|
-
var Error = require('@effect/platform/Http/ClientError');
|
|
6
|
-
var ClientRequest = require('@effect/platform/Http/ClientRequest');
|
|
7
|
-
var ClientResponse = require('@effect/platform/Http/ClientResponse');
|
|
8
|
-
var Headers = require('@effect/platform/Http/Headers');
|
|
9
|
-
var UrlParams = require('@effect/platform/Http/UrlParams');
|
|
10
|
-
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('./NodeClient-ea1a9ab0.cjs.prod.js');
|
|
11
|
-
|
|
12
|
-
function _interopNamespace(e) {
|
|
13
|
-
if (e && e.__esModule) return e;
|
|
14
|
-
var n = Object.create(null);
|
|
15
|
-
if (e) {
|
|
16
|
-
Object.keys(e).forEach(function (k) {
|
|
17
|
-
if (k !== 'default') {
|
|
18
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return e[k]; }
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
n["default"] = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var Body__namespace = /*#__PURE__*/_interopNamespace(Body);
|
|
31
|
-
var Client__namespace = /*#__PURE__*/_interopNamespace(Client);
|
|
32
|
-
var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
|
|
33
|
-
var ClientRequest__namespace = /*#__PURE__*/_interopNamespace(ClientRequest);
|
|
34
|
-
var ClientResponse__namespace = /*#__PURE__*/_interopNamespace(ClientResponse);
|
|
35
|
-
var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
|
|
36
|
-
var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @since 1.0.0
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
var HttpClient = /*#__PURE__*/Object.freeze({
|
|
43
|
-
__proto__: null,
|
|
44
|
-
body: Body__namespace,
|
|
45
|
-
client: Client__namespace,
|
|
46
|
-
error: Error__namespace,
|
|
47
|
-
headers: Headers__namespace,
|
|
48
|
-
nodeClient: Http_NodeClient_dist_effectPlatformNodeHttpNodeClient.NodeClient,
|
|
49
|
-
request: ClientRequest__namespace,
|
|
50
|
-
response: ClientResponse__namespace,
|
|
51
|
-
urlParams: UrlParams__namespace
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
exports.HttpClient = HttpClient;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as App from '@effect/platform/Http/App';
|
|
2
|
-
import * as Body from '@effect/platform/Http/Body';
|
|
3
|
-
import * as Headers from '@effect/platform/Http/Headers';
|
|
4
|
-
import * as Middleware from '@effect/platform/Http/Middleware';
|
|
5
|
-
import * as Router from '@effect/platform/Http/Router';
|
|
6
|
-
import * as Error from '@effect/platform/Http/ServerError';
|
|
7
|
-
import * as ServerRequest from '@effect/platform/Http/ServerRequest';
|
|
8
|
-
import * as ServerResponse from '@effect/platform/Http/ServerResponse';
|
|
9
|
-
import * as UrlParams from '@effect/platform/Http/UrlParams';
|
|
10
|
-
import { E as Etag } from './Etag-6f08d5ed.esm.js';
|
|
11
|
-
import { F as FormData } from './FormData-bafc0b9a.esm.js';
|
|
12
|
-
import { S as Server } from './Server-5237fa52.esm.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @since 1.0.0
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
var HttpServer = /*#__PURE__*/Object.freeze({
|
|
19
|
-
__proto__: null,
|
|
20
|
-
app: App,
|
|
21
|
-
body: Body,
|
|
22
|
-
error: Error,
|
|
23
|
-
etag: Etag,
|
|
24
|
-
formData: FormData,
|
|
25
|
-
headers: Headers,
|
|
26
|
-
middleware: Middleware,
|
|
27
|
-
request: ServerRequest,
|
|
28
|
-
response: ServerResponse,
|
|
29
|
-
router: Router,
|
|
30
|
-
server: Server,
|
|
31
|
-
urlParams: UrlParams
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export { HttpServer as H };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var App = require('@effect/platform/Http/App');
|
|
4
|
-
var Body = require('@effect/platform/Http/Body');
|
|
5
|
-
var Headers = require('@effect/platform/Http/Headers');
|
|
6
|
-
var Middleware = require('@effect/platform/Http/Middleware');
|
|
7
|
-
var Router = require('@effect/platform/Http/Router');
|
|
8
|
-
var Error = require('@effect/platform/Http/ServerError');
|
|
9
|
-
var ServerRequest = require('@effect/platform/Http/ServerRequest');
|
|
10
|
-
var ServerResponse = require('@effect/platform/Http/ServerResponse');
|
|
11
|
-
var UrlParams = require('@effect/platform/Http/UrlParams');
|
|
12
|
-
var Http_Etag_dist_effectPlatformNodeHttpEtag = require('./Etag-b38be81c.cjs.dev.js');
|
|
13
|
-
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('./FormData-053407d4.cjs.dev.js');
|
|
14
|
-
var Http_Server_dist_effectPlatformNodeHttpServer = require('./Server-264c702d.cjs.dev.js');
|
|
15
|
-
|
|
16
|
-
function _interopNamespace(e) {
|
|
17
|
-
if (e && e.__esModule) return e;
|
|
18
|
-
var n = Object.create(null);
|
|
19
|
-
if (e) {
|
|
20
|
-
Object.keys(e).forEach(function (k) {
|
|
21
|
-
if (k !== 'default') {
|
|
22
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
23
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () { return e[k]; }
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
n["default"] = e;
|
|
31
|
-
return Object.freeze(n);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var App__namespace = /*#__PURE__*/_interopNamespace(App);
|
|
35
|
-
var Body__namespace = /*#__PURE__*/_interopNamespace(Body);
|
|
36
|
-
var Headers__namespace = /*#__PURE__*/_interopNamespace(Headers);
|
|
37
|
-
var Middleware__namespace = /*#__PURE__*/_interopNamespace(Middleware);
|
|
38
|
-
var Router__namespace = /*#__PURE__*/_interopNamespace(Router);
|
|
39
|
-
var Error__namespace = /*#__PURE__*/_interopNamespace(Error);
|
|
40
|
-
var ServerRequest__namespace = /*#__PURE__*/_interopNamespace(ServerRequest);
|
|
41
|
-
var ServerResponse__namespace = /*#__PURE__*/_interopNamespace(ServerResponse);
|
|
42
|
-
var UrlParams__namespace = /*#__PURE__*/_interopNamespace(UrlParams);
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @since 1.0.0
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
var HttpServer = /*#__PURE__*/Object.freeze({
|
|
49
|
-
__proto__: null,
|
|
50
|
-
app: App__namespace,
|
|
51
|
-
body: Body__namespace,
|
|
52
|
-
error: Error__namespace,
|
|
53
|
-
etag: Http_Etag_dist_effectPlatformNodeHttpEtag.Etag,
|
|
54
|
-
formData: Http_FormData_dist_effectPlatformNodeHttpFormData.FormData,
|
|
55
|
-
headers: Headers__namespace,
|
|
56
|
-
middleware: Middleware__namespace,
|
|
57
|
-
request: ServerRequest__namespace,
|
|
58
|
-
response: ServerResponse__namespace,
|
|
59
|
-
router: Router__namespace,
|
|
60
|
-
server: Http_Server_dist_effectPlatformNodeHttpServer.Server,
|
|
61
|
-
urlParams: UrlParams__namespace
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
exports.HttpServer = HttpServer;
|