@effect-app/infra 0.84.0-next.0 → 0.84.0-next.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.
Files changed (154) hide show
  1. package/.cache/effect/095519d034161945a8d2616a506d3e7f35a9b3d868814f44c747429c60fc4e7f.content +36 -2
  2. package/.cache/effect/095519d034161945a8d2616a506d3e7f35a9b3d868814f44c747429c60fc4e7f.hash +1 -1
  3. package/.cache/effect/134218688132dfbdea493cbe1f26e73449f2759121df35ddd5448346b59c9a8d.content +24 -6
  4. package/.cache/effect/134218688132dfbdea493cbe1f26e73449f2759121df35ddd5448346b59c9a8d.hash +1 -1
  5. package/.cache/effect/14eb9da4ca6d22162888c7fdb7f39ab772d2a2dc6625db6031ecdb32ac89158f.content +75 -40
  6. package/.cache/effect/14eb9da4ca6d22162888c7fdb7f39ab772d2a2dc6625db6031ecdb32ac89158f.hash +1 -1
  7. package/.cache/effect/1bfd92946b11da4292f2ed99dc0e322462b60559148f9524abc20e26f70779e1.hash +1 -1
  8. package/.cache/effect/49c1bd9ec26e6df78b994d8df0bfe21b119803fa4aa46349bf4679fd0f1e7cda.content +3 -1
  9. package/.cache/effect/49c1bd9ec26e6df78b994d8df0bfe21b119803fa4aa46349bf4679fd0f1e7cda.hash +1 -1
  10. package/.cache/effect/58d4ccde8bd2db7829706db5bebd01b99900ee83f0f6a8413b53d17cbd69f510.content +1 -1
  11. package/.cache/effect/58d4ccde8bd2db7829706db5bebd01b99900ee83f0f6a8413b53d17cbd69f510.hash +1 -1
  12. package/.cache/effect/72a5a16a6b62b63cd71719c833091128207d7e6c823cb32293549b3dd58c451b.content +15 -7
  13. package/.cache/effect/72a5a16a6b62b63cd71719c833091128207d7e6c823cb32293549b3dd58c451b.hash +1 -1
  14. package/.cache/effect/7a9c33db6aedaf00093a132c1d4e48e9d043cef05e932b8a37da24d44e224248.hash +1 -1
  15. package/.cache/effect/8594f0f42afc0641b00e88998000cc47382a1d07da31f4a148f7976701ca22d5.hash +1 -1
  16. package/.cache/effect/c67d971634d2dc8118b40452b61c9a51620c35809be4a89982476aa80701d852.hash +1 -1
  17. package/.cache/effect/f38adf43700dab905456a534a0690eaf882cff2cd576c731f23d6d14a3c3d659.content +5 -1
  18. package/.cache/effect/f38adf43700dab905456a534a0690eaf882cff2cd576c731f23d6d14a3c3d659.hash +1 -1
  19. package/CHANGELOG.md +11 -0
  20. package/_cjs/_ext/Array.cjs +1 -1
  21. package/_cjs/api/defaultErrorHandler.cjs +2 -2
  22. package/_cjs/api/defaultErrorHandler.cjs.map +1 -1
  23. package/_cjs/api/express/makeOpenApiSpecs.cjs +4 -3
  24. package/_cjs/api/express/makeOpenApiSpecs.cjs.map +1 -1
  25. package/_cjs/api/express/schema/requestHandler.cjs +2 -2
  26. package/_cjs/api/reportError.cjs +1 -1
  27. package/_cjs/api/routing.cjs +8 -7
  28. package/_cjs/api/routing.cjs.map +1 -1
  29. package/_cjs/api/writeDocs.cjs +3 -2
  30. package/_cjs/api/writeDocs.cjs.map +1 -1
  31. package/_cjs/errorReporter.cjs +1 -1
  32. package/_cjs/logger/jsonLogger.cjs +10 -9
  33. package/_cjs/logger/jsonLogger.cjs.map +1 -1
  34. package/_cjs/logger/shared.cjs +1 -1
  35. package/_cjs/services/Emailer/Sendgrid.cjs +3 -3
  36. package/_cjs/services/Emailer/fake.cjs +1 -1
  37. package/_cjs/services/Operations/live.cjs +4 -4
  38. package/_cjs/services/Operations/service.cjs +6 -5
  39. package/_cjs/services/Operations/service.cjs.map +1 -1
  40. package/_cjs/services/QueueMaker/errors.cjs +2 -2
  41. package/_cjs/services/QueueMaker/memQueue.cjs +1 -1
  42. package/_cjs/services/QueueMaker/sbqueue.cjs +1 -1
  43. package/_cjs/services/Repository.cjs +1 -1
  44. package/_cjs/services/RepositoryBase.cjs +3 -3
  45. package/_cjs/services/RequestContextContainer.cjs +3 -2
  46. package/_cjs/services/RequestContextContainer.cjs.map +1 -1
  47. package/_cjs/services/Store/Cosmos.cjs +2 -2
  48. package/_cjs/services/Store/Disk.cjs +2 -2
  49. package/_cjs/services/Store/Memory.cjs +41 -39
  50. package/_cjs/services/Store/Memory.cjs.map +1 -1
  51. package/_cjs/services/Store/Redis.cjs +2 -2
  52. package/_cjs/services/Store/codeFilter.test.cjs +1 -1
  53. package/_cjs/services/Store/index.cjs +2 -2
  54. package/_cjs/services/Store/utils.cjs +1 -1
  55. package/_cjs/services/simpledb/cosmosdb.cjs +1 -1
  56. package/_cjs/services/simpledb/memdb.cjs +1 -1
  57. package/_cjs/services/simpledb/simpledb.cjs +1 -1
  58. package/dist/RequestContext.d.ts +4 -4
  59. package/dist/_ext/Array.d.ts +1 -1
  60. package/dist/_ext/Array.d.ts.map +1 -1
  61. package/dist/_ext/Array.js +1 -1
  62. package/dist/api/codec.d.ts +1 -1
  63. package/dist/api/codec.d.ts.map +1 -1
  64. package/dist/api/defaultErrorHandler.d.ts +2 -2
  65. package/dist/api/defaultErrorHandler.d.ts.map +1 -1
  66. package/dist/api/defaultErrorHandler.js +4 -3
  67. package/dist/api/express/makeJsonSchema.d.ts +2 -2
  68. package/dist/api/express/makeJsonSchema.d.ts.map +1 -1
  69. package/dist/api/express/makeOpenApiSpecs.d.ts +1 -1
  70. package/dist/api/express/makeOpenApiSpecs.js +5 -4
  71. package/dist/api/express/schema/requestHandler.d.ts +7 -7
  72. package/dist/api/express/schema/requestHandler.d.ts.map +1 -1
  73. package/dist/api/express/schema/requestHandler.js +2 -2
  74. package/dist/api/express/schema/routing.d.ts +1 -1
  75. package/dist/api/reportError.d.ts +5 -5
  76. package/dist/api/reportError.d.ts.map +1 -1
  77. package/dist/api/reportError.js +1 -1
  78. package/dist/api/routing.d.ts +5 -5
  79. package/dist/api/routing.d.ts.map +1 -1
  80. package/dist/api/routing.js +9 -8
  81. package/dist/api/setupRequest.d.ts +2 -2
  82. package/dist/api/setupRequest.d.ts.map +1 -1
  83. package/dist/api/writeDocs.d.ts +1 -1
  84. package/dist/api/writeDocs.d.ts.map +1 -1
  85. package/dist/api/writeDocs.js +4 -3
  86. package/dist/errorReporter.d.ts +3 -3
  87. package/dist/errorReporter.d.ts.map +1 -1
  88. package/dist/errorReporter.js +1 -1
  89. package/dist/errors.d.ts +7 -7
  90. package/dist/instrument.d.ts +1 -1
  91. package/dist/instrument.d.ts.map +1 -1
  92. package/dist/logger/jsonLogger.d.ts +2 -2
  93. package/dist/logger/jsonLogger.js +11 -10
  94. package/dist/logger/logFmtLogger.d.ts +2 -2
  95. package/dist/logger/shared.d.ts +1 -1
  96. package/dist/logger/shared.d.ts.map +1 -1
  97. package/dist/logger/shared.js +1 -1
  98. package/dist/rateLimit.d.ts +3 -3
  99. package/dist/rateLimit.d.ts.map +1 -1
  100. package/dist/services/Emailer/Sendgrid.d.ts +1 -1
  101. package/dist/services/Emailer/Sendgrid.js +3 -3
  102. package/dist/services/Emailer/fake.d.ts +1 -1
  103. package/dist/services/Emailer/fake.js +1 -1
  104. package/dist/services/Emailer/service.d.ts +4 -4
  105. package/dist/services/Operations/live.d.ts +1 -1
  106. package/dist/services/Operations/live.js +4 -4
  107. package/dist/services/Operations/service.d.ts +8 -8
  108. package/dist/services/Operations/service.d.ts.map +1 -1
  109. package/dist/services/Operations/service.js +13 -12
  110. package/dist/services/QueueMaker/errors.d.ts +3 -3
  111. package/dist/services/QueueMaker/errors.d.ts.map +1 -1
  112. package/dist/services/QueueMaker/errors.js +2 -2
  113. package/dist/services/QueueMaker/memQueue.d.ts +3 -3
  114. package/dist/services/QueueMaker/memQueue.js +1 -1
  115. package/dist/services/QueueMaker/sbqueue.d.ts +4 -4
  116. package/dist/services/QueueMaker/sbqueue.js +1 -1
  117. package/dist/services/Repository.d.ts +30 -30
  118. package/dist/services/Repository.d.ts.map +1 -1
  119. package/dist/services/Repository.js +1 -1
  120. package/dist/services/RepositoryBase.d.ts +12 -12
  121. package/dist/services/RepositoryBase.d.ts.map +1 -1
  122. package/dist/services/RepositoryBase.js +3 -3
  123. package/dist/services/RequestContextContainer.d.ts +8 -8
  124. package/dist/services/RequestContextContainer.d.ts.map +1 -1
  125. package/dist/services/RequestContextContainer.js +4 -3
  126. package/dist/services/Store/Cosmos.d.ts +3 -3
  127. package/dist/services/Store/Cosmos.js +2 -2
  128. package/dist/services/Store/Disk.d.ts +3 -3
  129. package/dist/services/Store/Disk.js +2 -2
  130. package/dist/services/Store/Memory.d.ts +5 -5
  131. package/dist/services/Store/Memory.d.ts.map +1 -1
  132. package/dist/services/Store/Memory.js +43 -41
  133. package/dist/services/Store/Redis.d.ts +3 -3
  134. package/dist/services/Store/Redis.js +2 -2
  135. package/dist/services/Store/index.d.ts +1 -1
  136. package/dist/services/Store/index.d.ts.map +1 -1
  137. package/dist/services/Store/index.js +2 -2
  138. package/dist/services/Store/service.d.ts +9 -9
  139. package/dist/services/Store/service.d.ts.map +1 -1
  140. package/dist/services/Store/utils.d.ts +1 -1
  141. package/dist/services/Store/utils.d.ts.map +1 -1
  142. package/dist/services/Store/utils.js +1 -1
  143. package/dist/services/simpledb/cosmosdb.d.ts +4 -4
  144. package/dist/services/simpledb/cosmosdb.js +1 -1
  145. package/dist/services/simpledb/diskdb.d.ts +3 -3
  146. package/dist/services/simpledb/memdb.d.ts +3 -3
  147. package/dist/services/simpledb/memdb.js +1 -1
  148. package/dist/services/simpledb/mongodb.d.ts +4 -4
  149. package/dist/services/simpledb/redisdb.d.ts +3 -3
  150. package/dist/services/simpledb/shared.d.ts +3 -3
  151. package/dist/services/simpledb/simpledb.d.ts +6 -6
  152. package/dist/services/simpledb/simpledb.d.ts.map +1 -1
  153. package/dist/services/simpledb/simpledb.js +1 -1
  154. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../_src/services/Store/utils.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,oBAAoB,EAAoB,MAAM,cAAc,CAAA;AAIpG,eAAO,MAAM,QAAQ,2EACF,CAAC,KACjB,CAIQ,CAAA;AACX,eAAO,MAAM,cAAc,SAClB,MAAM,gEAAgE,CAAC,WAAW,OAAO,CAAC,CAAC,6EAoB9F,CAAA;AAEN,wBAAgB,UAAU,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,OACxE,CAAC,mFA8Gb;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,EAC/D,MAAM,EAAE,gBAAgB,OAEb,CAAC;;KAkBb"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../_src/services/Store/utils.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,oBAAoB,EAAoB,MAAM,cAAc,CAAA;AAIpG,eAAO,MAAM,QAAQ,2EACF,CAAC,KACjB,CAIQ,CAAA;AACX,eAAO,MAAM,cAAc,SAClB,MAAM,gEAAgE,CAAC,WAAW,OAAO,CAAC,CAAC,sEAoB9F,CAAA;AAEN,wBAAgB,UAAU,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,OACxE,CAAC,mFA8Gb;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,EAC/D,MAAM,EAAE,gBAAgB,OAEb,CAAC;;KAkBb"}
