@effect-app/infra 0.113.8 → 0.113.10
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 +19 -0
- package/dist/services/RepositoryBase.d.ts +1 -1
- package/dist/services/simpledb/cosmosdb.d.ts +2 -2
- package/dist/services/simpledb/diskdb.d.ts +3 -3
- package/dist/services/simpledb/memdb.d.ts +2 -2
- package/dist/services/simpledb/redisdb.d.ts +2 -2
- package/dist/services/simpledb/simpledb.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 0.113.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [da80c66]
|
|
8
|
+
- @effect-app/prelude@0.89.0
|
|
9
|
+
- @effect-app/schema@0.81.0
|
|
10
|
+
- @effect-app/infra-adapters@0.70.11
|
|
11
|
+
|
|
12
|
+
## 0.113.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [8235a1a]
|
|
17
|
+
- @effect-app/core@0.83.3
|
|
18
|
+
- @effect-app/infra-adapters@0.70.10
|
|
19
|
+
- @effect-app/prelude@0.88.9
|
|
20
|
+
- @effect-app/schema@0.80.6
|
|
21
|
+
|
|
3
22
|
## 0.113.8
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -110,7 +110,7 @@ export declare function makeRepo<PM extends {
|
|
|
110
110
|
value: A_1;
|
|
111
111
|
readonly S: PM;
|
|
112
112
|
};
|
|
113
|
-
}) => Where | readonly [Where, ...Where[]], mode?: "
|
|
113
|
+
}) => Where | readonly [Where, ...Where[]], mode?: "or" | "and" | undefined) => Filter<PM>;
|
|
114
114
|
};
|
|
115
115
|
/**
|
|
116
116
|
* only use this as a shortcut if you don't have the item already
|
|
@@ -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<
|
|
10
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | Cosmos.CosmosClient | simpledb.RecordCache, 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<
|
|
12
|
+
save: (record: A) => import("effect/Effect").Effect<REncode | Cosmos.CosmosClient | simpledb.RecordCache, 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<simpledb.RecordCache
|
|
8
|
-
findByIndex: (index: Index) => import("effect/Effect").Effect<never, never, import("effect/Option").Option<TKey>>;
|
|
9
|
-
save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache |
|
|
7
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | simpledb.RecordCache, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
|
|
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>;
|
|
10
10
|
};
|
|
11
11
|
export declare function initialise(dir: string): void;
|
|
12
12
|
//# sourceMappingURL=diskdb.d.ts.map
|
|
@@ -5,8 +5,8 @@ import * as S from "@effect-app/schema";
|
|
|
5
5
|
import type { DBRecord } from "./shared.js";
|
|
6
6
|
import * as simpledb from "./simpledb.js";
|
|
7
7
|
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>) => {
|
|
8
|
-
find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache
|
|
8
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | simpledb.RecordCache, S.CondemnException | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
|
|
9
9
|
findBy: <V extends Partial<A>>(keys: V, eq: Equivalence<V>) => import("effect/Effect").Effect<RDecode, S.CondemnException, import("effect/Option").Option<A & {}>>;
|
|
10
|
-
save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache |
|
|
10
|
+
save: (record: A) => import("effect/Effect").Effect<REncode | simpledb.RecordCache, S.CondemnException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=memdb.d.ts.map
|
|
@@ -6,9 +6,9 @@ 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<
|
|
9
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | RedisClient | simpledb.RecordCache, 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<
|
|
11
|
+
save: (record: A) => import("effect/Effect").Effect<REncode | RedisClient | simpledb.RecordCache, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
12
12
|
};
|
|
13
13
|
declare const RedisSerializedDBRecord_base: S.Class<RedisSerializedDBRecord, S.SchemaProperties<S.ToProps<{
|
|
14
14
|
version: S.SchemaDefaultSchema<unknown, string, string, string, {}>;
|
|
@@ -19,5 +19,5 @@ export declare const RecordCache: import("effect/Context").Tag<RecordCache, Reco
|
|
|
19
19
|
export declare const LiveRecordCache: import("effect/Layer").Layer<never, never, RecordCache>;
|
|
20
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
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<
|
|
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>;
|
|
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.113.
|
|
3
|
+
"version": "0.113.10",
|
|
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/core": "0.83.
|
|
22
|
-
"@effect-app/
|
|
23
|
-
"@effect-app/
|
|
24
|
-
"@effect-app/
|
|
21
|
+
"@effect-app/core": "0.83.3",
|
|
22
|
+
"@effect-app/infra-adapters": "0.70.11",
|
|
23
|
+
"@effect-app/prelude": "0.89.0",
|
|
24
|
+
"@effect-app/schema": "0.81.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@babel/cli": "^7.23.4",
|