@effect-app/infra 1.35.2 → 1.36.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/CHANGELOG.md +14 -0
- package/dist/RequestContext.d.ts +3 -3
- package/dist/api/internal/RequestContextMiddleware.d.ts +1 -1
- package/dist/api/reportError.d.ts +2 -2
- package/dist/services/Operations.d.ts +1 -1
- package/dist/services/QueueMaker/sbqueue.d.ts +1 -1
- package/dist/services/Repository/ext.d.ts +11 -11
- package/dist/services/RepositoryBase.d.ts +6 -6
- package/dist/services/RequestContextContainer.d.ts +1 -1
- package/dist/services/Store/service.d.ts +1 -1
- package/dist/services/query/new-kid-interpreter.d.ts +1 -1
- package/package.json +12 -12
- package/vitest.config.ts.timestamp-1711656440838-19c636fe320df.mjs +0 -0
- package/vitest.config.ts.timestamp-1711724061890-6ecedb0a07fdd.mjs +0 -0
- package/vitest.config.ts.timestamp-1711743489537-da8d9e5f66c9f.mjs +0 -0
- package/vitest.config.ts.timestamp-1711744615239-dcf257a844e01.mjs +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 1.36.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9ddb31b: update packages
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [9ddb31b]
|
|
12
|
+
- @effect-app/infra-adapters@1.18.0
|
|
13
|
+
- effect-app@1.27.0
|
|
14
|
+
- @effect-app/schema@1.18.0
|
|
15
|
+
- @effect-app/core@1.16.0
|
|
16
|
+
|
|
3
17
|
## 1.35.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/RequestContext.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ declare const RequestContextParent_base: S.EnhancedClass<RequestContextParent, {
|
|
|
25
25
|
locale: S.Literal<["en", "de"]>;
|
|
26
26
|
createdAt: S.PropertySignature<":", Date, never, ":", string, true, never>;
|
|
27
27
|
}, RequestContextParent.From, never, {
|
|
28
|
-
readonly id: NonEmptyString255;
|
|
29
28
|
readonly name: string & S.NonEmptyString255Brand;
|
|
29
|
+
readonly id: NonEmptyString255;
|
|
30
30
|
readonly locale: "en" | "de";
|
|
31
31
|
readonly createdAt?: Date;
|
|
32
32
|
readonly userProfile?: {
|
|
@@ -62,14 +62,14 @@ declare const RequestContext_base: S.EnhancedClass<RequestContext, {
|
|
|
62
62
|
} & S.WithDefaults<S.Schema<string & S.StringIdBrand & import("effect-app/ids").UserProfileIdBrand, string, never>>;
|
|
63
63
|
}>>;
|
|
64
64
|
}, RequestContext.From, never, {
|
|
65
|
-
readonly id?: string & S.NonEmptyString255Brand;
|
|
66
65
|
readonly name: string & S.NonEmptyString255Brand;
|
|
66
|
+
readonly id?: string & S.NonEmptyString255Brand;
|
|
67
|
+
readonly rootId: NonEmptyString255;
|
|
67
68
|
readonly locale: "en" | "de";
|
|
68
69
|
readonly createdAt?: Date;
|
|
69
70
|
readonly userProfile?: {
|
|
70
71
|
readonly sub: string & S.StringIdBrand & import("effect-app/ids").UserProfileIdBrand;
|
|
71
72
|
} | undefined;
|
|
72
|
-
readonly rootId: NonEmptyString255;
|
|
73
73
|
readonly sourceId?: (string & S.NonEmptyString255Brand) | undefined;
|
|
74
74
|
readonly parent?: RequestContextParent | undefined;
|
|
75
75
|
readonly namespace?: (string & S.NonEmptyString255Brand) | undefined;
|
|
@@ -2,5 +2,5 @@ import { Effect } from "effect-app";
|
|
|
2
2
|
import { HttpServerRequest, HttpServerResponse } from "effect-app/http";
|
|
3
3
|
import { Locale } from "../../RequestContext.js";
|
|
4
4
|
import { RequestContextContainer } from "../../services/RequestContextContainer.js";
|
|
5
|
-
export declare const RequestContextMiddleware: (defaultLocale?: Locale) => <E, R>(app: import("@effect/platform/HttpApp").Default<E, R>) => Effect.Effect<HttpServerResponse.HttpServerResponse, import("effect/Cause").NoSuchElementException | E,
|
|
5
|
+
export declare const RequestContextMiddleware: (defaultLocale?: Locale) => <E, R>(app: import("@effect/platform/HttpApp").Default<E, R>) => Effect.Effect<HttpServerResponse.HttpServerResponse, import("effect/Cause").NoSuchElementException | E, HttpServerRequest.HttpServerRequest | RequestContextContainer | import("../../services/Store/ContextMapContainer.js").ContextMapContainer | Exclude<R, never>>;
|
|
6
6
|
//# sourceMappingURL=RequestContextMiddleware.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { Effect } from "effect-app";
|
|
|
9
9
|
* The parent span is set to the root span of the current fiber.
|
|
10
10
|
* Reports errors.
|
|
11
11
|
*/
|
|
12
|
-
export declare function forkDaemonReportRequest<R, E, A>(self: Effect<A, E, R>): Effect<import("effect/Fiber").RuntimeFiber<A, E>, never,
|
|
12
|
+
export declare function forkDaemonReportRequest<R, E, A>(self: Effect<A, E, R>): Effect<import("effect/Fiber").RuntimeFiber<A, E>, never, RequestFiberSet | R>;
|
|
13
13
|
/**
|
|
14
14
|
* Forks the effect into a new fiber attached to the RequestFiberSet scope. Because the
|
|
15
15
|
* new fiber isn't attached to the parent, when the fiber executing the
|
|
@@ -19,5 +19,5 @@ export declare function forkDaemonReportRequest<R, E, A>(self: Effect<A, E, R>):
|
|
|
19
19
|
* The parent span is set to the root span of the current fiber.
|
|
20
20
|
* Reports unexpected errors.
|
|
21
21
|
*/
|
|
22
|
-
export declare function forkDaemonReportRequestUnexpected<R, E, A>(self: Effect<A, E, R>): Effect<import("effect/Fiber").RuntimeFiber<A, E>, never,
|
|
22
|
+
export declare function forkDaemonReportRequestUnexpected<R, E, A>(self: Effect<A, E, R>): Effect<import("effect/Fiber").RuntimeFiber<A, E>, never, R | RequestFiberSet>;
|
|
23
23
|
//# sourceMappingURL=reportError.d.ts.map
|
|
@@ -48,7 +48,7 @@ declare const Operations_base: (abstract new (service: {
|
|
|
48
48
|
all: Effect<Operation[]>;
|
|
49
49
|
find: (id: OperationId) => Effect<Option<Operation>>;
|
|
50
50
|
update: (id: OperationId, progress: OperationProgress) => Effect.Effect<void, never, never>;
|
|
51
|
-
}) => X) => X extends Effect<infer A_1, infer E_2, infer R_4> ? Effect<A_1, E_2,
|
|
51
|
+
}) => X) => X extends Effect<infer A_1, infer E_2, infer R_4> ? Effect<A_1, E_2, R_4 | Operations> : Effect<X, never, Operations>;
|
|
52
52
|
};
|
|
53
53
|
export declare class Operations extends Operations_base {
|
|
54
54
|
private static readonly CleanupLive;
|
|
@@ -13,7 +13,7 @@ export declare function makeServiceBusQueue<Evt extends {
|
|
|
13
13
|
id: StringId;
|
|
14
14
|
_tag: string;
|
|
15
15
|
}, EvtE, DrainEvtE>(queueName: string, queueDrainName: string, schema: S.Schema<Evt, EvtE>, drainSchema: S.Schema<DrainEvt, DrainEvtE>): Effect.Effect<{
|
|
16
|
-
drain: <DrainE, DrainR>(handleEvent: (ks: DrainEvt) => Effect<void, DrainE, DrainR>, sessionId?: string) => Effect.Effect<never, never,
|
|
16
|
+
drain: <DrainE, DrainR>(handleEvent: (ks: DrainEvt) => Effect<void, DrainE, DrainR>, sessionId?: string) => Effect.Effect<never, never, import("effect/Scope").Scope | RequestContextContainer | import("../Store/ContextMapContainer.js").ContextMapContainer | Exclude<Exclude<Exclude<Exclude<DrainR, Tracer.ParentSpan>, never>, Tracer.ParentSpan>, ServiceBusReceiverFactory>>;
|
|
17
17
|
publish: (messages_0: Evt, ...messages: Evt[]) => Effect.Effect<void, never, never>;
|
|
18
18
|
}, never, RequestContextContainer | ServiceBusReceiverFactory | import("@azure/service-bus").ServiceBusSender>;
|
|
19
19
|
/**
|
|
@@ -26,7 +26,7 @@ export declare function byIdAndSaveWithPure<T extends {
|
|
|
26
26
|
id: unknown;
|
|
27
27
|
}, Encoded extends {
|
|
28
28
|
id: string;
|
|
29
|
-
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, id: T["id"]): <R, A, E, S2 extends T>(pure: Effect<A, E, FixEnv<R, Evt, T, S2>>) => Effect.Effect<A, import("effect-app/client/errors").
|
|
29
|
+
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, id: T["id"]): <R, A, E, S2 extends T>(pure: Effect<A, E, FixEnv<R, Evt, T, S2>>) => Effect.Effect<A, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | NotFoundError<ItemType> | E, Exclude<R, {
|
|
30
30
|
env: import("effect-app/Pure").PureEnv<Evt, T, S2>;
|
|
31
31
|
}>>;
|
|
32
32
|
/**
|
|
@@ -39,7 +39,7 @@ export declare function handleByIdAndSaveWithPure<T extends {
|
|
|
39
39
|
id: string;
|
|
40
40
|
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>): <Req extends {
|
|
41
41
|
id: T["id"];
|
|
42
|
-
}, Context, R, A, E, S2 extends T>(pure: (req: Req, ctx: Context) => Effect<A, E, FixEnv<R, Evt, T, S2>>) => (req: Req, ctx: Context) => Effect.Effect<A, import("effect-app/client/errors").
|
|
42
|
+
}, Context, R, A, E, S2 extends T>(pure: (req: Req, ctx: Context) => Effect<A, E, FixEnv<R, Evt, T, S2>>) => (req: Req, ctx: Context) => Effect.Effect<A, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | E | NotFoundError<ItemType>, Exclude<R, {
|
|
43
43
|
env: import("effect-app/Pure").PureEnv<Evt, T, S2>;
|
|
44
44
|
}>>;
|
|
45
45
|
/**
|
|
@@ -49,7 +49,7 @@ export declare function saveManyWithPure_<R, T extends {
|
|
|
49
49
|
id: unknown;
|
|
50
50
|
}, Encoded extends {
|
|
51
51
|
id: string;
|
|
52
|
-
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, items: Iterable<S1>, pure: Effect<A, E, FixEnv<R, Evt, readonly S1[], readonly S2[]>>): Effect.Effect<A, import("effect-app/client/errors").
|
|
52
|
+
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, items: Iterable<S1>, pure: Effect<A, E, FixEnv<R, Evt, readonly S1[], readonly S2[]>>): Effect.Effect<A, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | E, Exclude<R, {
|
|
53
53
|
env: import("effect-app/Pure").PureEnv<Evt, readonly S1[], readonly S2[]>;
|
|
54
54
|
}>>;
|
|
55
55
|
/**
|
|
@@ -59,14 +59,14 @@ export declare function saveWithPure_<R, T extends {
|
|
|
59
59
|
id: unknown;
|
|
60
60
|
}, Encoded extends {
|
|
61
61
|
id: string;
|
|
62
|
-
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, item: S1, pure: Effect<A, E, FixEnv<R, Evt, S1, S2>>): Effect.Effect<A, import("effect-app/client/errors").
|
|
62
|
+
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, item: S1, pure: Effect<A, E, FixEnv<R, Evt, S1, S2>>): Effect.Effect<A, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | E, Exclude<R, {
|
|
63
63
|
env: import("effect-app/Pure").PureEnv<Evt, S1, S2>;
|
|
64
64
|
}>>;
|
|
65
65
|
export declare function saveAllWithEffectInt<T extends {
|
|
66
66
|
id: unknown;
|
|
67
67
|
}, Encoded extends {
|
|
68
68
|
id: string;
|
|
69
|
-
}, P extends T, Evt, ItemType extends string, R, E, A>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, gen: Effect<readonly [Iterable<P>, Iterable<Evt>, A], E, R>): Effect.Effect<A, import("effect-app/client/errors").
|
|
69
|
+
}, P extends T, Evt, ItemType extends string, R, E, A>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, gen: Effect<readonly [Iterable<P>, Iterable<Evt>, A], E, R>): Effect.Effect<A, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | E, R>;
|
|
70
70
|
/**
|
|
71
71
|
* @tsplus fluent Repository saveManyWithPureBatched
|
|
72
72
|
*/
|
|
@@ -74,7 +74,7 @@ export declare function saveManyWithPureBatched<T extends {
|
|
|
74
74
|
id: unknown;
|
|
75
75
|
}, Encoded extends {
|
|
76
76
|
id: string;
|
|
77
|
-
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, batchSize?: number): <R, A, E, S1 extends T, S2 extends T>(pure: Effect<A, E, FixEnv<R, Evt, readonly S1[], readonly S2[]>>) => (items: Iterable<S1>) => Effect.Effect<A[], import("effect-app/client/errors").
|
|
77
|
+
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, batchSize?: number): <R, A, E, S1 extends T, S2 extends T>(pure: Effect<A, E, FixEnv<R, Evt, readonly S1[], readonly S2[]>>) => (items: Iterable<S1>) => Effect.Effect<A[], import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | E, Exclude<R, {
|
|
78
78
|
env: import("effect-app/Pure").PureEnv<Evt, readonly S1[], readonly S2[]>;
|
|
79
79
|
}>>;
|
|
80
80
|
/**
|
|
@@ -84,7 +84,7 @@ export declare function saveManyWithPureBatched_<R, T extends {
|
|
|
84
84
|
id: unknown;
|
|
85
85
|
}, Encoded extends {
|
|
86
86
|
id: string;
|
|
87
|
-
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, items: Iterable<S1>, pure: Effect<A, E, FixEnv<R, Evt, readonly S1[], readonly S2[]>>, batchSize?: number): Effect.Effect<A[], import("effect-app/client/errors").
|
|
87
|
+
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>, items: Iterable<S1>, pure: Effect<A, E, FixEnv<R, Evt, readonly S1[], readonly S2[]>>, batchSize?: number): Effect.Effect<A[], import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | E, Exclude<R, {
|
|
88
88
|
env: import("effect-app/Pure").PureEnv<Evt, readonly S1[], readonly S2[]>;
|
|
89
89
|
}>>;
|
|
90
90
|
/**
|
|
@@ -94,7 +94,7 @@ export declare function save<T extends {
|
|
|
94
94
|
id: unknown;
|
|
95
95
|
}, Encoded extends {
|
|
96
96
|
id: string;
|
|
97
|
-
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>): (items_0: T, ...items: T[]) => Effect<void, import("effect-app/client/errors").
|
|
97
|
+
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>): (items_0: T, ...items: T[]) => Effect<void, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException>;
|
|
98
98
|
/**
|
|
99
99
|
* @tsplus getter Repository saveWithEvents
|
|
100
100
|
*/
|
|
@@ -102,7 +102,7 @@ export declare function saveWithEvents<T extends {
|
|
|
102
102
|
id: unknown;
|
|
103
103
|
}, Encoded extends {
|
|
104
104
|
id: string;
|
|
105
|
-
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>): (events: Iterable<Evt>) => (items_0: T, ...items: T[]) => Effect<void, import("effect-app/client/errors").
|
|
105
|
+
}, Evt, ItemType extends string>(self: RepositoryBaseC<T, Encoded, Evt, ItemType>): (events: Iterable<Evt>) => (items_0: T, ...items: T[]) => Effect<void, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException>;
|
|
106
106
|
/**
|
|
107
107
|
* @tsplus fluent Repository updateWithEffect
|
|
108
108
|
*/
|
|
@@ -110,7 +110,7 @@ export declare function itemUpdateWithEffect<R, E, T extends {
|
|
|
110
110
|
id: string;
|
|
111
111
|
}, Encoded extends {
|
|
112
112
|
id: string;
|
|
113
|
-
}, Evt, ItemType extends string>(repo: RepositoryBaseC<T, Encoded, Evt, ItemType>, id: T["id"], mod: (item: T) => Effect<T, E, R>): Effect.Effect<void, import("effect-app/client/errors").
|
|
113
|
+
}, Evt, ItemType extends string>(repo: RepositoryBaseC<T, Encoded, Evt, ItemType>, id: T["id"], mod: (item: T) => Effect<T, E, R>): Effect.Effect<void, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | E | NotFoundError<ItemType>, R>;
|
|
114
114
|
/**
|
|
115
115
|
* @tsplus fluent Repository update
|
|
116
116
|
*/
|
|
@@ -118,7 +118,7 @@ export declare function itemUpdate<T extends {
|
|
|
118
118
|
id: string;
|
|
119
119
|
}, Encoded extends {
|
|
120
120
|
id: string;
|
|
121
|
-
}, Evt, ItemType extends string>(repo: RepositoryBaseC<T, Encoded, Evt, ItemType>, id: T["id"], mod: (item: T) => T): Effect.Effect<void, import("effect-app/client/errors").
|
|
121
|
+
}, Evt, ItemType extends string>(repo: RepositoryBaseC<T, Encoded, Evt, ItemType>, id: T["id"], mod: (item: T) => T): Effect.Effect<void, import("effect-app/client/errors").InvalidStateError | import("effect-app/client/errors").OptimisticConcurrencyException | NotFoundError<ItemType>, never>;
|
|
122
122
|
/**
|
|
123
123
|
* only use this as a shortcut if you don't have the item already
|
|
124
124
|
* @tsplus fluent Repository removeById
|
|
@@ -88,8 +88,8 @@ export declare class RepositoryBaseC3<T extends {
|
|
|
88
88
|
get(id: T["id"]): Effect.Effect<T, NotFoundError<ItemType>, never>;
|
|
89
89
|
readonly log: (evt: Evt) => import("effect-app/Pure").PureLogT<any>;
|
|
90
90
|
removeById(id: T["id"]): Effect.Effect<void, NotFoundError<ItemType>, never>;
|
|
91
|
-
readonly save: (items_0: T, ...items: T[]) => Effect<void,
|
|
92
|
-
readonly saveWithEvents: (events: Iterable<Evt>) => (items_0: T, ...items: T[]) => Effect<void,
|
|
91
|
+
readonly save: (items_0: T, ...items: T[]) => Effect<void, InvalidStateError | OptimisticConcurrencyException>;
|
|
92
|
+
readonly saveWithEvents: (events: Iterable<Evt>) => (items_0: T, ...items: T[]) => Effect<void, InvalidStateError | OptimisticConcurrencyException>;
|
|
93
93
|
readonly queryAndSavePure: {
|
|
94
94
|
<A, E2, R2, T2 extends T>(q: (q: Query<Encoded>) => QueryEnd<Encoded, "one">, pure: Effect<A, E2, FixEnv<R2, Evt, T, T2>>): Effect.Effect<A, InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | E2, Exclude<R2, {
|
|
95
95
|
env: PureEnv<Evt, T, T2>;
|
|
@@ -106,7 +106,7 @@ export declare class RepositoryBaseC3<T extends {
|
|
|
106
106
|
*/
|
|
107
107
|
readonly handleByIdAndSaveWithPure: <Req extends {
|
|
108
108
|
id: T["id"];
|
|
109
|
-
}, Context, R, A, E, S2 extends T>(pure: (req: Req, ctx: Context) => Effect<A, E, FixEnv<R, Evt, T, S2>>) => (req: Req, ctx: Context) => Effect.Effect<A,
|
|
109
|
+
}, Context, R, A, E, S2 extends T>(pure: (req: Req, ctx: Context) => Effect<A, E, FixEnv<R, Evt, T, S2>>) => (req: Req, ctx: Context) => Effect.Effect<A, InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | E, Exclude<R, {
|
|
110
110
|
env: PureEnv<Evt, T, S2>;
|
|
111
111
|
}>>;
|
|
112
112
|
saveManyWithPure: {
|
|
@@ -122,7 +122,7 @@ export declare class RepositoryBaseC3<T extends {
|
|
|
122
122
|
env: PureEnv<Evt, T, S2>;
|
|
123
123
|
}>>;
|
|
124
124
|
};
|
|
125
|
-
saveWithPure<R, A, E, S1 extends T, S2 extends T>(item: S1, pure: Effect<A, E, FixEnv<R, Evt, S1, S2>>): Effect.Effect<A,
|
|
125
|
+
saveWithPure<R, A, E, S1 extends T, S2 extends T>(item: S1, pure: Effect<A, E, FixEnv<R, Evt, S1, S2>>): Effect.Effect<A, InvalidStateError | OptimisticConcurrencyException | E, Exclude<R, {
|
|
126
126
|
env: PureEnv<Evt, S1, S2>;
|
|
127
127
|
}>>;
|
|
128
128
|
}
|
|
@@ -145,7 +145,7 @@ export declare function makeRepo<Evt = never>(): <ItemType extends string, R, En
|
|
|
145
145
|
config?: Omit<StoreConfig<Encoded>, "partitionValue"> & {
|
|
146
146
|
partitionValue?: (a: Encoded) => string;
|
|
147
147
|
};
|
|
148
|
-
}) => Effect.Effect<Repository<T, Encoded, Evt, ItemType>, E,
|
|
148
|
+
}) => Effect.Effect<Repository<T, Encoded, Evt, ItemType>, E, R | RInitial | R2 | StoreMaker | ContextMapContainer>;
|
|
149
149
|
Q: Query<Encoded>;
|
|
150
150
|
};
|
|
151
151
|
export declare function makeStore<Encoded extends {
|
|
@@ -156,7 +156,7 @@ export declare function makeStore<Encoded extends {
|
|
|
156
156
|
id: unknown;
|
|
157
157
|
}>(name: ItemType, schema: S.Schema<T, E, R>, mapTo: (e: E, etag: string | undefined) => Encoded) => <RInitial = never, EInitial = never>(makeInitial?: Effect<readonly T[], EInitial, RInitial>, config?: Omit<StoreConfig<Encoded>, "partitionValue"> & {
|
|
158
158
|
partitionValue?: (a: Encoded) => string;
|
|
159
|
-
}) => Effect.Effect<import("./Store.js").Store<Encoded, string, PersistenceModelType<Encoded>>, EInitial,
|
|
159
|
+
}) => Effect.Effect<import("./Store.js").Store<Encoded, string, PersistenceModelType<Encoded>>, EInitial, R | RInitial | StoreMaker>;
|
|
160
160
|
export interface Repos<T extends {
|
|
161
161
|
id: unknown;
|
|
162
162
|
}, Encoded extends {
|
|
@@ -25,7 +25,7 @@ declare const RequestContextContainer_base: (abstract new (service: {
|
|
|
25
25
|
requestContext: Effect<RequestContext>;
|
|
26
26
|
update: (f: (rc: RequestContext) => RequestContext) => Effect<RequestContext>;
|
|
27
27
|
start: (f: RequestContext) => Effect<void>;
|
|
28
|
-
}) => X) => X extends Effect<infer A_1, infer E_1, infer R_3> ? Effect<A_1, E_1,
|
|
28
|
+
}) => X) => X extends Effect<infer A_1, infer E_1, infer R_3> ? Effect<A_1, E_1, RequestContextContainer | R_3> : Effect<X, never, RequestContextContainer>;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* @tsplus type RequestContextContainer
|
|
@@ -87,7 +87,7 @@ declare const StoreMaker_base: (abstract new (service: {
|
|
|
87
87
|
make: <Encoded extends {
|
|
88
88
|
id: Id;
|
|
89
89
|
}, Id extends string, R = never, E = never>(name: string, seed?: Effect<Iterable<Encoded>, E, R>, config?: StoreConfig<Encoded>) => Effect<Store<Encoded, Id>, E, R>;
|
|
90
|
-
}) => X) => X extends Effect<infer A_1, infer E_1, infer R_3> ? Effect<A_1, E_1,
|
|
90
|
+
}) => X) => X extends Effect<infer A_1, infer E_1, infer R_3> ? Effect<A_1, E_1, R_3 | StoreMaker> : Effect<X, never, StoreMaker>;
|
|
91
91
|
};
|
|
92
92
|
/**
|
|
93
93
|
* @tsplus type StoreMaker
|
|
@@ -14,7 +14,7 @@ export declare const toFilter: <TFieldValues extends FieldValues, A, R>(q: QAll<
|
|
|
14
14
|
key: import("../../filter/types/path/eager.js").Path<TFieldValues>;
|
|
15
15
|
direction: "ASC" | "DESC";
|
|
16
16
|
}[]];
|
|
17
|
-
ttype: "
|
|
17
|
+
ttype: "one" | "count" | "many";
|
|
18
18
|
mode: "project" | "collect" | "transform";
|
|
19
19
|
filter: FilterResult[];
|
|
20
20
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@azure/cosmos": "^4.1.1",
|
|
8
8
|
"@azure/service-bus": "^7.9.5",
|
|
9
|
-
"@effect/rpc": "^0.43.
|
|
10
|
-
"@effect/rpc-http": "^0.41.
|
|
9
|
+
"@effect/rpc": "^0.43.3",
|
|
10
|
+
"@effect/rpc-http": "^0.41.3",
|
|
11
11
|
"express-oauth2-jwt-bearer": "^1.6.0",
|
|
12
12
|
"@faker-js/faker": "^8.4.1",
|
|
13
13
|
"@sendgrid/helpers": "^8.0.0",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"proper-lockfile": "^4.1.2",
|
|
21
21
|
"pure-rand": "6.1.0",
|
|
22
22
|
"redlock": "^4.2.0",
|
|
23
|
-
"@effect-app/
|
|
24
|
-
"effect-app": "1.
|
|
25
|
-
"@effect-app/core": "1.
|
|
26
|
-
"@effect-app/
|
|
23
|
+
"@effect-app/infra-adapters": "1.18.0",
|
|
24
|
+
"effect-app": "1.27.0",
|
|
25
|
+
"@effect-app/core": "1.16.0",
|
|
26
|
+
"@effect-app/schema": "1.18.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/cli": "^7.25.7",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"express": "^4.21.1",
|
|
46
|
-
"@effect/platform": "^0.68.
|
|
47
|
-
"@effect/schema": "^0.75.
|
|
48
|
-
"@effect/sql": "^0.16.
|
|
49
|
-
"@effect/vitest": "^0.12.
|
|
50
|
-
"effect": "^3.9.
|
|
46
|
+
"@effect/platform": "^0.68.4",
|
|
47
|
+
"@effect/schema": "^0.75.4",
|
|
48
|
+
"@effect/sql": "^0.16.4",
|
|
49
|
+
"@effect/vitest": "^0.12.1",
|
|
50
|
+
"effect": "^3.9.2"
|
|
51
51
|
},
|
|
52
52
|
"typesVersions": {
|
|
53
53
|
"*": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// packages/infra/vitest.config.ts
|
|
2
|
-
import { defineConfig } from "file:///Users/patrickroza/pj/effect-app/libs/node_modules/.pnpm/vite@5.2.6_@types+node@20.11.30/node_modules/vite/dist/node/index.js";
|
|
3
|
-
|
|
4
|
-
// vite.config.base.ts
|
|
5
|
-
import path from "path";
|
|
6
|
-
import fs from "fs";
|
|
7
|
-
var __vite_injected_original_dirname = "/Users/patrickroza/pj/effect-app/libs";
|
|
8
|
-
function makeConfig(dirName) {
|
|
9
|
-
const prefix = path.resolve(__vite_injected_original_dirname, "packages");
|
|
10
|
-
const packages = fs.readdirSync(prefix).map((f) => prefix + "/" + f).filter((f) => fs.lstatSync(f).isDirectory());
|
|
11
|
-
const cfg = {
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
13
|
-
//plugins: [autoImport],
|
|
14
|
-
test: {
|
|
15
|
-
include: ["./test/**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
16
|
-
reporters: "verbose",
|
|
17
|
-
globals: true
|
|
18
|
-
},
|
|
19
|
-
resolve: {
|
|
20
|
-
alias: packages.reduce((acc, cur) => {
|
|
21
|
-
acc[JSON.parse(fs.readFileSync(cur + "/package.json", "utf-8")).name] = path.resolve(cur, cur.endsWith("core") ? "dist" : "src");
|
|
22
|
-
return acc;
|
|
23
|
-
}, {})
|
|
24
|
-
// "@effect-app/core/Prelude": path.join(__dirname, "packages/core/src/Prelude.code.ts")
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
console.log(cfg);
|
|
28
|
-
return cfg;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// packages/infra/vitest.config.ts
|
|
32
|
-
var __vite_injected_original_dirname2 = "/Users/patrickroza/pj/effect-app/libs/packages/infra";
|
|
33
|
-
var vitest_config_default = defineConfig(makeConfig(__vite_injected_original_dirname2));
|
|
34
|
-
export {
|
|
35
|
-
vitest_config_default as default
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsicGFja2FnZXMvaW5mcmEvdml0ZXN0LmNvbmZpZy50cyIsICJ2aXRlLmNvbmZpZy5iYXNlLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5q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