@effect-app/infra 0.94.5 → 0.94.6

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @effect-app/infra
2
2
 
3
+ ## 0.94.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @effect-app/prelude@0.72.4
9
+ - @effect-app/infra-adapters@0.60.6
10
+
3
11
  ## 0.94.5
4
12
 
5
13
  ### Patch Changes
@@ -1,12 +1,9 @@
1
1
  import { useClassFeaturesForSchema, MNModel, literal, ReasonableString, props, prop, date, EncodedClass, ConstructorInputFromApi, GetProvidedProps } from "@effect-app/prelude/schema";
2
- import { RequestId, UserProfileId } from "@effect-app/prelude/ids";
2
+ import { UserProfileId } from "@effect-app/prelude/ids";
3
3
  declare const RequestContextParent_base: import("@effect-app/schema").MNModel<import("@effect-app/schema").SchemaProperties<import("@effect-app/schema").ToProps<{
4
4
  _tag: import("@effect-app/schema").DefaultSchema<unknown, "RequestContext", "RequestContext", "RequestContext", import("@effect-app/schema").LiteralApi<["RequestContext"]>>;
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
- EParser: import("@effect-app/schema/custom/_parser").Parser<string, any, RequestId>;
7
- make: () => RequestId;
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]>>;
5
+ id: 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>>> & {
6
+ withDefault: 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>>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => import("@effect-app/schema").ReasonableString]>>;
10
7
  };
11
8
  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
9
  userProfile: import("@effect-app/schema").Property<import("@effect-app/schema").Schema<unknown, {
@@ -31,12 +28,9 @@ declare const RequestContextParent_base: import("@effect-app/schema").MNModel<im
31
28
  export declare class RequestContextParent extends RequestContextParent_base {
32
29
  }
33
30
  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("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => RequestId]>>;
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
- EParser: import("@effect-app/schema/custom/_parser").Parser<string, any, RequestId>;
37
- make: () => RequestId;
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]>>;
31
+ id: 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>>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => import("@effect-app/schema").ReasonableString]>>;
32
+ rootId: 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>>> & {
33
+ withDefault: 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>>, "required", import("effect/Option").None<any>, import("effect/Option").Some<["constructor", () => import("@effect-app/schema").ReasonableString]>>;
40
34
  };
