@effect-app/infra 4.0.0-beta.266 → 4.0.0-beta.268

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 (62) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/ClusterCosmos.d.ts +16 -16
  3. package/dist/Store/Cosmos.d.ts +1 -1
  4. package/dist/Store/Cosmos.d.ts.map +1 -1
  5. package/dist/Store/Cosmos.js +64 -31
  6. package/dist/Store/Disk.d.ts +2 -2
  7. package/dist/Store/Disk.d.ts.map +1 -1
  8. package/dist/Store/Disk.js +2 -2
  9. package/dist/Store/Memory.d.ts +2 -3
  10. package/dist/Store/Memory.d.ts.map +1 -1
  11. package/dist/Store/Memory.js +3 -6
  12. package/dist/Store/SQL.d.ts +1 -1
  13. package/dist/Store/SQL.d.ts.map +1 -1
  14. package/dist/Store/SQL.js +14 -7
  15. package/dist/Store/codeFilter.d.ts +1 -1
  16. package/dist/Store/codeFilter.d.ts.map +1 -1
  17. package/dist/Store/codeFilter.js +2 -3
  18. package/dist/Store/index.js +1 -1
  19. package/dist/Store/utils.d.ts +3 -1
  20. package/dist/Store/utils.d.ts.map +1 -1
  21. package/dist/Store/utils.js +5 -1
  22. package/dist/WorkflowEngineCosmos.d.ts +1 -1
  23. package/dist/routing/middleware.d.ts +2 -2
  24. package/package.json +3 -3
  25. package/src/CUPS.ts +1 -1
  26. package/src/ClusterCosmos.ts +2 -2
  27. package/src/ContextProvider.ts +1 -1
  28. package/src/Emailer/Sendgrid.ts +1 -1
  29. package/src/Emailer/fake.ts +1 -1
  30. package/src/MainFiberSet.ts +3 -3
  31. package/src/QueueMaker/SQLQueue.ts +3 -3
  32. package/src/QueueMaker/memQueue.ts +4 -4
  33. package/src/QueueMaker/sbqueue.ts +4 -4
  34. package/src/RequestFiberSet.ts +2 -2
  35. package/src/SQL/Model.ts +1 -1
  36. package/src/SQL.ts +1 -1
  37. package/src/ServiceBus.ts +1 -1
  38. package/src/Store/Cosmos/query.ts +2 -2
  39. package/src/Store/Cosmos.ts +88 -64
  40. package/src/Store/Disk.ts +6 -4
  41. package/src/Store/Memory.ts +5 -8
  42. package/src/Store/SQL/Pg.ts +5 -5
  43. package/src/Store/SQL/query.ts +2 -2
  44. package/src/Store/SQL.ts +23 -12
  45. package/src/Store/codeFilter.ts +1 -2
  46. package/src/Store/index.test.ts.bak +2 -2
  47. package/src/Store/index.ts +6 -6
  48. package/src/Store/utils.ts +6 -1
  49. package/src/WorkflowEngineCosmos.ts +3 -3
  50. package/src/WorkflowEngineSqlite.ts +2 -2
  51. package/src/errorReporter.ts +2 -2
  52. package/src/index.ts +2 -2
  53. package/src/internal/events.ts +1 -1
  54. package/src/layerUtils.ts +1 -1
  55. package/src/logger/jsonLogger.ts +1 -1
  56. package/src/logger/logFmtLogger.ts +1 -1
  57. package/src/middlewares.ts +4 -4
  58. package/src/reportError.ts +1 -1
  59. package/src/routing/middleware/middleware.ts +3 -3
  60. package/src/routing.ts +3 -3
  61. package/src/test.ts +2 -2
  62. package/src/vitest.ts +1 -1
@@ -47,8 +47,8 @@ import { SqlClient } from "effect/unstable/sql"
47
47
  import * as Workflow from "effect/unstable/workflow/Workflow"
48
48
  import { type Encoded, makeUnsafe, WorkflowEngine, WorkflowInstance } from "effect/unstable/workflow/WorkflowEngine"
49
49
  import { randomUUID } from "node:crypto"
50
- import { OptimisticConcurrencyException } from "./errors.js"
51
- import { annotateDb } from "./otel.js"
50
+ import { OptimisticConcurrencyException } from "./errors.ts"
51
+ import { annotateDb } from "./otel.ts"
52
52
 
