@effect/platform-node 0.19.3 → 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.
Files changed (49) hide show
  1. package/Command/dist/effect-platform-node-Command.esm.js +0 -4
  2. package/CommandExecutor/dist/effect-platform-node-CommandExecutor.esm.js +14 -13
  3. package/Effectify/dist/effect-platform-node-Effectify.esm.js +0 -4
  4. package/Error/dist/effect-platform-node-Error.esm.js +0 -4
  5. package/FileSystem/dist/effect-platform-node-FileSystem.esm.js +12 -13
  6. package/Http/Etag/dist/effect-platform-node-Http-Etag.esm.js +4 -0
  7. package/Http/FormData/dist/effect-platform-node-Http-FormData.esm.js +16 -0
  8. package/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.esm.js +24 -0
  9. package/Http/Platform/dist/effect-platform-node-Http-Platform.esm.js +40 -0
  10. package/Http/Server/dist/effect-platform-node-Http-Server.esm.js +45 -0
  11. package/HttpClient/dist/effect-platform-node-HttpClient.esm.js +19 -6
  12. package/HttpServer/dist/effect-platform-node-HttpServer.esm.js +40 -10
  13. package/KeyValueStore/dist/effect-platform-node-KeyValueStore.esm.js +17 -18
  14. package/NodeContext/dist/effect-platform-node-NodeContext.esm.js +25 -22
  15. package/Path/dist/effect-platform-node-Path.esm.js +6 -25
  16. package/Runtime/dist/effect-platform-node-Runtime.esm.js +3 -13
  17. package/Sink/dist/effect-platform-node-Sink.esm.js +5 -18
  18. package/Stream/dist/effect-platform-node-Stream.esm.js +6 -30
  19. package/dist/Command-56d67f13.esm.js +27 -0
  20. package/{internal/commandExecutor.esm.js → dist/CommandExecutor-cfc0af4b.esm.js} +27 -10
  21. package/dist/Effectify-24bba5b0.esm.js +12 -0
  22. package/dist/Error-6b032e84.esm.js +16 -0
  23. package/dist/Etag-6f08d5ed.esm.js +86 -0
  24. package/{internal/fileSystem.esm.js → dist/FileSystem-d4a3521c.esm.js} +30 -12
  25. package/dist/FormData-bafc0b9a.esm.js +43 -0
  26. package/dist/HttpClient-3e1bd3e7.esm.js +26 -0
  27. package/dist/HttpServer-331621bd.esm.js +34 -0
  28. package/dist/KeyValueStore-66bca5fd.esm.js +38 -0
  29. package/{internal/http/nodeClient.esm.js → dist/NodeClient-4070cde3.esm.js} +86 -12
  30. package/dist/NodeContext-4bca6ed4.esm.js +27 -0
  31. package/{internal/path.esm.js → dist/Path-7a81561f.esm.js} +35 -5
  32. package/{internal/runtime.esm.js → dist/Runtime-3bc7ee1e.esm.js} +18 -2
  33. package/{internal/http/server.esm.js → dist/Server-3a9f4a90.esm.js} +56 -10
  34. package/dist/Sink-554d2819.esm.js +23 -0
  35. package/dist/Stream-2d5b1ece.esm.js +37 -0
  36. package/dist/effect-platform-node.esm.js +73 -26
  37. package/{internal/error.esm.js → dist/error-4865cb95.esm.js} +1 -1
  38. package/{internal/http/formData.esm.js → dist/formData-4330f230.esm.js} +2 -2
  39. package/{internal/http/incomingMessage.esm.js → dist/incomingMessage-309eb6a5.esm.js} +2 -2
  40. package/{internal/http/platform.esm.js → dist/platform-f3d31bb1.esm.js} +3 -3
  41. package/{internal/sink.esm.js → dist/sink-bd7ef408.esm.js} +1 -1
  42. package/{internal/stream.esm.js → dist/stream-860139d3.esm.js} +1 -1
  43. package/package.json +2 -3
  44. package/Http/Http/Etag/dist/effect-platform-node-Http-Etag.esm.js +0 -23
  45. package/Http/Http/FormData/dist/effect-platform-node-Http-FormData.esm.js +0 -23
  46. package/Http/Http/NodeClient/dist/effect-platform-node-Http-NodeClient.esm.js +0 -65
  47. package/Http/Http/Platform/dist/effect-platform-node-Http-Platform.esm.js +0 -22
  48. package/Http/Http/Server/dist/effect-platform-node-Http-Server.esm.js +0 -29
  49. package/internal/http/etag.esm.js +0 -47
