@effect-app/infra 0.133.9 → 0.133.11
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 +17 -0
- package/_cjs/api/express/schema/jwt.cjs +4 -1
- package/_cjs/api/express/schema/jwt.cjs.map +1 -1
- package/_src/api/express/schema/jwt.ts +12 -3
- package/dist/api/express/schema/jwt.d.ts +1 -0
- package/dist/api/express/schema/jwt.d.ts.map +1 -1
- package/dist/api/express/schema/jwt.js +5 -2
- package/dist/services/RepositoryBase.d.ts +1 -1
- package/dist/services/simpledb/cosmosdb.d.ts +2 -2
- package/dist/services/simpledb/diskdb.d.ts +2 -2
- package/dist/services/simpledb/memdb.d.ts +2 -2
- package/dist/services/simpledb/mongodb.d.ts +2 -2
- package/dist/services/simpledb/redisdb.d.ts +5 -5
- package/dist/services/simpledb/shared.d.ts +5 -5
- package/dist/services/simpledb/simpledb.d.ts +3 -3
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 0.133.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5564b85: update packages
|
|
8
|
+
- Updated dependencies [5564b85]
|
|
9
|
+
- @effect-app/infra-adapters@0.85.10
|
|
10
|
+
- @effect-app/prelude@0.107.10
|
|
11
|
+
- @effect-app/schema@0.150.9
|
|
12
|
+
- @effect-app/core@0.97.3
|
|
13
|
+
|
|
14
|
+
## 0.133.10
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- aaf2203: fix: jwt can fail
|
|
19
|
+
|
|
3
20
|
## 0.133.9
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -12,7 +12,10 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
12
12
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
13
13
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
14
14
|
|
|
15
|
-
const jwt = exports.jwt = S.
|
|
15
|
+
const jwt = exports.jwt = S.transformOrFail(S.string, S.unknown, (s, __, ast) => S.ParseResult.try({
|
|
16
|
+
try: () => (0, _jwtDecode.jwtDecode)(s),
|
|
17
|
+
catch: e => S.ParseResult.parseError([S.ParseResult.type(ast, s, e.message)])
|
|
18
|
+
}), _ => {
|
|
16
19
|
throw new Error("not implemented");
|
|
17
20
|
});
|
|
18
21
|
//# sourceMappingURL=jwt.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.cjs","names":["S","_interopRequireWildcard","require","_jwtDecode","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","jwt","exports","
|
|
1
|
+
{"version":3,"file":"jwt.cjs","names":["S","_interopRequireWildcard","require","_jwtDecode","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","jwt","exports","transformOrFail","string","unknown","s","__","ast","ParseResult","try","jwtDecode","catch","parseError","type","message","_","Error"],"sources":["../../../../_src/api/express/schema/jwt.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,CAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAAsC,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAI,CAAA,IAAAV,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAgB,GAAA,CAAAnB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AALtC;AACA;AACA;;AAKO,MAAMY,GAAG,GAAAC,OAAA,CAAAD,GAAA,GAAGzB,CAAC,CAAC2B,eAAe,CAClC3B,CAAC,CAAC4B,MAAM,EACR5B,CAAC,CAAC6B,OAAO,EACT,CAACC,CAAC,EAAEC,EAAE,EAAEC,GAAG,KACThC,CARS,CAQTiC,WAAW,CAACC,GAAG,CAAC;EACdA,GAAG,EAAEA,CAAA,KAAM,IAAAC,oBAAS,EAACL,CAAC,CAAC;EACvBM,KAAK,EAAG/B,CAAM,IAAKL,CAVZ,CAUYiC,WAAW,CAACI,UAAU,CAAC,CAACrC,CAVpC,CAUoCiC,WAAW,CAACK,IAAI,CAACN,GAAG,EAAEF,CAAC,EAAEzB,CAAC,CAACkC,OAAO,CAAC,CAAC;CAChF,CAAC,EACHC,CAAC,IAAqC;EACrC,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;AACpC,CAAC,CACF"}
|
|
@@ -5,6 +5,15 @@ import * as S from "@effect-app/schema"
|
|
|
5
5
|
|
|
6
6
|
import { jwtDecode } from "jwt-decode"
|
|
7
7
|
|
|
8
|
-
export const jwt = S.
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export const jwt = S.transformOrFail(
|
|
9
|
+
S.string,
|
|
10
|
+
S.unknown,
|
|
11
|
+
(s, __, ast) =>
|
|
12
|
+
ParseResult.try({
|
|
13
|
+
try: () => jwtDecode(s),
|
|
14
|
+
catch: (e: any) => ParseResult.parseError([ParseResult.type(ast, s, e.message)])
|
|
15
|
+
}),
|
|
16
|
+
(_): ParseResult.ParseResult<string> => {
|
|
17
|
+
throw new Error("not implemented")
|
|
18
|
+
}
|
|
19
|
+
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../../../_src/api/express/schema/jwt.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAA;AAIvC,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../../../_src/api/express/schema/jwt.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAA;AAIvC,eAAO,MAAM,GAAG,2BAWf,CAAA"}
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
4
4
|
import * as S from "@effect-app/schema";
|
|
5
5
|
import { jwtDecode } from "jwt-decode";
|
|
6
|
-
export const jwt = S.
|
|
6
|
+
export const jwt = S.transformOrFail(S.string, S.unknown, (s, __, ast) => S.ParseResult.try({
|
|
7
|
+
try: () => jwtDecode(s),
|
|
8
|
+
catch: (e) => S.ParseResult.parseError([S.ParseResult.type(ast, s, e.message)])
|
|
9
|
+
}), (_) => {
|
|
7
10
|
throw new Error("not implemented");
|
|
8
11
|
});
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiand0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vX3NyYy9hcGkvZXhwcmVzcy9zY2hlbWEvand0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDREQUE0RDtBQUM1RCx1REFBdUQ7QUFDdkQsaURBQWlEO0FBQ2pELE9BQU8sS0FBSyxDQUFDLE1BQU0sb0JBQW9CLENBQUE7QUFFdkMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLFlBQVksQ0FBQTtBQUV0QyxNQUFNLENBQUMsTUFBTSxHQUFHLEdBQUcsQ0FBQyxDQUFDLGVBQWUsQ0FDbEMsQ0FBQyxDQUFDLE1BQU0sRUFDUixDQUFDLENBQUMsT0FBTyxFQUNULENBQUMsQ0FBQyxFQUFFLEVBQUUsRUFBRSxHQUFHLEVBQUUsRUFBRSxDQUNiLEFBUlEsQ0FBQyxDQVFULFdBQVcsQ0FBQyxHQUFHLENBQUM7SUFDZCxHQUFHLEVBQUUsR0FBRyxFQUFFLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztJQUN2QixLQUFLLEVBQUUsQ0FBQyxDQUFNLEVBQUUsRUFBRSxDQUFDLEFBVmIsQ0FBQyxDQVVZLFdBQVcsQ0FBQyxVQUFVLENBQUMsQ0FBQyxBQVZyQyxDQUFDLENBVW9DLFdBQVcsQ0FBQyxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztDQUNqRixDQUFDLEVBQ0osQ0FBQyxDQUFDLEVBQW1DLEVBQUU7SUFDckMsTUFBTSxJQUFJLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQyxDQUFBO0FBQ3BDLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -99,7 +99,7 @@ export declare function makeRepo<PM extends {
|
|
|
99
99
|
value: A_1;
|
|
100
100
|
readonly S: PM;
|
|
101
101
|
};
|
|
102
|
-
}) => Where | readonly [Where, ...Where[]], mode?: "
|
|
102
|
+
}) => Where | readonly [Where, ...Where[]], mode?: "or" | "and" | undefined) => Filter<PM>;
|
|
103
103
|
query: (fn: (f: import("./Store/filterApi/query.js").FilterTest<PM>, fields: import("./Store/filterApi/proxy.js").Filter<PM, never>) => QueryBuilder<PM>) => QueryBuilder<PM>;
|
|
104
104
|
};
|
|
105
105
|
/**
|
|
@@ -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<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<
|
|
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<
|
|
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<
|
|
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<
|
|
7
|
+
find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache | RDecode, import("@effect/schema/ParseResult").ParseError | 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").ParseError, import("effect/Option").Option<A & {}>>;
|
|
9
|
-
save: (record: A) => import("effect/Effect").Effect<
|
|
9
|
+
save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache | REncode, import("@effect/schema/ParseResult").ParseError | 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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<{
|
|
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<string, string>;
|
|
27
27
|
timestamp: S.Schema<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<{
|
|
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<string, string>;
|
|
54
54
|
timestamp: S.Schema<string, Date>;
|
|
@@ -57,13 +57,13 @@ declare const SerializedDBRecord_base: S.Class<{
|
|
|
57
57
|
export declare class SerializedDBRecord extends SerializedDBRecord_base {
|
|
58
58
|
}
|
|
59
59
|
export declare function makeSerialisedDBRecord(s: Schema<any, any>): S.Schema<{
|
|
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<
|
|
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<
|
|
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<
|
|
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,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "0.133.
|
|
3
|
+
"version": "0.133.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@azure/cosmos": "^4.0.0",
|
|
8
8
|
"@azure/service-bus": "^7.9.3",
|
|
9
|
-
"@effect/platform": "^0.40.
|
|
10
|
-
"@effect/schema": "npm:@effect-app/schema-fork@0.0.0-
|
|
9
|
+
"@effect/platform": "^0.40.4",
|
|
10
|
+
"@effect/schema": "npm:@effect-app/schema-fork@0.0.0-20240109124241",
|
|
11
11
|
"express-oauth2-jwt-bearer": "^1.6.0",
|
|
12
12
|
"@faker-js/faker": "^8.3.1",
|
|
13
13
|
"@sendgrid/helpers": "^8.0.0",
|
|
@@ -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/core": "0.97.
|
|
25
|
-
"@effect-app/infra-adapters": "0.85.
|
|
26
|
-
"@effect-app/
|
|
27
|
-
"@effect-app/
|
|
24
|
+
"@effect-app/core": "0.97.3",
|
|
25
|
+
"@effect-app/infra-adapters": "0.85.10",
|
|
26
|
+
"@effect-app/schema": "0.150.9",
|
|
27
|
+
"@effect-app/prelude": "0.107.10"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/cli": "^7.23.4",
|