@@ -2,7 +2,7 @@ import * as tsplus_module_1 from "@effect-app/prelude/_ext/misc";
2
2
  import * as tsplus_module_2 from "effect/Option.impl";
3
3
  import * as tsplus_module_3 from "effect/Effect";
4
4
  import * as tsplus_module_4 from "effect/Option";
5
- import * as tsplus_module_5 from "effect/ReadonlyArray.int";
5
+ import * as tsplus_module_5 from "effect/ReadonlyArray.impl";
6
6
  import { get } from "@effect-app/prelude/utils";
7
7
  import { OptimisticConcurrencyException } from "../../errors.js";
8
8
  import objectHash from "object-hash";
@@ -6,9 +6,9 @@ import * as Cosmos from "@effect-app/infra-adapters/cosmos-client";
6
6
  import type { DBRecord } from "./shared.js";
7
7
  import { OptimisticLockException } from "./shared.js";
8
8
  import * as simpledb from "./simpledb.js";
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, unknown, {
10
- find: (id: string) => import("effect/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | RDecode, unknown, import("effect/Option").Option<A>>;
11
- findBy: (parameters: Record<string, string>) => import("effect/Effect").Effect<Cosmos.CosmosClient, unknown, import("effect/Option").Option<any>>;
12
- save: (record: A) => import("effect/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | REncode, OptimisticLockException, A>;
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<Cosmos.CosmosClient, unknown, {
10
+ find: (id: string) => import("effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | RDecode, unknown, import("effect").Option<A>>;
11
+ findBy: (parameters: Record<string, string>) => import("effect").Effect<Cosmos.CosmosClient, unknown, import("effect").Option<any>>;
12
+ save: (record: A) => import("effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache | REncode, OptimisticLockException, A>;
13
13
  }>;
14
14
  //# sourceMappingURL=cosmosdb.d.ts.map
@@ -3,7 +3,7 @@ import * as tsplus_module_2 from "effect/Effect";
3
3
  import * as tsplus_module_3 from "effect/Effect.impl";
4
4
  import * as tsplus_module_4 from "effect/Option.impl";
5
5
  import * as tsplus_module_5 from "effect/Option";
6
- import * as tsplus_module_6 from "effect/ReadonlyArray.int";
6
+ import * as tsplus_module_6 from "effect/ReadonlyArray.impl";
7
7
  import { typedKeysOf } from "@effect-app/core/utils";
8
8
  import * as Cosmos from "@effect-app/infra-adapters/cosmos-client";
9
9
  import { OptimisticLockException } from "./shared.js";
@@ -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<simpledb.RecordCache | RDecode, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
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 | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
7
+ find: (id: string) => import("effect").Effect<simpledb.RecordCache | RDecode, simpledb.InvalidStateError, import("effect").Option<A>>;
8
+ findByIndex: (index: Index) => import("effect").Effect<never, never, import("effect").Option<TKey & {}>>;
9
+ save: (record: A) => import("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
@@ -5,8 +5,8 @@ import * as MO from "@effect-app/schema";
5
5
  import type { DBRecord } from "./shared.js";
6
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) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>) => {
8
- find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache | RDecode, MO.CondemnException | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
9
- findBy: <V extends Partial<A>>(keys: V, eq: Equivalence<V>) => import("effect/Effect").Effect<RDecode, MO.CondemnException, import("effect/Option").Option<A & {}>>;
10
- save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache | REncode, MO.CondemnException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
8
+ find: (id: string) => import("effect").Effect<simpledb.RecordCache | RDecode, MO.CondemnException | simpledb.InvalidStateError, import("effect").Option<A>>;
9
+ findBy: <V extends Partial<A>>(keys: V, eq: Equivalence<V>) => import("effect").Effect<RDecode, MO.CondemnException, import("effect").Option<A & {}>>;
10
+ save: (record: A) => import("effect").Effect<simpledb.RecordCache | REncode, MO.CondemnException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
11
11
  };
12
12
  //# sourceMappingURL=memdb.d.ts.map
@@ -3,7 +3,7 @@ import * as tsplus_module_2 from "effect/Effect.impl";
3
3
  import * as tsplus_module_3 from "@effect-app/core/EffectX";
4
4
  import * as tsplus_module_4 from "effect/Option";
5
5
  import * as tsplus_module_5 from "effect/Effect";
6
- import * as tsplus_module_6 from "effect/Exit.int";
6
+ import * as tsplus_module_6 from "effect/Exit.impl";
7
7
  import { flow } from "@effect-app/core/Function";
8
8
  import * as MO from "@effect-app/schema";
9
9
  import { getRecordName, makeMap, SerializedDBRecord } from "./shared.js";
@@ -5,9 +5,9 @@ import type { IndexDescription } from "mongodb";
5
5
  import type { DBRecord } from "./shared.js";
6
6
  import { OptimisticLockException } from "./shared.js";
7
7
  import * as simpledb from "./simpledb.js";
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, unknown, {
9
- find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache | RDecode | MongoClient, unknown, import("effect/Option").Option<A>>;
10
- findBy: (keys: Record<string, string>) => import("effect/Effect").Effect<MongoClient, unknown, import("effect/Option").Option<TKey>>;
11
- save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache | REncode | MongoClient, OptimisticLockException, A>;
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<MongoClient, unknown, {
9
+ find: (id: string) => import("effect").Effect<simpledb.RecordCache | RDecode | MongoClient, unknown, import("effect").Option<A>>;
10
+ findBy: (keys: Record<string, string>) => import("effect").Effect<MongoClient, unknown, import("effect").Option<TKey>>;
11
+ save: (record: A) => import("effect").Effect<simpledb.RecordCache | REncode | MongoClient, OptimisticLockException, A>;
12
12
  }>;
13
13
  //# sourceMappingURL=mongodb.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<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index) => {
9
- find: (id: string) => import("effect/Effect").Effect<RedisClient | simpledb.RecordCache | RDecode, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
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<RedisClient | simpledb.RecordCache | REncode, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
9
+ find: (id: string) => import("effect").Effect<RedisClient | simpledb.RecordCache | RDecode, simpledb.InvalidStateError, import("effect").Option<A>>;
10
+ findByIndex: (index: Index) => import("effect").Effect<RedisClient, import("@effect-app/infra-adapters/redis-client").ConnectionException, import("effect").Option<TKey>>;
11
+ save: (record: A) => import("effect").Effect<RedisClient | simpledb.RecordCache | REncode, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, 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/Option.impl").None<any>, import("effect/Option.impl").None<any>>;
@@ -3,7 +3,7 @@ import { Effect } from "effect/Effect";
3
3
  import { Option } from "effect/Option";
4
4
  import * as MO from "@effect-app/schema";
5
5
  import type { SchemaAny } from "@effect-app/schema";
6
- declare const CouldNotAquireDbLockException_base: new <A extends Record<string, any>>(args: import("effect/Types.int").Equals<Omit<A, keyof import("effect/Equal")>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal") ? never : P]: A[P]; }) => import("effect/Data.int").YieldableError & {
6
+ declare const CouldNotAquireDbLockException_base: new <A extends Record<string, any>>(args: import("effect/Types.impl").Equals<Omit<A, keyof import("effect").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect").Equal ? never : P]: A[P]; }) => import("effect/Data.impl").YieldableError & {
7
7
  readonly _tag: "CouldNotAquireDbLockException";
8
8
  } & Readonly<A>;
9
9
  export declare class CouldNotAquireDbLockException extends CouldNotAquireDbLockException_base<{
@@ -14,7 +14,7 @@ export declare class CouldNotAquireDbLockException extends CouldNotAquireDbLockE
14
14
  }> {
15
15
  constructor(type: string, id: string, error: Error);
16
16
  }
17
- declare const OptimisticLockException_base: new <A extends Record<string, any>>(args: import("effect/Types.int").Equals<Omit<A, keyof import("effect/Equal")>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal") ? never : P]: A[P]; }) => import("effect/Data.int").YieldableError & {
17
+ declare const OptimisticLockException_base: new <A extends Record<string, any>>(args: import("effect/Types.impl").Equals<Omit<A, keyof import("effect").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect").Equal ? never : P]: A[P]; }) => import("effect/Data.impl").YieldableError & {
18
18
  readonly _tag: "OptimisticLockException";
19
19
  } & Readonly<A>;
20
20
  export declare class OptimisticLockException extends OptimisticLockException_base<{
@@ -24,7 +24,7 @@ export declare class OptimisticLockException extends OptimisticLockException_bas
24
24
  }> {
25
25
  constructor(type: string, id: string);
26
26
  }
27
- declare const ConnectionException_base: new <A extends Record<string, any>>(args: import("effect/Types.int").Equals<Omit<A, keyof import("effect/Equal")>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect/Equal") ? never : P]: A[P]; }) => import("effect/Data.int").YieldableError & {
27
+ declare const ConnectionException_base: new <A extends Record<string, any>>(args: import("effect/Types.impl").Equals<Omit<A, keyof import("effect").Equal>, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" | keyof import("effect").Equal ? never : P]: A[P]; }) => import("effect/Data.impl").YieldableError & {
28
28
  readonly _tag: "ConnectionException";
29
29
  } & Readonly<A>;
30
30
  export declare class ConnectionException extends ConnectionException_base<{
@@ -11,13 +11,13 @@ export declare class InvalidStateError {
11
11
  constructor(message: string, details?: unknown);
12
12
  }
13
13
  export declare function makeLiveRecordCache(): {
14
- get: <T>(type: string) => import("effect/Effect").Effect<never, never, EffectMap<string, CachedRecord<T>>>;
14
+ get: <T>(type: string) => import("effect").Effect<never, never, EffectMap<string, CachedRecord<T>>>;
15
15
  };
16
16
  export interface RecordCache extends ReturnType<typeof makeLiveRecordCache> {
17
17
  }
18
- export declare const RecordCache: import("effect/Context.int").Tag<RecordCache, RecordCache>;
19
- export declare const LiveRecordCache: import("effect/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<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")>, OptimisticLockException | InvalidStateError | E | E2, A>;
18
+ export declare const RecordCache: import("effect/Context.impl").Tag<RecordCache, RecordCache>;
19
+ export declare const LiveRecordCache: import("effect").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<RecordCache | R | RDecode, InvalidStateError | E, import("effect").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<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<RecordCache | R | Exclude<R2, import("effect").Scope>, OptimisticLockException | InvalidStateError | E | E2, A>;
23
23
  //# sourceMappingURL=simpledb.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"simpledb.d.ts","sourceRoot":"","sources":["../../../_src/services/simpledb/simpledb.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACpE,OAAO,EAAW,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAE9D,MAAM,MAAM,OAAO,GAAG,MAAM,CAAA;AAC5B,qBAAa,iBAAiB;IAEhB,QAAQ,CAAC,OAAO,EAAE,MAAM;IAAE,QAAQ,CAAC,OAAO,CAAC;IADvD,QAAQ,CAAC,IAAI,uBAAsB;gBACd,OAAO,EAAE,MAAM,EAAW,OAAO,CAAC,SAAS;CACjE;AAED,wBAAgB,mBAAmB;mBAGhB,MAAM;EAWxB;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAG9E,eAAO,MAAM,WAAW,4DAAqB,CAAA;AAE7C,eAAO,MAAM,eAAe,mDAAgE,CAAA;AAQ5F,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAChD,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAC/D,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,EAC9C,IAAI,EAAE,MAAM,QAcA,MAAM,yHAOnB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AAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAC/D,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EACvE,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,EACrD,IAAI,EAAE,MAAM,YAGI,CAAC,6IA6BlB"}
@@ -1,6 +1,6 @@
1
1
  import * as tsplus_module_1 from "effect/Effect";
2
2
  import * as tsplus_module_2 from "effect/Context";
3
- import * as tsplus_module_3 from "effect/Layer.int";
3
+ import * as tsplus_module_3 from "effect/Layer.impl";
4
4
  import * as tsplus_module_4 from "effect/Effect.impl";
5
5
  import * as tsplus_module_5 from "@effect-app/core/EffectX";
6
6
  import * as tsplus_module_6 from "effect/Option";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/infra",
3
- "version": "0.84.0-next.0",
3
+ "version": "0.84.0-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -18,10 +18,10 @@
18
18
  "proper-lockfile": "^4.1.2",
19
19
  "pure-rand": "6.0.4",
20
20
  "redlock": "^4.2.0",
21
- "@effect-app/core": "0.68.0-next.0",
22
- "@effect-app/infra-adapters": "0.59.0-next.0",
23
- "@effect-app/prelude": "0.70.0-next.0",
24
- "@effect-app/schema": "0.62.0-next.0"
21
+ "@effect-app/core": "0.68.0-next.1",
22
+ "@effect-app/infra-adapters": "0.59.0-next.1",
23
+ "@effect-app/prelude": "0.70.0-next.1",
24
+ "@effect-app/schema": "0.62.0-next.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@babel/cli": "^7.23.0",