@effect/platform 0.89.0 → 0.90.1
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/dist/cjs/Terminal.js.map +1 -1
- package/dist/cjs/internal/httpServerResponse.js +1 -1
- package/dist/dts/Terminal.d.ts +4 -2
- package/dist/dts/Terminal.d.ts.map +1 -1
- package/dist/esm/Terminal.js.map +1 -1
- package/dist/esm/internal/httpServerResponse.js +1 -1
- package/package.json +2 -2
- package/src/Terminal.ts +4 -2
- package/src/internal/httpServerResponse.ts +1 -1
package/dist/cjs/Terminal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Terminal.js","names":["_Data","require","InternalTerminal","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","QuitException","TaggedError","exports","Terminal","tag"],"sources":["../../src/Terminal.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,KAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"file":"Terminal.js","names":["_Data","require","InternalTerminal","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","QuitException","TaggedError","exports","Terminal","tag"],"sources":["../../src/Terminal.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,gBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA0D,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAkE1D;;;;;;;AAOM,MAAOkB,aAAc,sBAAQ,IAAAC,iBAAW,EAAC,eAAe,CAAK;AAEnE;;;;AAAAC,OAAA,CAAAF,aAAA,GAAAA,aAAA;AAIO,MAAMG,QAAQ,GAAAD,OAAA,CAAAC,QAAA,GAA4BxB,gBAAgB,CAACyB,GAAG","ignoreList":[]}
|
|
@@ -83,7 +83,7 @@ const redirect = (location, options) => {
|
|
|
83
83
|
const headers = Headers.unsafeFromRecord({
|
|
84
84
|
location: location.toString()
|
|
85
85
|
});
|
|
86
|
-
return new ServerResponseImpl(options?.status ??
|
|
86
|
+
return new ServerResponseImpl(options?.status ?? 302, options?.statusText, options?.headers ? Headers.merge(headers, Headers.fromInput(options.headers)) : headers, options?.cookies ?? Cookies.empty, internalBody.empty);
|
|
87
87
|
};
|
|
88
88
|
/** @internal */
|
|
89
89
|
exports.redirect = redirect;
|
package/dist/dts/Terminal.d.ts
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Tag } from "effect/Context";
|
|
5
5
|
import type { Effect } from "effect/Effect";
|
|
6
|
+
import type { ReadonlyMailbox } from "effect/Mailbox";
|
|
6
7
|
import type { Option } from "effect/Option";
|
|
8
|
+
import type * as Scope from "effect/Scope";
|
|
7
9
|
import type { PlatformError } from "./Error.js";
|
|
8
10
|
/**
|
|
9
11
|
* A `Terminal` represents a command-line interface which can read input from a
|
|
@@ -18,9 +20,9 @@ export interface Terminal {
|
|
|
18
20
|
*/
|
|
19
21
|
readonly columns: Effect<number>;
|
|
20
22
|
/**
|
|
21
|
-
* Reads
|
|
23
|
+
* Reads input events from the default standard input.
|
|
22
24
|
*/
|
|
23
|
-
readonly readInput: Effect<UserInput,
|
|
25
|
+
readonly readInput: Effect<ReadonlyMailbox<UserInput>, never, Scope.Scope>;
|
|
24
26
|
/**
|
|
25
27
|
* Reads a single line from the default standard input.
|
|
26
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Terminal.d.ts","sourceRoot":"","sources":["../../src/Terminal.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG/C;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAChC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"Terminal.d.ts","sourceRoot":"","sources":["../../src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AAE,GAAG,CAAA;CAClB;;;;AAED;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,mBAA6B,EAAE,CAAC;CAAG;AAEtE;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAwB,CAAA"}
|
package/dist/esm/Terminal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Terminal.js","names":["TaggedError","InternalTerminal","QuitException","Terminal","tag"],"sources":["../../src/Terminal.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,WAAW,QAAQ,aAAa;
|
|
1
|
+
{"version":3,"file":"Terminal.js","names":["TaggedError","InternalTerminal","QuitException","Terminal","tag"],"sources":["../../src/Terminal.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,WAAW,QAAQ,aAAa;AAMzC,OAAO,KAAKC,gBAAgB,MAAM,wBAAwB;AAkE1D;;;;;;;AAOA,OAAM,MAAOC,aAAc,sBAAQF,WAAW,CAAC,eAAe,CAAK;AAEnE;;;;AAIA,OAAO,MAAMG,QAAQ,GAA4BF,gBAAgB,CAACG,GAAG","ignoreList":[]}
|
|
@@ -74,7 +74,7 @@ export const redirect = (location, options) => {
|
|
|
74
74
|
const headers = Headers.unsafeFromRecord({
|
|
75
75
|
location: location.toString()
|
|
76
76
|
});
|
|
77
|
-
return new ServerResponseImpl(options?.status ??
|
|
77
|
+
return new ServerResponseImpl(options?.status ?? 302, options?.statusText, options?.headers ? Headers.merge(headers, Headers.fromInput(options.headers)) : headers, options?.cookies ?? Cookies.empty, internalBody.empty);
|
|
78
78
|
};
|
|
79
79
|
/** @internal */
|
|
80
80
|
export const uint8Array = (body, options) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/platform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.90.1",
|
|
4
4
|
"description": "Unified interfaces for common platform-specific services",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"multipasta": "^0.2.7"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"effect": "^3.17.
|
|
20
|
+
"effect": "^3.17.7"
|
|
21
21
|
},
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"provenance": true
|
package/src/Terminal.ts
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
import type { Tag } from "effect/Context"
|
|
5
5
|
import { TaggedError } from "effect/Data"
|
|
6
6
|
import type { Effect } from "effect/Effect"
|
|
7
|
+
import type { ReadonlyMailbox } from "effect/Mailbox"
|
|
7
8
|
import type { Option } from "effect/Option"
|
|
9
|
+
import type * as Scope from "effect/Scope"
|
|
8
10
|
import type { PlatformError } from "./Error.js"
|
|
9
11
|
import * as InternalTerminal from "./internal/terminal.js"
|
|
10
12
|
|
|
@@ -21,9 +23,9 @@ export interface Terminal {
|
|
|
21
23
|
*/
|
|
22
24
|
readonly columns: Effect<number>
|
|
23
25
|
/**
|
|
24
|
-
* Reads
|
|
26
|
+
* Reads input events from the default standard input.
|
|
25
27
|
*/
|
|
26
|
-
readonly readInput: Effect<UserInput,
|
|
28
|
+
readonly readInput: Effect<ReadonlyMailbox<UserInput>, never, Scope.Scope>
|
|
27
29
|
/**
|
|
28
30
|
* Reads a single line from the default standard input.
|
|
29
31
|
*/
|
|
@@ -103,7 +103,7 @@ export const redirect = (
|
|
|
103
103
|
): ServerResponse.HttpServerResponse => {
|
|
104
104
|
const headers = Headers.unsafeFromRecord({ location: location.toString() })
|
|
105
105
|
return new ServerResponseImpl(
|
|
106
|
-
options?.status ??
|
|
106
|
+
options?.status ?? 302,
|
|
107
107
|
options?.statusText,
|
|
108
108
|
options?.headers ?
|
|
109
109
|
Headers.merge(
|