@effect-app/infra 0.173.0 → 0.174.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @effect-app/infra
2
2
 
3
+ ## 0.174.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c8a07bc: fix path
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [c8a07bc]
12
+ - @effect-app/core@0.131.0
13
+ - @effect-app/fluent-extensions@0.126.0
14
+ - @effect-app/infra-adapters@0.119.0
15
+ - effect-app@0.153.0
16
+ - @effect-app/schema@0.184.0
17
+
3
18
  ## 0.173.0
4
19
 
5
20
  ### Minor Changes
@@ -7,7 +7,7 @@ exports.RecordInspect = RecordInspect;
7
7
  exports.getFirstById_ = getFirstById_;
8
8
  var tsplus_module_1 = _interopRequireWildcard(require("effect/Equal"));
9
9
  var tsplus_module_2 = _interopRequireWildcard(require("effect/Chunk"));
10
- var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
10
+ var tsplus_module_3 = _interopRequireWildcard(require("effect-app/_ext/misc"));
11
11
  var _util = require("util");
12
12
  var _errors = require("../errors.cjs");
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Live = void 0;
7
7
  var tsplus_module_1 = _interopRequireWildcard(require("effect/Effect"));
8
- var tsplus_module_2 = _interopRequireWildcard(require("@effect-app/prelude/_ext/date"));
8
+ var tsplus_module_2 = _interopRequireWildcard(require("effect-app/_ext/date"));
9
9
  var tsplus_module_3 = _interopRequireWildcard(require("effect/Option"));
10
10
  var tsplus_module_4 = _interopRequireWildcard(require("@effect-app/core/Array"));
11
11
  var tsplus_module_5 = _interopRequireWildcard(require("effect/Chunk"));
@@ -13,7 +13,7 @@ var tsplus_module_6 = _interopRequireWildcard(require("effect/Exit"));
13
13
  var tsplus_module_7 = _interopRequireWildcard(require("effect/Cause"));
14
14
  var tsplus_module_8 = _interopRequireWildcard(require("effect-app/schema"));
15
15
  var tsplus_module_9 = _interopRequireWildcard(require("@effect/schema/Parser"));
16
- var tsplus_module_10 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
16
+ var tsplus_module_10 = _interopRequireWildcard(require("effect-app/_ext/misc"));
17
17
  var tsplus_module_11 = _interopRequireWildcard(require("effect/Duration"));
18
18
  var tsplus_module_12 = _interopRequireWildcard(require("effect/Schedule"));
19
19
  var tsplus_module_13 = _interopRequireWildcard(require("effect/Layer"));
@@ -11,7 +11,7 @@ exports.makeDSL = makeDSL;
11
11
  exports.makeOneDSL = makeOneDSL;
12
12
  exports.updateWith = updateWith;
13
13
  exports.updateWithOne = updateWithOne;
14
- var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/prelude/Pure"));
14
+ var tsplus_module_1 = _interopRequireWildcard(require("effect-app/Pure"));
15
15
  var tsplus_module_2 = _interopRequireWildcard(require("effect/Effect"));
16
16
  var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/core/Array"));
17
17
  var tsplus_module_4 = _interopRequireWildcard(require("@effect-app/core/Effect"));
@@ -26,10 +26,10 @@ exports.saveManyWithPureBatched = saveManyWithPureBatched;
26
26
  exports.saveManyWithPure_ = exports.saveManyWithPureBatched_ = void 0;
27
27
  exports.saveWithEvents = saveWithEvents;
28
28
  exports.saveWithPure_ = void 0;
29
- var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
29
+ var tsplus_module_1 = _interopRequireWildcard(require("effect-app/_ext/misc"));
30
30
  var tsplus_module_2 = _interopRequireWildcard(require("effect/Effect"));
31
31
  var tsplus_module_3 = _interopRequireWildcard(require("effect-app/schema"));
32
- var tsplus_module_4 = _interopRequireWildcard(require("@effect-app/prelude/Pure"));
32
+ var tsplus_module_4 = _interopRequireWildcard(require("effect-app/Pure"));
33
33
  var tsplus_module_5 = _interopRequireWildcard(require("@effect-app/core/Array"));
34
34
  var tsplus_module_6 = _interopRequireWildcard(require("@effect-app/core/_ext/Iterable"));
35
35
  var _errors = require("../../errors.cjs");
@@ -8,11 +8,11 @@ exports.makeRepo = makeRepo;
8
8
  exports.makeStore = makeStore;
9
9
  exports.makeWhere = makeWhere;
10
10
  exports.removeById = removeById;