@@ -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
- import * as Command_dist_effectPlatformNodeCommand from '../Command/dist/effect-platform-node-Command.esm.js';
2
- export { Command_dist_effectPlatformNodeCommand as Command };
3
- import * as CommandExecutor_dist_effectPlatformNodeCommandExecutor from '../CommandExecutor/dist/effect-platform-node-CommandExecutor.esm.js';
4
- export { CommandExecutor_dist_effectPlatformNodeCommandExecutor as CommandExecutor };
5
- import * as Effectify_dist_effectPlatformNodeEffectify from '../Effectify/dist/effect-platform-node-Effectify.esm.js';
6
- export { Effectify_dist_effectPlatformNodeEffectify as Effectify };
7
- import * as Error_dist_effectPlatformNodeError from '../Error/dist/effect-platform-node-Error.esm.js';
8
- export { Error_dist_effectPlatformNodeError as Error };
9
- import * as FileSystem_dist_effectPlatformNodeFileSystem from '../FileSystem/dist/effect-platform-node-FileSystem.esm.js';
10
- export { FileSystem_dist_effectPlatformNodeFileSystem as FileSystem };
11
- import * as HttpClient_dist_effectPlatformNodeHttpClient from '../HttpClient/dist/effect-platform-node-HttpClient.esm.js';
12
- export { HttpClient_dist_effectPlatformNodeHttpClient as HttpClient };
13
- import * as HttpServer_dist_effectPlatformNodeHttpServer from '../HttpServer/dist/effect-platform-node-HttpServer.esm.js';
14
- export { HttpServer_dist_effectPlatformNodeHttpServer as HttpServer };
15
- import * as KeyValueStore_dist_effectPlatformNodeKeyValueStore from '../KeyValueStore/dist/effect-platform-node-KeyValueStore.esm.js';
16
- export { KeyValueStore_dist_effectPlatformNodeKeyValueStore as KeyValueStore };
17
- import * as NodeContext_dist_effectPlatformNodeNodeContext from '../NodeContext/dist/effect-platform-node-NodeContext.esm.js';
18
- export { NodeContext_dist_effectPlatformNodeNodeContext as NodeContext };
19
- import * as Path_dist_effectPlatformNodePath from '../Path/dist/effect-platform-node-Path.esm.js';
20
- export { Path_dist_effectPlatformNodePath as Path };
21
- import * as Runtime_dist_effectPlatformNodeRuntime from '../Runtime/dist/effect-platform-node-Runtime.esm.js';
22
- export { Runtime_dist_effectPlatformNodeRuntime as Runtime };
23
- import * as Sink_dist_effectPlatformNodeSink from '../Sink/dist/effect-platform-node-Sink.esm.js';
24
- export { Sink_dist_effectPlatformNodeSink as Sink };
25
- import * as Stream_dist_effectPlatformNodeStream from '../Stream/dist/effect-platform-node-Stream.esm.js';
26
- export { Stream_dist_effectPlatformNodeStream as Stream };
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';
@@ -36,4 +36,4 @@ const handleErrnoException = (module, method) => (err, [path]) => {
36
36
  });
37
37
  };
38
38
 
39
- export { handleErrnoException };
39
+ export { handleErrnoException as h };
@@ -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 '../../Stream/dist/effect-platform-node-Stream.esm.js';
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 '../../Stream/dist/effect-platform-node-Stream.esm.js';
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 { layer as layer$1 } from '../../FileSystem/dist/effect-platform-node-FileSystem.esm.js';
9
- import { layer as layer$2 } from '../../Http/Http/Etag/dist/effect-platform-node-Http-Etag.esm.js';
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 };
@@ -31,4 +31,4 @@ const write = (stream, onError, encoding) => _ => Effect.async(resume => {
31
31
  }
32
32
  });
33
33
 
34
- export { fromWritable };
34
+ export { fromWritable as f };
@@ -91,4 +91,4 @@ const toUint8Array = options => {
91
91
  }));
92
92
  };
93
93
 
