effect-app 0.152.0 → 0.153.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/CHANGELOG.md +22 -0
- package/_cjs/client/fetch.cjs +1 -1
- package/_cjs/refinements.cjs +1 -1
- package/dist/Config/SecretURL.d.ts +7 -7
- package/dist/Pure.d.ts +17 -17
- package/dist/Request.d.ts +9 -9
- package/dist/_ext/date.d.ts +14 -14
- package/dist/_ext/misc.d.ts +11 -11
- package/dist/client/QueryResult.d.ts +7 -7
- package/dist/client/fetch.d.ts +4 -4
- package/dist/client/fetch.js +1 -1
- package/dist/refinements.d.ts +5 -5
- package/dist/refinements.js +1 -1
- package/dist/service.d.ts +2 -2
- package/package.json +5 -5
- package/tsplus.config.json +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @effect-app/prelude
|
|
2
2
|
|
|
3
|
+
## 0.153.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [27e6867]
|
|
8
|
+
- @effect-app/core@0.131.1
|
|
9
|
+
- @effect-app/fluent-extensions@0.126.1
|
|
10
|
+
- @effect-app/schema@0.184.1
|
|
11
|
+
|
|
12
|
+
## 0.153.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- c8a07bc: fix path
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [c8a07bc]
|
|
21
|
+
- @effect-app/core@0.131.0
|
|
22
|
+
- @effect-app/fluent-extensions@0.126.0
|
|
23
|
+
- @effect-app/schema@0.184.0
|
|
24
|
+
|
|
3
25
|
## 0.152.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/_cjs/client/fetch.cjs
CHANGED
|
@@ -23,7 +23,7 @@ var tsplus_module_5 = _interopRequireWildcard(require("effect-app/schema"));
|
|
|
23
23
|
var tsplus_module_6 = _interopRequireWildcard(require("@effect/platform/Http/ClientRequest"));
|
|
24
24
|
var tsplus_module_7 = _interopRequireWildcard(require("@effect/platform/Http/Client"));
|
|
25
25
|
var tsplus_module_8 = _interopRequireWildcard(require("effect-app/Request"));
|
|
26
|
-
var tsplus_module_9 = _interopRequireWildcard(require("
|
|
26
|
+
var tsplus_module_9 = _interopRequireWildcard(require("effect-app/_ext/misc"));
|
|
27
27
|
var tsplus_module_10 = _interopRequireWildcard(require("effect-app"));
|
|
28
28
|
var tsplus_module_11 = _interopRequireWildcard(require("effect/ReadonlyRecord"));
|
|
29
29
|
var _Function = require("@effect-app/core/Function");
|
package/_cjs/refinements.cjs
CHANGED
|
@@ -7,7 +7,7 @@ exports.asOption = exports.asCollectable = exports.as = void 0;
|
|
|
7
7
|
exports.makeAwesome = makeAwesome;
|
|
8
8
|
exports.makeAwesomeCollect = makeAwesomeCollect;
|
|
9
9
|
var tsplus_module_1 = _interopRequireWildcard(require("effect/Option"));
|
|
10
|
-
var tsplus_module_2 = _interopRequireWildcard(require("
|
|
10
|
+
var tsplus_module_2 = _interopRequireWildcard(require("effect-app/_ext/misc"));
|
|
11
11
|
var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/core/Function"));
|
|
12
12
|
var tsplus_module_4 = _interopRequireWildcard(require("@fp-ts/optic/index"));
|
|
13
13
|
var _client = require("./client.cjs");
|
|
@@ -36,47 +36,47 @@ export declare namespace SecretURL {
|
|
|
36
36
|
* @tsplus static SecretURL.Ops isSecretURL
|
|
37
37
|
* @since 1.0.0
|
|
38
38
|
* @category refinements
|
|
39
|
-
* @tsplus location "
|
|
39
|
+
* @tsplus location "effect-app/Config/SecretURL"
|
|
40
40
|
*/
|
|
41
41
|
export declare const isSecretURL: (u: unknown) => u is SecretURL;
|
|
42
42
|
/**
|
|
43
43
|
* @tsplus static SecretURL.Ops make
|
|
44
44
|
* @since 1.0.0
|
|
45
45
|
* @category constructors
|
|
46
|
-
* @tsplus location "
|
|
46
|
+
* @tsplus location "effect-app/Config/SecretURL"
|
|
47
47
|
*/
|
|
48
48
|
export declare const make: (bytes: Array<number>) => SecretURL;
|
|
49
49
|
/**
|
|
50
50
|
* @tsplus static SecretURL.Ops fromChunk
|
|
51
51
|
* @since 1.0.0
|
|
52
52
|
* @category constructors
|
|
53
|
-
* @tsplus location "
|
|
53
|
+
* @tsplus location "effect-app/Config/SecretURL"
|
|
54
54
|
*/
|
|
55
55
|
export declare const fromChunk: (chunk: Chunk.Chunk<string>) => SecretURL;
|
|
56
56
|
/**
|
|
57
57
|
* @tsplus static SecretURL.Ops fromString
|
|
58
58
|
* @since 1.0.0
|
|
59
59
|
* @category constructors
|
|
60
|
-
* @tsplus location "
|
|
60
|
+
* @tsplus location "effect-app/Config/SecretURL"
|
|
61
61
|
*/
|
|
62
62
|
export declare const fromString: (text: string) => SecretURL;
|
|
63
63
|
/**
|
|
64
64
|
* @tsplus getter SecretURL value
|
|
65
65
|
* @since 1.0.0
|
|
66
66
|
* @category getters
|
|
67
|
-
* @tsplus location "
|
|
67
|
+
* @tsplus location "effect-app/Config/SecretURL"
|
|
68
68
|
*/
|
|
69
69
|
export declare const value: (self: SecretURL) => string;
|
|
70
70
|
/**
|
|
71
71
|
* @tsplus fluent SecretURL unsafeWipe
|
|
72
72
|
* @since 1.0.0
|
|
73
73
|
* @category unsafe
|
|
74
|
-
* @tsplus location "
|
|
74
|
+
* @tsplus location "effect-app/Config/SecretURL"
|
|
75
75
|
*/
|
|
76
76
|
export declare const unsafeWipe: (self: SecretURL) => void;
|
|
77
77
|
/**
|
|
78
78
|
* @tsplus static effect/io/Config.Ops secretURL
|
|
79
|
-
* @tsplus location "
|
|
79
|
+
* @tsplus location "effect-app/Config/SecretURL"
|
|
80
80
|
*/
|
|
81
81
|
export declare const secretURL: (name?: string) => Config<SecretURL>;
|
|
82
82
|
//# sourceMappingURL=SecretURL.d.ts.map
|
package/dist/Pure.d.ts
CHANGED
|
@@ -51,22 +51,22 @@ export declare function unifyPureEnv<X extends PureEnv<any, any, any>>(self: X):
|
|
|
51
51
|
export type Pure<W, S, S2, R, E, A> = Effect<A, E, PureEnvEnv<W, S, S2> | R>;
|
|
52
52
|
/**
|
|
53
53
|
* @tsplus static Pure.Ops GMUA_
|
|
54
|
-
* @tsplus location "
|
|
54
|
+
* @tsplus location "effect-app/Pure"
|
|
55
55
|
*/
|
|
56
56
|
export declare function GMUA_<W, S, S2, GR, GE, GA, MR, ME, MA, UR, UE, UA>(get: Pure<W, S, S2, GR, GE, GA>, modify: (i: GA) => Pure<W, S, S2, MR, ME, readonly [GA, MA]>, update: (i: GA) => Pure<W, S, S2, UR, UE, UA>): Pure<W, S, S2, GR | MR | UR, GE | ME | UE, MA>;
|
|
57
57
|
/**
|
|
58
58
|
* @tsplus static Pure.Ops GMUA
|
|
59
|
-
* @tsplus location "
|
|
59
|
+
* @tsplus location "effect-app/Pure"
|
|
60
60
|
*/
|
|
61
61
|
export declare function GMUA<W, S, S2, GA, MR, ME, MA>(modify: (i: GA) => Pure<W, S, S2, MR, ME, readonly [GA, MA]>): <GR, GE, UR, UE, UA>(get: Pure<W, S, S2, GR, GE, GA>, update: (i: GA) => Pure<W, S, S2, UR, UE, UA>) => Pure<W, S, S2, MR | GR | UR, ME | GE | UE, MA>;
|
|
62
62
|
/**
|
|
63
63
|
* @tsplus static Pure.Ops GMU_
|
|
64
|
-
* @tsplus location "
|
|
64
|
+
* @tsplus location "effect-app/Pure"
|
|
65
65
|
*/
|
|
66
66
|
export declare function GMU_<W, S, S2, GR, GE, GA, MR, ME, UR, UE, UA>(get: Pure<W, S, S2, GR, GE, GA>, modify: (i: GA) => Pure<W, S, S2, MR, ME, GA>, update: (i: GA) => Pure<W, S, S2, UR, UE, UA>): Pure<W, S, S2, GR | MR | UR, GE | ME | UE, UA>;
|
|
67
67
|
/**
|
|
68
68
|
* @tsplus static Pure.Ops GMU
|
|
69
|
-
* @tsplus location "
|
|
69
|
+
* @tsplus location "effect-app/Pure"
|
|
70
70
|
*/
|
|
71
71
|
export declare function GMU<W, S, S2, GA, MR, ME>(modify: (i: GA) => Pure<W, S, S2, MR, ME, GA>): <GR, GE, UR, UE, UA>(get: Pure<W, S, S2, GR, GE, GA>, update: (i: GA) => Pure<W, S, S2, UR, UE, UA>) => Pure<W, S, S2, MR | GR | UR, ME | GE | UE, UA>;
|
|
72
72
|
export declare const PureEnvEnv: unique symbol;
|
|
@@ -75,29 +75,29 @@ export interface PureEnvEnv<W, S, S2> extends ServiceTagged<typeof PureEnvEnv> {
|
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* @tsplus static Pure.Ops get
|
|
78
|
-
* @tsplus location "
|
|
78
|
+
* @tsplus location "effect-app/Pure"
|
|
79
79
|
*/
|
|
80
80
|
export declare function get<S>(): Pure<never, S, S, never, never, S>;
|
|
81
81
|
/**
|
|
82
82
|
* @tsplus static Pure.Ops set
|
|
83
|
-
* @tsplus location "
|
|
83
|
+
* @tsplus location "effect-app/Pure"
|
|
84
84
|
*/
|
|
85
85
|
export declare function set<S>(s: S): Pure<never, S, S, never, never, void>;
|
|
86
86
|
export type PureLogT<W> = Pure<W, unknown, never, never, never, void>;
|
|
87
87
|
/**
|
|
88
88
|
* @tsplus static Pure.Ops log
|
|
89
|
-
* @tsplus location "
|
|
89
|
+
* @tsplus location "effect-app/Pure"
|
|
90
90
|
*/
|
|
91
91
|
export declare function log<W>(w: W): PureLogT<W>;
|
|
92
92
|
/**
|
|
93
93
|
* @tsplus static Pure.Ops logMany
|
|
94
|
-
* @tsplus location "
|
|
94
|
+
* @tsplus location "effect-app/Pure"
|
|
95
95
|
*/
|
|
96
96
|
export declare function logMany<W>(w: Iterable<W>): PureLogT<W>;
|
|
97
97
|
/**
|
|
98
98
|
* @tsplus static Pure.Ops runAll
|
|
99
99
|
* @tsplus fluent effect/io/Effect runAll
|
|
100
|
-
* @tsplus location "
|
|
100
|
+
* @tsplus location "effect-app/Pure"
|
|
101
101
|
*/
|
|
102
102
|
export declare function runAll<R, E, A, W3, S1, S3, S4 extends S1>(self: Effect<A, E, FixEnv<R, W3, S1, S3>>, s: S4): Effect<readonly [Chunk<W3>, Either.Either<E, readonly [S3, A]>], never, Exclude<R, {
|
|
103
103
|
env: PureEnv<W3, S1, S3>;
|
|
@@ -105,7 +105,7 @@ export declare function runAll<R, E, A, W3, S1, S3, S4 extends S1>(self: Effect<
|
|
|
105
105
|
/**
|
|
106
106
|
* @tsplus static Pure.Ops runResult
|
|
107
107
|
* @tsplus fluent effect/io/Effect runResult
|
|
108
|
-
* @tsplus location "
|
|
108
|
+
* @tsplus location "effect-app/Pure"
|
|
109
109
|
*/
|
|
110
110
|
export declare function runResult<R, E, A, W3, S1, S3, S4 extends S1>(self: Effect<A, E, FixEnv<R, W3, S1, S3>>, s: S4): import("effect/Effect").Effect<readonly [import("effect/Chunk").Chunk<W3>, Either.Either<E, S3>], never, Exclude<R, {
|
|
111
111
|
env: PureEnv<W3, S1, S3>;
|
|
@@ -113,7 +113,7 @@ export declare function runResult<R, E, A, W3, S1, S3, S4 extends S1>(self: Effe
|
|
|
113
113
|
/**
|
|
114
114
|
* @tsplus static Pure.Ops runTerm
|
|
115
115
|
* @tsplus fluent effect/io/Effect runTerm
|
|
116
|
-
* @tsplus location "
|
|
116
|
+
* @tsplus location "effect-app/Pure"
|
|
117
117
|
*/
|
|
118
118
|
export declare function runTerm<R, E, A, W3, S1, S3, S4 extends S1>(self: Effect<A, E, FixEnv<R, W3, S1, S3>>, s: S4): import("effect/Effect").Effect<readonly [S3, W3[], A], E, Exclude<R, {
|
|
119
119
|
env: PureEnv<W3, S1, S3>;
|
|
@@ -121,7 +121,7 @@ export declare function runTerm<R, E, A, W3, S1, S3, S4 extends S1>(self: Effect
|
|
|
121
121
|
/**
|
|
122
122
|
* @tsplus static Pure.Ops runTermDiscard
|
|
123
123
|
* @tsplus fluent effect/io/Effect runTermDiscard
|
|
124
|
-
* @tsplus location "
|
|
124
|
+
* @tsplus location "effect-app/Pure"
|
|
125
125
|
*/
|
|
126
126
|
export declare function runTermDiscard<R, E, A, W3, S1, S3, S4 extends S1>(self: Effect<A, E, FixEnv<R, W3, S1, S3>>, s: S4): import("effect/Effect").Effect<readonly [S3, W3[]], E, Exclude<R, {
|
|
127
127
|
env: PureEnv<W3, S1, S3>;
|
|
@@ -129,26 +129,26 @@ export declare function runTermDiscard<R, E, A, W3, S1, S3, S4 extends S1>(self:
|
|
|
129
129
|
/**
|
|
130
130
|
* @tsplus static Pure.Ops runA
|
|
131
131
|
* @tsplus fluent effect/io/Effect runA
|
|
132
|
-
* @tsplus location "
|
|
132
|
+
* @tsplus location "effect-app/Pure"
|
|
133
133
|
*/
|
|
134
134
|
export declare function runA<R, E, A, W3, S1, S3, S4 extends S1>(self: Effect<A, E, FixEnv<R, W3, S1, S3>>, s: S4): import("effect/Effect").Effect<readonly [import("effect/Chunk").Chunk<W3>, Either.Either<E, A>], never, Exclude<R, {
|
|
135
135
|
env: PureEnv<W3, S1, S3>;
|
|
136
136
|
}>>;
|
|
137
137
|
/**
|
|
138
138
|
* @tsplus static Pure.Ops modifyWith
|
|
139
|
-
* @tsplus location "
|
|
139
|
+
* @tsplus location "effect-app/Pure"
|
|
140
140
|
*/
|
|
141
141
|
export declare function modify<S2, A, S3>(mod: (s: S2) => readonly [S3, A]): Effect<A, never, {
|
|
142
142
|
env: PureEnv<never, S2, S3>;
|
|
143
143
|
}>;
|
|
144
144
|
/**
|
|
145
145
|
* @tsplus static Pure.Ops modifyWithEffect
|
|
146
|
-
* @tsplus location "
|
|
146
|
+
* @tsplus location "effect-app/Pure"
|
|
147
147
|
*/
|
|
148
148
|
export declare function modifyM<W, R, E, A, S2, S3>(mod: (s: S2) => Effect<readonly [S3, A], E, FixEnv<R, W, S2, S3>>): Effect<A, E, FixEnv<R, W, S2, S3>>;
|
|
149
149
|
/**
|
|
150
150
|
* @tsplus static Pure.Ops updateWith
|
|
151
|
-
* @tsplus location "
|
|
151
|
+
* @tsplus location "effect-app/Pure"
|
|
152
152
|
*/
|
|
153
153
|
export declare function update<S2, S3>(upd: (s: S2) => S3): import("effect/Effect").Effect<S3, never, {
|
|
154
154
|
env: PureEnv<never, S2, S3>;
|
|
@@ -156,7 +156,7 @@ export declare function update<S2, S3>(upd: (s: S2) => S3): import("effect/Effec
|
|
|
156
156
|
export type FixEnv<R, W, S, S2> = Exclude<R, PureEnvEnv<any, any, any>> | PureEnvEnv<W, S, S2>;
|
|
157
157
|
/**
|
|
158
158
|
* @tsplus static Pure.Ops updateWithEffect
|
|
159
|
-
* @tsplus location "
|
|
159
|
+
* @tsplus location "effect-app/Pure"
|
|
160
160
|
*/
|
|
161
161
|
export declare function updateM<W, R, E, S2, S3>(upd: (s: S2, log: (evt: W) => PureLogT<W>) => Effect<S3, E, FixEnv<R, W, S2, S3>>): Effect<S3, E, FixEnv<R, W, S2, S3>>;
|
|
162
162
|
/**
|
package/dist/Request.d.ts
CHANGED
|
@@ -10,40 +10,40 @@ export interface ResponseWithBody<A> extends Pick<ClientResponse, "headers" | "s
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* @tsplus getter effect/platform/Http/ClientResponse responseWithJsonBody
|
|
13
|
-
* @tsplus location "
|
|
13
|
+
* @tsplus location "effect-app/Request"
|
|
14
14
|
*/
|
|
15
15
|
export declare const responseWithJsonBody: (response: ClientResponse) => import("effect/Effect").Effect<ResponseWithBody<unknown>, import("@effect/platform/Http/ClientError").ResponseError, never>;
|
|
16
16
|
/**
|
|
17
17
|
* @tsplus fluent effect/platform/Http/Client schemaJsonBody
|
|
18
|
-
* @tsplus location "
|
|
18
|
+
* @tsplus location "effect-app/Request"
|
|
19
19
|
*/
|
|
20
|
-
export declare const schemaJsonBody: <R, To, From, A, B>(client: HttpClient<A, B, ClientResponse>, schema: Schema<To, From, R>) => import("@effect/platform/Http/Client").Client<R | A, import("@effect/platform/Http/ClientError").ResponseError |
|
|
20
|
+
export declare const schemaJsonBody: <R, To, From, A, B>(client: HttpClient<A, B, ClientResponse>, schema: Schema<To, From, R>) => import("@effect/platform/Http/Client").Client<R | A, import("@effect/platform/Http/ClientError").ResponseError | import("@effect/schema/ParseResult").ParseError | B, To>;
|
|
21
21
|
/**
|
|
22
22
|
* @tsplus fluent effect/platform/Http/Client schemaJsonBodyUnsafe
|
|
23
|
-
* @tsplus location "
|
|
23
|
+
* @tsplus location "effect-app/Request"
|
|
24
24
|
*/
|
|
25
25
|
export declare const schemaJsonBodyUnsafe: <To, From, A, B>(client: HttpClient<A, B, ClientResponse>, schema: Schema<To, From>) => import("@effect/platform/Http/Client").Client<A, import("@effect/platform/Http/ClientError").ResponseError | B, To>;
|
|
26
26
|
/**
|
|
27
27
|
* @tsplus fluent effect/platform/Http/Client schemaJson
|
|
28
|
-
* @tsplus location "
|
|
28
|
+
* @tsplus location "effect-app/Request"
|
|
29
29
|
*/
|
|
30
30
|
export declare const schemaJson: <R, From extends {
|
|
31
31
|
readonly status?: number;
|
|
32
32
|
readonly headers?: Headers;
|
|
33
33
|
readonly body?: unknown;
|
|
34
|
-
}, To, A, B>(client: HttpClient<A, B, ClientResponse>, schema: Schema<To, From, R>) => import("@effect/platform/Http/Client").Client<R | A, import("@effect/platform/Http/ClientError").ResponseError |
|
|
34
|
+
}, To, A, B>(client: HttpClient<A, B, ClientResponse>, schema: Schema<To, From, R>) => import("@effect/platform/Http/Client").Client<R | A, import("@effect/platform/Http/ClientError").ResponseError | import("@effect/schema/ParseResult").ParseError | B, To>;
|
|
35
35
|
/**
|
|
36
36
|
* @tsplus fluent effect/platform/Http/Client schemaJsonUnsafe
|
|
37
|
-
* @tsplus location "
|
|
37
|
+
* @tsplus location "effect-app/Request"
|
|
38
38
|
*/
|
|
39
39
|
export declare const schemaJsonUnsafe: <R, From extends {
|
|
40
40
|
readonly status?: number;
|
|
41
41
|
readonly headers?: Headers;
|
|
42
42
|
readonly body?: unknown;
|
|
43
|
-
}, To, A, B>(client: HttpClient<A, B, ClientResponse>, schema: Schema<To, From, R>) => import("@effect/platform/Http/Client").Client<R | A, import("@effect/platform/Http/ClientError").ResponseError |
|
|
43
|
+
}, To, A, B>(client: HttpClient<A, B, ClientResponse>, schema: Schema<To, From, R>) => import("@effect/platform/Http/Client").Client<R | A, import("@effect/platform/Http/ClientError").ResponseError | import("@effect/schema/ParseResult").ParseError | B, To>;
|
|
44
44
|
/**
|
|
45
45
|
* @tsplus getter effect/platform/Http/Client demandJson
|
|
46
|
-
* @tsplus location "
|
|
46
|
+
* @tsplus location "effect-app/Request"
|
|
47
47
|
*/
|
|
48
48
|
export declare const demandJson: <R, E>(client: HttpClient<R, E, ClientResponse>) => import("@effect/platform/Http/Client").Client<R, import("@effect/platform/Http/ClientError").ResponseError | E, ClientResponse>;
|
|
49
49
|
//# sourceMappingURL=Request.d.ts.map
|
package/dist/_ext/date.d.ts
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @tsplus fluent Date addDays
|
|
3
|
-
* @tsplus location "
|
|
3
|
+
* @tsplus location "effect-app/_ext/date"
|
|
4
4
|
*/
|
|
5
5
|
export declare const DateAddDays: (date: Date, amount: number) => Date;
|
|
6
6
|
/**
|
|
7
7
|
* @tsplus fluent Date subDays
|
|
8
|
-
* @tsplus location "
|
|
8
|
+
* @tsplus location "effect-app/_ext/date"
|
|
9
9
|
*/
|
|
10
10
|
export declare const DateSubDays: (date: Date, amount: number) => Date;
|
|
11
11
|
/**
|
|
12
12
|
* @tsplus fluent Date addHours
|
|
13
|
-
* @tsplus location "
|
|
13
|
+
* @tsplus location "effect-app/_ext/date"
|
|
14
14
|
*/
|
|
15
15
|
export declare const DateAddHours: (date: Date, amount: number) => Date;
|
|
16
16
|
/**
|
|
17
17
|
* @tsplus fluent Date subHours
|
|
18
|
-
* @tsplus location "
|
|
18
|
+
* @tsplus location "effect-app/_ext/date"
|
|
19
19
|
*/
|
|
20
20
|
export declare const DateSubHours: (date: Date, amount: number) => Date;
|
|
21
21
|
/**
|
|
22
22
|
* @tsplus fluent Date addMinutes
|
|
23
|
-
* @tsplus location "
|
|
23
|
+
* @tsplus location "effect-app/_ext/date"
|
|
24
24
|
*/
|
|
25
25
|
export declare const DateAddMinutes: (date: Date, amount: number) => Date;
|
|
26
26
|
/**
|
|
27
27
|
* @tsplus fluent Date subMinutes
|
|
28
|
-
* @tsplus location "
|
|
28
|
+
* @tsplus location "effect-app/_ext/date"
|
|
29
29
|
*/
|
|
30
30
|
export declare const DateSubMinutes: (date: Date, amount: number) => Date;
|
|
31
31
|
/**
|
|
32
32
|
* @tsplus fluent Date addSeconds
|
|
33
|
-
* @tsplus location "
|
|
33
|
+
* @tsplus location "effect-app/_ext/date"
|
|
34
34
|
*/
|
|
35
35
|
export declare const DateAddSeconds: (date: Date, amount: number) => Date;
|
|
36
36
|
/**
|
|
37
37
|
* @tsplus fluent Date subSeconds
|
|
38
|
-
* @tsplus location "
|
|
38
|
+
* @tsplus location "effect-app/_ext/date"
|
|
39
39
|
*/
|
|
40
40
|
export declare const DateSubSeconds: (date: Date, amount: number) => Date;
|
|
41
41
|
/**
|
|
42
42
|
* @tsplus fluent Date addYears
|
|
43
|
-
* @tsplus location "
|
|
43
|
+
* @tsplus location "effect-app/_ext/date"
|
|
44
44
|
*/
|
|
45
45
|
export declare const DateAddYears: (date: Date, amount: number) => Date;
|
|
46
46
|
/**
|
|
47
47
|
* @tsplus fluent Date subYears
|
|
48
|
-
* @tsplus location "
|
|
48
|
+
* @tsplus location "effect-app/_ext/date"
|
|
49
49
|
*/
|
|
50
50
|
export declare const DateSubYears: (date: Date, amount: number) => Date;
|
|
51
51
|
/**
|
|
52
52
|
* @tsplus fluent Date addMonths
|
|
53
|
-
* @tsplus location "
|
|
53
|
+
* @tsplus location "effect-app/_ext/date"
|
|
54
54
|
*/
|
|
55
55
|
export declare const DateAddMonths: (date: Date, amount: number) => Date;
|
|
56
56
|
/**
|
|
57
57
|
* @tsplus fluent Date subMonths
|
|
58
|
-
* @tsplus location "
|
|
58
|
+
* @tsplus location "effect-app/_ext/date"
|
|
59
59
|
*/
|
|
60
60
|
export declare const DateSubMonths: (date: Date, amount: number) => Date;
|
|
61
61
|
/**
|
|
62
62
|
* @tsplus fluent Date addWeeks
|
|
63
|
-
* @tsplus location "
|
|
63
|
+
* @tsplus location "effect-app/_ext/date"
|
|
64
64
|
*/
|
|
65
65
|
export declare const DateAddWeeks: (date: Date, amount: number) => Date;
|
|
66
66
|
/**
|
|
67
67
|
* @tsplus fluent Date subWeeks
|
|
68
|
-
* @tsplus location "
|
|
68
|
+
* @tsplus location "effect-app/_ext/date"
|
|
69
69
|
*/
|
|
70
70
|
export declare const DateSubWeeks: (date: Date, amount: number) => Date;
|
|
71
71
|
//# sourceMappingURL=date.d.ts.map
|
package/dist/_ext/misc.d.ts
CHANGED
|
@@ -13,62 +13,62 @@ export type _E<T extends Effect<any, any, any>> = [T] extends [
|
|
|
13
13
|
] ? E : never;
|
|
14
14
|
/**
|
|
15
15
|
* @tsplus fluent effect/data/Option encaseInEffect
|
|
16
|
-
* @tsplus location "
|
|
16
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
17
17
|
*/
|
|
18
18
|
export declare function encaseMaybeInEffect_<E, A>(o: Option<A>, onError: LazyArg<E>): Effect<A, E>;
|
|
19
19
|
/**
|
|
20
20
|
* @tsplus fluent effect/data/Option encaseInEither
|
|
21
|
-
* @tsplus location "
|
|
21
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
22
22
|
*/
|
|
23
23
|
export declare function encaseMaybeEither_<E, A>(o: Option<A>, onError: LazyArg<E>): Either.Either<E, A>;
|
|
24
24
|
/**
|
|
25
25
|
* @tsplus getter effect/io/Effect toNullable
|
|
26
|
-
* @tsplus location "
|
|
26
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
27
27
|
*/
|
|
28
28
|
export declare function toNullable<R, E, A>(self: Effect<Option<A>, E, R>): import("effect/Effect").Effect<A | null, E, R>;
|
|
29
29
|
/**
|
|
30
30
|
* @tsplus fluent effect/io/Effect scope
|
|
31
|
-
* @tsplus location "
|
|
31
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
32
32
|
*/
|
|
33
33
|
export declare function scope<R, E, A, R2, E2, A2>(scopedEffect: Effect<A, E, R | Scope>, effect: Effect<A2, E2, R2>): Effect<A2, E | E2, Exclude<R | R2, Scope>>;
|
|
34
34
|
/**
|
|
35
35
|
* @tsplus fluent effect/io/Effect flatMapScoped
|
|
36
|
-
* @tsplus location "
|
|
36
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
37
37
|
*/
|
|
38
38
|
export declare function flatMapScoped<R, E, A, R2, E2, A2>(scopedEffect: Effect<A, E, R | Scope>, effect: (a: A) => Effect<A2, E2, R2>): Effect<A2, E | E2, Exclude<R | R2, Scope>>;
|
|
39
39
|
/**
|
|
40
40
|
* Recovers from all errors.
|
|
41
41
|
* @tsplus static effect/io/Effect.Ops catchAllMap
|
|
42
42
|
* @tsplus pipeable effect/io/Effect catchAllMap
|
|
43
|
-
* @tsplus location "
|
|
43
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
44
44
|
*/
|
|
45
45
|
export declare function catchAllMap<E, A2>(f: (e: E) => A2): <R, A>(self: Effect<A, E, R>) => Effect<A2 | A, never, R>;
|
|
46
46
|
/**
|
|
47
47
|
* Annotates each log in this effect with the specified log annotations.
|
|
48
48
|
* @tsplus static effect/io/Effect.Ops annotateLogs
|
|
49
|
-
* @tsplus location "
|
|
49
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
50
50
|
*/
|
|
51
51
|
export declare function annotateLogs(kvps: Record<string, string>): <R, E, A>(effect: Effect<A, E, R>) => Effect<A, E, R>;
|
|
52
52
|
/**
|
|
53
53
|
* Annotates each log in this scope with the specified log annotation.
|
|
54
54
|
* @tsplus static effect/io/Effect.Ops annotateLogscoped
|
|
55
|
-
* @tsplus location "
|
|
55
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
56
56
|
*/
|
|
57
57
|
export declare function annotateLogscoped(key: string, value: string): import("effect/Effect").Effect<void, never, import("effect/Scope").Scope>;
|
|
58
58
|
/**
|
|
59
59
|
* Annotates each log in this scope with the specified log annotations.
|
|
60
60
|
* @tsplus static effect/io/Effect.Ops annotateLogsScoped
|
|
61
|
-
* @tsplus location "
|
|
61
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
62
62
|
*/
|
|
63
63
|
export declare function annotateLogsScoped(kvps: Record<string, string>): import("effect/Effect").Effect<void, never, import("effect/Scope").Scope>;
|
|
64
64
|
/**
|
|
65
65
|
* @tsplus fluent function flow
|
|
66
|
-
* @tsplus location "
|
|
66
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
67
67
|
*/
|
|
68
68
|
export declare function flow<Args extends readonly any[], B, C>(f: (...args: Args) => B, g: (b: B) => C): (...args: Args) => C;
|
|
69
69
|
/**
|
|
70
70
|
* @tsplus fluent effect/platform/Http/Client request
|
|
71
|
-
* @tsplus location "
|
|
71
|
+
* @tsplus location "effect-app/_ext/misc"
|
|
72
72
|
*/
|
|
73
73
|
export declare const client: {
|
|
74
74
|
<A, B, C, R, E>(client: HttpClient<A, B, C>, req: Effect<ClientRequest, E, R>): Effect<C, B | E, A | R>;
|
|
@@ -41,34 +41,34 @@ export type QueryResult<E, A> = Initial | Loading | Refreshing<E, A> | Done<E, A
|
|
|
41
41
|
type Result<E, A> = Omit<Done<E, A>, "current"> | Omit<Refreshing<E, A>, "current">;
|
|
42
42
|
/**
|
|
43
43
|
* @tsplus fluent QueryResult isSuccess
|
|
44
|
-
* @tsplus location "
|
|
44
|
+
* @tsplus location "effect-app/client/QueryResult"
|
|
45
45
|
*/
|
|
46
46
|
export declare function isSuccess<E, A>(qr: QueryResult<E, A>): qr is Result<E, A> & {
|
|
47
47
|
current: Either.Right<E, A>;
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* @tsplus fluent QueryResult hasValue
|
|
51
|
-
* @tsplus location "
|
|
51
|
+
* @tsplus location "effect-app/client/QueryResult"
|
|
52
52
|
*/
|
|
53
53
|
export declare function hasValue<E, A>(qr: QueryResult<E, A>): qr is Done<E, A> | Refreshing<E, A>;
|
|
54
54
|
/**
|
|
55
55
|
* @tsplus fluent QueryResult isRefreshing
|
|
56
|
-
* @tsplus location "
|
|
56
|
+
* @tsplus location "effect-app/client/QueryResult"
|
|
57
57
|
*/
|
|
58
58
|
export declare function isRefreshing<E, A>(qr: QueryResult<E, A>): qr is Refreshing<E, A>;
|
|
59
59
|
/**
|
|
60
60
|
* @tsplus fluent QueryResult isDone
|
|
61
|
-
* @tsplus location "
|
|
61
|
+
* @tsplus location "effect-app/client/QueryResult"
|
|
62
62
|
*/
|
|
63
63
|
export declare function isDone<E, A>(qr: QueryResult<E, A>): qr is Done<E, A>;
|
|
64
64
|
/**
|
|
65
65
|
* @tsplus fluent QueryResult isInitializing
|
|
66
|
-
* @tsplus location "
|
|
66
|
+
* @tsplus location "effect-app/client/QueryResult"
|
|
67
67
|
*/
|
|
68
68
|
export declare function isInitializing<E, A>(qr: QueryResult<E, A>): qr is Initial | Loading;
|
|
69
69
|
/**
|
|
70
70
|
* @tsplus fluent QueryResult isFailed
|
|
71
|
-
* @tsplus location "
|
|
71
|
+
* @tsplus location "effect-app/client/QueryResult"
|
|
72
72
|
*/
|
|
73
73
|
export declare function isFailed<E, A>(qr: QueryResult<E, A>): qr is Result<E, A> & {
|
|
74
74
|
current: Either.Left<E, A>;
|
|
@@ -78,7 +78,7 @@ export type QueryResultTuple<E, A> = ResultTuple<QueryResult<E, A>>;
|
|
|
78
78
|
export declare const fail: typeof Done.fail, succeed: typeof Done.succeed;
|
|
79
79
|
/**
|
|
80
80
|
* @tsplus getter effect/io/Effect asQueryResult
|
|
81
|
-
* @tsplus location "
|
|
81
|
+
* @tsplus location "effect-app/client/QueryResult"
|
|
82
82
|
*/
|
|
83
83
|
export declare function queryResult<R, E, A>(self: Effect<A, E, R>): Effect<QueryResult<E, A>, never, R>;
|
|
84
84
|
export {};
|
package/dist/client/fetch.d.ts
CHANGED
|
@@ -15,12 +15,12 @@ export declare function fetchApi(method: Method, path: string, body?: unknown):
|
|
|
15
15
|
status: number;
|
|
16
16
|
body: unknown;
|
|
17
17
|
headers: import("@effect/platform/Http/Headers").Headers;
|
|
18
|
-
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | HttpRequestError | HttpResponseError<unknown>,
|
|
18
|
+
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | HttpRequestError | HttpResponseError<unknown>, import("@effect/platform/Http/Client").Client.Default | ApiConfig>;
|
|
19
19
|
export declare function fetchApi2S<RequestR, RequestFrom, RequestTo, ResponseR, ResponseFrom, ResponseTo>(request: Schema<RequestTo, RequestFrom, RequestR>, response: Schema<ResponseTo, ResponseFrom, ResponseR>): (method: Method, path: Path) => (req: RequestTo) => import("effect/Effect").Effect<{
|
|
20
20
|
body: ResponseTo;
|
|
21
21
|
headers: Headers;
|
|
22
22
|
status: number;
|
|
23
|
-
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | import("@effect/schema/ParseResult").ParseError |
|
|
23
|
+
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | HttpRequestError | ResponseError | import("@effect/schema/ParseResult").ParseError | HttpResponseError<unknown>, import("@effect/platform/Http/Client").Client.Default | ApiConfig | RequestR | ResponseR>;
|
|
24
24
|
export declare function fetchApi3S<RequestA, RequestE, ResponseE = unknown, ResponseA = void>({ Request, Response }: {
|
|
25
25
|
Request: REST.RequestSchemed<RequestA, RequestE>;
|
|
26
26
|
Response: REST.ReqRes<ResponseA, ResponseE, any>;
|
|
@@ -28,11 +28,11 @@ export declare function fetchApi3S<RequestA, RequestE, ResponseE = unknown, Resp
|
|
|
28
28
|
body: ResponseA;
|
|
29
29
|
headers: Headers;
|
|
30
30
|
status: number;
|
|
31
|
-
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | import("@effect/schema/ParseResult").ParseError |
|
|
31
|
+
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | HttpRequestError | ResponseError | import("@effect/schema/ParseResult").ParseError | HttpResponseError<unknown>, any>;
|
|
32
32
|
export declare function fetchApi3SE<RequestA, RequestE, ResponseE = unknown, ResponseA = void>({ Request, Response }: {
|
|
33
33
|
Request: REST.RequestSchemed<RequestA, RequestE>;
|
|
34
34
|
Response: REST.ReqRes<ResponseA, ResponseE, any>;
|
|
35
|
-
}): (req: RequestA) => import("effect/Effect").Effect<FetchResponse<ResponseE>, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | import("@effect/schema/ParseResult").ParseError |
|
|
35
|
+
}): (req: RequestA) => import("effect/Effect").Effect<FetchResponse<ResponseE>, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | HttpRequestError | ResponseError | import("@effect/schema/ParseResult").ParseError | HttpResponseError<unknown>, any>;
|
|
36
36
|
export declare function makePathWithQuery(path: Path, pars: Record<string, string | number | boolean | readonly string[] | readonly number[] | readonly boolean[] | null>): string;
|
|
37
37
|
export declare function makePathWithBody(path: Path, pars: Record<string, string | number | boolean | readonly string[] | readonly number[] | readonly boolean[] | null>): string;
|
|
38
38
|
export declare function mapResponse<T, A>(map: (t: T) => A): (r: FetchResponse<T>) => FetchResponse<A>;
|
package/dist/client/fetch.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as tsplus_module_5 from "effect-app/schema";
|
|
|
6
6
|
import * as tsplus_module_6 from "@effect/platform/Http/ClientRequest";
|
|
7
7
|
import * as tsplus_module_7 from "@effect/platform/Http/Client";
|
|
8
8
|
import * as tsplus_module_8 from "effect-app/Request";
|
|
9
|
-
import * as tsplus_module_9 from "
|
|
9
|
+
import * as tsplus_module_9 from "effect-app/_ext/misc";
|
|
10
10
|
import * as tsplus_module_10 from "effect-app";
|
|
11
11
|
import * as tsplus_module_11 from "effect/ReadonlyRecord";
|
|
12
12
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
package/dist/refinements.d.ts
CHANGED
|
@@ -5,17 +5,17 @@ import type { Clone } from "@fp-ts/optic";
|
|
|
5
5
|
import { InvalidStateError } from "./client.js";
|
|
6
6
|
/**
|
|
7
7
|
* @tsplus getter function asCollectable
|
|
8
|
-
* @tsplus location "
|
|
8
|
+
* @tsplus location "effect-app/refinements"
|
|
9
9
|
*/
|
|
10
10
|
export declare function asCollectable<T, T2 extends T>(refinement: Refinement<T, T2>): (a: T) => import("effect/Option").Option<T2>;
|
|
11
11
|
/**
|
|
12
12
|
* @tsplus fluent function as
|
|
13
|
-
* @tsplus location "
|
|
13
|
+
* @tsplus location "effect-app/refinements"
|
|
14
14
|
*/
|
|
15
15
|
export declare function as<T, T2 extends T>(refinement: Refinement<T, T2>, name: string): (a: T) => import("effect/Either").Either<InvalidStateError, T2>;
|
|
16
16
|
/**
|
|
17
17
|
* @tsplus fluent function refinements
|
|
18
|
-
* @tsplus location "
|
|
18
|
+
* @tsplus location "effect-app/refinements"
|
|
19
19
|
*/
|
|
20
20
|
export declare function makeAwesome<T, T2 extends T>(refinement: Refinement<T, T2>, name: string): {
|
|
21
21
|
$item: (item: T) => {
|
|
@@ -32,12 +32,12 @@ export interface Collect<A, B extends A> {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* @tsplus fluent function as
|
|
35
|
-
* @tsplus location "
|
|
35
|
+
* @tsplus location "effect-app/refinements"
|
|
36
36
|
*/
|
|
37
37
|
export declare function asOption<T, T2 extends T>(collect: Collect<T, T2>, name: string): (a: T) => import("effect/Either").Either<InvalidStateError, T2>;
|
|
38
38
|
/**
|
|
39
39
|
* @tsplus fluent function refinements
|
|
40
|
-
* @tsplus location "
|
|
40
|
+
* @tsplus location "effect-app/refinements"
|
|
41
41
|
*/
|
|
42
42
|
export declare function makeAwesomeCollect<T extends Object, T2 extends T>(collect: Collect<T, T2>, name: string): {
|
|
43
43
|
$item: (item: T) => {
|
package/dist/refinements.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as tsplus_module_1 from "effect/Option";
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
2
|
+
import * as tsplus_module_2 from "effect-app/_ext/misc";
|
|
3
3
|
import * as tsplus_module_3 from "@effect-app/core/Function";
|
|
4
4
|
import * as tsplus_module_4 from "@fp-ts/optic/index";
|
|
5
5
|
export const asCollectable = asCollectable_1;
|
package/dist/service.d.ts
CHANGED
|
@@ -22,12 +22,12 @@ export declare abstract class ServiceTagged<ServiceKey> extends PhantomTypeParam
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* @tsplus static ServiceTagged make
|
|
25
|
-
* @tsplus location "
|
|
25
|
+
* @tsplus location "effect-app/service"
|
|
26
26
|
*/
|
|
27
27
|
export declare function makeService<T extends ServiceTagged<any>>(_: Omit<T, ServiceTag>): T;
|
|
28
28
|
/**
|
|
29
29
|
* @tsplus fluent effect/data/Context/Tag make
|
|
30
|
-
* @tsplus location "
|
|
30
|
+
* @tsplus location "effect-app/service"
|
|
31
31
|
*/
|
|
32
32
|
export declare function make<T extends ServiceTagged<any>, I = T>(_: Tag<I, T>, t: Omit<T, ServiceTag>): T;
|
|
33
33
|
export declare const TagTypeId: TagTypeIdOriginal;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "effect-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.153.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"ts-pattern": "^5.0.6",
|
|
17
17
|
"uuid": "^9.0.1",
|
|
18
18
|
"validator": "^13.11.0",
|
|
19
|
-
"@effect-app/core": "0.
|
|
20
|
-
"@effect-app/
|
|
21
|
-
"@effect-app/
|
|
19
|
+
"@effect-app/core": "0.131.1",
|
|
20
|
+
"@effect-app/schema": "0.184.1",
|
|
21
|
+
"@effect-app/fluent-extensions": "0.126.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@babel/cli": "^7.23.9",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"ts-node": "^10.9.2",
|
|
31
31
|
"typescript": "npm:@effect-app/typescript@5.4.0-tsplus.20240124",
|
|
32
32
|
"vitest": "^1.2.2",
|
|
33
|
-
"@effect-app/compiler": "0.
|
|
33
|
+
"@effect-app/compiler": "0.62.0"
|
|
34
34
|
},
|
|
35
35
|
"typesVersions": {
|
|
36
36
|
"*": {
|
package/tsplus.config.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"importMap": {
|
|
3
|
+
"^(.*)/packages/prelude/_src/(.*)\\.[cm]?[tj]s$": "effect-app/$2",
|
|
3
4
|
"^(.*)/packages/(.*)/_src/(.*)\\.[cm]?[tj]s$": "@effect-app/$2/$3",
|
|
5
|
+
"^(.*)/node_modules/@effect-app/prelude/_src/(.*)\\.[cm]?[tj]s$": "effect-app/$2",
|
|
4
6
|
"^(.*)/node_modules/@effect-app/(.*)/_src/(.*)\\.[cm]?[tj]s$": "@effect-app/$2/$3",
|
|
5
7
|
".pnpm/[^\/]*/node_modules/(.*)": "$1"
|
|
6
8
|
}
|