effect-app 1.2.1 → 1.2.2
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 +9 -0
- package/dist/client/errors.d.ts +24 -91
- package/dist/client/errors.d.ts.map +1 -1
- package/dist/schema.d.ts +2 -2
- package/dist/schema.d.ts.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
package/dist/client/errors.d.ts
CHANGED
|
@@ -1,109 +1,58 @@
|
|
|
1
1
|
import { Cause, Effect, S } from "../lib.js";
|
|
2
|
-
declare const NotFoundError_base:
|
|
3
|
-
readonly _tag: S.
|
|
2
|
+
declare const NotFoundError_base: S.TaggedErrorClass<NotFoundError<ItemType>, "NotFoundError", {
|
|
3
|
+
readonly _tag: S.PropertySignature<":", "NotFoundError", never, ":", "NotFoundError", true, never>;
|
|
4
4
|
} & {
|
|
5
5
|
type: typeof S.String;
|
|
6
6
|
id: typeof S.Unknown;
|
|
7
|
-
}
|
|
8
|
-
readonly _tag: "NotFoundError";
|
|
9
|
-
readonly id: unknown;
|
|
10
|
-
readonly type: string;
|
|
11
|
-
}, {
|
|
12
|
-
readonly _tag: "NotFoundError";
|
|
13
|
-
readonly id: unknown;
|
|
14
|
-
readonly type: string;
|
|
15
|
-
}, never, {
|
|
16
|
-
readonly id: unknown;
|
|
17
|
-
readonly type: string;
|
|
18
|
-
}, {}, Cause.YieldableError>;
|
|
7
|
+
}>;
|
|
19
8
|
export declare class NotFoundError<ItemType = string> extends NotFoundError_base {
|
|
20
9
|
get message(): string;
|
|
21
10
|
}
|
|
22
|
-
declare const InvalidStateError_base:
|
|
23
|
-
readonly _tag: S.
|
|
11
|
+
declare const InvalidStateError_base: S.TaggedErrorClass<InvalidStateError, "InvalidStateError", {
|
|
12
|
+
readonly _tag: S.PropertySignature<":", "InvalidStateError", never, ":", "InvalidStateError", true, never>;
|
|
24
13
|
} & {
|
|
25
14
|
message: typeof S.String;
|
|
26
|
-
}
|
|
27
|
-
readonly _tag: "InvalidStateError";
|
|
28
|
-
readonly message: string;
|
|
29
|
-
}, {
|
|
30
|
-
readonly _tag: "InvalidStateError";
|
|
31
|
-
readonly message: string;
|
|
32
|
-
}, never, {
|
|
33
|
-
readonly message: string;
|
|
34
|
-
}, {}, Cause.YieldableError>;
|
|
15
|
+
}>;
|
|
35
16
|
export declare class InvalidStateError extends InvalidStateError_base {
|
|
36
17
|
constructor(messageOrObject: string | {
|
|
37
18
|
message: string;
|
|
38
19
|
}, disableValidation?: boolean);
|
|
39
20
|
}
|
|
40
|
-
declare const ServiceUnavailableError_base:
|
|
41
|
-
readonly _tag: S.
|
|
21
|
+
declare const ServiceUnavailableError_base: S.TaggedErrorClass<ServiceUnavailableError, "ServiceUnavailableError", {
|
|
22
|
+
readonly _tag: S.PropertySignature<":", "ServiceUnavailableError", never, ":", "ServiceUnavailableError", true, never>;
|
|
42
23
|
} & {
|
|
43
24
|
message: typeof S.String;
|
|
44
|
-
}
|
|
45
|
-
readonly _tag: "ServiceUnavailableError";
|
|
46
|
-
readonly message: string;
|
|
47
|
-
}, {
|
|
48
|
-
readonly _tag: "ServiceUnavailableError";
|
|
49
|
-
readonly message: string;
|
|
50
|
-
}, never, {
|
|
51
|
-
readonly message: string;
|
|
52
|
-
}, {}, Cause.YieldableError>;
|
|
25
|
+
}>;
|
|
53
26
|
export declare class ServiceUnavailableError extends ServiceUnavailableError_base {
|
|
54
27
|
constructor(messageOrObject: string | {
|
|
55
28
|
message: string;
|
|
56
29
|
}, disableValidation?: boolean);
|
|
57
30
|
}
|
|
58
|
-
declare const ValidationError_base:
|
|
59
|
-
readonly _tag: S.
|
|
31
|
+
declare const ValidationError_base: S.TaggedErrorClass<ValidationError, "ValidationError", {
|
|
32
|
+
readonly _tag: S.PropertySignature<":", "ValidationError", never, ":", "ValidationError", true, never>;
|
|
60
33
|
} & {
|
|
61
34
|
errors: S.$Array<typeof S.Unknown> & {
|
|
62
35
|
withDefault: S.PropertySignature<":", readonly unknown[], never, ":", readonly unknown[], true, never>;
|
|
63
36
|
};
|
|
64
|
-
}
|
|
65
|
-
readonly _tag: "ValidationError";
|
|
66
|
-
readonly errors: readonly unknown[];
|
|
67
|
-
}, {
|
|
68
|
-
readonly _tag: "ValidationError";
|
|
69
|
-
readonly errors: readonly unknown[];
|
|
70
|
-
}, never, {
|
|
71
|
-
readonly errors: readonly unknown[];
|
|
72
|
-
}, {}, Cause.YieldableError>;
|
|
37
|
+
}>;
|
|
73
38
|
export declare class ValidationError extends ValidationError_base {
|
|
74
39
|
get message(): string;
|
|
75
40
|
}
|
|
76
|
-
declare const NotLoggedInError_base:
|
|
77
|
-
readonly _tag: S.
|
|
41
|
+
declare const NotLoggedInError_base: S.TaggedErrorClass<NotLoggedInError, "NotLoggedInError", {
|
|
42
|
+
readonly _tag: S.PropertySignature<":", "NotLoggedInError", never, ":", "NotLoggedInError", true, never>;
|
|
78
43
|
} & {
|
|
79
44
|
message: S.PropertySignature<"?:", string | undefined, never, "?:", string | undefined, false, never>;
|
|
80
|
-
}
|
|
81
|
-
readonly _tag: "NotLoggedInError";
|
|
82
|
-
readonly message?: string | undefined;
|
|
83
|
-
}, {
|
|
84
|
-
readonly _tag: "NotLoggedInError";
|
|
85
|
-
readonly message?: string | undefined;
|
|
86
|
-
}, never, {
|
|
87
|
-
readonly message?: string | undefined;
|
|
88
|
-
}, {}, Cause.YieldableError>;
|
|
45
|
+
}>;
|
|
89
46
|
export declare class NotLoggedInError extends NotLoggedInError_base {
|
|
90
47
|
constructor(messageOrObject?: string | {
|
|
91
48
|
message?: string;
|
|
92
49
|
}, disableValidation?: boolean);
|
|
93
50
|
}
|
|
94
|
-
declare const LoginError_base:
|
|
95
|
-
readonly _tag: S.
|
|
51
|
+
declare const LoginError_base: S.TaggedErrorClass<LoginError, "NotLoggedInError", {
|
|
52
|
+
readonly _tag: S.PropertySignature<":", "NotLoggedInError", never, ":", "NotLoggedInError", true, never>;
|
|
96
53
|
} & {
|
|
97
54
|
message: S.PropertySignature<"?:", string | undefined, never, "?:", string | undefined, false, never>;
|
|
98
|
-
}
|
|
99
|
-
readonly _tag: "NotLoggedInError";
|
|
100
|
-
readonly message?: string | undefined;
|
|
101
|
-
}, {
|
|
102
|
-
readonly _tag: "NotLoggedInError";
|
|
103
|
-
readonly message?: string | undefined;
|
|
104
|
-
}, never, {
|
|
105
|
-
readonly message?: string | undefined;
|
|
106
|
-
}, {}, Cause.YieldableError>;
|
|
55
|
+
}>;
|
|
107
56
|
/**
|
|
108
57
|
* The user carries a valid Userprofile, but there is a problem with the login none the less.
|
|
109
58
|
*/
|
|
@@ -112,19 +61,11 @@ export declare class LoginError extends LoginError_base {
|
|
|
112
61
|
message?: string;
|
|
113
62
|
}, disableValidation?: boolean);
|
|
114
63
|
}
|
|
115
|
-
declare const UnauthorizedError_base:
|
|
116
|
-
readonly _tag: S.
|
|
64
|
+
declare const UnauthorizedError_base: S.TaggedErrorClass<UnauthorizedError, "UnauthorizedError", {
|
|
65
|
+
readonly _tag: S.PropertySignature<":", "UnauthorizedError", never, ":", "UnauthorizedError", true, never>;
|
|
117
66
|
} & {
|
|
118
67
|
message: S.PropertySignature<"?:", string | undefined, never, "?:", string | undefined, false, never>;
|
|
119
|
-
}
|
|
120
|
-
readonly _tag: "UnauthorizedError";
|
|
121
|
-
readonly message?: string | undefined;
|
|
122
|
-
}, {
|
|
123
|
-
readonly _tag: "UnauthorizedError";
|
|
124
|
-
readonly message?: string | undefined;
|
|
125
|
-
}, never, {
|
|
126
|
-
readonly message?: string | undefined;
|
|
127
|
-
}, {}, Cause.YieldableError>;
|
|
68
|
+
}>;
|
|
128
69
|
export declare class UnauthorizedError extends UnauthorizedError_base {
|
|
129
70
|
constructor(messageOrObject?: string | {
|
|
130
71
|
message?: string;
|
|
@@ -136,19 +77,11 @@ type OptimisticConcurrencyDetails = {
|
|
|
136
77
|
readonly current?: string | undefined;
|
|
137
78
|
readonly found?: string | undefined;
|
|
138
79
|
};
|
|
139
|
-
declare const OptimisticConcurrencyException_base:
|
|
140
|
-
readonly _tag: S.
|
|
80
|
+
declare const OptimisticConcurrencyException_base: S.TaggedErrorClass<OptimisticConcurrencyException, "OptimisticConcurrencyException", {
|
|
81
|
+
readonly _tag: S.PropertySignature<":", "OptimisticConcurrencyException", never, ":", "OptimisticConcurrencyException", true, never>;
|
|
141
82
|
} & {
|
|
142
83
|
message: typeof S.String;
|
|
143
|
-
}
|
|
144
|
-
readonly _tag: "OptimisticConcurrencyException";
|
|
145
|
-
readonly message: string;
|
|
146
|
-
}, {
|
|
147
|
-
readonly _tag: "OptimisticConcurrencyException";
|
|
148
|
-
readonly message: string;
|
|
149
|
-
}, never, {
|
|
150
|
-
readonly message: string;
|
|
151
|
-
}, {}, Cause.YieldableError>;
|
|
84
|
+
}>;
|
|
152
85
|
export declare class OptimisticConcurrencyException extends OptimisticConcurrencyException_base {
|
|
153
86
|
readonly details?: OptimisticConcurrencyDetails;
|
|
154
87
|
constructor(args: OptimisticConcurrencyDetails | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/client/errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAa,CAAC,EAAE,MAAM,WAAW,CAAA
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/client/errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAa,CAAC,EAAE,MAAM,WAAW,CAAA;;;;;;;AAIvD,qBAAa,aAAa,CAAC,QAAQ,GAAG,MAAM,CAAE,SAAQ,kBAGpD;IACA,IAAa,OAAO,WAEnB;CACF;;;;;;AAED,qBAAa,iBAAkB,SAAQ,sBAErC;gBACY,eAAe,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,iBAAiB,CAAC,EAAE,OAAO;CAGvF;;;;;;AAED,qBAAa,uBAAwB,SAAQ,4BAE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AAe,CAAC,CAAA;AAanE,eAAO,MAAM,cAAc,gOAAkB,CAAA;AAC7C,eAAO,MAAM,WAAW,gOAAkB,CAAA;AAC1C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC,CAAA;AACjE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAA;AAE3D,eAAO,MAAM,aAAa,eAA0C,CAAA;AACpE,eAAO,MAAM,eAAe,MAAO,OAAO,KAAG,OAC2C,CAAA;AAExF,qBAAa,cAAc,CAAC,CAAC,CAAE,SAAQ,KAAK;IAC9B,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM;gBAA9C,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,EAAW,IAAI,EAAE,MAAM;IAYnE,MAAM;;;;;;;IAaG,QAAQ;IAIjB,CAAC,aAAa,CAAC,UAAQ;CACxB;AAED,eAAO,MAAM,qBAAqB,UAAW,MAAM,OAAO,CAAC,SAAS,MAAM,sCAUtE,CAAA"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { Array } from "@effect-app/core";
|
|
|
2
2
|
import { type Email as EmailT, type PhoneNumber as PhoneNumberT } from "@effect-app/schema";
|
|
3
3
|
import * as S from "@effect-app/schema";
|
|
4
4
|
export * from "@effect-app/schema";
|
|
5
|
-
export declare const Email: S.WithDefaults<S.
|
|
5
|
+
export declare const Email: S.WithDefaults<S.refine<string & S.EmailBrand, S.Schema<string, string, never>>> & S.refine<string & S.EmailBrand, S.Schema<string, string, never>>;
|
|
6
6
|
export type Email = EmailT;
|
|
7
|
-
export declare const PhoneNumber: S.WithDefaults<S.
|
|
7
|
+
export declare const PhoneNumber: S.WithDefaults<S.refine<string & S.PhoneNumberBrand, S.Schema<string, string, never>>> & S.refine<string & S.PhoneNumberBrand, S.Schema<string, string, never>>;
|
|
8
8
|
export declare const makeIs: <A extends {
|
|
9
9
|
_tag: string;
|
|
10
10
|
}, I, R>(schema: S.Schema<A, I, R>) => Is<A>;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAgB,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAU,KAAK,KAAK,IAAI,MAAM,EAAE,KAAK,WAAW,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACnG,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAA;AAIvC,cAAc,oBAAoB,CAAA;AAElC,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAgB,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAU,KAAK,KAAK,IAAI,MAAM,EAAE,KAAK,WAAW,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACnG,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAA;AAIvC,cAAc,oBAAoB,CAAA;AAElC,eAAO,MAAM,KAAK,qJAQf,CAAA;AAEH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAA;AAE1B,eAAO,MAAM,WAAW,iKASrB,CAAA;AAEH,eAAO,MAAM,MAAM;UAAsB,MAAM;iBACrC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,UA6B1B,CAAA;AAED,eAAO,MAAM,WAAW;UAAsB,MAAM;iBAC1C,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KACxB,MAAM,CAAC,CAMT,CAAA;AAED,eAAO,MAAM,iBAAiB;UAAsB,MAAM;iBAChD,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAA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|
"validator": "^13.11.0",
|
|
15
|
-
"@effect-app/core": "1.1.
|
|
16
|
-
"@effect-app/schema": "1.1.
|
|
15
|
+
"@effect-app/core": "1.1.2",
|
|
16
|
+
"@effect-app/schema": "1.1.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@babel/cli": "^7.24.5",
|
|
20
20
|
"@faker-js/faker": "^8.4.1",
|
|
21
|
-
"@types/node": "~20.12.
|
|
21
|
+
"@types/node": "~20.12.8",
|
|
22
22
|
"@types/uuid": "^9.0.8",
|
|
23
23
|
"@types/validator": "^13.11.9",
|
|
24
24
|
"fast-check": "~3.18.0",
|
|
25
25
|
"ts-node": "^10.9.2",
|
|
26
26
|
"typescript": "^5.4.5",
|
|
27
|
-
"vitest": "^1.5.
|
|
27
|
+
"vitest": "^1.5.3"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@effect/platform": "^0.
|
|
31
|
-
"effect": "^3.1.
|
|
32
|
-
"@effect/schema": "^0.66.
|
|
30
|
+
"@effect/platform": "^0.52.1",
|
|
31
|
+
"effect": "^3.1.1",
|
|
32
|
+
"@effect/schema": "^0.66.13"
|
|
33
33
|
},
|
|
34
34
|
"typesVersions": {
|
|
35
35
|
"*": {
|