41
35
  parent: import("@effect-app/schema").Property<import("@effect-app/schema").Schema<unknown, RequestContextParent, RequestContextParent.ConstructorInput, RequestContextParent.Encoded, {
42
36
  props: RequestContextParent.Props;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestContext.d.ts","sourceRoot":"","sources":["../_src/RequestContext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElE,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"}
1
+ {"version":3,"file":"RequestContext.d.ts","sourceRoot":"","sources":["../_src/RequestContext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAElE,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"}
@@ -181,7 +181,7 @@ export declare function queryAndSavePureEffect<T extends {
181
181
  skip?: number;
182
182
  }>): <R2, A, E2, S2 extends T>(pure: Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("effect/Effect").Effect<R | Exclude<R2, {
183
183
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S[], S2[]>;
184
- }>, InvalidStateError | OptimisticConcurrencyException | E | E2, A>;
184
+ }>, OptimisticConcurrencyException | InvalidStateError | E | E2, A>;
185
185
  /**
186
186
  * @tsplus fluent Repository queryAndSavePure
187
187
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -197,7 +197,7 @@ export declare function queryAndSavePure<T extends {
197
197
  skip?: number;
198
198
  }): <R2, A, E2, S2 extends T>(pure: import("effect/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("effect/Effect").Effect<Exclude<R2, {
199
199
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S[], S2[]>;
200
- }>, InvalidStateError | OptimisticConcurrencyException | E2, A>;
200
+ }>, OptimisticConcurrencyException | InvalidStateError | E2, A>;
201
201
  /**
202
202
  * @tsplus getter Repository saveManyWithPure
203
203
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -208,7 +208,7 @@ export declare function saveManyWithPure<T extends {
208
208
  id: string;
209
209
  }, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): <R, A, E, S1 extends T, S2 extends T>(pure: Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>) => (items: Iterable<S1>) => import("effect/Effect").Effect<Exclude<R, {
210
210
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1[], S2[]>;
211
- }>, InvalidStateError | OptimisticConcurrencyException | E, A>;
211
+ }>, OptimisticConcurrencyException | InvalidStateError | E, A>;
212
212
  /**
213
213
  * @tsplus fluent Repository byIdAndSaveWithPure
214
214
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -219,7 +219,7 @@ export declare function byIdAndSaveWithPure<T extends {
219
219
  id: string;
220
220
  }, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, id: T["id"]): <R, A, E, S2 extends T>(pure: Effect<FixEnv<R, Evt, T, S2>, E, A>) => import("effect/Effect").Effect<Exclude<R, {
221
221
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, T, S2>;
222
- }>, InvalidStateError | OptimisticConcurrencyException | E | NotFoundError<ItemType>, A>;
222
+ }>, OptimisticConcurrencyException | InvalidStateError | E | NotFoundError<ItemType>, A>;
223
223
  /**
224
224
  * NOTE: it's not as composable, only useful when the request is simple, and only this part needs request args.
225
225
  * @tsplus getter Repository handleByIdAndSaveWithPure
@@ -233,7 +233,7 @@ export declare function handleByIdAndSaveWithPure<T extends {
233
233
  id: T["id"];
234
234
  }, Context, R, A, E, S2 extends T>(pure: (req: Req, ctx: Context) => Effect<FixEnv<R, Evt, T, S2>, E, A>) => (req: Req, ctx: Context) => import("effect/Effect").Effect<Exclude<R, {
235
235
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, T, S2>;
236
- }>, InvalidStateError | OptimisticConcurrencyException | E | NotFoundError<ItemType>, A>;
236
+ }>, OptimisticConcurrencyException | InvalidStateError | E | NotFoundError<ItemType>, A>;
237
237
  /**
238
238
  * @tsplus fluent Repository saveManyWithPure_
239
239
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -244,7 +244,7 @@ export declare function saveManyWithPure_<Id extends string, R, T extends {
244
244
  id: string;
245
245
  }, 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/Effect").Effect<Exclude<R, {
246
246
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1[], S2[]>;
247
- }>, InvalidStateError | OptimisticConcurrencyException | E, A>;
247
+ }>, OptimisticConcurrencyException | InvalidStateError | E, A>;
248
248
  /**
249
249
  * @tsplus fluent Repository saveWithPure_
250
250
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -255,12 +255,12 @@ export declare function saveWithPure_<Id extends string, R, T extends {
255
255
  id: string;
256
256
  }, 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/Effect").Effect<Exclude<R, {
257
257
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1, S2>;
258
- }>, InvalidStateError | OptimisticConcurrencyException | E, A>;
258
+ }>, OptimisticConcurrencyException | InvalidStateError | E, A>;
259
259
  export declare function saveAllWithEffectInt<T extends {
260
260
  id: string;
261
261
  }, PM extends {
262
262
  id: string;
263
- }, 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/Effect").Effect<R, InvalidStateError | OptimisticConcurrencyException | E, A>;
263
+ }, 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/Effect").Effect<R, OptimisticConcurrencyException | InvalidStateError | E, A>;
264
264
  /**
265
265
  * @tsplus fluent Repository queryAndSavePureEffectBatched
266
266
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -276,7 +276,7 @@ export declare function queryAndSavePureEffectBatched<T extends {
276
276
  skip?: number;
277
277
  }>, batchSize?: number): <R2, A, E2, S2 extends T>(pure: Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("effect/Effect").Effect<R | Exclude<R2, {
278
278
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S[], S2[]>;
279
- }>, InvalidStateError | OptimisticConcurrencyException | E | E2, A[]>;
279
+ }>, OptimisticConcurrencyException | InvalidStateError | E | E2, A[]>;
280
280
  /**
281
281
  * @tsplus fluent Repository queryAndSavePureBatched
282
282
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -292,7 +292,7 @@ export declare function queryAndSavePureBatched<T extends {
292
292
  skip?: number;
293
293
  }, batchSize?: number): <R2, A, E2, S2 extends T>(pure: import("effect/Effect").Effect<FixEnv<R2, Evt, S[], S2[]>, E2, A>) => import("effect/Effect").Effect<Exclude<R2, {
294
294
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S[], S2[]>;
295
- }>, InvalidStateError | OptimisticConcurrencyException | E2, A[]>;
295
+ }>, OptimisticConcurrencyException | InvalidStateError | E2, A[]>;
296
296
  /**
297
297
  * @tsplus fluent Repository saveManyWithPureBatched
298
298
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -303,7 +303,7 @@ export declare function saveManyWithPureBatched<T extends {
303
303
  id: string;
304
304
  }, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>, batchSize?: number): <R, A, E, S1 extends T, S2 extends T>(pure: Effect<FixEnv<R, Evt, S1[], S2[]>, E, A>) => (items: Iterable<S1>) => import("effect/Effect").Effect<Exclude<R, {
305
305
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1[], S2[]>;
306
- }>, InvalidStateError | OptimisticConcurrencyException | E, A[]>;
306
+ }>, OptimisticConcurrencyException | InvalidStateError | E, A[]>;
307
307
  /**
308
308
  * @tsplus fluent Repository saveManyWithPureBatched_
309
309
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -314,7 +314,7 @@ export declare function saveManyWithPureBatched_<Id extends string, R, T extends
314
314
  id: string;
315
315
  }, 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/Effect").Effect<Exclude<R, {
316
316
  env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1[], S2[]>;
317
- }>, InvalidStateError | OptimisticConcurrencyException | E, A[]>;
317
+ }>, OptimisticConcurrencyException | InvalidStateError | E, A[]>;
318
318
  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>;
319
319
  /**
320
320
  * @tsplus type DSLExt
@@ -363,7 +363,7 @@ export declare function save<T extends {
363
363
  id: string;
364
364
  }, PM extends {
365
365
  id: string;
366
- }, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): (items_0: T, ...items_1: T[]) => import("effect/Effect").Effect<never, InvalidStateError | OptimisticConcurrencyException, void>;
366
+ }, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): (items_0: T, ...items_1: T[]) => import("effect/Effect").Effect<never, OptimisticConcurrencyException | InvalidStateError, void>;
367
367
  /**
368
368
  * @tsplus getter Repository saveWithEvents
369
369
  * @tsplus location "@effect-app/infra/services/Repository"
@@ -372,5 +372,5 @@ export declare function saveWithEvents<T extends {
372
372
  id: string;
373
373
  }, PM extends {
374
374
  id: string;
375
- }, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): (events: Iterable<Evt>) => (items_0: T, ...items_1: T[]) => import("effect/Effect").Effect<never, InvalidStateError | OptimisticConcurrencyException, void>;
375
+ }, Evt, ItemType extends string>(self: Repository<T, PM, Evt, ItemType>): (events: Iterable<Evt>) => (items_0: T, ...items_1: T[]) => import("effect/Effect").Effect<never, OptimisticConcurrencyException | InvalidStateError, void>;
376
376
  //# sourceMappingURL=Repository.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/infra",
3
- "version": "0.94.5",
3
+ "version": "0.94.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -18,10 +18,10 @@
18
18
  "proper-lockfile": "^4.1.2",
19
19
  "pure-rand": "6.0.4",
20
20
  "redlock": "^4.2.0",
21
+ "@effect-app/infra-adapters": "0.60.6",
21
22
  "@effect-app/core": "0.70.1",
22
- "@effect-app/infra-adapters": "0.60.5",
23
23
  "@effect-app/schema": "0.63.1",
24
- "@effect-app/prelude": "0.72.3"
24
+ "@effect-app/prelude": "0.72.4"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@babel/cli": "^7.23.0",