11
- var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
11
+ var tsplus_module_1 = _interopRequireWildcard(require("effect-app/_ext/misc"));
12
12
  var tsplus_module_2 = _interopRequireWildcard(require("effect/Effect"));
13
13
  var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/infra/services/Repository/ext"));
14
14
  var tsplus_module_4 = _interopRequireWildcard(require("effect-app/schema"));
15
- var tsplus_module_5 = _interopRequireWildcard(require("@effect-app/prelude/Pure"));
15
+ var tsplus_module_5 = _interopRequireWildcard(require("effect-app/Pure"));
16
16
  var tsplus_module_6 = _interopRequireWildcard(require("@effect-app/core/Array"));
17
17
  var tsplus_module_7 = _interopRequireWildcard(require("@effect-app/core/_ext/Iterable"));
18
18
  var tsplus_module_8 = _interopRequireWildcard(require("@effect-app/core/Effect"));
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.RedisStoreLayer = RedisStoreLayer;
7
7
  var tsplus_module_1 = _interopRequireWildcard(require("effect/Effect"));
8
8
  var tsplus_module_2 = _interopRequireWildcard(require("effect/Option"));
9
- var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
9
+ var tsplus_module_3 = _interopRequireWildcard(require("effect-app/_ext/misc"));
10
10
  var tsplus_module_4 = _interopRequireWildcard(require("effect/ReadonlyArray"));
11
11
  var tsplus_module_5 = _interopRequireWildcard(require("effect/Secret"));
12
12
  var tsplus_module_6 = _interopRequireWildcard(require("effect/Layer"));
@@ -12,7 +12,7 @@ exports.lowerThan = lowerThan;
12
12
  exports.lowerThanExclusive = lowerThanExclusive;
13
13
  exports.lowercaseIfString = lowercaseIfString;
14
14
  exports.makeUpdateETag = exports.makeETag = void 0;
15
- var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
15
+ var tsplus_module_1 = _interopRequireWildcard(require("effect-app/_ext/misc"));
16
16
  var tsplus_module_2 = _interopRequireWildcard(require("effect/Option"));
17
17
  var tsplus_module_3 = _interopRequireWildcard(require("effect/Effect"));
18
18
  var _utils = require("effect-app/utils");
@@ -1,6 +1,6 @@
1
1
  import * as tsplus_module_1 from "effect/Equal";
2
2
  import * as tsplus_module_2 from "effect/Chunk";
3
- import * as tsplus_module_3 from "@effect-app/prelude/_ext/misc";
3
+ import * as tsplus_module_3 from "effect-app/_ext/misc";
4
4
  import { inspect } from "util";
5
5
  import { NotFoundError } from "../errors.js";