53
53
  export interface WorkflowEngineSqliteConfig {
54
54
  /** Optional prefix for table names (e.g. `tenant_`). */
@@ -4,8 +4,8 @@ import { getRC } from "effect-app/setupRequest"
4
4
  import { dropUndefined, LogLevelToSentry } from "effect-app/utils"
5
5
  import * as Cause from "effect/Cause"
6
6
  import type * as LogLevel from "effect/LogLevel"
7
- import { CauseException, tryToJson, tryToReport } from "./errors.js"
8
- import { InfraLogger } from "./logger.js"
7
+ import { CauseException, tryToJson, tryToReport } from "./errors.ts"
8
+ import { InfraLogger } from "./logger.ts"
9
9
 
10
10
  const tryCauseException = <E>(cause: Cause.Cause<E>, name: string): CauseException<E> => {
11
11
  try {
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./logger.js"
2
- export * from "./Store/index.js"
1
+ export * from "./logger.ts"
2
+ export * from "./Store/index.ts"
@@ -7,7 +7,7 @@ import * as Duration from "effect/Duration"
7
7
  import { pipe } from "effect/Function"
8
8
  import * as Schedule from "effect/Schedule"
9
9
  import * as Stream from "effect/Stream"
10
- import { reportError } from "../errorReporter.js"
10
+ import { reportError } from "../errorReporter.ts"
11
11
 
12
12
  // Tell the client to retry every 10 seconds if connectivity is lost
13
13
  const setRetry = Stream.succeed("retry: 10000")
package/src/layerUtils.ts CHANGED
@@ -4,7 +4,7 @@ import * as Context from "effect-app/Context"
4
4
  import * as Effect from "effect-app/Effect"
5
5
  import type * as Layer from "effect-app/Layer"
6
6
  import * as Option from "effect-app/Option"
7
- import { InfraLogger } from "./logger.js"
7
+ import { InfraLogger } from "./logger.ts"
8
8
 
9
9
  // TODO: These LayerUtils are flaky, like in dependencies as a readonly array, it breaks when there are two entries
10
10
  // we should look at Service.MakeDeps[E/RIn/ROut] etc.
@@ -3,7 +3,7 @@ import { spanAttributes } from "effect-app/RequestContext"
3
3
  import * as Cause from "effect/Cause"
4
4
  import * as Logger from "effect/Logger"
5
5
  import { CurrentLogAnnotations, CurrentLogSpans } from "effect/References"
6
- import { getRequestContextFromFiber } from "./shared.js"
6
+ import { getRequestContextFromFiber } from "./shared.ts"
7
7
 
8
8
  export const jsonLogger = Logger.make<unknown, void>(
9
9
  ({ cause, date, fiber, logLevel, message }) => {
@@ -1,6 +1,6 @@
1
1
  import { spanAttributes } from "effect-app/RequestContext"
2
2
  import * as Logger from "effect/Logger"
3
- import { getRequestContextFromFiber } from "./shared.js"
3
+ import { getRequestContextFromFiber } from "./shared.ts"
4
4
 
5
5
  export const logfmtLogger = Logger.make<unknown, void>(
6
6
  (options) => {
@@ -4,7 +4,7 @@
4
4
  * @since 1.0.0
5
5
  */
6
6
 
7
- export * from "./internal/auth.js"
8
- export * from "./internal/events.js"
9
- export * from "./internal/health.js"
10
- export * from "./internal/RequestContextMiddleware.js"
7
+ export * from "./internal/auth.ts"
8
+ export * from "./internal/events.ts"
9
+ export * from "./internal/health.ts"
10
+ export * from "./internal/RequestContextMiddleware.ts"
@@ -1,6 +1,6 @@
1
1
  import * as Effect from "effect-app/Effect"
2
2
  import * as Cause from "effect/Cause"
3
- import { logError, reportError } from "./errorReporter.js"
3
+ import { logError, reportError } from "./errorReporter.ts"
4
4
 
5
5
  // const onExitReportError = (name: string, unknownOnly?: boolean) => {
6
6
  // const report = reportError(name)
@@ -10,9 +10,9 @@ import * as Effect from "effect/Effect"
10
10
  import * as Layer from "effect/Layer"
11
11
  import * as Schema from "effect/Schema"
12
12
  import { type Rpc } from "effect/unstable/rpc"
13
- import { logError, reportError } from "../../errorReporter.js"
14
- import { InfraLogger } from "../../logger.js"
15
- import { WithNsTransaction } from "../../Store/SQL.js"
13
+ import { logError, reportError } from "../../errorReporter.ts"
14
+ import { InfraLogger } from "../../logger.ts"
15
+ import { WithNsTransaction } from "../../Store/SQL.ts"
16
16
 
17
17
  const logRequestError = logError("Request")
18
18
  const reportRequestError = reportError("Request")
package/src/routing.ts CHANGED
@@ -18,10 +18,10 @@ import * as Ref from "effect/Ref"
18
18
  import type * as Scope from "effect/Scope"
19
19
  import * as Stream from "effect/Stream"
20
20
  import { Rpc, RpcGroup, type RpcSerialization, RpcServer } from "effect/unstable/rpc"
21
- import { type LayerUtils } from "./layerUtils.js"
22
- import { RequestType as RequestTypeAnnotation } from "./routing/middleware.js"
21
+ import { type LayerUtils } from "./layerUtils.ts"
22
+ import { RequestType as RequestTypeAnnotation } from "./routing/middleware.ts"
23
23
 
24
- export * from "./routing/middleware.js"
24
+ export * from "./routing/middleware.ts"
25
25
 
26
26
  export const applyRequestTypeInterruptibility = <A, E, R>(
27
27
  requestType: "command" | "query",
package/src/test.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as S from "effect-app/Schema"
2
2
  import { copy } from "effect-app/utils"
3
- import { generate } from "./arbs.js"
3
+ import { generate } from "./arbs.ts"
4
4
 
5
5
  /**
6
6
  * Given the schema for an object-like structure, creates a function that generates random instances of that object with some values provided.
@@ -27,4 +27,4 @@ export const createRandomInstanceI = <A extends object, I>(s: S.Codec<A, I> & {
27
27
  }
28
28
  }
29
29
 
30
- export * from "./arbs.js"
30
+ export * from "./arbs.ts"
package/src/vitest.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from "@effect/vitest"
2
- export * from "./test.js"
2
+ export * from "./test.ts"