@effect-app/infra 0.65.0 → 0.66.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 +24 -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/memdb.d.ts +1 -1
- package/dist/services/simpledb/redisdb.d.ts +2 -2
- package/dist/services/simpledb/simpledb.d.ts +2 -2
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 0.66.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @effect-app/core@0.53.1
|
|
9
|
+
- @effect-app/prelude@0.53.1
|
|
10
|
+
- @effect-app/infra-adapters@0.46.1
|
|
11
|
+
- @effect-app/schema@0.47.1
|
|
12
|
+
|
|
13
|
+
## 0.66.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- Update packages
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @effect-app/core@0.53.0
|
|
23
|
+
- @effect-app/infra-adapters@0.46.0
|
|
24
|
+
- @effect-app/prelude@0.53.0
|
|
25
|
+
- @effect-app/schema@0.47.0
|
|
26
|
+
|
|
3
27
|
## 0.65.0
|
|
4
28
|
|
|
5
29
|
### Minor 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<"
|
|
21
|
+
paths: Record<string, Record<"GET" | "POST" | "PUT" | "PATCH" | "DELETE", {
|
|
22
22
|
[x: string]: {
|
|
23
23
|
responses: any;
|
|
24
24
|
tags: readonly string[] | undefined;
|
|
@@ -103,7 +103,7 @@ export declare function makeRepo<PM extends {
|
|
|
103
103
|
value: A_1;
|
|
104
104
|
readonly S: PM;
|
|
105
105
|
};
|
|
106
|
-
}) => Where | readonly [Where, ...Where[]], mode?: "
|
|
106
|
+
}) => Where | readonly [Where, ...Where[]], mode?: "or" | "and" | undefined) => Filter<PM>;
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
109
|
* @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<
|
|
9
|
+
find: (id: string) => import("@effect/io/Effect").Effect<simpledb.RecordCache | RDecode | Cosmos.CosmosClient, 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<
|
|
11
|
+
save: (record: A) => import("@effect/io/Effect").Effect<simpledb.RecordCache | REncode | Cosmos.CosmosClient, 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, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException
|
|
9
|
+
save: (record: A) => import("@effect/io/Effect").Effect<simpledb.RecordCache | REncode, CouldNotAquireDbLockException | simpledb.InvalidStateError | import("./shared.js").OptimisticLockException, A>;
|
|
10
10
|
};
|
|
11
11
|
export declare function initialise(dir: string): void;
|
|
12
12
|
//# sourceMappingURL=diskdb.d.ts.map
|
|
@@ -7,6 +7,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) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>) => {
|
|
8
8
|
find: (id: string) => import("@effect/io/Effect").Effect<simpledb.RecordCache | RDecode, MO.CondemnException | simpledb.InvalidStateError, import("@effect/data/Option").Option<A>>;
|
|
9
9
|
findBy: <V extends Partial<A>>(keys: V, eq: import("@effect/data/typeclass/Equivalence").Equivalence<V>) => import("@effect/io/Effect").Effect<RDecode, MO.CondemnException, import("@effect/data/Option").Option<A & {}>>;
|
|
10
|
-
save: (record: A) => import("@effect/io/Effect").Effect<simpledb.RecordCache | REncode, MO.CondemnException | import("./shared.js").OptimisticLockException
|
|
10
|
+
save: (record: A) => import("@effect/io/Effect").Effect<simpledb.RecordCache | REncode, MO.CondemnException | simpledb.InvalidStateError | import("./shared.js").OptimisticLockException, 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) => 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
|
-
find: (id: string) => import("@effect/io/Effect").Effect<RedisClient | simpledb.RecordCache
|
|
9
|
+
find: (id: string) => import("@effect/io/Effect").Effect<RDecode | RedisClient | simpledb.RecordCache, 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
|
|
11
|
+
save: (record: A) => import("@effect/io/Effect").Effect<REncode | RedisClient | simpledb.RecordCache, CouldNotAquireDbLockException | simpledb.InvalidStateError | import("./shared.js").OptimisticLockException, A>;
|
|
12
12
|
};
|
|
13
13
|
declare const RedisSerializedDBRecord_base: MO.Model<RedisSerializedDBRecord, MO.SchemaProperties<MO.ToProps<{
|
|
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<
|
|
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<R | RDecode | RecordCache, E | InvalidStateError, import("@effect/data/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/io/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/io/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/io/Effect").Effect<R | RecordCache | Exclude<R2, import("@effect/io/Scope").Scope>, E | E2 | InvalidStateError | OptimisticLockException, A>;
|
|
23
23
|
//# sourceMappingURL=simpledb.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.66.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@azure/cosmos": "^3.17.3",
|
|
8
8
|
"@azure/service-bus": "^7.9.0",
|
|
9
9
|
"@effect/data": "^0.12.2",
|
|
10
|
-
"@effect/io": "^0.25.
|
|
10
|
+
"@effect/io": "^0.25.9",
|
|
11
11
|
"@sendgrid/helpers": "^7.7.0",
|
|
12
12
|
"@sendgrid/mail": "^7.7.0",
|
|
13
13
|
"change-case": "^4.1.2",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"proper-lockfile": "^4.1.2",
|
|
20
20
|
"pure-rand": "^6.0.2",
|
|
21
21
|
"redlock": "^4.2.0",
|
|
22
|
-
"@effect-app/
|
|
23
|
-
"@effect-app/
|
|
24
|
-
"@effect-app/
|
|
25
|
-
"@effect-app/
|
|
22
|
+
"@effect-app/prelude": "0.53.1",
|
|
23
|
+
"@effect-app/core": "0.53.1",
|
|
24
|
+
"@effect-app/schema": "0.47.1",
|
|
25
|
+
"@effect-app/infra-adapters": "0.46.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/cli": "^7.21.5",
|
|
29
|
-
"@sentry/node": "^7.
|
|
29
|
+
"@sentry/node": "^7.51.0",
|
|
30
30
|
"@types/express": "^4.17.17",
|
|
31
|
-
"@types/node": "~
|
|
31
|
+
"@types/node": "~20.1.0",
|
|
32
32
|
"@types/proper-lockfile": "^4.1.2",
|
|
33
33
|
"@types/redis": "^2.8.32",
|
|
34
34
|
"@types/redlock": "^4.0.4",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"express-jwt-authz": "^2.4.1",
|
|
38
38
|
"jwks-rsa": "2.1.4",
|
|
39
39
|
"jwt-decode": "^3.1.2",
|
|
40
|
-
"mongodb": "5.
|
|
40
|
+
"mongodb": "5.4.0",
|
|
41
41
|
"redis": "^3.1.2",
|
|
42
42
|
"ts-node": "^10.9.1",
|
|
43
43
|
"typescript": "https://cdn.jsdelivr.net/npm/@tsplus/installer@0.0.176/compiler/typescript.tgz",
|
|
44
|
-
"vitest": "^0.
|
|
44
|
+
"vitest": "^0.31.0",
|
|
45
45
|
"@effect-app/compiler": "0.26.0"
|
|
46
46
|
},
|
|
47
47
|
"typesVersions": {
|