@effect-app/infra 0.57.0 → 0.58.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/_cjs/RequestContext.cjs.map +1 -1
- package/_src/RequestContext.ts +0 -2
- package/dist/RequestContext.d.ts.map +1 -1
- package/dist/RequestContext.js +1 -1
- package/dist/services/Repository.d.ts +15 -15
- package/dist/services/RepositoryBase.d.ts +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 0.58.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Compiler test
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @effect-app/core@0.49.0
|
|
13
|
+
- @effect-app/infra-adapters@0.42.0
|
|
14
|
+
- @effect-app/prelude@0.48.0
|
|
15
|
+
- @effect-app/schema@0.43.0
|
|
16
|
+
|
|
3
17
|
## 0.57.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestContext.cjs","names":["RequestId","tsplus_module_1","StringId","exports","RequestContextParent","MNModel","_tag","literal","id","name","ReasonableString","user","tsplus_module_2","optionalProp","props","prop","locale","createdAt","withDefaultProp","date","__decorate","useClassFeaturesForSchema","RequestContext","RequestContext_1","omit","withDefault","rootId","parent","namespace","inherit","newSelf","toMonitoring","self","operationName","parentOperationName","parentLocale","Encoded","EncodedClass"],"sources":["../_src/RequestContext.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"RequestContext.cjs","names":["RequestId","tsplus_module_1","StringId","exports","RequestContextParent","MNModel","_tag","literal","id","name","ReasonableString","user","tsplus_module_2","optionalProp","props","prop","locale","createdAt","withDefaultProp","date","__decorate","useClassFeaturesForSchema","RequestContext","RequestContext_1","omit","withDefault","rootId","parent","namespace","inherit","newSelf","toMonitoring","self","operationName","parentOperationName","parentLocale","Encoded","EncodedClass"],"sources":["../_src/RequestContext.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;AAAO,MAAMA,SAAS,GAAAC,eAAA,CAAGC,QAAQ;AAAAC,OAAA,CAAAH,SAAA,GAAAA,SAAA;AAIjC,IAAaI,oBAAoB,GAAjC,MAAaA,oBAAqB,SAAQH,eAAA,CAAAI,OAAO,EAK9C,CAAC;EACFC,IAAI,EAAEL,eAAA,CAAAM,OAAO,CAAC,gBAAgB,CAAC;EAC/BC,EAAE,EAAER,SAAS;EACbS,IAAI,EAAAR,eAAA,CAAES,gBAAgB;EACtBC,IAAI,EAAAC,eAAA,CAAAC,YAAA,CAAEZ,eAAA,CAAAa,KAAK,CAAC;IAAEN,EAAE,EAAEP,eAAA,CAAAc,IAAI,CAAAd,eAAA,CAACC,QAAQ;EAAC,CAAE,CAAC,CAAS;EAC5Cc,MAAM,EAAEf,eAAA,CAAAM,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;EAC3BU,SAAS,EAAAL,eAAA,CAAAM,eAAA,CAAAjB,eAAA,CAAEkB,IAAI;CAChB,CAAC,GAAG;AAAAhB,OAAA,CAAAC,oBAAA,GAAAA,oBAAA;AAZQD,OAAA,CAAAC,oBAAA,GAAAA,oBAAoB,GAAAgB,UAAA,E,gBADhCC,yBAAyB,C,EACbjB,oBAAoB,CAY5B;AAEL;;;;AAKA,IAAakB,cAAc,GAAAC,gBAAA,GAA3B,MAAaD,cAAe,SAAQrB,eAAA,CAAAI,OAAO,EAKxC,CAAC;EACF,GAAGD,oBAAoB,CAACoB,IAAI,CAAC,IAAI,CAAC;EAClChB,EAAE,EAAER,SAAS,CAACyB,WAAW;EACzBC,MAAM,EAAE1B,SAAS;EACjB2B,MAAM,EAAAf,eAAA,CAAAC,YAAA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@
|
|
|
1
|
-
{"version":3,"file":"RequestContext.d.ts","sourceRoot":"","sources":["../_src/RequestContext.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestContext.d.ts","sourceRoot":"","sources":["../_src/RequestContext.ts"],"names":[],"mappings":";AAAA,eAAO,MAAM,SAAS;;;CAAW,CAAA;AACjC,MAAM,MAAM,SAAS,GAAG,mBAAmB,CAAC,OAAO,SAAS,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAE7D,qBACa,oBAAqB,SAAQ,yBAYxC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL;;;GAGG;AACH,qBACa,cAAe,SAAQ,mBAWlC;IACA,MAAM,CAAC,OAAO,CACZ,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,oBAAoB,CAAC,gBAAgB;IAUhD,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc;;;;;;CASrD;AAKD,yBAAiB,oBAAoB,CAAC;;;;;;;;;;;IACpC;;;OAGG;IACH,MAAM,OAAO,OAAQ,SAAQ,YAA2C;KAAG;IAC3E,MAAM,WAAW,gBACf,SAAQ,uBAAuB,CAAC,OAAO,oBAAoB,CAAC;KAAG;IACjE,MAAM,WAAW,KAAM,SAAQ,gBAAgB,CAAC,OAAO,oBAAoB,CAAC;KAAG;;CAChF;AACD,yBAAiB,cAAc,CAAC;;;;;;;;;;;;;;IAC9B;;;OAGG;IACH,MAAM,OAAO,OAAQ,SAAQ,cAAqC;KAAG;IACrE,MAAM,WAAW,gBACf,SAAQ,uBAAuB,CAAC,OAAO,cAAc,CAAC;KAAG;IAC3D,MAAM,WAAW,KAAM,SAAQ,gBAAgB,CAAC,OAAO,cAAc,CAAC;KAAG;;CAC1E"}
|
package/dist/RequestContext.js
CHANGED
|
@@ -75,4 +75,4 @@ export { RequestContext };
|
|
|
75
75
|
}
|
|
76
76
|
RequestContext.Encoded = Encoded;
|
|
77
77
|
})(RequestContext || (RequestContext = {}));
|
|
78
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVxdWVzdENvbnRleHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9fc3JjL1JlcXVlc3RDb250ZXh0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLE1BQU0sQ0FBQyxNQUFNLFNBQVMsbUJBQUcsUUFBUSxDQUFBO0FBSWpDLElBQWEsb0JBQW9CLEdBQWpDLE1BQWEsb0JBQXFCLFNBQVEsZ0JBQUEsT0FBTyxFQUs5QyxDQUFDO0lBQ0YsSUFBSSxFQUFFLGdCQUFBLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQztJQUMvQixFQUFFLEVBQUUsU0FBUztJQUNiLElBQUksa0JBQUUsZ0JBQWdCO0lBQ3RCLElBQUksK0JBQUUsZ0JBQUEsS0FBSyxDQUFDLEVBQUUsRUFBRSxFQUFFLGdCQUFBLElBQUksaUJBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxDQUFTO0lBQzVDLE1BQU0sRUFBRSxnQkFBQSxPQUFPLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQztJQUMzQixTQUFTLGtEQUFFLElBQUksQ0FBWTtDQUM1QixDQUFDO0NBQUcsQ0FBQTtBQVpRLG9CQUFvQjtvQkFEaEMseUJBQXlCO0dBQ2Isb0JBQW9CLENBWTVCO1NBWlEsb0JBQW9CO0FBY2pDOzs7R0FHRztBQUVILElBQWEsY0FBYyxzQkFBM0IsTUFBYSxjQUFlLFNBQVEsZ0JBQUEsT0FBTyxFQUt4QyxDQUFDO0lBQ0YsR0FBRyxvQkFBb0IsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDO0lBQ2xDLEVBQUUsRUFBRSxTQUFTLENBQUMsV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EIsb0JBQW9CLFFBU3BDO0FBQ0QsV0FBaUIsY0FBYztJQUM3Qjs7O09BR0c7SUFDSCxNQUFhLE9BQVEsU0FBUSxnQkFBQSxZQUFZLEVBQXlCO0tBQUc7SUFBeEQsc0JBQU8sVUFBaUQsQ0FBQTtBQUl2RSxDQUFDLEVBVGdCLGNBQWMsS0FBZCxjQUFjLFFBUzlCIn0=
|
|
@@ -48,7 +48,7 @@ export declare function get<T extends {
|
|
|
48
48
|
id: string;
|
|
49
49
|
}, PM extends {
|
|
50
50
|
id: string;
|
|
51
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, id: T["id"]): import("@effect/io/Effect").Effect<
|
|
51
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, id: T["id"]): import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer, NotFoundError<ItemType>, T>;
|
|
52
52
|
/**
|
|
53
53
|
* @tsplus fluent Repository filter
|
|
54
54
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -180,7 +180,7 @@ export declare function queryAndSavePureEffect<T extends {
|
|
|
180
180
|
collect?: (t: T) => Option<S>;
|
|
181
181
|
limit?: number;
|
|
182
182
|
skip?: number;
|
|
183
|
-
}>): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("@effect/io/Effect").Effect<
|
|
183
|
+
}>): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | R | Exclude<R2, {
|
|
184
184
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S[], S2[]>;
|
|
185
185
|
}>, InvalidStateError | OptimisticConcurrencyException | E | E2, A>;
|
|
186
186
|
/**
|
|
@@ -196,7 +196,7 @@ export declare function queryAndSavePure<T extends {
|
|
|
196
196
|
collect?: (t: T) => Option<S>;
|
|
197
197
|
limit?: number;
|
|
198
198
|
skip?: number;
|
|
199
|
-
}): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("@effect/io/Effect").Effect<
|
|
199
|
+
}): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R2, {
|
|
200
200
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S[], S2[]>;
|
|
201
201
|
}>, InvalidStateError | OptimisticConcurrencyException | E2, A>;
|
|
202
202
|
/**
|
|
@@ -207,7 +207,7 @@ export declare function saveManyWithPure<T extends {
|
|
|
207
207
|
id: string;
|
|
208
208
|
}, PM extends {
|
|
209
209
|
id: string;
|
|
210
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): <R, A, E, S1 extends T, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>) => (items: Iterable<S1>) => import("@effect/io/Effect").Effect<
|
|
210
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): <R, A, E, S1 extends T, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>) => (items: Iterable<S1>) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R, {
|
|
211
211
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1[], S2[]>;
|
|
212
212
|
}>, InvalidStateError | OptimisticConcurrencyException | E, A>;
|
|
213
213
|
/**
|
|
@@ -218,7 +218,7 @@ export declare function byIdAndSaveWithPure<T extends {
|
|
|
218
218
|
id: string;
|
|
219
219
|
}, PM extends {
|
|
220
220
|
id: string;
|
|
221
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, id: T["id"]): <R, A, E, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, T, S2>, E, A>) => import("@effect/io/Effect").Effect<
|
|
221
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, id: T["id"]): <R, A, E, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, T, S2>, E, A>) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R, {
|
|
222
222
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, T, S2>;
|
|
223
223
|
}>, InvalidStateError | OptimisticConcurrencyException | E | NotFoundError<ItemType>, A>;
|
|
224
224
|
/**
|
|
@@ -232,7 +232,7 @@ export declare function handleByIdAndSaveWithPure<T extends {
|
|
|
232
232
|
id: string;
|
|
233
233
|
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): <Req extends {
|
|
234
234
|
id: T["id"];
|
|
235
|
-
}, Context_1, R, A, E, S2 extends T>(pure: (req: Req, ctx: Context_1) => import("@effect/io/Effect").Effect<FixEnv<R, Evt, T, S2>, E, A>) => (req: Req, ctx: Context_1) => import("@effect/io/Effect").Effect<
|
|
235
|
+
}, Context_1, R, A, E, S2 extends T>(pure: (req: Req, ctx: Context_1) => import("@effect/io/Effect").Effect<FixEnv<R, Evt, T, S2>, E, A>) => (req: Req, ctx: Context_1) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R, {
|
|
236
236
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, T, S2>;
|
|
237
237
|
}>, InvalidStateError | OptimisticConcurrencyException | E | NotFoundError<ItemType>, A>;
|
|
238
238
|
/**
|
|
@@ -243,7 +243,7 @@ export declare function saveManyWithPure_<Id extends string, R, T extends {
|
|
|
243
243
|
id: Id;
|
|
244
244
|
}, PM extends {
|
|
245
245
|
id: string;
|
|
246
|
-
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, items: Iterable<S1>, pure: Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>): import("@effect/io/Effect").Effect<
|
|
246
|
+
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, items: Iterable<S1>, pure: Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>): import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R, {
|
|
247
247
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1[], S2[]>;
|
|
248
248
|
}>, InvalidStateError | OptimisticConcurrencyException | E, A>;
|
|
249
249
|
/**
|
|
@@ -254,14 +254,14 @@ export declare function saveWithPure_<Id extends string, R, T extends {
|
|
|
254
254
|
id: Id;
|
|
255
255
|
}, PM extends {
|
|
256
256
|
id: string;
|
|
257
|
-
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, item: S1, pure: Effect<FixEnv<R, Evt, S1, S2>, E, A>): import("@effect/io/Effect").Effect<
|
|
257
|
+
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, item: S1, pure: Effect<FixEnv<R, Evt, S1, S2>, E, A>): import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R, {
|
|
258
258
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1, S2>;
|
|
259
259
|
}>, InvalidStateError | OptimisticConcurrencyException | E, A>;
|
|
260
260
|
export declare function saveAllWithEffectInt<T extends {
|
|
261
261
|
id: string;
|
|
262
262
|
}, PM extends {
|
|
263
263
|
id: string;
|
|
264
|
-
}, P extends T, Evt, ItemType extends string, R, E, A>(self: Repository<T, PM, Evt, ItemType>, gen: Effect<R, E, readonly [Iterable<P>, Iterable<Evt>, A]>): import("@effect/io/Effect").Effect<
|
|
264
|
+
}, P extends T, Evt, ItemType extends string, R, E, A>(self: Repository<T, PM, Evt, ItemType>, gen: Effect<R, E, readonly [Iterable<P>, Iterable<Evt>, A]>): import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | R, InvalidStateError | OptimisticConcurrencyException | E, A>;
|
|
265
265
|
/**
|
|
266
266
|
* @tsplus fluent Repository queryAndSavePureEffectBatched
|
|
267
267
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -275,7 +275,7 @@ export declare function queryAndSavePureEffectBatched<T extends {
|
|
|
275
275
|
collect?: (t: T) => Option<S>;
|
|
276
276
|
limit?: number;
|
|
277
277
|
skip?: number;
|
|
278
|
-
}>, batchSize?: number): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("@effect/io/Effect").Effect<
|
|
278
|
+
}>, batchSize?: number): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | R | Exclude<R2, {
|
|
279
279
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S[], S2[]>;
|
|
280
280
|
}>, InvalidStateError | OptimisticConcurrencyException | E | E2, A[]>;
|
|
281
281
|
/**
|
|
@@ -291,7 +291,7 @@ export declare function queryAndSavePureBatched<T extends {
|
|
|
291
291
|
collect?: (t: T) => Option<S>;
|
|
292
292
|
limit?: number;
|
|
293
293
|
skip?: number;
|
|
294
|
-
}, batchSize?: number): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("@effect/io/Effect").Effect<
|
|
294
|
+
}, batchSize?: number): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R2, {
|
|
295
295
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S[], S2[]>;
|
|
296
296
|
}>, InvalidStateError | OptimisticConcurrencyException | E2, A[]>;
|
|
297
297
|
/**
|
|
@@ -302,7 +302,7 @@ export declare function saveManyWithPureBatched<T extends {
|
|
|
302
302
|
id: string;
|
|
303
303
|
}, PM extends {
|
|
304
304
|
id: string;
|
|
305
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, batchSize?: number): <R, A, E, S1 extends T, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>) => (items: Iterable<S1>) => import("@effect/io/Effect").Effect<
|
|
305
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, batchSize?: number): <R, A, E, S1 extends T, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>) => (items: Iterable<S1>) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R, {
|
|
306
306
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1[], S2[]>;
|
|
307
307
|
}>, InvalidStateError | OptimisticConcurrencyException | E, A[]>;
|
|
308
308
|
/**
|
|
@@ -313,7 +313,7 @@ export declare function saveManyWithPureBatched_<Id extends string, R, T extends
|
|
|
313
313
|
id: Id;
|
|
314
314
|
}, PM extends {
|
|
315
315
|
id: string;
|
|
316
|
-
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, items: Iterable<S1>, pure: Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>, batchSize?: number): import("@effect/io/Effect").Effect<
|
|
316
|
+
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, items: Iterable<S1>, pure: Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>, batchSize?: number): import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer | Exclude<R, {
|
|
317
317
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1[], S2[]>;
|
|
318
318
|
}>, InvalidStateError | OptimisticConcurrencyException | E, A[]>;
|
|
319
319
|
export type AllDSL<T, Evt> = (<R, A, E, S1 extends T, S2 extends T>(pure: (dsl: PureDSL<S1[], S2[], Evt>) => Effect<R, E, A>) => Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>) & AllDSLExt<T, Evt>;
|
|
@@ -364,7 +364,7 @@ export declare function save<T extends {
|
|
|
364
364
|
id: string;
|
|
365
365
|
}, PM extends {
|
|
366
366
|
id: string;
|
|
367
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): (items_0: T, ...items_1: T[]) => import("@effect/io/Effect").Effect<
|
|
367
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): (items_0: T, ...items_1: T[]) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer, InvalidStateError | OptimisticConcurrencyException, void>;
|
|
368
368
|
/**
|
|
369
369
|
* @tsplus getter Repository saveWithEvents
|
|
370
370
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -373,5 +373,5 @@ export declare function saveWithEvents<T extends {
|
|
|
373
373
|
id: string;
|
|
374
374
|
}, PM extends {
|
|
375
375
|
id: string;
|
|
376
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): (events: Iterable<Evt>) => (items_0: T, ...items_1: T[]) => import("@effect/io/Effect").Effect<
|
|
376
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): (events: Iterable<Evt>) => (items_0: T, ...items_1: T[]) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer, InvalidStateError | OptimisticConcurrencyException, void>;
|
|
377
377
|
//# sourceMappingURL=Repository.d.ts.map
|
|
@@ -20,7 +20,7 @@ export declare const RepositoryBase: <Service>() => <T extends {
|
|
|
20
20
|
_etag: string | undefined;
|
|
21
21
|
}, Evt, ItemType extends string>(itemType: ItemType) => ((abstract new () => {
|
|
22
22
|
itemType: ItemType;
|
|
23
|
-
find: (id: T["id"]) => import("@effect/io/Effect").Effect<
|
|
23
|
+
find: (id: T["id"]) => import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer, never, Opt<T>>;
|
|
24
24
|
all: import("@effect/io/Effect").Effect<ContextMap, never, T[]>;
|
|
25
25
|
saveAndPublish: (items: Iterable<T>, events?: Iterable<Evt> | undefined) => Effect<ContextMap | RequestContextContainer, InvalidStateError | OptimisticConcurrencyException, void>;
|
|
26
26
|
utils: {
|
|
@@ -112,7 +112,7 @@ export declare function removeById<T extends {
|
|
|
112
112
|
id: string;
|
|
113
113
|
}, PM extends {
|
|
114
114
|
id: string;
|
|
115
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, id: T["id"]): import("@effect/io/Effect").Effect<
|
|
115
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, id: T["id"]): import("@effect/io/Effect").Effect<ContextMap | RequestContextContainer, import("../errors.js").NotFoundError<ItemType>, void>;
|
|
116
116
|
export declare function makeWhere<PM extends {
|
|
117
117
|
id: string;
|
|
118
118
|
_etag: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"proper-lockfile": "^4.1.2",
|
|
20
20
|
"pure-rand": "^6.0.1",
|
|
21
21
|
"redlock": "^4.2.0",
|
|
22
|
-
"@effect-app/
|
|
23
|
-
"@effect-app/infra-adapters": "0.
|
|
24
|
-
"@effect-app/
|
|
25
|
-
"@effect-app/
|
|
22
|
+
"@effect-app/prelude": "0.48.0",
|
|
23
|
+
"@effect-app/infra-adapters": "0.42.0",
|
|
24
|
+
"@effect-app/schema": "0.43.0",
|
|
25
|
+
"@effect-app/core": "0.49.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/cli": "^7.21.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"mongodb": "5.3.0",
|
|
41
41
|
"redis": "^3.1.2",
|
|
42
42
|
"ts-node": "^10.9.1",
|
|
43
|
-
"typescript": "https://cdn.jsdelivr.net/npm/@tsplus/installer@0.0.
|
|
43
|
+
"typescript": "https://cdn.jsdelivr.net/npm/@tsplus/installer@0.0.174/compiler/typescript.tgz",
|
|
44
44
|
"vitest": "^0.30.1",
|
|
45
45
|
"@effect-app/compiler": "0.25.0"
|
|
46
46
|
},
|