@effect-app/infra 3.6.0 → 3.6.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 +7 -0
- package/dist/Model/Repository/internal/internal.d.ts +2 -2
- package/dist/Operations.d.ts +3 -3
- package/dist/OperationsRepo.d.ts +4 -4
- package/dist/QueueMaker/SQLQueue.d.ts +1 -1
- package/dist/QueueMaker/memQueue.d.ts +1 -1
- package/dist/QueueMaker/sbqueue.d.ts +2 -2
- package/dist/Store/ContextMapContainer.d.ts +1 -1
- package/dist/Store/service.d.ts +1 -1
- package/dist/api/internal/RequestContextMiddleware.d.ts +1 -1
- package/dist/api/setupRequest.d.ts +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -20,12 +20,12 @@ export declare function makeRepoInternal<Evt = never>(): <ItemType extends strin
|
|
|
20
20
|
config?: Omit<StoreConfig<Encoded>, "partitionValue"> & {
|
|
21
21
|
partitionValue?: (e?: Encoded) => string;
|
|
22
22
|
};
|
|
23
|
-
}) => Effect.Effect<Repository<T, Encoded, Evt, ItemType, IdKey, Exclude<R, RCtx>, RPublish>, E,
|
|
23
|
+
}) => Effect.Effect<Repository<T, Encoded, Evt, ItemType, IdKey, Exclude<R, RCtx>, RPublish>, E, StoreMaker | R | RInitial>;
|
|
24
24
|
Q: Q.Query<Encoded>;
|
|
25
25
|
};
|
|
26
26
|
export declare function makeStore<Encoded extends FieldValues>(): <ItemType extends string, R, E, T, IdKey extends keyof Encoded>(name: ItemType, schema: S.Schema<T, E, R>, mapTo: (e: E, etag: string | undefined) => Encoded, idKey: IdKey) => <RInitial = never, EInitial = never>(makeInitial?: Effect.Effect<readonly T[], EInitial, RInitial>, config?: Omit<StoreConfig<Encoded>, "partitionValue"> & {
|
|
27
27
|
partitionValue?: (e?: Encoded) => string;
|
|
28
|
-
}) => Effect.Effect<import("../../../Store.js").Store<IdKey, Encoded, PersistenceModelType<Encoded>>, EInitial,
|
|
28
|
+
}) => Effect.Effect<import("../../../Store.js").Store<IdKey, Encoded, PersistenceModelType<Encoded>>, EInitial, StoreMaker | R | RInitial>;
|
|
29
29
|
export interface Repos<T, Encoded extends {
|
|
30
30
|
id: string;
|
|
31
31
|
}, RSchema, Evt, ItemType extends string, IdKey extends keyof T, RPublish> {
|
package/dist/Operations.d.ts
CHANGED
|
@@ -54,15 +54,15 @@ declare const Operations_base: (abstract new (service: {
|
|
|
54
54
|
update: (id: OperationId, progress: OperationProgress) => Effect.Effect<void, never, never>;
|
|
55
55
|
}>) & {
|
|
56
56
|
toLayer: {
|
|
57
|
-
(): Layer.Layer<Operations, never,
|
|
57
|
+
(): Layer.Layer<Operations, never, RequestFiberSet | OperationsRepo>;
|
|
58
58
|
<E_1, R_1>(eff: Effect.Effect<Omit<Operations, keyof Context.TagClassShape<any, any>>, E_1, R_1>): Layer.Layer<Operations, E_1, R_1>;
|
|
59
59
|
};
|
|
60
60
|
toLayerScoped: {
|
|
61
|
-
(): Layer.Layer<Operations, never,
|
|
61
|
+
(): Layer.Layer<Operations, never, RequestFiberSet | OperationsRepo>;
|
|
62
62
|
<E_1, R_2>(eff: Effect.Effect<Omit<Operations, keyof Context.TagClassShape<any, any>>, E_1, R_2>): Layer.Layer<Operations, E_1, Exclude<R_2, Scope.Scope>>;
|
|
63
63
|
};
|
|
64
64
|
of: (service: Context.TagClassShape<any, any>) => Operations;
|
|
65
|
-
make: Effect.Effect<Operations, never,
|
|
65
|
+
make: Effect.Effect<Operations, never, RequestFiberSet | OperationsRepo>;
|
|
66
66
|
} & Context.Tag<Operations, Operations> & {
|
|
67
67
|
cleanup: Effect.Effect<void[], never, Operations>;
|
|
68
68
|
register: (title: S.NonEmptyString2k) => Effect.Effect<S.StringId, never, Scope.Scope | Operations>;
|
package/dist/OperationsRepo.d.ts
CHANGED
|
@@ -6,10 +6,6 @@ declare const OperationsRepo_base: Effect.Service.Class<OperationsRepo, "Operati
|
|
|
6
6
|
readonly title: string;
|
|
7
7
|
readonly createdAt: string;
|
|
8
8
|
readonly updatedAt: string | null;
|
|
9
|
-
readonly progress?: {
|
|
10
|
-
readonly completed: number;
|
|
11
|
-
readonly total: number;
|
|
12
|
-
} | undefined;
|
|
13
9
|
readonly result?: {
|
|
14
10
|
readonly _tag: "OperationSuccess";
|
|
15
11
|
readonly message: string | null;
|
|
@@ -17,6 +13,10 @@ declare const OperationsRepo_base: Effect.Service.Class<OperationsRepo, "Operati
|
|
|
17
13
|
readonly _tag: "OperationFailure";
|
|
18
14
|
readonly message: string | null;
|
|
19
15
|
} | undefined;
|
|
16
|
+
readonly progress?: {
|
|
17
|
+
readonly completed: number;
|
|
18
|
+
readonly total: number;
|
|
19
|
+
} | undefined;
|
|
20
20
|
}, never, "Operation", "id", never, never>, never, import("./Store.js").StoreMaker>;
|
|
21
21
|
}>;
|
|
22
22
|
export declare class OperationsRepo extends OperationsRepo_base {
|
|
@@ -13,6 +13,6 @@ export declare function makeSQLQueue<Evt extends {
|
|
|
13
13
|
_tag: string;
|
|
14
14
|
}, EvtE, DrainEvtE>(queueName: NonEmptyString255, queueDrainName: NonEmptyString255, schema: S.Schema<Evt, EvtE>, drainSchema: S.Schema<DrainEvt, DrainEvtE>): Effect.Effect<{
|
|
15
15
|
publish: (messages_0: Evt, ...messages: Evt[]) => Effect.Effect<void, never, never>;
|
|
16
|
-
drain: <DrainE, DrainR>(handleEvent: (ks: DrainEvt) => Effect.Effect<void, DrainE, DrainR>, sessionId?: string) => Effect.Effect<never, never, Exclude<Exclude<Exclude<DrainR, Tracer.ParentSpan>, import("../
|
|
16
|
+
drain: <DrainE, DrainR>(handleEvent: (ks: DrainEvt) => Effect.Effect<void, DrainE, DrainR>, sessionId?: string) => Effect.Effect<never, never, Exclude<Exclude<Exclude<DrainR, Tracer.ParentSpan>, import("../RequestContext.js").LocaleRef | import("../Store/ContextMapContainer.js").ContextMapContainer | import("../Store/Memory.js").storeId>, Tracer.ParentSpan>>;
|
|
17
17
|
}, never, SqlClient.SqlClient>;
|
|
18
18
|
//# sourceMappingURL=SQLQueue.d.ts.map
|
|
@@ -9,6 +9,6 @@ export declare function makeMemQueue<Evt extends {
|
|
|
9
9
|
_tag: string;
|
|
10
10
|
}, EvtE, DrainEvtE>(queueName: string, queueDrainName: string, schema: S.Schema<Evt, EvtE>, drainSchema: S.Schema<DrainEvt, DrainEvtE>): Effect.Effect<{
|
|
11
11
|
publish: (messages_0: Evt, ...messages: Evt[]) => Effect.Effect<void, never, never>;
|
|
12
|
-
drain: <DrainE, DrainR>(handleEvent: (ks: DrainEvt) => Effect.Effect<void, DrainE, DrainR>, sessionId?: string) => Effect.Effect<never, never, Exclude<Exclude<Exclude<DrainR, Tracer.ParentSpan>, import("../
|
|
12
|
+
drain: <DrainE, DrainR>(handleEvent: (ks: DrainEvt) => Effect.Effect<void, DrainE, DrainR>, sessionId?: string) => Effect.Effect<never, never, Exclude<Exclude<Exclude<DrainR, Tracer.ParentSpan>, import("../RequestContext.js").LocaleRef | import("../Store/ContextMapContainer.js").ContextMapContainer | import("../Store/Memory.js").storeId>, Tracer.ParentSpan>>;
|
|
13
13
|
}, never, MemQueue>;
|
|
14
14
|
//# sourceMappingURL=memQueue.d.ts.map
|
|
@@ -9,7 +9,7 @@ export declare function makeServiceBusQueue<Evt extends {
|
|
|
9
9
|
id: StringId;
|
|
10
10
|
_tag: string;
|
|
11
11
|
}, EvtE, DrainEvtE>(schema: S.Schema<Evt, EvtE>, drainSchema: S.Schema<DrainEvt, DrainEvtE>): Effect.Effect<{
|
|
12
|
-
drain: <DrainE, DrainR>(handleEvent: (ks: DrainEvt) => Effect.Effect<void, DrainE, DrainR>, sessionId?: string) => Effect.Effect<never, never, import("effect/Scope").Scope | Exclude<Exclude<DrainR, Tracer.ParentSpan>, import("../
|
|
12
|
+
drain: <DrainE, DrainR>(handleEvent: (ks: DrainEvt) => Effect.Effect<void, DrainE, DrainR>, sessionId?: string) => Effect.Effect<never, never, import("effect/Scope").Scope | Exclude<Exclude<DrainR, Tracer.ParentSpan>, import("../RequestContext.js").LocaleRef | import("../Store/ContextMapContainer.js").ContextMapContainer | import("../Store/Memory.js").storeId>>;
|
|
13
13
|
publish: (messages_0: Evt, ...messages: Evt[]) => Effect.Effect<void, never, never>;
|
|
14
|
-
}, never,
|
|
14
|
+
}, never, Sender | Receiver>;
|
|
15
15
|
//# sourceMappingURL=sbqueue.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, Effect, Layer } from "effect-app";
|
|
2
2
|
import { ContextMap } from "./service.js";
|
|
3
|
-
declare const ContextMapContainer_base: Context.ReferenceClass<ContextMapContainer, "ContextMapContainer",
|
|
3
|
+
declare const ContextMapContainer_base: Context.ReferenceClass<ContextMapContainer, "ContextMapContainer", "root" | ContextMap>;
|
|
4
4
|
export declare class ContextMapContainer extends ContextMapContainer_base {
|
|
5
5
|
static readonly layer: Layer.Layer<ContextMapContainer, never, never>;
|
|
6
6
|
}
|
package/dist/Store/service.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ declare const StoreMaker_base: (abstract new (service: {
|
|
|
89
89
|
} & Context.Tag<StoreMaker, StoreMaker> & {} & {
|
|
90
90
|
use: <X>(body: (_: {
|
|
91
91
|
make: <IdKey extends keyof Encoded, Encoded extends FieldValues, R = never, E = never>(name: string, idKey: IdKey, seed?: Effect.Effect<Iterable<Encoded>, E, R>, config?: StoreConfig<Encoded>) => Effect.Effect<Store<IdKey, Encoded>, E, R>;
|
|
92
|
-
}) => X) => X extends Effect.Effect<infer A, infer E_1, infer R_2> ? Effect.Effect<A, E_1,
|
|
92
|
+
}) => X) => X extends Effect.Effect<infer A, infer E_1, infer R_2> ? Effect.Effect<A, E_1, R_2 | StoreMaker> : Effect.Effect<X, never, StoreMaker>;
|
|
93
93
|
};
|
|
94
94
|
export declare class StoreMaker extends StoreMaker_base {
|
|
95
95
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect } from "effect-app";
|
|
2
2
|
import { HttpServerRequest, HttpServerResponse } from "effect-app/http";
|
|
3
3
|
import { Locale } from "../../RequestContext.js";
|
|
4
|
-
export declare const RequestContextMiddleware: (defaultLocale?: Locale) => <E, R>(app: import("@effect/platform/HttpApp").Default<E, R>) => Effect.Effect<HttpServerResponse.HttpServerResponse, E, HttpServerRequest.HttpServerRequest | Exclude<Exclude<R, import("effect/Tracer").ParentSpan>, import("../../
|
|
4
|
+
export declare const RequestContextMiddleware: (defaultLocale?: Locale) => <E, R>(app: import("@effect/platform/HttpApp").Default<E, R>) => Effect.Effect<HttpServerResponse.HttpServerResponse, E, HttpServerRequest.HttpServerRequest | Exclude<Exclude<R, import("effect/Tracer").ParentSpan>, import("../../RequestContext.js").LocaleRef | import("../../Store/ContextMapContainer.js").ContextMapContainer | import("../../Store/Memory.js").storeId>>;
|
|
5
5
|
//# sourceMappingURL=RequestContextMiddleware.d.ts.map
|
|
@@ -9,6 +9,6 @@ export declare const getRC: Effect.Effect<{
|
|
|
9
9
|
namespace: NonEmptyString255;
|
|
10
10
|
}, never, never>;
|
|
11
11
|
export declare const setupRequestContextFromCurrent: (name?: string, options?: Tracer.SpanOptions) => <R, E, A>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<Exclude<R, Tracer.ParentSpan>, ContextMapContainer>>;
|
|
12
|
-
export declare function setupRequestContext<R, E, A>(self: Effect.Effect<A, E, R>, requestContext: RequestContext): Effect.Effect<A, E, Exclude<Exclude<R, Tracer.ParentSpan>,
|
|
13
|
-
export declare function setupRequestContextWithCustomSpan<R, E, A>(self: Effect.Effect<A, E, R>, requestContext: RequestContext, name: string, options?: Tracer.SpanOptions): Effect.Effect<A, E, Exclude<Exclude<R, Tracer.ParentSpan>,
|
|
12
|
+
export declare function setupRequestContext<R, E, A>(self: Effect.Effect<A, E, R>, requestContext: RequestContext): Effect.Effect<A, E, Exclude<Exclude<R, Tracer.ParentSpan>, LocaleRef | ContextMapContainer | storeId>>;
|
|
13
|
+
export declare function setupRequestContextWithCustomSpan<R, E, A>(self: Effect.Effect<A, E, R>, requestContext: RequestContext, name: string, options?: Tracer.SpanOptions): Effect.Effect<A, E, Exclude<Exclude<R, Tracer.ParentSpan>, LocaleRef | ContextMapContainer | storeId>>;
|
|
14
14
|
//# sourceMappingURL=setupRequest.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"proper-lockfile": "^4.1.2",
|
|
14
14
|
"pure-rand": "7.0.1",
|
|
15
15
|
"query-string": "^9.3.1",
|
|
16
|
-
"effect-app": "3.
|
|
16
|
+
"effect-app": "3.12.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@azure/cosmos": "^4.5.1",
|