@effect-app/infra 0.74.7 → 0.75.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/.cache/effect/095519d034161945a8d2616a506d3e7f35a9b3d868814f44c747429c60fc4e7f.content +36 -2
- package/.cache/effect/095519d034161945a8d2616a506d3e7f35a9b3d868814f44c747429c60fc4e7f.hash +1 -1
- package/.cache/effect/134218688132dfbdea493cbe1f26e73449f2759121df35ddd5448346b59c9a8d.content +24 -6
- package/.cache/effect/134218688132dfbdea493cbe1f26e73449f2759121df35ddd5448346b59c9a8d.hash +1 -1
- package/.cache/effect/14eb9da4ca6d22162888c7fdb7f39ab772d2a2dc6625db6031ecdb32ac89158f.content +75 -40
- package/.cache/effect/14eb9da4ca6d22162888c7fdb7f39ab772d2a2dc6625db6031ecdb32ac89158f.hash +1 -1
- package/.cache/effect/1bfd92946b11da4292f2ed99dc0e322462b60559148f9524abc20e26f70779e1.hash +1 -1
- package/.cache/effect/49c1bd9ec26e6df78b994d8df0bfe21b119803fa4aa46349bf4679fd0f1e7cda.content +3 -1
- package/.cache/effect/49c1bd9ec26e6df78b994d8df0bfe21b119803fa4aa46349bf4679fd0f1e7cda.hash +1 -1
- package/.cache/effect/58d4ccde8bd2db7829706db5bebd01b99900ee83f0f6a8413b53d17cbd69f510.content +1 -1
- package/.cache/effect/58d4ccde8bd2db7829706db5bebd01b99900ee83f0f6a8413b53d17cbd69f510.hash +1 -1
- package/.cache/effect/72a5a16a6b62b63cd71719c833091128207d7e6c823cb32293549b3dd58c451b.content +15 -7
- package/.cache/effect/72a5a16a6b62b63cd71719c833091128207d7e6c823cb32293549b3dd58c451b.hash +1 -1
- package/.cache/effect/7a9c33db6aedaf00093a132c1d4e48e9d043cef05e932b8a37da24d44e224248.hash +1 -1
- package/.cache/effect/8594f0f42afc0641b00e88998000cc47382a1d07da31f4a148f7976701ca22d5.hash +1 -1
- package/.cache/effect/c67d971634d2dc8118b40452b61c9a51620c35809be4a89982476aa80701d852.hash +1 -1
- package/.cache/effect/f38adf43700dab905456a534a0690eaf882cff2cd576c731f23d6d14a3c3d659.content +5 -1
- package/.cache/effect/f38adf43700dab905456a534a0690eaf882cff2cd576c731f23d6d14a3c3d659.hash +1 -1
- package/CHANGELOG.md +14 -0
- package/_cjs/_ext/Array.cjs +1 -1
- package/_cjs/api/defaultErrorHandler.cjs +3 -3
- package/_cjs/api/express/makeJsonSchema.cjs +2 -2
- package/_cjs/api/express/makeJsonSchema.test.cjs +2 -2
- package/_cjs/api/express/makeOpenApiSpecs.cjs +2 -2
- package/_cjs/api/express/schema/requestHandler.cjs +4 -4
- package/_cjs/api/express/schema/routing.cjs +2 -2
- package/_cjs/api/reportError.cjs +2 -2
- package/_cjs/api/routing.cjs +3 -3
- package/_cjs/api/setupRequest.cjs +1 -1
- package/_cjs/api/writeDocs.cjs +2 -2
- package/_cjs/errorReporter.cjs +2 -2
- package/_cjs/errors.cjs +10 -8
- package/_cjs/errors.cjs.map +1 -1
- package/_cjs/instrument.cjs +1 -1
- package/_cjs/logger/jsonLogger.cjs +5 -5
- package/_cjs/logger/logFmtLogger.cjs +2 -2
- package/_cjs/logger/shared.cjs +5 -5
- package/_cjs/rateLimit.cjs +1 -1
- package/_cjs/services/Emailer/Sendgrid.cjs +4 -4
- package/_cjs/services/Emailer/fake.cjs +2 -2
- package/_cjs/services/Operations/live.cjs +8 -8
- package/_cjs/services/Operations/service.cjs +2 -2
- package/_cjs/services/Operations/service.cjs.map +1 -1
- package/_cjs/services/QueueMaker/errors.cjs +3 -3
- package/_cjs/services/QueueMaker/memQueue.cjs +2 -2
- package/_cjs/services/QueueMaker/sbqueue.cjs +2 -2
- package/_cjs/services/Repository.cjs +2 -2
- package/_cjs/services/RepositoryBase.cjs +4 -4
- package/_cjs/services/RequestContextContainer.cjs +4 -4
- package/_cjs/services/Store/Cosmos.cjs +5 -5
- package/_cjs/services/Store/Disk.cjs +3 -3
- package/_cjs/services/Store/Memory.cjs +6 -6
- package/_cjs/services/Store/Redis.cjs +4 -4
- package/_cjs/services/Store/codeFilter.test.cjs +1 -1
- package/_cjs/services/Store/index.cjs +3 -3
- package/_cjs/services/Store/service.cjs +1 -1
- package/_cjs/services/Store/utils.cjs +3 -3
- package/_cjs/services/simpledb/cosmosdb.cjs +3 -3
- package/_cjs/services/simpledb/diskdb.cjs +2 -2
- package/_cjs/services/simpledb/memdb.cjs +3 -3
- package/_cjs/services/simpledb/mongodb.cjs +2 -2
- package/_cjs/services/simpledb/redisdb.cjs +2 -2
- package/_cjs/services/simpledb/shared.cjs +2 -2
- package/_cjs/services/simpledb/simpledb.cjs +4 -4
- package/_src/errors.ts +8 -9
- package/_src/logger/jsonLogger.ts +1 -1
- package/_src/logger/shared.ts +1 -1
- package/_src/services/Operations/service.ts +1 -1
- package/_src/services/RepositoryBase.ts +2 -2
- package/dist/RequestContext.d.ts +20 -20
- package/dist/_ext/Array.d.ts +1 -1
- package/dist/_ext/Array.d.ts.map +1 -1
- package/dist/_ext/Array.js +1 -1
- package/dist/api/codec.d.ts +1 -1
- package/dist/api/codec.d.ts.map +1 -1
- package/dist/api/defaultErrorHandler.d.ts +3 -3
- package/dist/api/defaultErrorHandler.d.ts.map +1 -1
- package/dist/api/defaultErrorHandler.js +3 -3
- package/dist/api/express/makeJsonSchema.d.ts +2 -2
- package/dist/api/express/makeJsonSchema.d.ts.map +1 -1
- package/dist/api/express/makeJsonSchema.js +2 -2
- package/dist/api/express/makeOpenApiSpecs.d.ts +1 -1
- package/dist/api/express/makeOpenApiSpecs.js +2 -2
- package/dist/api/express/schema/requestHandler.d.ts +9 -9
- package/dist/api/express/schema/requestHandler.d.ts.map +1 -1
- package/dist/api/express/schema/requestHandler.js +4 -4
- package/dist/api/express/schema/routing.d.ts +1 -1
- package/dist/api/express/schema/routing.js +2 -2
- package/dist/api/reportError.d.ts +7 -7
- package/dist/api/reportError.d.ts.map +1 -1
- package/dist/api/reportError.js +2 -2
- package/dist/api/routing.d.ts +7 -7
- package/dist/api/routing.d.ts.map +1 -1
- package/dist/api/routing.js +3 -3
- package/dist/api/setupRequest.d.ts +2 -2
- package/dist/api/setupRequest.d.ts.map +1 -1
- package/dist/api/setupRequest.js +1 -1
- package/dist/api/writeDocs.d.ts +1 -1
- package/dist/api/writeDocs.d.ts.map +1 -1
- package/dist/api/writeDocs.js +2 -2
- package/dist/errorReporter.d.ts +4 -4
- package/dist/errorReporter.d.ts.map +1 -1
- package/dist/errorReporter.js +2 -2
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +10 -9
- package/dist/instrument.d.ts +2 -2
- package/dist/instrument.d.ts.map +1 -1
- package/dist/instrument.js +1 -1
- package/dist/logger/jsonLogger.d.ts +2 -2
- package/dist/logger/jsonLogger.d.ts.map +1 -1
- package/dist/logger/jsonLogger.js +5 -5
- package/dist/logger/logFmtLogger.d.ts +2 -2
- package/dist/logger/logFmtLogger.d.ts.map +1 -1
- package/dist/logger/logFmtLogger.js +2 -2
- package/dist/logger/shared.d.ts +2 -2
- package/dist/logger/shared.d.ts.map +1 -1
- package/dist/logger/shared.js +6 -6
- package/dist/rateLimit.d.ts +7 -7
- package/dist/rateLimit.d.ts.map +1 -1
- package/dist/rateLimit.js +1 -1
- package/dist/services/Emailer/Sendgrid.d.ts +2 -2
- package/dist/services/Emailer/Sendgrid.d.ts.map +1 -1
- package/dist/services/Emailer/Sendgrid.js +4 -4
- package/dist/services/Emailer/fake.d.ts +1 -1
- package/dist/services/Emailer/fake.d.ts.map +1 -1
- package/dist/services/Emailer/fake.js +2 -2
- package/dist/services/Emailer/service.d.ts +7 -7
- package/dist/services/Operations/live.d.ts +2 -2
- package/dist/services/Operations/live.d.ts.map +1 -1
- package/dist/services/Operations/live.js +8 -8
- package/dist/services/Operations/service.d.ts +10 -10
- package/dist/services/Operations/service.d.ts.map +1 -1
- package/dist/services/Operations/service.js +3 -3
- package/dist/services/QueueMaker/errors.d.ts +8 -8
- package/dist/services/QueueMaker/errors.d.ts.map +1 -1
- package/dist/services/QueueMaker/errors.js +3 -3
- package/dist/services/QueueMaker/memQueue.d.ts +4 -4
- package/dist/services/QueueMaker/memQueue.js +2 -2
- package/dist/services/QueueMaker/sbqueue.d.ts +5 -5
- package/dist/services/QueueMaker/sbqueue.d.ts.map +1 -1
- package/dist/services/QueueMaker/sbqueue.js +2 -2
- package/dist/services/QueueMaker/service.d.ts +3 -3
- package/dist/services/Repository.d.ts +34 -34
- package/dist/services/Repository.d.ts.map +1 -1
- package/dist/services/Repository.js +2 -2
- package/dist/services/RepositoryBase.d.ts +31 -31
- package/dist/services/RepositoryBase.d.ts.map +1 -1
- package/dist/services/RepositoryBase.js +4 -4
- package/dist/services/RequestContextContainer.d.ts +11 -11
- package/dist/services/RequestContextContainer.d.ts.map +1 -1
- package/dist/services/RequestContextContainer.js +4 -4
- package/dist/services/Store/Cosmos.d.ts +6 -6
- package/dist/services/Store/Cosmos.d.ts.map +1 -1
- package/dist/services/Store/Cosmos.js +5 -5
- package/dist/services/Store/Disk.d.ts +5 -5
- package/dist/services/Store/Disk.d.ts.map +1 -1
- package/dist/services/Store/Disk.js +3 -3
- package/dist/services/Store/Memory.d.ts +7 -7
- package/dist/services/Store/Memory.d.ts.map +1 -1
- package/dist/services/Store/Memory.js +6 -6
- package/dist/services/Store/Redis.d.ts +6 -6
- package/dist/services/Store/Redis.d.ts.map +1 -1
- package/dist/services/Store/Redis.js +4 -4
- package/dist/services/Store/index.d.ts +2 -2
- package/dist/services/Store/index.d.ts.map +1 -1
- package/dist/services/Store/index.js +3 -3
- package/dist/services/Store/service.d.ts +12 -12
- package/dist/services/Store/service.d.ts.map +1 -1
- package/dist/services/Store/service.js +1 -1
- package/dist/services/Store/utils.d.ts +2 -2
- package/dist/services/Store/utils.d.ts.map +1 -1
- package/dist/services/Store/utils.js +3 -3
- package/dist/services/simpledb/cosmosdb.d.ts +5 -5
- package/dist/services/simpledb/cosmosdb.d.ts.map +1 -1
- package/dist/services/simpledb/cosmosdb.js +3 -3
- package/dist/services/simpledb/diskdb.d.ts +5 -5
- package/dist/services/simpledb/diskdb.d.ts.map +1 -1
- package/dist/services/simpledb/diskdb.js +2 -2
- package/dist/services/simpledb/memdb.d.ts +6 -6
- package/dist/services/simpledb/memdb.d.ts.map +1 -1
- package/dist/services/simpledb/memdb.js +3 -3
- package/dist/services/simpledb/mongodb.d.ts +5 -5
- package/dist/services/simpledb/mongodb.d.ts.map +1 -1
- package/dist/services/simpledb/mongodb.js +2 -2
- package/dist/services/simpledb/redisdb.d.ts +11 -11
- package/dist/services/simpledb/redisdb.d.ts.map +1 -1
- package/dist/services/simpledb/redisdb.js +2 -2
- package/dist/services/simpledb/shared.d.ts +10 -10
- package/dist/services/simpledb/shared.js +2 -2
- package/dist/services/simpledb/simpledb.d.ts +8 -8
- package/dist/services/simpledb/simpledb.d.ts.map +1 -1
- package/dist/services/simpledb/simpledb.js +4 -4
- package/package.json +6 -7
package/_src/errors.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as CausePretty from "@effect/io/internal/cause"
|
|
2
|
-
|
|
3
1
|
export class NotFoundError<T extends string = string> {
|
|
4
2
|
public readonly _tag = "NotFoundError"
|
|
5
3
|
public readonly message: string
|
|
@@ -41,15 +39,16 @@ export class CauseException<E> extends Error {
|
|
|
41
39
|
Error.stackTraceLimit = 0
|
|
42
40
|
super()
|
|
43
41
|
Error.stackTraceLimit = limit
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
42
|
+
// TODO
|
|
43
|
+
// const pretty = (CausePretty as any).prettyErrors(this.originalCause)
|
|
44
|
+
// if (pretty.length > 0) {
|
|
45
|
+
// this.name = pretty[0].message.split(":")[0]
|
|
46
|
+
// this.message = pretty[0].message.substring(this.name.length + 2)
|
|
47
|
+
// this.stack = `${this.name}: ${this.message}\n` + pretty[0].stack
|
|
48
|
+
// }
|
|
50
49
|
}
|
|
51
50
|
override toString() {
|
|
52
|
-
return `[${this._tag}] ` +
|
|
51
|
+
return `[${this._tag}] ` + Cause.pretty(this.originalCause)
|
|
53
52
|
}
|
|
54
53
|
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
55
54
|
return this.toString()
|
package/_src/logger/shared.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type { Repository, RequestCTX } from "./Repository.js"
|
|
|
3
3
|
import type { RequestContextContainer } from "./RequestContextContainer.js"
|
|
4
4
|
import { ContextMap, StoreMaker } from "./Store.js"
|
|
5
5
|
import type { Filter, StoreConfig, Where } from "./Store.js"
|
|
6
|
-
import type {} from "
|
|
7
|
-
import type {} from "
|
|
6
|
+
import type {} from "effect/Equal"
|
|
7
|
+
import type {} from "effect/Hash"
|
|
8
8
|
import type { Opt } from "@effect-app/core/Option"
|
|
9
9
|
import { makeCodec } from "@effect-app/infra/api/codec"
|
|
10
10
|
import { makeFilters } from "@effect-app/infra/filter"
|
package/dist/RequestContext.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ declare const RequestContextParent_base: import("@effect-app/schema").MNModel<im
|
|
|
5
5
|
id: import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>> & import("@effect-app/schema").Utils<import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>>> & {
|
|
6
6
|
EParser: import("@effect-app/schema/custom/_parser").Parser<string, any, RequestId>;
|
|
7
7
|
make: () => RequestId;
|
|
8
|
-
eq: import("
|
|
9
|
-
withDefault: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>>, "required", import("
|
|
8
|
+
eq: import("effect/Equivalence").Equivalence<RequestId>;
|
|
9
|
+
withDefault: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => RequestId]>>;
|
|
10
10
|
};
|
|
11
11
|
name: import("@effect-app/schema").SchemaDefaultSchema<unknown, import("@effect-app/schema").ReasonableString, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/schema").ReasonableString>> & import("@effect-app/schema").Utils<import("@effect-app/schema").SchemaDefaultSchema<unknown, import("@effect-app/schema").ReasonableString, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/schema").ReasonableString>>>;
|
|
12
12
|
userProfile: import("@effect-app/schema").Property<import("@effect-app/schema").Schema<unknown, {
|
|
@@ -20,30 +20,30 @@ declare const RequestContextParent_base: import("@effect-app/schema").MNModel<im
|
|
|
20
20
|
sub: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, UserProfileId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<UserProfileId>> & import("@effect-app/schema").Utils<import("@effect-app/schema").SchemaDefaultSchema<unknown, UserProfileId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<UserProfileId>>> & {
|
|
21
21
|
EParser: import("@effect-app/schema/custom/_parser").Parser<string, any, UserProfileId>;
|
|
22
22
|
make: () => UserProfileId;
|
|
23
|
-
eq: import("
|
|
24
|
-
withDefault: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, UserProfileId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<UserProfileId>>, "required", import("
|
|
25
|
-
}, "required", import("
|
|
23
|
+
eq: import("effect/Equivalence").Equivalence<UserProfileId>;
|
|
24
|
+
withDefault: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, UserProfileId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<UserProfileId>>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => UserProfileId]>>;
|
|
25
|
+
}, "required", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
26
26
|
}>;
|
|
27
|
-
}>, "optional", import("
|
|
27
|
+
}>, "optional", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
28
28
|
locale: import("@effect-app/schema").DefaultSchema<unknown, "en" | "de", "en" | "de", "en" | "de", import("@effect-app/schema").LiteralApi<["en", "de"]>>;
|
|
29
|
-
createdAt: import("@effect-app/schema").FromProperty<import("@effect-app/schema").Schema<unknown, Date, Date, string, {}>, "required", import("
|
|
29
|
+
createdAt: import("@effect-app/schema").FromProperty<import("@effect-app/schema").Schema<unknown, Date, Date, string, {}>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => Date]>>;
|
|
30
30
|
}>>, RequestContextParent, RequestContextParent.ConstructorInput, RequestContextParent.Encoded, RequestContextParent.Props> & import("@effect-app/schema").PropsExtensions<RequestContextParent.Props>;
|
|
31
31
|
export declare class RequestContextParent extends RequestContextParent_base {
|
|
32
32
|
}
|
|
33
33
|
declare const RequestContext_base: import("@effect-app/schema").MNModel<import("@effect-app/schema").SchemaProperties<import("@effect-app/schema").ToProps<{
|
|
34
|
-
id: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>>, "required", import("
|
|
34
|
+
id: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => RequestId]>>;
|
|
35
35
|
rootId: import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>> & import("@effect-app/schema").Utils<import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>>> & {
|
|
36
36
|
EParser: import("@effect-app/schema/custom/_parser").Parser<string, any, RequestId>;
|
|
37
37
|
make: () => RequestId;
|
|
38
|
-
eq: import("
|
|
39
|
-
withDefault: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>>, "required", import("
|
|
38
|
+
eq: import("effect/Equivalence").Equivalence<RequestId>;
|
|
39
|
+
withDefault: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, RequestId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<RequestId>>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => RequestId]>>;
|
|
40
40
|
};
|
|
41
41
|
parent: import("@effect-app/schema").Property<import("@effect-app/schema").Schema<unknown, RequestContextParent, RequestContextParent.ConstructorInput, RequestContextParent.Encoded, {
|
|
42
42
|
props: RequestContextParent.Props;
|
|
43
|
-
}>, "optional", import("
|
|
44
|
-
namespace: import("@effect-app/schema").Property<import("@effect-app/schema").Schema<unknown, import("@effect-app/schema").ReasonableString, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/schema").ReasonableString>>, "optional", import("
|
|
45
|
-
_tag: import("@effect-app/schema").Property<import("@effect-app/schema").DefaultSchema<unknown, "RequestContext", "RequestContext", "RequestContext", import("@effect-app/schema").LiteralApi<["RequestContext"]>>, "required", import("
|
|
46
|
-
name: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, import("@effect-app/schema").ReasonableString, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/schema").ReasonableString>> & import("@effect-app/schema").Utils<import("@effect-app/schema").SchemaDefaultSchema<unknown, import("@effect-app/schema").ReasonableString, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/schema").ReasonableString>>>, "required", import("
|
|
43
|
+
}>, "optional", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
44
|
+
namespace: import("@effect-app/schema").Property<import("@effect-app/schema").Schema<unknown, import("@effect-app/schema").ReasonableString, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/schema").ReasonableString>>, "optional", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
45
|
+
_tag: import("@effect-app/schema").Property<import("@effect-app/schema").DefaultSchema<unknown, "RequestContext", "RequestContext", "RequestContext", import("@effect-app/schema").LiteralApi<["RequestContext"]>>, "required", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
46
|
+
name: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, import("@effect-app/schema").ReasonableString, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/schema").ReasonableString>> & import("@effect-app/schema").Utils<import("@effect-app/schema").SchemaDefaultSchema<unknown, import("@effect-app/schema").ReasonableString, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/schema").ReasonableString>>>, "required", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
47
47
|
userProfile: import("@effect-app/schema").Property<import("@effect-app/schema").Schema<unknown, {
|
|
48
48
|
readonly sub: UserProfileId;
|
|
49
49
|
}, {
|
|
@@ -55,13 +55,13 @@ declare const RequestContext_base: import("@effect-app/schema").MNModel<import("
|
|
|
55
55
|
sub: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, UserProfileId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<UserProfileId>> & import("@effect-app/schema").Utils<import("@effect-app/schema").SchemaDefaultSchema<unknown, UserProfileId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<UserProfileId>>> & {
|
|
56
56
|
EParser: import("@effect-app/schema/custom/_parser").Parser<string, any, UserProfileId>;
|
|
57
57
|
make: () => UserProfileId;
|
|
58
|
-
eq: import("
|
|
59
|
-
withDefault: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, UserProfileId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<UserProfileId>>, "required", import("
|
|
60
|
-
}, "required", import("
|
|
58
|
+
eq: import("effect/Equivalence").Equivalence<UserProfileId>;
|
|
59
|
+
withDefault: import("@effect-app/schema").Property<import("@effect-app/schema").SchemaDefaultSchema<unknown, UserProfileId, string, string, import("@effect-app/schema").ApiSelfType<import("@effect-app/prelude/schema").StringId> & import("@effect-app/schema").ApiSelfType<UserProfileId>>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => UserProfileId]>>;
|
|
60
|
+
}, "required", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
61
61
|
}>;
|
|
62
|
-
}>, "optional", import("
|
|
63
|
-
locale: import("@effect-app/schema").Property<import("@effect-app/schema").DefaultSchema<unknown, "en" | "de", "en" | "de", "en" | "de", import("@effect-app/schema").LiteralApi<["en", "de"]>>, "required", import("
|
|
64
|
-
createdAt: import("@effect-app/schema").FromProperty<import("@effect-app/schema").Schema<unknown, Date, Date, string, {}>, "required", import("
|
|
62
|
+
}>, "optional", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
63
|
+
locale: import("@effect-app/schema").Property<import("@effect-app/schema").DefaultSchema<unknown, "en" | "de", "en" | "de", "en" | "de", import("@effect-app/schema").LiteralApi<["en", "de"]>>, "required", import("effect/Option").None<any>, import("effect/Option").None<any>>;
|
|
64
|
+
createdAt: import("@effect-app/schema").FromProperty<import("@effect-app/schema").Schema<unknown, Date, Date, string, {}>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => Date]>>;
|
|
65
65
|
}>>, RequestContext, RequestContext.ConstructorInput, RequestContext.Encoded, RequestContext.Props> & import("@effect-app/schema").PropsExtensions<RequestContext.Props>;
|
|
66
66
|
/**
|
|
67
67
|
* @tsplus type RequestContext
|
package/dist/_ext/Array.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { NotFoundError } from "../errors.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function getFirstById_<A extends {
|
|
12
12
|
id: Id;
|
|
13
|
-
}, Id extends string, Type extends string>(a: Iterable<A>, id: Id, type: Type): import("
|
|
13
|
+
}, Id extends string, Type extends string>(a: Iterable<A>, id: Id, type: Type): import("effect/Effect").Effect<never, NotFoundError<Type>, A>;
|
|
14
14
|
/**
|
|
15
15
|
* @tsplus fluent Object.Ops inspect
|
|
16
16
|
* @tsplus location "@effect-app/infra/_ext/Array"
|
package/dist/_ext/Array.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../_src/_ext/Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;;;;;;;;;AAS5C,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,EAAE,CAAA;CAAE,EAAE,EAAE,SAAS,MAAM,EAAE,IAAI,SAAS,MAAM,EACxF,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EACd,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../_src/_ext/Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;;;;;;;;;AAS5C,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,EAAE,CAAA;CAAE,EAAE,EAAE,SAAS,MAAM,EAAE,IAAI,SAAS,MAAM,EACxF,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EACd,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,iEAMX;;;;;AAKD,wBAAgB,aAAa,CAAC,EAAE,SAAS,MAAM,EAC7C,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,EAChB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,EAChC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,UAG5B"}
|
package/dist/_ext/Array.js
CHANGED
package/dist/api/codec.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import * as MO from "@effect-app/schema";
|
|
|
2
2
|
import { Encoder, Parser } from "@effect-app/schema";
|
|
3
3
|
export declare function makeCodec<ParsedShape extends {
|
|
4
4
|
id: Id;
|
|
5
|
-
}, ConstructorInput, Encoded, Api, Id>(self: MO.Schema<unknown, ParsedShape, ConstructorInput, Encoded, Api>): readonly [(a: unknown, env?: Parser.ParserEnv | undefined) => import("
|
|
5
|
+
}, ConstructorInput, Encoded, Api, Id>(self: MO.Schema<unknown, ParsedShape, ConstructorInput, Encoded, Api>): readonly [(a: unknown, env?: Parser.ParserEnv | undefined) => import("effect/Effect").Effect<never, never, ParsedShape>, Encoder.Encoder<ParsedShape, Encoded>];
|
|
6
6
|
//# sourceMappingURL=codec.d.ts.map
|
package/dist/api/codec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../_src/api/codec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEpD,wBAAgB,SAAS,CACvB,WAAW,SAAS;IAAE,EAAE,EAAE,EAAE,CAAA;CAAE,EAC9B,gBAAgB,EAChB,OAAO,EACP,GAAG,EACH,EAAE,EACF,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../_src/api/codec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEpD,wBAAgB,SAAS,CACvB,WAAW,SAAS;IAAE,EAAE,EAAE,EAAE,CAAA;CAAE,EAC9B,gBAAgB,EAChB,OAAO,EACP,GAAG,EACH,EAAE,EACF,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,CAAC,mKAKtE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Effect } from "
|
|
1
|
+
import { Effect } from "effect/Effect";
|
|
2
2
|
import type express from "express";
|
|
3
3
|
import type { InvalidStateError, NotFoundError, NotLoggedInError, OptimisticConcurrencyException, UnauthorizedError, ValidationError } from "../errors.js";
|
|
4
|
-
export declare function defaultBasicErrorHandler<R>(_req: express.Request, res: express.Response, r2: Effect<R, ValidationError, void>): import("
|
|
5
|
-
export declare function defaultErrorHandler<R>(req: express.Request, res: express.Response, r2: Effect<R, SupportedErrors, void>): import("
|
|
4
|
+
export declare function defaultBasicErrorHandler<R>(_req: express.Request, res: express.Response, r2: Effect<R, ValidationError, void>): import("effect/Effect").Effect<R, never, void | express.Response<any, Record<string, any>>>;
|
|
5
|
+
export declare function defaultErrorHandler<R>(req: express.Request, res: express.Response, r2: Effect<R, SupportedErrors, void>): import("effect/Effect").Effect<R, never, void | express.Response<any, Record<string, any>>>;
|
|
6
6
|
export type SupportedErrors = ValidationError | NotFoundError | NotLoggedInError | UnauthorizedError | InvalidStateError | OptimisticConcurrencyException;
|
|
7
7
|
//# sourceMappingURL=defaultErrorHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultErrorHandler.d.ts","sourceRoot":"","sources":["../../_src/api/defaultErrorHandler.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,8BAA8B,EAC9B,iBAAiB,EACjB,eAAe,EAChB,MAAM,cAAc,CAAA;AAGrB,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,IAAI,EAAE,OAAO,CAAC,OAAO,EACrB,GAAG,EAAE,OAAO,CAAC,QAAQ,EACrB,EAAE,EAAE,MAAM,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"defaultErrorHandler.d.ts","sourceRoot":"","sources":["../../_src/api/defaultErrorHandler.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,8BAA8B,EAC9B,iBAAiB,EACjB,eAAe,EAChB,MAAM,cAAc,CAAA;AAGrB,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,IAAI,EAAE,OAAO,CAAC,OAAO,EACrB,GAAG,EAAE,OAAO,CAAC,QAAQ,EACrB,EAAE,EAAE,MAAM,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,+FAerC;AAKD,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,GAAG,EAAE,OAAO,CAAC,OAAO,EACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,EACrB,EAAE,EAAE,MAAM,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,+FA0BrC;AAED,MAAM,MAAM,eAAe,GACvB,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,8BAA8B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
3
|
-
import * as tsplus_module_3 from "
|
|
1
|
+
import * as tsplus_module_1 from "effect/Effect";
|
|
2
|
+
import * as tsplus_module_2 from "effect/Cause";
|
|
3
|
+
import * as tsplus_module_3 from "effect/Schedule";
|
|
4
4
|
import { logRequestError } from "./reportError.js";
|
|
5
5
|
export function defaultBasicErrorHandler(_req, res, r2) {
|
|
6
6
|
const sendError = (code) => (body) => tsplus_module_1.sync(() => res.status(code).send(body));
|
|
@@ -4,11 +4,11 @@ type Methods = "GET" | "PUT" | "POST" | "PATCH" | "DELETE";
|
|
|
4
4
|
export declare function checkPaths<T extends {
|
|
5
5
|
path: string;
|
|
6
6
|
method: string;
|
|
7
|
-
}>(paths: readonly T[]): import("
|
|
7
|
+
}>(paths: readonly T[]): import("effect/Effect").Effect<never, InvalidStateError, readonly T[]>;
|
|
8
8
|
/**
|
|
9
9
|
* Work in progress JSONSchema generator.
|
|
10
10
|
*/
|
|
11
|
-
export declare function makeJsonSchema(r: Iterable<RS.RouteDescriptorAny>): import("
|
|
11
|
+
export declare function makeJsonSchema(r: Iterable<RS.RouteDescriptorAny>): import("effect/Effect").Effect<never, InvalidStateError, Record<string, Record<Methods, {
|
|
12
12
|
[x: string]: {
|
|
13
13
|
responses: any;
|
|
14
14
|
tags: readonly string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeJsonSchema.d.ts","sourceRoot":"","sources":["../../../_src/api/express/makeJsonSchema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAEzC,KAAK,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AA0D1D,wBAAgB,UAAU,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACnE,KAAK,EAAE,SAAS,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"makeJsonSchema.d.ts","sourceRoot":"","sources":["../../../_src/api/express/makeJsonSchema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAEzC,KAAK,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AA0D1D,wBAAgB,UAAU,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACnE,KAAK,EAAE,SAAS,CAAC,EAAE,0EA2DpB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;KA8BhE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
1
|
+
import * as tsplus_module_1 from "effect/Effect";
|
|
2
|
+
import * as tsplus_module_2 from "effect/Chunk";
|
|
3
3
|
import * as tsplus_module_3 from "@effect-app/core/_ext/Iterable";
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
5
|
import { InvalidStateError } from "../../errors.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Plutus from "@effect-app/infra-adapters/Openapi/atlas-plutus";
|
|
2
2
|
import type { RouteDescriptorAny } from "./schema/routing.js";
|
|
3
|
-
export declare function makeOpenApiSpecs(rdescs: Iterable<RouteDescriptorAny>, info: Plutus.Info): import("
|
|
3
|
+
export declare function makeOpenApiSpecs(rdescs: Iterable<RouteDescriptorAny>, info: Plutus.Info): import("effect/Effect").Effect<never, import("../../errors.js").InvalidStateError, {
|
|
4
4
|
openapi: string;
|
|
5
5
|
info: {
|
|
6
6
|
title: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
1
|
+
import * as tsplus_module_1 from "effect/Ref";
|
|
2
|
+
import * as tsplus_module_2 from "effect/Effect";
|
|
3
3
|
import { References } from "@effect-app/infra-adapters/Openapi/atlas-plutus/Schema/index";
|
|
4
4
|
import { makeJsonSchema } from "./makeJsonSchema.js";
|
|
5
5
|
export function makeOpenApiSpecs(rdescs, info) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Effect } from "
|
|
2
|
-
import { Layer } from "
|
|
1
|
+
import { Effect } from "effect/Effect";
|
|
2
|
+
import { Layer } from "effect/Layer";
|
|
3
3
|
import { Option } from "@effect-app/core/Option";
|
|
4
4
|
import * as MO from "@effect-app/schema";
|
|
5
5
|
import type { Methods } from "@effect-app/schema";
|
|
@@ -26,14 +26,14 @@ export type Request2<Path extends string, Method extends Methods, ReqA> = MO.Req
|
|
|
26
26
|
};
|
|
27
27
|
export type Encode<A, E> = (a: A) => E;
|
|
28
28
|
export declare function decodeErrors(x: unknown): unknown[];
|
|
29
|
-
export declare function parseRequestParams<PathA, CookieA, QueryA, BodyA, HeaderA>(parsers: RequestParsers<PathA, CookieA, QueryA, BodyA, HeaderA>): ({ body, cookies, headers, params, query }: express.Request) => import("
|
|
30
|
-
body: import("
|
|
31
|
-
cookie: import("
|
|
32
|
-
headers: import("
|
|
33
|
-
path: import("
|
|
34
|
-
query: import("
|
|
29
|
+
export declare function parseRequestParams<PathA, CookieA, QueryA, BodyA, HeaderA>(parsers: RequestParsers<PathA, CookieA, QueryA, BodyA, HeaderA>): ({ body, cookies, headers, params, query }: express.Request) => import("effect/Effect").Effect<never, ValidationError, {
|
|
30
|
+
body: import("effect/Option").Option<BodyA>;
|
|
31
|
+
cookie: import("effect/Option").Option<CookieA>;
|
|
32
|
+
headers: import("effect/Option").Option<HeaderA>;
|
|
33
|
+
path: import("effect/Option").Option<PathA>;
|
|
34
|
+
query: import("effect/Option").Option<QueryA>;
|
|
35
35
|
}>;
|
|
36
|
-
export declare function respondSuccess<ReqA, A, E>(encodeResponse: (req: ReqA) => Encode<A, E>): (req: ReqA, res: express.Response) => (a: A) => import("
|
|
36
|
+
export declare function respondSuccess<ReqA, A, E>(encodeResponse: (req: ReqA) => Encode<A, E>): (req: ReqA, res: express.Response) => (a: A) => import("effect/Effect").Effect<never, never, void>;
|
|
37
37
|
export interface RequestHandlerOptRes<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA extends PathA & QueryA & BodyA, ResA, ResE> {
|
|
38
38
|
adaptResponse?: any;
|
|
39
39
|
h: (i: PathA & QueryA & BodyA & {}) => Effect<R, ResE, ResA>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHandler.d.ts","sourceRoot":"","sources":["../../../../_src/api/express/schema/requestHandler.ts"],"names":[],"mappings":";;;AAEA,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,MAAM,MAAM,EAAE,CAAC,CAAC,SAAS,MAAM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AAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IAChC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IAChC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;CACrC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
3
|
-
import * as tsplus_module_3 from "
|
|
1
|
+
import * as tsplus_module_1 from "effect/Effect";
|
|
2
|
+
import * as tsplus_module_2 from "effect/Exit";
|
|
3
|
+
import * as tsplus_module_3 from "effect/Cause";
|
|
4
4
|
import * as tsplus_module_4 from "@effect-app/core/Function";
|
|
5
|
-
import * as tsplus_module_5 from "
|
|
5
|
+
import * as tsplus_module_5 from "effect/Option";
|
|
6
6
|
import * as tsplus_module_6 from "@effect-app/core/Effect";
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
8
8
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
@@ -14,7 +14,7 @@ export interface RouteDescriptor<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA
|
|
|
14
14
|
}
|
|
15
15
|
export type RouteDescriptorAny = RouteDescriptor<any, any, any, any, any, any, any, any, any>;
|
|
16
16
|
export declare function makeRouteDescriptor<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA extends PathA & QueryA & BodyA, ResA = void, Errors = any, METHOD extends Methods = Methods>(path: string, method: METHOD, handler: RequestHandlerOptRes<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, Errors>): RouteDescriptor<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, Errors, METHOD>;
|
|
17
|
-
export declare function makeFromSchema<ResA>(e: RouteDescriptor<any, any, any, any, any, any, ResA, any, any>): import("
|
|
17
|
+
export declare function makeFromSchema<ResA>(e: RouteDescriptor<any, any, any, any, any, any, ResA, any, any>): import("effect/Effect").Effect<never, never, {
|
|
18
18
|
path: string;
|
|
19
19
|
method: string;
|
|
20
20
|
tags: readonly string[] | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as tsplus_module_1 from "@effect-app/core/Option";
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
3
|
-
import * as tsplus_module_3 from "
|
|
2
|
+
import * as tsplus_module_2 from "effect/Effect";
|
|
3
|
+
import * as tsplus_module_3 from "effect/Option";
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
5
|
import * as MO from "@effect-app/schema";
|
|
6
6
|
import { isObjectSchema } from "@effect-app/infra-adapters/Openapi/atlas-plutus";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cause } from "
|
|
2
|
-
import { Effect } from "
|
|
1
|
+
import { Cause } from "effect/Cause";
|
|
2
|
+
import { Effect } from "effect/Effect";
|
|
3
3
|
import { CauseException } from "../errors.js";
|
|
4
4
|
export declare class RequestException<E> extends CauseException<E> {
|
|
5
5
|
constructor(cause: Cause<E>);
|
|
@@ -7,9 +7,9 @@ export declare class RequestException<E> extends CauseException<E> {
|
|
|
7
7
|
export declare class FatalMainException<E> extends CauseException<E> {
|
|
8
8
|
constructor(cause: Cause<E>);
|
|
9
9
|
}
|
|
10
|
-
export declare const reportMainError: <E>(cause: import("
|
|
11
|
-
export declare const reportRequestError: <E>(cause: import("
|
|
12
|
-
export declare const logRequestError: <E>(cause: import("
|
|
10
|
+
export declare const reportMainError: <E>(cause: import("effect/Cause").Cause<E>, extras?: Record<string, unknown> | undefined) => import("effect/Effect").Effect<never, never, void>;
|
|
11
|
+
export declare const reportRequestError: <E>(cause: import("effect/Cause").Cause<E>, extras?: Record<string, unknown> | undefined) => import("effect/Effect").Effect<never, never, void>;
|
|
12
|
+
export declare const logRequestError: <E>(cause: import("effect/Cause").Cause<E>, extras?: Record<string, unknown> | undefined) => import("effect/Effect").Effect<never, never, void>;
|
|
13
13
|
/**
|
|
14
14
|
* Forks the effect into a new fiber attached to the global scope. Because the
|
|
15
15
|
* new fiber is attached to the global scope, when the fiber executing the
|
|
@@ -19,7 +19,7 @@ export declare const logRequestError: <E>(cause: import("@effect/io/Cause").Caus
|
|
|
19
19
|
* @tsplus getter effect/io/Effect forkDaemonReportRequest
|
|
20
20
|
* @tsplus location "@effect-app/infra/api/reportError"
|
|
21
21
|
*/
|
|
22
|
-
export declare function forkDaemonReportRequest<R, E, A>(self: Effect<R, E, A>): import("
|
|
22
|
+
export declare function forkDaemonReportRequest<R, E, A>(self: Effect<R, E, A>): import("effect/Effect").Effect<R, never, import("effect/Fiber").RuntimeFiber<E, A>>;
|
|
23
23
|
/**
|
|
24
24
|
* Forks the effect into a new fiber attached to the global scope. Because the
|
|
25
25
|
* new fiber is attached to the global scope, when the fiber executing the
|
|
@@ -29,5 +29,5 @@ export declare function forkDaemonReportRequest<R, E, A>(self: Effect<R, E, A>):
|
|
|
29
29
|
* @tsplus getter effect/io/Effect forkDaemonReportRequestUnexpected
|
|
30
30
|
* @tsplus location "@effect-app/infra/api/reportError"
|
|
31
31
|
*/
|
|
32
|
-
export declare function forkDaemonReportRequestUnexpected<R, E, A>(self: Effect<R, E, A>): import("
|
|
32
|
+
export declare function forkDaemonReportRequestUnexpected<R, E, A>(self: Effect<R, E, A>): import("effect/Effect").Effect<R, never, import("effect/Fiber").RuntimeFiber<E, A>>;
|
|
33
33
|
//# sourceMappingURL=reportError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reportError.d.ts","sourceRoot":"","sources":["../../_src/api/reportError.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,qBAAa,gBAAgB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;gBAC5C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CAG5B;AACD,qBAAa,kBAAkB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;gBAC9C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CAG5B;AAID,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"reportError.d.ts","sourceRoot":"","sources":["../../_src/api/reportError.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,qBAAa,gBAAgB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;gBAC5C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CAG5B;AACD,qBAAa,kBAAkB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;gBAC9C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CAG5B;AAID,eAAO,MAAM,eAAe,uDAAiC,OAAO,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,uDAC/D,CAAA;AAIjC,eAAO,MAAM,kBAAkB,uDAAiC,OAAO,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,uDAC/D,CAAA;AAIpC,eAAO,MAAM,eAAe,uDAAiC,OAAO,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,uDAC/D,CAAA;;;;;;;;;;AAWjC,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,uFAKrE;;;;;;;;;;AAWD,wBAAgB,iCAAiC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,uFAS/E"}
|
package/dist/api/reportError.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
1
|
+
import * as tsplus_module_1 from "effect/Effect";
|
|
2
|
+
import * as tsplus_module_2 from "effect/Cause";
|
|
3
3
|
import { logError, reportError } from "../errorReporter.js";
|
|
4
4
|
import { CauseException } from "../errors.js";
|
|
5
5
|
export class RequestException extends CauseException {
|
package/dist/api/routing.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Effect } from "
|
|
2
|
-
import { Context } from "
|
|
1
|
+
import { Effect } from "effect/Effect";
|
|
2
|
+
import { Context } from "effect/Context";
|
|
3
3
|
import { ParsedShapeOf } from "@effect-app/prelude/schema";
|
|
4
4
|
import * as Ex from "@effect-app/infra-adapters/express";
|
|
5
5
|
import type { _E, _R } from "@effect-app/prelude/_ext/misc";
|
|
@@ -11,7 +11,7 @@ import { RequestContextContainer } from "../services/RequestContextContainer.js"
|
|
|
11
11
|
import type { SupportedErrors } from "./defaultErrorHandler.js";
|
|
12
12
|
import type { Encode, RequestHandler, RequestHandlerOptRes, RequestParsers } from "./express/schema/requestHandler.js";
|
|
13
13
|
import type { RouteDescriptorAny } from "./express/schema/routing.js";
|
|
14
|
-
export declare const RequestSettings: import("
|
|
14
|
+
export declare const RequestSettings: import("effect/FiberRef").FiberRef<{
|
|
15
15
|
verbose: boolean;
|
|
16
16
|
}>;
|
|
17
17
|
export declare function makeRequestParsers<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA extends PathA & QueryA & BodyA, ResA, Errors>(Request: RequestHandler<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, Errors>["Request"]): RequestParsers<PathA, CookieA, QueryA, BodyA, HeaderA>;
|
|
@@ -20,8 +20,8 @@ export type Middleware<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA extends P
|
|
|
20
20
|
handler: typeof handler;
|
|
21
21
|
makeContext: MakeMiddlewareContext<ResE, R2, PR>;
|
|
22
22
|
};
|
|
23
|
-
export declare function match<R, E, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA extends PathA & QueryA & BodyA, ResA, R2 = never, PR = never, RErr = never>(requestHandler: RequestHandler<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, E>, errorHandler: <R>(req: express.Request, res: express.Response, r2: Effect<R, E | ValidationError, void>) => Effect<RErr, never, void>, middleware?: Middleware<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, E, R2, PR>): import("
|
|
24
|
-
export declare function respondSuccess<ReqA, A, E>(encodeResponse: (req: ReqA) => Encode<A, E>): (req: ReqA, res: express.Response, a: A) => import("
|
|
23
|
+
export declare function match<R, E, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA extends PathA & QueryA & BodyA, ResA, R2 = never, PR = never, RErr = never>(requestHandler: RequestHandler<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, E>, errorHandler: <R>(req: express.Request, res: express.Response, r2: Effect<R, E | ValidationError, void>) => Effect<RErr, never, void>, middleware?: Middleware<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, E, R2, PR>): import("effect/Effect").Effect<Ex.ExpressEnv | Exclude<R, RequestContextContainer> | Exclude<R2, RequestContextContainer> | Exclude<RErr, RequestContextContainer>, never, import("./express/schema/routing.js").RouteDescriptor<R, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, E, MO.Methods>>;
|
|
24
|
+
export declare function respondSuccess<ReqA, A, E>(encodeResponse: (req: ReqA) => Encode<A, E>): (req: ReqA, res: express.Response, a: A) => import("effect/Effect").Effect<never, never, void>;
|
|
25
25
|
export declare function makeRequestHandler<R, E, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA extends PathA & QueryA & BodyA, ResA = void, R2 = never, PR = never, RErr = never>(handler: RequestHandlerOptRes<R | PR, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, E>, errorHandler: <R>(req: express.Request, res: express.Response, r2: Effect<R, E | ValidationError, void>) => Effect<RErr | R | RequestContextContainer, never, void>, makeMiddlewareContext?: MakeMiddlewareContext<E, R2, PR>): (req: express.Request, res: express.Response) => Effect<Exclude<RErr | R | R2, RequestContextContainer>, never, void>;
|
|
26
26
|
export type RequestHandlers = {
|
|
27
27
|
[key: string]: BasicRequestHandler;
|
|
@@ -69,7 +69,7 @@ type FlattenLVL1<T extends object> = object extends T ? object : {
|
|
|
69
69
|
} : never : never;
|
|
70
70
|
export declare function handle<TModule extends Record<string, any>>(_: TModule & {
|
|
71
71
|
ResponseOpenApi?: any;
|
|
72
|
-
}, adaptResponse?: any): <R, E>(h: (r: InstanceType<GetRequest<TModule> extends new (...args: any[]) => any ? GetRequest<TModule> : never>) => import("
|
|
72
|
+
}, adaptResponse?: any): <R, E>(h: (r: InstanceType<GetRequest<TModule> extends new (...args: any[]) => any ? GetRequest<TModule> : never>) => import("effect/Effect").Effect<R, E, MO.ParsedShapeOf<Extr<GetResponse<TModule>>>>) => ReqHandler<InstanceType<GetRequest<TModule> extends new (...args: any[]) => any ? GetRequest<TModule> : never>, R, E, MO.ParsedShapeOf<Extr<GetResponse<TModule>>>, GetRequest<TModule>, GetResponse<TModule>, any>;
|
|
73
73
|
export type Extr<T> = T extends {
|
|
74
74
|
Model: MO.SchemaAny;
|
|
75
75
|
} ? T["Model"] : T extends MO.SchemaAny ? T : never;
|
|
@@ -94,7 +94,7 @@ export interface ReqHandler<Req, R, E, Res, ReqSchema extends MO.SchemaAny, ResS
|
|
|
94
94
|
* })
|
|
95
95
|
* ```
|
|
96
96
|
*/
|
|
97
|
-
export declare function matchResource<TModules extends Record<string, Record<string, any>>>(mod: TModules): <THandlers extends keyof TModules extends infer T extends keyof TModules ? { [K in T]: (req: InstanceType<GetRequest<TModules[K]> extends infer T_1 ? T_1 extends GetRequest<TModules[K]> ? T_1 extends new (...args: any[]) => any ? T_1 : never : never : never>) => import("
|
|
97
|
+
export declare function matchResource<TModules extends Record<string, Record<string, any>>>(mod: TModules): <THandlers extends keyof TModules extends infer T extends keyof TModules ? { [K in T]: (req: InstanceType<GetRequest<TModules[K]> extends infer T_1 ? T_1 extends GetRequest<TModules[K]> ? T_1 extends new (...args: any[]) => any ? T_1 : never : never : never>) => import("effect/Effect").Effect<any, SupportedErrors, MO.ParsedShapeOf<Extr<GetResponse<TModules[K]>>>>; } : never>(handlers: THandlers) => keyof TModules extends infer T_2 extends keyof TModules ? { [K_1 in T_2]: ReqHandler<InstanceType<GetRequest<TModules[K_1]> extends infer T_3 ? T_3 extends GetRequest<TModules[K_1]> ? T_3 extends new (...args: any[]) => any ? T_3 : never : never : never>, _R<ReturnType<THandlers[K_1]>>, _E<ReturnType<THandlers[K_1]>>, MO.ParsedShapeOf<Extr<GetResponse<TModules[K_1]>>>, GetRequest<TModules[K_1]>, GetResponse<TModules[K_1]>, any>; } : never;
|
|
98
98
|
export type ReqFromSchema<ReqSchema> = InstanceType<ReqSchema extends {
|
|
99
99
|
new (...args: any[]): any;
|
|
100
100
|
} ? ReqSchema : never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../_src/api/routing.ts"],"names":[],"mappings":";;;AACA,OAAO,KAAK,EAAE,MAAM,oCAAoC,CAAA;AACxD,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,+BAA+B,CAAA;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAEzE,OAAO,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEhD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,OAAO,EAAE,uBAAuB,EAA+B,MAAM,wCAAwC,CAAA;AAE7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE/D,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAEtH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6B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.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "
|
|
2
|
-
import * as tsplus_module_2 from "
|
|
3
|
-
import * as tsplus_module_3 from "
|
|
1
|
+
import * as tsplus_module_1 from "effect/FiberRef";
|
|
2
|
+
import * as tsplus_module_2 from "effect/Option";
|
|
3
|
+
import * as tsplus_module_3 from "effect/Effect";
|
|
4
4
|
import * as tsplus_module_4 from "@effect-app/core/Effect";
|
|
5
5
|
import * as tsplus_module_5 from "@effect-app/schema/ext";
|
|
6
6
|
import * as tsplus_module_6 from "@effect-app/prelude/utils";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Effect } from "
|
|
1
|
+
import { Effect } from "effect/Effect";
|
|
2
2
|
import { RequestContextContainer } from "../services/RequestContextContainer.js";
|
|
3
3
|
/**
|
|
4
4
|
* @tsplus fluent effect/io/Effect setupRequestFromWith
|
|
5
5
|
* @tsplus location "@effect-app/infra/api/setupRequest"
|
|
6
6
|
*/
|
|
7
|
-
export declare function setupReq3<R, E, A>(self: Effect<R, E, A>, name: string): import("
|
|
7
|
+
export declare function setupReq3<R, E, A>(self: Effect<R, E, A>, name: string): import("effect/Effect").Effect<Exclude<R, RequestContextContainer>, E, A>;
|
|
8
8
|
//# sourceMappingURL=setupRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupRequest.d.ts","sourceRoot":"","sources":["../../_src/api/setupRequest.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,uBAAuB,EAA+B,MAAM,wCAAwC,CAAA;;;;;AAK7G,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"setupRequest.d.ts","sourceRoot":"","sources":["../../_src/api/setupRequest.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,uBAAuB,EAA+B,MAAM,wCAAwC,CAAA;;;;;AAK7G,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,6EAMrE"}
|
package/dist/api/setupRequest.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "
|
|
1
|
+
import * as tsplus_module_1 from "effect/Effect";
|
|
2
2
|
import * as tsplus_module_2 from "@effect-app/prelude/schema";
|
|
3
3
|
import { RequestId } from "@effect-app/prelude/ids";
|
|
4
4
|
import { RequestContext } from "../RequestContext.js";
|
package/dist/api/writeDocs.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RouteDescriptorAny } from "./express/schema/routing.js";
|
|
2
|
-
export declare function writeOpenapiDocs(rdescs: Record<string, Record<string, RouteDescriptorAny>>): import("
|
|
2
|
+
export declare function writeOpenapiDocs(rdescs: Record<string, Record<string, RouteDescriptorAny>>): import("effect/Effect").Effect<never, import("../errors.js").InvalidStateError, void>;
|
|
3
3
|
//# sourceMappingURL=writeDocs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeDocs.d.ts","sourceRoot":"","sources":["../../_src/api/writeDocs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAErE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"writeDocs.d.ts","sourceRoot":"","sources":["../../_src/api/writeDocs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAErE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,yFAmB1F"}
|