@effect-app/infra 0.154.0 → 0.154.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @effect-app/infra
2
2
 
3
+ ## 0.154.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [cb62aaa]
8
+ - @effect-app/schema@0.169.1
9
+ - @effect-app/infra-adapters@0.104.8
10
+ - @effect-app/prelude@0.130.1
11
+
3
12
  ## 0.154.0
4
13
 
5
14
  ### Minor Changes
@@ -100,7 +100,7 @@ export declare function makeRepo<PM extends {
100
100
  value: A_1;
101
101
  readonly S: PM;
102
102
  };
103
- }) => Where | readonly [Where, ...Where[]], mode?: "and" | "or" | undefined) => Filter<PM>;
103
+ }) => Where | readonly [Where, ...Where[]], mode?: "or" | "and" | undefined) => Filter<PM>;
104
104
  query: (fn: (f: import("./Store/filterApi/query.js").FilterTest<PM>, fields: import("./Store/filterApi/proxy.js").Filter<PM, never>) => QueryBuilder<PM>) => QueryBuilder<PM>;
105
105
  };
106
106
  /**
@@ -7,8 +7,8 @@ import type { DBRecord } from "./shared.js";
7
7
  import { OptimisticLockException } from "./shared.js";
8
8
  import * as simpledb from "./simpledb.js";
9
9
  export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, indexes: IndexingPolicy) => import("effect/Effect").Effect<Cosmos.CosmosClient, import("effect/Cause").UnknownException, {
10
- find: (id: string) => import("effect/Effect").Effect<RDecode | Cosmos.CosmosClient | simpledb.RecordCache, import("effect/Cause").UnknownException | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
10
+ find: (id: string) => import("effect/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | RDecode, import("effect/Cause").UnknownException | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
11
11
  findBy: (parameters: Record<string, string>) => import("effect/Effect").Effect<Cosmos.CosmosClient, import("effect/Cause").UnknownException, import("effect/Option").Option<any>>;
12
- save: (record: A) => import("effect/Effect").Effect<REncode | Cosmos.CosmosClient | simpledb.RecordCache, OptimisticLockException, A>;
12
+ save: (record: A) => import("effect/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | REncode, OptimisticLockException, A>;
13
13
  }>;
14
14
  //# sourceMappingURL=cosmosdb.d.ts.map
@@ -4,9 +4,9 @@ import type { DBRecord, Index } from "./shared.js";
4
4
  import { CouldNotAquireDbLockException } from "./shared.js";
5
5
  import * as simpledb from "./simpledb.js";
6
6
  export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index, dir?: string) => {
7
- find: (id: string) => import("effect/Effect").Effect<RDecode | simpledb.RecordCache, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
7
+ find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache | RDecode, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
8
8
  findByIndex: (index: Index) => import("effect/Effect").Effect<never, never, import("effect/Option").Option<TKey>>;
9
- save: (record: A) => import("effect/Effect").Effect<REncode | simpledb.RecordCache, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
9
+ save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache | REncode, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
10
10
  };
11
11
  export declare function initialise(dir: string): void;
12
12
  //# sourceMappingURL=diskdb.d.ts.map
@@ -4,8 +4,8 @@ import { Option } from "@effect-app/core/Option";
4
4
  import type { DBRecord } from "./shared.js";
5
5
  import * as simpledb from "./simpledb.js";
6
6
  export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>) => {
7
- find: (id: string) => import("effect/Effect").Effect<RDecode | simpledb.RecordCache, import("@effect/schema/ParseResult").ParseIssue | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
7
+ find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache | RDecode, import("@effect/schema/ParseResult").ParseIssue | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
8
8
  findBy: <V extends Partial<A>>(keys: V, eq: Equivalence<V>) => import("effect/Effect").Effect<RDecode, import("@effect/schema/ParseResult").ParseIssue, import("effect/Option").Option<A & {}>>;
9
- save: (record: A) => import("effect/Effect").Effect<REncode | simpledb.RecordCache, import("@effect/schema/ParseResult").ParseIssue | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
9
+ save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache | REncode, import("@effect/schema/ParseResult").ParseIssue | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
10
10
  };
11
11
  //# sourceMappingURL=memdb.d.ts.map
@@ -6,8 +6,8 @@ import type { DBRecord } from "./shared.js";
6
6
  import { OptimisticLockException } from "./shared.js";
7
7
  import * as simpledb from "./simpledb.js";
8
8
  export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, indexes: IndexDescription[]) => import("effect/Effect").Effect<MongoClient, import("effect/Cause").UnknownException, {
9
- find: (id: string) => import("effect/Effect").Effect<RDecode | MongoClient | simpledb.RecordCache, import("effect/Cause").UnknownException | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
9
+ find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache | RDecode | MongoClient, import("effect/Cause").UnknownException | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
10
10
  findBy: (keys: Record<string, string>) => import("effect/Effect").Effect<MongoClient, import("effect/Cause").UnknownException, import("effect/Option").Option<TKey>>;
11
- save: (record: A) => import("effect/Effect").Effect<REncode | MongoClient | simpledb.RecordCache, OptimisticLockException, A>;
11
+ save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache | REncode | MongoClient, OptimisticLockException, A>;
12
12
  }>;
13
13
  //# sourceMappingURL=mongodb.d.ts.map
@@ -6,22 +6,22 @@ import type { DBRecord, Index } from "./shared.js";
6
6
  import { CouldNotAquireDbLockException } from "./shared.js";
7
7
  import * as simpledb from "./simpledb.js";
8
8
  export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index) => {
9
- find: (id: string) => import("effect/Effect").Effect<RDecode | RedisClient | simpledb.RecordCache, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
9
+ find: (id: string) => import("effect/Effect").Effect<RedisClient | simpledb.RecordCache | RDecode, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
10
10
  findByIndex: (index: Index) => import("effect/Effect").Effect<RedisClient, import("@effect-app/infra-adapters/redis-client").ConnectionException, import("effect/Option").Option<TKey>>;
11
- save: (record: A) => import("effect/Effect").Effect<REncode | RedisClient | simpledb.RecordCache, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
11
+ save: (record: A) => import("effect/Effect").Effect<RedisClient | simpledb.RecordCache | REncode, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
12
12
  };
13
13
  declare const RedisSerializedDBRecord_base: S.Class<never, {
14
+ readonly data: string;
14
15
  readonly version: string;
15
16
  readonly timestamp: string;
16
- readonly data: string;
17
17
  }, {
18
+ readonly data: string;
18
19
  readonly version: string;
19
20
  readonly timestamp: Date;
20
- readonly data: string;
21
21
  }, {
22
+ readonly data: string;
22
23
  readonly version: string;
23
24
  readonly timestamp: Date;
24
- readonly data: string;
25
25
  }, RedisSerializedDBRecord, {
26
26
  version: S.Schema<never, string, string>;
27
27
  timestamp: S.Schema<never, string, Date>;
@@ -38,17 +38,17 @@ export interface DBRecord<TKey extends string> {
38
38
  id: TKey;
39
39
  }
40
40
  declare const SerializedDBRecord_base: S.Class<never, {
41
+ readonly data: string;
41
42
  readonly version: string;
42
43
  readonly timestamp: string;
43
- readonly data: string;
44
44
  }, {
45
+ readonly data: string;
45
46
  readonly version: string;
46
47
  readonly timestamp: Date;
47
- readonly data: string;
48
48
  }, {
49
+ readonly data: string;
49
50
  readonly version: string;
50
51
  readonly timestamp: Date;
51
- readonly data: string;
52
52
  }, SerializedDBRecord, {
53
53
  version: S.Schema<never, string, string>;
54
54
  timestamp: S.Schema<never, string, Date>;
@@ -57,13 +57,13 @@ declare const SerializedDBRecord_base: S.Class<never, {
57
57
  export declare class SerializedDBRecord extends SerializedDBRecord_base {
58
58
  }
59
59
  export declare function makeSerialisedDBRecord(s: Schema<never, any>): S.Schema<never, {
60
+ readonly data: any;
60
61
  readonly version: number;
61
62
  readonly timestamp: string;
62
- readonly data: any;
63
63
  }, {
64
+ readonly data: any;
64
65
  readonly version: number;
65
66
  readonly timestamp: Date;
66
- readonly data: any;
67
67
  }>;
68
68
  export interface CachedRecord<T> {
69
69
  version: string;
@@ -17,7 +17,7 @@ export interface RecordCache extends ReturnType<typeof makeLiveRecordCache> {
17
17
  }
18
18
  export declare const RecordCache: import("effect/Context").Tag<RecordCache, RecordCache>;
19
19
  export declare const LiveRecordCache: import("effect/Layer").Layer<never, never, RecordCache>;
20
- export declare function find<R, RDecode, EDecode, E, EA, A>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, decode: (d: EA) => Effect<RDecode, EDecode, A>, type: string): (id: string) => import("effect/Effect").Effect<R | RDecode | RecordCache, E | InvalidStateError, import("effect/Option").Option<A>>;
21
- export declare function storeDirectly<R, E, TKey extends string, A extends DBRecord<TKey>>(save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, type: string): (record: A) => import("effect/Effect").Effect<R | RecordCache, E, A>;
22
- export declare function store<R, E, R2, E2, TKey extends string, EA, A extends DBRecord<TKey>>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, lock: (id: string) => Effect<R2 | Scope, E2, unknown>, type: string): (record: A) => import("effect/Effect").Effect<R | RecordCache | Exclude<R2, import("effect/Scope").Scope>, E | E2 | OptimisticLockException | InvalidStateError, A>;
20
+ export declare function find<R, RDecode, EDecode, E, EA, A>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, decode: (d: EA) => Effect<RDecode, EDecode, A>, type: string): (id: string) => import("effect/Effect").Effect<RecordCache | R | RDecode, InvalidStateError | E, import("effect/Option").Option<A>>;
21
+ export declare function storeDirectly<R, E, TKey extends string, A extends DBRecord<TKey>>(save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, type: string): (record: A) => import("effect/Effect").Effect<RecordCache | R, E, A>;
22
+ export declare function store<R, E, R2, E2, TKey extends string, EA, A extends DBRecord<TKey>>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, lock: (id: string) => Effect<R2 | Scope, E2, unknown>, type: string): (record: A) => import("effect/Effect").Effect<RecordCache | R | Exclude<R2, import("effect/Scope").Scope>, OptimisticLockException | InvalidStateError | E | E2, A>;
23
23
  //# sourceMappingURL=simpledb.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/infra",
3
- "version": "0.154.0",
3
+ "version": "0.154.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -21,10 +21,10 @@
21
21
  "proper-lockfile": "^4.1.2",
22
22
  "pure-rand": "6.0.4",
23
23
  "redlock": "^4.2.0",
24
- "@effect-app/infra-adapters": "0.104.7",
25
- "@effect-app/schema": "0.169.0",
26
- "@effect-app/prelude": "0.130.0",
27
- "@effect-app/core": "0.115.0"
24
+ "@effect-app/core": "0.115.0",
25
+ "@effect-app/infra-adapters": "0.104.8",
26
+ "@effect-app/schema": "0.169.1",
27
+ "@effect-app/prelude": "0.130.1"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@babel/cli": "^7.23.9",