@effect-app/infra 0.150.0 → 0.152.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 +27 -0
- package/_cjs/test.arbs.cjs +1 -1
- package/_src/test.arbs.ts +1 -1
- package/dist/services/QueueMaker/service.d.ts +2 -2
- 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 +5 -5
- package/dist/services/simpledb/shared.d.ts +5 -5
- package/dist/services/simpledb/simpledb.d.ts +2 -2
- package/dist/test.arbs.d.ts +1 -1
- package/dist/test.arbs.js +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 0.152.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ed813b4: update packages
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [ed813b4]
|
|
12
|
+
- @effect-app/infra-adapters@0.103.0
|
|
13
|
+
- @effect-app/prelude@0.126.0
|
|
14
|
+
- @effect-app/schema@0.165.0
|
|
15
|
+
|
|
16
|
+
## 0.151.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 3eb4057: update packages
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [3eb4057]
|
|
25
|
+
- @effect-app/infra-adapters@0.102.0
|
|
26
|
+
- @effect-app/prelude@0.125.0
|
|
27
|
+
- @effect-app/schema@0.164.0
|
|
28
|
+
- @effect-app/core@0.114.0
|
|
29
|
+
|
|
3
30
|
## 0.150.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/_cjs/test.arbs.cjs
CHANGED
|
@@ -18,7 +18,7 @@ const generate = exports.generate = generate_1;
|
|
|
18
18
|
const rnd = new _fastCheck.Random(rand.congruential32(5));
|
|
19
19
|
(0, _faker.setFaker)(_faker2.faker);
|
|
20
20
|
/**
|
|
21
|
-
* @tsplus getter FastCheck
|
|
21
|
+
* @tsplus getter FastCheck generateRandom
|
|
22
22
|
*/
|
|
23
23
|
function generate_1(arb) {
|
|
24
24
|
return arb.generate(rnd, undefined);
|
package/_src/test.arbs.ts
CHANGED
|
@@ -38,15 +38,15 @@ export declare const QueueMeta: import("@effect-app/schema").Schema<never, {
|
|
|
38
38
|
readonly namespace?: string | undefined;
|
|
39
39
|
};
|
|
40
40
|
readonly span?: {
|
|
41
|
-
readonly traceId: string;
|
|
42
41
|
readonly spanId: string;
|
|
42
|
+
readonly traceId: string;
|
|
43
43
|
readonly sampled?: boolean | undefined;
|
|
44
44
|
} | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
readonly requestContext: RequestContext;
|
|
47
47
|
readonly span?: {
|
|
48
|
-
readonly traceId: string;
|
|
49
48
|
readonly spanId: string;
|
|
49
|
+
readonly traceId: string;
|
|
50
50
|
readonly sampled?: boolean | undefined;
|
|
51
51
|
} | undefined;
|
|
52
52
|
}>;
|
|
@@ -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<simpledb.RecordCache | RDecode
|
|
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<simpledb.RecordCache | REncode
|
|
12
|
+
save: (record: A) => import("effect/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | REncode, OptimisticLockException, A>;
|
|
13
13
|
}>;
|
|
14
14
|
//# 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) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index, dir?: string) => {
|
|
7
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<simpledb.RecordCache | REncode, CouldNotAquireDbLockException |
|
|
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
|
|
@@ -6,6 +6,6 @@ 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
7
|
find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache | RDecode, import("@effect/schema/ParseResult").ParseIssue | 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").ParseIssue, import("effect/Option").Option<A & {}>>;
|
|
9
|
-
save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache | REncode, import("@effect/schema/ParseResult").ParseIssue |
|
|
9
|
+
save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache | REncode, import("@effect/schema/ParseResult").ParseIssue | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=memdb.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<never, {
|
|
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<never, string, string>;
|
|
27
27
|
timestamp: S.Schema<never, 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<never, {
|
|
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<never, string, string>;
|
|
54
54
|
timestamp: S.Schema<never, string, Date>;
|
|
@@ -57,13 +57,13 @@ declare const SerializedDBRecord_base: S.Class<never, {
|
|
|
57
57
|
export declare class SerializedDBRecord extends SerializedDBRecord_base {
|
|
58
58
|
}
|
|
59
59
|
export declare function makeSerialisedDBRecord(s: Schema<never, any>): S.Schema<never, {
|
|
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<
|
|
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
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<
|
|
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/dist/test.arbs.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { A } from "@effect-app/prelude/schema";
|
|
2
2
|
import * as fc from "fast-check";
|
|
3
3
|
/**
|
|
4
|
-
* @tsplus getter FastCheck
|
|
4
|
+
* @tsplus getter FastCheck generateRandom
|
|
5
5
|
* @tsplus location "@effect-app/infra/test.arbs"
|
|
6
6
|
*/
|
|
7
7
|
export declare function generate<T>(arb: fc.Arbitrary<T>): fc.Value<T>;
|
package/dist/test.arbs.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as rand from "pure-rand";
|
|
|
8
8
|
const rnd = new Random(rand.congruential32(5));
|
|
9
9
|
setFaker(faker);
|
|
10
10
|
/**
|
|
11
|
-
* @tsplus getter FastCheck
|
|
11
|
+
* @tsplus getter FastCheck generateRandom
|
|
12
12
|
*/
|
|
13
13
|
function generate_1(arb) {
|
|
14
14
|
return arb.generate(rnd, undefined);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.152.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.3",
|
|
9
|
-
"@effect/platform": "^0.43.
|
|
10
|
-
"@effect/schema": "npm:@effect-app/schema-fork@0.0.0-
|
|
9
|
+
"@effect/platform": "^0.43.2",
|
|
10
|
+
"@effect/schema": "npm:@effect-app/schema-fork@0.0.0-20240126154023",
|
|
11
11
|
"express-oauth2-jwt-bearer": "^1.6.0",
|
|
12
12
|
"@faker-js/faker": "^8.4.0",
|
|
13
13
|
"@sendgrid/helpers": "^8.0.0",
|
|
@@ -21,16 +21,16 @@
|
|
|
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/
|
|
26
|
-
"@effect-app/prelude": "0.
|
|
27
|
-
"@effect-app/schema": "0.
|
|
24
|
+
"@effect-app/infra-adapters": "0.103.0",
|
|
25
|
+
"@effect-app/core": "0.114.0",
|
|
26
|
+
"@effect-app/prelude": "0.126.0",
|
|
27
|
+
"@effect-app/schema": "0.165.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/cli": "^7.23.9",
|
|
31
31
|
"@sentry/node": "^7.98.0",
|
|
32
32
|
"@types/express": "^4.17.21",
|
|
33
|
-
"@types/node": "~20.11.
|
|
33
|
+
"@types/node": "~20.11.7",
|
|
34
34
|
"@types/proper-lockfile": "^4.1.4",
|
|
35
35
|
"@types/redis": "^2.8.32",
|
|
36
36
|
"@types/redlock": "^4.0.7",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"ts-node": "^10.9.2",
|
|
43
43
|
"typescript": "npm:@effect-app/typescript@5.4.0-tsplus.20240124",
|
|
44
44
|
"vitest": "^1.2.1",
|
|
45
|
-
"@effect-app/compiler": "0.
|
|
45
|
+
"@effect-app/compiler": "0.54.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"express": "^4.18.2"
|