@effect-app/infra 0.177.8 → 0.178.0
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/services/Emailer/Sendgrid.cjs +2 -2
- package/_cjs/services/Emailer/Sendgrid.cjs.map +1 -1
- package/_cjs/services/Emailer/fake.cjs +1 -1
- package/_cjs/services/Emailer/fake.cjs.map +1 -1
- package/_cjs/services/Emailer/service.cjs +1 -1
- package/_cjs/services/Emailer/service.cjs.map +1 -1
- package/_cjs/services/Operations/live.cjs +2 -2
- package/_cjs/services/Operations/live.cjs.map +1 -1
- package/_cjs/services/Operations/service.cjs +1 -1
- package/_cjs/services/Operations/service.cjs.map +1 -1
- package/_cjs/services/RequestContextContainer.cjs +2 -2
- package/_cjs/services/RequestContextContainer.cjs.map +1 -1
- package/_cjs/services/Store/ContextMapContainer.cjs +5 -6
- package/_cjs/services/Store/ContextMapContainer.cjs.map +1 -1
- package/_cjs/services/Store/Cosmos.cjs +1 -1
- package/_cjs/services/Store/Cosmos.cjs.map +1 -1
- package/_cjs/services/Store/Disk.cjs +1 -2
- package/_cjs/services/Store/Disk.cjs.map +1 -1
- package/_cjs/services/Store/Memory.cjs +1 -2
- package/_cjs/services/Store/Memory.cjs.map +1 -1
- package/_cjs/services/Store/Redis.cjs +1 -1
- package/_cjs/services/Store/Redis.cjs.map +1 -1
- package/_cjs/services/Store/service.cjs +4 -8
- package/_cjs/services/Store/service.cjs.map +1 -1
- package/_src/services/Emailer/Sendgrid.ts +2 -2
- package/_src/services/Emailer/fake.ts +7 -5
- package/_src/services/Emailer/service.ts +2 -2
- package/_src/services/Operations/live.ts +3 -3
- package/_src/services/Operations/service.ts +2 -7
- package/_src/services/RequestContextContainer.ts +10 -8
- package/_src/services/Store/ContextMapContainer.ts +7 -7
- package/_src/services/Store/Cosmos.ts +2 -2
- package/_src/services/Store/Disk.ts +1 -2
- package/_src/services/Store/Memory.ts +1 -1
- package/_src/services/Store/Redis.ts +2 -2
- package/_src/services/Store/service.ts +4 -7
- package/dist/services/Emailer/Sendgrid.js +3 -3
- package/dist/services/Emailer/fake.d.ts.map +1 -1
- package/dist/services/Emailer/fake.js +2 -2
- package/dist/services/Emailer/service.d.ts +16 -6
- package/dist/services/Emailer/service.d.ts.map +1 -1
- package/dist/services/Emailer/service.js +2 -2
- package/dist/services/Operations/live.d.ts +1 -1
- package/dist/services/Operations/live.d.ts.map +1 -1
- package/dist/services/Operations/live.js +3 -3
- package/dist/services/Operations/service.d.ts +39 -25
- package/dist/services/Operations/service.d.ts.map +1 -1
- package/dist/services/Operations/service.js +2 -2
- package/dist/services/QueueMaker/service.d.ts +2 -2
- package/dist/services/RequestContextContainer.d.ts +26 -10
- package/dist/services/RequestContextContainer.d.ts.map +1 -1
- package/dist/services/RequestContextContainer.js +3 -3
- package/dist/services/Store/ContextMapContainer.d.ts +21 -8
- package/dist/services/Store/ContextMapContainer.d.ts.map +1 -1
- package/dist/services/Store/ContextMapContainer.js +6 -7
- package/dist/services/Store/Cosmos.js +3 -2
- package/dist/services/Store/Disk.d.ts.map +1 -1
- package/dist/services/Store/Disk.js +2 -3
- package/dist/services/Store/Memory.d.ts.map +1 -1
- package/dist/services/Store/Memory.js +2 -3
- package/dist/services/Store/Redis.js +3 -2
- package/dist/services/Store/service.d.ts +20 -14
- package/dist/services/Store/service.d.ts.map +1 -1
- package/dist/services/Store/service.js +4 -8
- 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/redisdb.d.ts +2 -2
- package/dist/services/simpledb/simpledb.d.ts +2 -2
- package/package.json +9 -9
|
@@ -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<EA, never, REncode>, decode: (d: EA) => Effect<A, EDecode, RDecode>) => {
|
|
7
|
-
find: (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>,
|
|
7
|
+
find: (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>, import("@effect/schema/ParseResult").ParseError | simpledb.InvalidStateError, simpledb.RecordCache | RDecode>;
|
|
8
8
|
findBy: <V extends Partial<A>>(keys: V, eq: Equivalence<V>) => import("effect/Effect").Effect<import("effect/Option").Option<A & {}>, import("@effect/schema/ParseResult").ParseError, RDecode>;
|
|
9
|
-
save: (record: A) => import("effect/Effect").Effect<A,
|
|
9
|
+
save: (record: A) => import("effect/Effect").Effect<A, import("@effect/schema/ParseResult").ParseError | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, simpledb.RecordCache | REncode>;
|
|
10
10
|
};
|
|
11
11
|
//# 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<EA, never, REncode>, decode: (d: EA) => Effect<A, EDecode, RDecode>, schemaVersion: string, makeIndexKey: (r: A) => Index) => {
|
|
9
|
-
find: (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>, simpledb.InvalidStateError, simpledb.RecordCache |
|
|
9
|
+
find: (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>, simpledb.InvalidStateError, RedisClient | simpledb.RecordCache | RDecode>;
|
|
10
10
|
findByIndex: (index: Index) => import("effect/Effect").Effect<import("effect/Option").Option<TKey>, import("@effect-app/infra-adapters/redis-client").ConnectionException, RedisClient>;
|
|
11
|
-
save: (record: A) => import("effect/Effect").Effect<A, CouldNotAquireDbLockException |
|
|
11
|
+
save: (record: A) => import("effect/Effect").Effect<A, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, RedisClient | simpledb.RecordCache | REncode>;
|
|
12
12
|
};
|
|
13
13
|
declare const RedisSerializedDBRecord_base: S.EnhancedClass<{
|
|
14
14
|
readonly data: 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<RecordCache, never, never>;
|
|
20
|
-
export declare function find<R, RDecode, EDecode, E, EA, A>(tryRead: (id: string) => Effect<Option<CachedRecord<EA>>, E, R>, decode: (d: EA) => Effect<A, EDecode, RDecode>, type: string): (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>,
|
|
20
|
+
export declare function find<R, RDecode, EDecode, E, EA, A>(tryRead: (id: string) => Effect<Option<CachedRecord<EA>>, E, R>, decode: (d: EA) => Effect<A, EDecode, RDecode>, type: string): (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>, InvalidStateError | E, RecordCache | R | RDecode>;
|
|
21
21
|
export declare function storeDirectly<R, E, TKey extends string, A extends DBRecord<TKey>>(save: (r: A, version: Option<Version>) => Effect<CachedRecord<A>, E, R>, type: string): (record: A) => import("effect/Effect").Effect<A, E, RecordCache | R>;
|
|
22
|
-
export declare function store<R, E, R2, E2, TKey extends string, EA, A extends DBRecord<TKey>>(tryRead: (id: string) => Effect<Option<CachedRecord<EA>>, E, R>, save: (r: A, version: Option<Version>) => Effect<CachedRecord<A>, E, R>, lock: (id: string) => Effect<unknown, E2, R2 | Scope>, type: string): (record: A) => import("effect/Effect").Effect<A,
|
|
22
|
+
export declare function store<R, E, R2, E2, TKey extends string, EA, A extends DBRecord<TKey>>(tryRead: (id: string) => Effect<Option<CachedRecord<EA>>, E, R>, save: (r: A, version: Option<Version>) => Effect<CachedRecord<A>, E, R>, lock: (id: string) => Effect<unknown, E2, R2 | Scope>, type: string): (record: A) => import("effect/Effect").Effect<A, OptimisticLockException | InvalidStateError | E | E2, RecordCache | R | Exclude<R2, import("effect/Scope").Scope>>;
|
|
23
23
|
//# sourceMappingURL=simpledb.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.178.0",
|
|
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.4",
|
|
9
|
-
"@effect/platform": "^0.44.
|
|
10
|
-
"@effect/schema": "^0.62.
|
|
9
|
+
"@effect/platform": "^0.44.3",
|
|
10
|
+
"@effect/schema": "^0.62.2",
|
|
11
11
|
"express-oauth2-jwt-bearer": "^1.6.0",
|
|
12
12
|
"@faker-js/faker": "^8.4.1",
|
|
13
13
|
"@sendgrid/helpers": "^8.0.0",
|
|
14
14
|
"@sendgrid/mail": "^8.1.0",
|
|
15
15
|
"change-case": "^5.4.2",
|
|
16
16
|
"cross-fetch": "^4.0.0",
|
|
17
|
-
"effect": "^2.3.
|
|
17
|
+
"effect": "^2.3.2",
|
|
18
18
|
"fast-check": "~3.15.1",
|
|
19
19
|
"object-hash": "^3.0.0",
|
|
20
20
|
"path-parser": "^6.1.0",
|
|
21
21
|
"proper-lockfile": "^4.1.2",
|
|
22
22
|
"pure-rand": "6.0.4",
|
|
23
23
|
"redlock": "^4.2.0",
|
|
24
|
-
"@effect-app/
|
|
25
|
-
"effect-app": "0.
|
|
26
|
-
"@effect-app/
|
|
27
|
-
"
|
|
28
|
-
"@effect-app/schema": "0.
|
|
24
|
+
"@effect-app/fluent-extensions": "0.127.0",
|
|
25
|
+
"@effect-app/core": "0.132.0",
|
|
26
|
+
"@effect-app/infra-adapters": "0.120.0",
|
|
27
|
+
"effect-app": "0.155.0",
|
|
28
|
+
"@effect-app/schema": "0.186.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/cli": "^7.23.9",
|