94
- export { fromReadable, toString, toUint8Array };
94
+ export { toUint8Array as a, fromReadable as f, toString as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/platform-node",
3
- "version": "0.19.3",
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.3"
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,23 +0,0 @@
1
- import { layer as layer$1, layerWeak as layerWeak$1 } from '../../../../internal/http/etag.esm.js';
2
- import * as Etag$1 from '@effect/platform/Http/Etag';
3
- export * from '@effect/platform/Http/Etag';
4
-
5
- /**
6
- * @since 1.0.0
7
- *
8
- * Also includes exports from [`@effect/platform/Http/Etag`](https://effect-ts.github.io/platform/platform/Http/Etag.ts.html).
9
- */
10
-
11
- /**
12
- * @since 1.0.0
13
- * @category layers
14
- */
15
- const layer = layer$1;
16
-
17
- /**
18
- * @since 1.0.0
19
- * @category layers
20
- */
21
- const layerWeak = layerWeak$1;
22
-
23
- export { layer, layerWeak };
@@ -1,23 +0,0 @@
1
- import { stream as stream$1, formData as formData$1 } from '../../../../internal/http/formData.esm.js';
2
- import * as FormData$1 from '@effect/platform/Http/FormData';
3
- export * from '@effect/platform/Http/FormData';
4
-
5
- /**
6
- * @since 1.0.0
7
- *
8
- * Also includes exports from [`@effect/platform/Http/FormData`](https://effect-ts.github.io/platform/platform/Http/FormData.ts.html).
9
- */
10
-
11
- /**
12
- * @since 1.0.0
13
- * @category constructors
14
- */
15
- const stream = stream$1;
16
-
17
- /**
18
- * @since 1.0.0
19
- * @category constructors
20
- */
21
- const formData = formData$1;
22
-
23
- export { formData, stream };
@@ -1,65 +0,0 @@
1
- import { HttpAgentTypeId as HttpAgentTypeId$1, HttpAgent as HttpAgent$1, makeAgent as makeAgent$1, agentLayer as agentLayer$1, makeAgentLayer as makeAgentLayer$1, make as make$1, layer as layer$1, layerWithoutAgent as layerWithoutAgent$1 } from '../../../../internal/http/nodeClient.esm.js';
2
-
3
- /**
4
- * @since 1.0.0
5
- */
6
-
7
- /**
8
- * @since 1.0.0
9
- * @category agent
10
- */
11
- const HttpAgentTypeId = HttpAgentTypeId$1;
12
-
13
- /**
14
- * @since 1.0.0
15
- * @category agent
16
- */
17
-
18
- /**
19
- * @since 1.0.0
20
- * @category agent
21
- */
22
-
23
- /**
24
- * @since 1.0.0
25
- * @category agent
26
- */
27
- const HttpAgent = HttpAgent$1;
28
-
29
- /**
30
- * @since 1.0.0
31
- * @category agent
32
- */
33
- const makeAgent = makeAgent$1;
34
-
35
- /**
36
- * @since 1.0.0
37
- * @category agent
38
- */
39
- const agentLayer = agentLayer$1;
40
-
41
- /**
42
- * @since 1.0.0
43
- * @category agent
44
- */
45
- const makeAgentLayer = makeAgentLayer$1;
46
-
47
- /**
48
- * @since 1.0.0
49
- * @category constructors
50
- */
51
- const make = make$1;
52
-
53
- /**
54
- * @since 1.0.0
55
- * @category layers
56
- */
57
- const layer = layer$1;
58
-
59
- /**
60
- * @since 1.0.0
61
- * @category layers
62
- */
63
- const layerWithoutAgent = layerWithoutAgent$1;
64
-
65
- export { HttpAgent, HttpAgentTypeId, agentLayer, layer, layerWithoutAgent, make, makeAgent, makeAgentLayer };
@@ -1,22 +0,0 @@
1
- import { make as make$1, layer as layer$1 } from '../../../../internal/http/platform.esm.js';
2
- export * from '@effect/platform/Http/Platform';
3
-
4
- /**
5
- * @since 1.0.0
6
- *
7
- * Also includes exports from [`@effect/platform/Http/Platform`](https://effect-ts.github.io/platform/platform/Http/Platform.ts.html).
8
- */
9
-
10
- /**
11
- * @since 1.0.0
12
- * @category constructors
13
- */
14
- const make = make$1;
15
-
16
- /**
17
- * @since 1.0.0
18
- * @category layers
19
- */
20
- const layer = layer$1;
21
-
22
- export { layer, make };
@@ -1,29 +0,0 @@
1
- import { make as make$1, layer as layer$1, layerConfig as layerConfig$1 } from '../../../../internal/http/server.esm.js';
2
- import * as Server$1 from '@effect/platform/Http/Server';
3
- export * from '@effect/platform/Http/Server';
4
-
5
- /**
6
- * @since 1.0.0
7
- *
8
- * Also includes exports from [`@effect/platform/Http/Server`](https://effect-ts.github.io/platform/platform/Http/Server.ts.html).
9
- */
10
-
11
- /**
12
- * @since 1.0.0
13
- * @category constructors
14
- */
15
- const make = make$1;
16
-
17
- /**
18
- * @since 1.0.0
19
- * @category layers
20
- */
21
- const layer = layer$1;
22
-
23
- /**
24
- * @since 1.0.0
25
- * @category layers
26
- */
27
- const layerConfig = layerConfig$1;
28
-
29
- export { layer, layerConfig, make };
@@ -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 };