@effect-app/infra 0.51.2 → 0.51.3
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 +10 -0
- package/dist/api/express/makeOpenApiSpecs.d.ts +1 -1
- package/dist/services/RepositoryBase.d.ts +1 -1
- package/dist/services/simpledb/cosmosdb.d.ts +2 -2
- package/dist/services/simpledb/diskdb.d.ts +1 -1
- package/dist/services/simpledb/redisdb.d.ts +1 -1
- package/dist/services/simpledb/simpledb.d.ts +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 0.51.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @effect-app/core@0.44.0
|
|
9
|
+
- @effect-app/infra-adapters@0.37.2
|
|
10
|
+
- @effect-app/prelude@0.40.1
|
|
11
|
+
- @effect-app/schema@0.36.1
|
|
12
|
+
|
|
3
13
|
## 0.51.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -18,7 +18,7 @@ export declare function makeOpenApiSpecs(rdescs: Iterable<RouteDescriptorAny>, i
|
|
|
18
18
|
version: string;
|
|
19
19
|
};
|
|
20
20
|
tags: never[];
|
|
21
|
-
paths: Record<string, Record<"PATCH" | "GET" | "
|
|
21
|
+
paths: Record<string, Record<"PATCH" | "GET" | "POST" | "PUT" | "DELETE", {
|
|
22
22
|
[x: string]: {
|
|
23
23
|
responses: any;
|
|
24
24
|
tags: readonly string[] | undefined;
|
|
@@ -102,7 +102,7 @@ export declare function makeRepo<PM extends {
|
|
|
102
102
|
value: A_1;
|
|
103
103
|
readonly S: PM;
|
|
104
104
|
};
|
|
105
|
-
}) => Where | readonly [Where, ...Where[]], mode?: "
|
|
105
|
+
}) => Where | readonly [Where, ...Where[]], mode?: "and" | "or" | undefined) => Filter<PM>;
|
|
106
106
|
};
|
|
107
107
|
/**
|
|
108
108
|
* @tsplus fluent Repository removeById
|
|
@@ -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) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>, indexes: IndexingPolicy) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient, unknown, {
|
|
9
|
-
find: (id: string) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient |
|
|
9
|
+
find: (id: string) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | RDecode, unknown, import("@effect/data/Option").Option<A>>;
|
|
10
10
|
findBy: (parameters: Record<string, string>) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient, unknown, import("@effect/data/Option").Option<any>>;
|
|
11
|
-
save: (record: A) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient |
|
|
11
|
+
save: (record: A) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | REncode, OptimisticLockException, A>;
|
|
12
12
|
}>;
|
|
13
13
|
//# sourceMappingURL=cosmosdb.d.ts.map
|
|
@@ -6,7 +6,7 @@ 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) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index, dir?: string) => {
|
|
7
7
|
find: (id: string) => import("@effect/io/Effect").Effect<simpledb.RecordCache | RDecode, simpledb.InvalidStateError, import("@effect/data/Option").Option<A>>;
|
|
8
8
|
findByIndex: (index: Index) => import("@effect/io/Effect").Effect<never, never, import("@effect/data/Option").Option<TKey & {}>>;
|
|
9
|
-
save: (record: A) => import("@effect/io/Effect").Effect<simpledb.RecordCache | REncode, import("./shared.js").OptimisticLockException | simpledb.InvalidStateError
|
|
9
|
+
save: (record: A) => import("@effect/io/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
|
|
@@ -8,7 +8,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) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index) => {
|
|
9
9
|
find: (id: string) => import("@effect/io/Effect").Effect<RedisClient | simpledb.RecordCache | RDecode, simpledb.InvalidStateError, import("@effect/data/Option").Option<A>>;
|
|
10
10
|
findByIndex: (index: Index) => import("@effect/io/Effect").Effect<RedisClient, import("@effect-app/infra-adapters/redis-client").ConnectionException, import("@effect/data/Option").Option<TKey>>;
|
|
11
|
-
save: (record: A) => import("@effect/io/Effect").Effect<RedisClient | simpledb.RecordCache | REncode, import("./shared.js").OptimisticLockException | simpledb.InvalidStateError
|
|
11
|
+
save: (record: A) => import("@effect/io/Effect").Effect<RedisClient | simpledb.RecordCache | REncode, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
12
12
|
};
|
|
13
13
|
declare const RedisSerializedDBRecord_base: MO.Model<RedisSerializedDBRecord, MO.SchemaProperties<{
|
|
14
14
|
version: MO.Property<MO.SchemaDefaultSchema<unknown, string, string, string, {}>, "required", import("@effect/data/Option").None<any>, import("@effect/data/Option").None<any>>;
|
|
@@ -17,7 +17,7 @@ export interface RecordCache extends ReturnType<typeof makeLiveRecordCache> {
|
|
|
17
17
|
}
|
|
18
18
|
export declare const RecordCache: import("@effect/data/Context").Tag<RecordCache, RecordCache>;
|
|
19
19
|
export declare const LiveRecordCache: import("@effect/io/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/io/Effect").Effect<
|
|
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/io/Effect").Effect<
|
|
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/io/Effect").Effect<RecordCache | R | RDecode, InvalidStateError | E, import("@effect/data/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/io/Effect").Effect<RecordCache | R, E, A>;
|
|
22
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/io/Effect").Effect<RecordCache | R | Exclude<R2, import("@effect/io/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.51.
|
|
3
|
+
"version": "0.51.3",
|
|
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/prelude": "0.40.
|
|
23
|
-
"@effect-app/core": "0.
|
|
24
|
-
"@effect-app/
|
|
25
|
-
"@effect-app/
|
|
22
|
+
"@effect-app/prelude": "0.40.1",
|
|
23
|
+
"@effect-app/core": "0.44.0",
|
|
24
|
+
"@effect-app/schema": "0.36.1",
|
|
25
|
+
"@effect-app/infra-adapters": "0.37.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/cli": "^7.21.0",
|