6
6
  /**
@@ -1,5 +1,5 @@
1
1
  import * as tsplus_module_1 from "effect/Effect";
2
- import * as tsplus_module_2 from "@effect-app/prelude/_ext/date";
2
+ import * as tsplus_module_2 from "effect-app/_ext/date";
3
3
  import * as tsplus_module_3 from "effect/Option";
4
4
  import * as tsplus_module_4 from "@effect-app/core/Array";
5
5
  import * as tsplus_module_5 from "effect/Chunk";
@@ -7,7 +7,7 @@ import * as tsplus_module_6 from "effect/Exit";
7
7
  import * as tsplus_module_7 from "effect/Cause";
8
8
  import * as tsplus_module_8 from "effect-app/schema";
9
9
  import * as tsplus_module_9 from "@effect/schema/Parser";
10
- import * as tsplus_module_10 from "@effect-app/prelude/_ext/misc";
10
+ import * as tsplus_module_10 from "effect-app/_ext/misc";
11
11
  import * as tsplus_module_11 from "effect/Duration";
12
12
  import * as tsplus_module_12 from "effect/Schedule";
13
13
  import * as tsplus_module_13 from "effect/Layer";
@@ -17,8 +17,8 @@ export declare const QueueMaker: QueueMakerOps;
17
17
  export declare const QueueMeta: import("@effect-app/schema").Schema<{
18
18
  readonly requestContext: RequestContext;
19
19
  readonly span?: {
20
- readonly traceId: string;
21
20
  readonly spanId: string;
21
+ readonly traceId: string;
22
22
  readonly sampled?: boolean | undefined;
23
23
  } | undefined;
24
24
  }, {
@@ -45,8 +45,8 @@ export declare const QueueMeta: import("@effect-app/schema").Schema<{
45
45
  readonly namespace?: string | undefined;
46
46
  };
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
  }, never>;
@@ -1,4 +1,4 @@
1
- import * as tsplus_module_1 from "@effect-app/prelude/Pure";
1
+ import * as tsplus_module_1 from "effect-app/Pure";
2
2
  import * as tsplus_module_2 from "effect/Effect";
3
3
  import * as tsplus_module_3 from "@effect-app/core/Array";
4
4
  import * as tsplus_module_4 from "@effect-app/core/Effect";
@@ -1,7 +1,7 @@
1
- import * as tsplus_module_1 from "@effect-app/prelude/_ext/misc";
1
+ import * as tsplus_module_1 from "effect-app/_ext/misc";
2
2
  import * as tsplus_module_2 from "effect/Effect";
3
3
  import * as tsplus_module_3 from "effect-app/schema";
4
- import * as tsplus_module_4 from "@effect-app/prelude/Pure";
4
+ import * as tsplus_module_4 from "effect-app/Pure";
5
5
  import * as tsplus_module_5 from "@effect-app/core/Array";
6
6
  import * as tsplus_module_6 from "@effect-app/core/_ext/Iterable";
7
7
  export const get = get_1;
@@ -1,8 +1,8 @@
1
- import * as tsplus_module_1 from "@effect-app/prelude/_ext/misc";
1
+ import * as tsplus_module_1 from "effect-app/_ext/misc";
2
2
  import * as tsplus_module_2 from "effect/Effect";
3
3
  import * as tsplus_module_3 from "@effect-app/infra/services/Repository/ext";
4
4
  import * as tsplus_module_4 from "effect-app/schema";
5
- import * as tsplus_module_5 from "@effect-app/prelude/Pure";
5
+ import * as tsplus_module_5 from "effect-app/Pure";
6
6
  import * as tsplus_module_6 from "@effect-app/core/Array";
7
7
  import * as tsplus_module_7 from "@effect-app/core/_ext/Iterable";
8
8
  import * as tsplus_module_8 from "@effect-app/core/Effect";
@@ -1,6 +1,6 @@
1
1
  import * as tsplus_module_1 from "effect/Effect";
2
2
  import * as tsplus_module_2 from "effect/Option";
3
- import * as tsplus_module_3 from "@effect-app/prelude/_ext/misc";
3
+ import * as tsplus_module_3 from "effect-app/_ext/misc";
4
4
  import * as tsplus_module_4 from "effect/ReadonlyArray";
5
5
  import * as tsplus_module_5 from "effect/Secret";
6
6
  import * as tsplus_module_6 from "effect/Layer";
@@ -1,4 +1,4 @@
1
- import * as tsplus_module_1 from "@effect-app/prelude/_ext/misc";
1
+ import * as tsplus_module_1 from "effect-app/_ext/misc";
2
2
  import * as tsplus_module_2 from "effect/Option";
3
3
  import * as tsplus_module_3 from "effect/Effect";
4
4
  import { get } from "effect-app/utils";
@@ -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<EA, never, REncode>, decode: (d: EA) => Effect<A, EDecode, RDecode>, indexes: IndexingPolicy) => import("effect/Effect").Effect<{
10
- find: (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>, import("effect/Cause").UnknownException | simpledb.InvalidStateError, RDecode | Cosmos.CosmosClient | simpledb.RecordCache>;
10
+ find: (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>, import("effect/Cause").UnknownException | simpledb.InvalidStateError, Cosmos.CosmosClient | simpledb.RecordCache | RDecode>;
11
11
  findBy: (parameters: Record<string, string>) => import("effect/Effect").Effect<import("effect/Option").Option<any>, import("effect/Cause").UnknownException, Cosmos.CosmosClient>;
12
- save: (record: A) => import("effect/Effect").Effect<A, OptimisticLockException, REncode | Cosmos.CosmosClient | simpledb.RecordCache>;
12
+ save: (record: A) => import("effect/Effect").Effect<A, OptimisticLockException, Cosmos.CosmosClient | simpledb.RecordCache | REncode>;
13
13
  }, import("effect/Cause").UnknownException, Cosmos.CosmosClient>;
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<EA, never, REncode>, decode: (d: EA) => Effect<A, EDecode, RDecode>, schemaVersion: string, makeIndexKey: (r: A) => Index, dir?: string) => {
7
7
  find: (id: string) => import("effect/Effect").Effect<import("effect/Option").Option<A>, simpledb.InvalidStateError, simpledb.RecordCache | RDecode>;
8
8
  findByIndex: (index: Index) => import("effect/Effect").Effect<import("effect/Option").Option<TKey>, never, never>;
9
- save: (record: A) => import("effect/Effect").Effect<A, import("./shared.js").OptimisticLockException | simpledb.InvalidStateError | CouldNotAquireDbLockException, simpledb.RecordCache | REncode>;
9
+ save: (record: A) => import("effect/Effect").Effect<A, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, simpledb.RecordCache | REncode>;
10
10
  };
11
11
  export declare function initialise(dir: string): void;
12
12
  //# sourceMappingURL=diskdb.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<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 | RDecode | RedisClient>;
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, import("./shared.js").OptimisticLockException | simpledb.InvalidStateError | CouldNotAquireDbLockException, simpledb.RecordCache | REncode | RedisClient>;
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;
15
- readonly timestamp: Date;
16
15
  readonly version: string;
16
+ readonly timestamp: Date;
17
17
  }, {
18
18
  readonly data: string;
19
- readonly timestamp: string;
20
19
  readonly version: string;
20
+ readonly timestamp: string;
21
21
  }, never, {
22
22
  readonly data: string;
23
- readonly timestamp: Date;
24
23
  readonly version: string;
24
+ readonly timestamp: Date;
25
25
  }, RedisSerializedDBRecord, {
26
26
  version: S.Schema<string, string, never>;
27
27
  timestamp: S.Schema<Date, string, never> & {
@@ -39,16 +39,16 @@ export interface DBRecord<TKey extends string> {
39
39
  }
40
40
  declare const SerializedDBRecord_base: S.EnhancedClass<{
41
41
  readonly data: string;
42
- readonly timestamp: Date;
43
42
  readonly version: string;
43
+ readonly timestamp: Date;
44
44
  }, {
45
45
  readonly data: string;
46
- readonly timestamp: string;
47
46
  readonly version: string;
47
+ readonly timestamp: string;
48
48
  }, never, {
49
49
  readonly data: string;
50
- readonly timestamp: Date;
51
50
  readonly version: string;
51
+ readonly timestamp: Date;
52
52
  }, SerializedDBRecord, {
53
53
  version: S.Schema<string, string, never>;
54
54
  timestamp: S.Schema<Date, string, never> & {
@@ -60,12 +60,12 @@ export declare class SerializedDBRecord extends SerializedDBRecord_base {
60
60
  }
61
61
  export declare function makeSerialisedDBRecord(s: Schema<any>): S.Schema<{
62
62
  readonly data: any;
63
- readonly timestamp: Date;
64
63
  readonly version: number;
64
+ readonly timestamp: Date;
65
65
  }, {
66
66
  readonly data: any;
67
- readonly timestamp: string;
68
67
  readonly version: number;
68
+ readonly timestamp: string;
69
69
  }, never>;
70
70
  export interface CachedRecord<T> {
71
71
  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<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>, E | InvalidStateError, R | RDecode | RecordCache>;
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, R | RecordCache>;
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
+ 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
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/infra",
3
- "version": "0.173.0",
3
+ "version": "0.174.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -21,11 +21,11 @@
21
21
  "proper-lockfile": "^4.1.2",
22
22
  "pure-rand": "6.0.4",
23
23
  "redlock": "^4.2.0",
24
- "@effect-app/fluent-extensions": "0.125.9",
25
- "@effect-app/infra-adapters": "0.118.0",
26
- "@effect-app/core": "0.130.0",
27
- "effect-app": "0.152.0",
28
- "@effect-app/schema": "0.183.14"
24
+ "@effect-app/fluent-extensions": "0.126.0",
25
+ "@effect-app/core": "0.131.0",
26
+ "@effect-app/schema": "0.184.0",
27
+ "@effect-app/infra-adapters": "0.119.0",
28
+ "effect-app": "0.153.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@babel/cli": "^7.23.9",
@@ -43,7 +43,7 @@
43
43
  "ts-node": "^10.9.2",
44
44
  "typescript": "npm:@effect-app/typescript@5.4.0-tsplus.20240124",
45
45
  "vitest": "^1.2.2",
46
- "@effect-app/compiler": "0.61.0"
46
+ "@effect-app/compiler": "0.62.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "express": "^4.18.2"
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "importMap": {
3
+ "^(.*)/packages/prelude/_src/(.*)\\.[cm]?[tj]s$": "effect-app/$2",
3
4
  "^(.*)/packages/(.*)/_src/(.*)\\.[cm]?[tj]s$": "@effect-app/$2/$3",
5
+ "^(.*)/node_modules/@effect-app/prelude/_src/(.*)\\.[cm]?[tj]s$": "effect-app/$2",
4
6
  "^(.*)/node_modules/@effect-app/(.*)/_src/(.*)\\.[cm]?[tj]s$": "@effect-app/$2/$3",
5
7
  ".pnpm/[^\/]*/node_modules/(.*)": "$1"
6
8
  }