@effect-app/infra 1.1.0 → 1.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @effect-app/infra
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 93f53d4: update packages
8
+ - Updated dependencies [93f53d4]
9
+ - @effect-app/infra-adapters@1.0.8
10
+ - effect-app@1.0.6
11
+ - @effect-app/schema@1.0.6
12
+ - @effect-app/core@1.0.4
13
+
3
14
  ## 1.1.0
4
15
 
5
16
  ### Minor Changes
@@ -8,5 +8,5 @@ import type { HttpServerRequest, HttpServerResponse } from "effect-app/http";
8
8
  import type { RequestHandler } from "./base.js";
9
9
  import type { Middleware } from "./makeRequestHandler.js";
10
10
  export declare const RouteDescriptors: Context.Tag<Ref<RouteDescriptorAny[]>, Ref<RouteDescriptorAny[]>>;
11
- export declare function match<R, M, PathA extends Struct.Fields, CookieA extends Struct.Fields, QueryA extends Struct.Fields, BodyA extends Struct.Fields, HeaderA extends Struct.Fields, ReqA extends PathA & QueryA & BodyA, ResA extends Struct.Fields, ResE, MiddlewareE, PPath extends `/${string}`, R2, PR, RErr, CTX, Context, Config>(requestHandler: RequestHandler<R, M, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, ResE, PPath, CTX, Context, Config>, errorHandler: <R>(req: HttpServerRequest.ServerRequest, res: HttpServerResponse.ServerResponse, r2: Effect<HttpServerResponse.ServerResponse, ValidationError | MiddlewareE | ResE, R>) => Effect<HttpServerResponse.ServerResponse, never, Exclude<RErr | R, HttpServerRequest.ServerRequest | HttpRouter.RouteContext | Scope>>, middleware?: Middleware<R, M, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, ResE, MiddlewareE, PPath, R2, PR, CTX, Context, Config>): Effect.Effect<HttpRouter.Route<import("@effect/platform/Http/ServerError").RequestError, import("../../services/RequestContextContainer.js").RequestContextContainer | import("../../services/Store/ContextMapContainer.js").ContextMapContainer | import("@effect-app/infra-adapters/RequestFiberSet").RequestFiberSet | Exclude<R2, Scope.Scope | HttpServerRequest.ServerRequest | HttpRouter.RouteContext> | Exclude<RErr, Scope.Scope | HttpServerRequest.ServerRequest | HttpRouter.RouteContext> | Exclude<Exclude<Exclude<R, import("effect-app/utils").EnforceNonEmptyRecord<M>>, PR>, Scope.Scope | HttpServerRequest.ServerRequest | HttpRouter.RouteContext>>, never, never>;
11
+ export declare function match<R, M, PathA extends Struct.Fields, CookieA extends Struct.Fields, QueryA extends Struct.Fields, BodyA extends Struct.Fields, HeaderA extends Struct.Fields, ReqA extends PathA & QueryA & BodyA, ResA extends Struct.Fields, ResE, MiddlewareE, PPath extends `/${string}`, R2, PR, RErr, CTX, Context, Config>(requestHandler: RequestHandler<R, M, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, ResE, PPath, CTX, Context, Config>, errorHandler: <R>(req: HttpServerRequest.ServerRequest, res: HttpServerResponse.ServerResponse, r2: Effect<HttpServerResponse.ServerResponse, ValidationError | MiddlewareE | ResE, R>) => Effect<HttpServerResponse.ServerResponse, never, Exclude<RErr | R, HttpServerRequest.ServerRequest | HttpRouter.RouteContext | Scope>>, middleware?: Middleware<R, M, PathA, CookieA, QueryA, BodyA, HeaderA, ReqA, ResA, ResE, MiddlewareE, PPath, R2, PR, CTX, Context, Config>): Effect.Effect<HttpRouter.Route<import("@effect/platform/Http/ServerError").RequestError, import("../../services/RequestContextContainer.js").RequestContextContainer | import("@effect-app/infra-adapters/RequestFiberSet").RequestFiberSet | import("../../services/Store/ContextMapContainer.js").ContextMapContainer | Exclude<R2, Scope.Scope | HttpServerRequest.ServerRequest | HttpRouter.RouteContext> | Exclude<RErr, Scope.Scope | HttpServerRequest.ServerRequest | HttpRouter.RouteContext> | Exclude<Exclude<Exclude<R, import("effect-app/utils").EnforceNonEmptyRecord<M>>, PR>, Scope.Scope | HttpServerRequest.ServerRequest | HttpRouter.RouteContext>>, never, never>;
12
12
  //# sourceMappingURL=match.d.ts.map
@@ -47,7 +47,7 @@ declare const Operations_base: (abstract new (service: {
47
47
  all: Effect.Effect<Operation[], never, never>;
48
48
  find: (id: StringId) => Effect.Effect<Option.Option<Operation>, never, never>;
49
49
  update: (id: StringId, progress: OperationProgress) => Effect.Effect<void, never, never>;
50
- }) => X) => X extends Effect<infer A_3, infer E_5, infer R_5> ? Effect<A_3, E_5, R_5 | Operations> : Effect<X, never, Operations>;
50
+ }) => X) => X extends Effect<infer A_3, infer E_5, infer R_5> ? Effect<A_3, E_5, Operations | R_5> : Effect<X, never, Operations>;
51
51
  };
52
52
  export declare class Operations extends Operations_base {
53
53
  private static readonly CleanupLive;
@@ -16,13 +16,13 @@ export declare const QueueMaker: QueueMakerOps;
16
16
  export declare const QueueMeta: import("@effect/schema/Schema").Struct<{
17
17
  requestContext: typeof RequestContext;
18
18
  span: S.PropertySignature<"?:", {
19
- readonly sampled: boolean;
20
19
  readonly spanId: string;
21
20
  readonly traceId: string;
22
- } | undefined, never, "?:", {
23
21
  readonly sampled: boolean;
22
+ } | undefined, never, "?:", {
24
23
  readonly spanId: string;
25
24
  readonly traceId: string;
25
+ readonly sampled: boolean;
26
26
  } | undefined, false, never>;
27
27
  }>;
28
28
  //# sourceMappingURL=service.d.ts.map
@@ -145,7 +145,7 @@ export declare function makeRepo<Evt = never>(): <ItemType extends string, R, En
145
145
  config?: Omit<StoreConfig<Encoded>, "partitionValue"> & {
146
146
  partitionValue?: (a: Encoded) => string;
147
147
  };
148
- }) => Effect.Effect<Repository<T, Encoded, Evt, ItemType>, E, StoreMaker | ContextMapContainer | R | RInitial | R2>;
148
+ }) => Effect.Effect<Repository<T, Encoded, Evt, ItemType>, E, ContextMapContainer | StoreMaker | R | RInitial | R2>;
149
149
  Q: Query<Encoded>;
150
150
  };
151
151
  export declare function makeStore<Encoded extends {
@@ -25,7 +25,7 @@ declare const RequestContextContainer_base: (abstract new (service: {
25
25
  requestContext: Effect<RequestContext>;
26
26
  update: (f: (rc: RequestContext) => RequestContext) => Effect<RequestContext>;
27
27
  start: (f: RequestContext) => Effect<void>;
28
- }) => X) => X extends Effect<infer A_3, infer E_4, infer R_4> ? Effect<A_3, E_4, R_4 | RequestContextContainer> : Effect<X, never, RequestContextContainer>;
28
+ }) => X) => X extends Effect<infer A_3, infer E_4, infer R_4> ? Effect<A_3, E_4, RequestContextContainer | R_4> : Effect<X, never, RequestContextContainer>;
29
29
  };
30
30
  /**
31
31
  * @tsplus type RequestContextContainer
@@ -88,7 +88,7 @@ declare const StoreMaker_base: (abstract new (service: {
88
88
  make: <Encoded extends {
89
89
  id: Id;
90
90
  }, Id extends string, R = never, E = never>(name: string, seed?: Effect<Iterable<Encoded>, E, R> | undefined, config?: StoreConfig<Encoded> | undefined) => Effect<Store<Encoded, Id, PersistenceModelType<Encoded>>, E, R>;
91
- }) => X) => X extends Effect<infer A_3, infer E_4, infer R_4> ? Effect<A_3, E_4, StoreMaker | R_4> : Effect<X, never, StoreMaker>;
91
+ }) => X) => X extends Effect<infer A_3, infer E_4, infer R_4> ? Effect<A_3, E_4, R_4 | StoreMaker> : Effect<X, never, StoreMaker>;
92
92
  };
93
93
  /**
94
94
  * @tsplus type StoreMaker
@@ -127,7 +127,7 @@ declare const ContextMap_base: (abstract new (service: {
127
127
  use: <X>(body: (_: {
128
128
  get: (id: string) => string | undefined;
129
129
  set: (id: string, eTag: string | undefined) => void;
130
- }) => X) => X extends Effect<infer A_3, infer E_5, infer R_5> ? Effect<A_3, E_5, ContextMap | R_5> : Effect<X, never, ContextMap>;
130
+ }) => X) => X extends Effect<infer A_3, infer E_5, infer R_5> ? Effect<A_3, E_5, R_5 | ContextMap> : Effect<X, never, ContextMap>;
131
131
  };
132
132
  /**
133
133
  * @tsplus type ContextMap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/infra",
3
- "version": "1.1.0",
3
+ "version": "1.1.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.1.0",
20
20
  "redlock": "^4.2.0",
21
- "@effect-app/core": "1.0.3",
22
- "@effect-app/schema": "1.0.5",
23
- "@effect-app/infra-adapters": "1.0.7",
24
- "effect-app": "1.0.5"
21
+ "@effect-app/core": "1.0.4",
22
+ "@effect-app/infra-adapters": "1.0.8",
23
+ "effect-app": "1.0.6",
24
+ "@effect-app/schema": "1.0.6"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@babel/cli": "^7.24.1",
@@ -42,8 +42,8 @@
42
42
  },
43
43
  "peerDependencies": {
44
44
  "express": "^4.19.2",
45
- "@effect/platform": "^0.50.2",
46
- "@effect/schema": "^0.66.5",
45
+ "@effect/platform": "^0.50.3",
46
+ "@effect/schema": "^0.66.6",
47
47
  "effect": "^3.0.3"
48
48
  },
49
49
  "typesVersions": {
@@ -1,37 +0,0 @@
1
- // packages/infra/vitest.config.ts
2
- import { defineConfig } from "file:///Users/patrickroza/pj/effect-app/libs/node_modules/.pnpm/vite@5.2.6_@types+node@20.11.30/node_modules/vite/dist/node/index.js";
3
-
4
- // vite.config.base.ts
5
- import path from "path";
6
- import fs from "fs";
7
- var __vite_injected_original_dirname = "/Users/patrickroza/pj/effect-app/libs";
8
- function makeConfig(dirName) {
9
- const prefix = path.resolve(__vite_injected_original_dirname, "packages");
10
- const packages = fs.readdirSync(prefix).map((f) => prefix + "/" + f).filter((f) => fs.lstatSync(f).isDirectory());
11
- const cfg = {
12
- // eslint-disable-next-line @typescript-eslint/no-var-requires
13
- //plugins: [autoImport],
14
- test: {
15
- include: ["./test/**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
16
- reporters: "verbose",
17
- globals: true
18
- },
19
- resolve: {
20
- alias: packages.reduce((acc, cur) => {
21
- acc[JSON.parse(fs.readFileSync(cur + "/package.json", "utf-8")).name] = path.resolve(cur, cur.endsWith("core") ? "dist" : "src");
22
- return acc;
23
- }, {})
24
- // "@effect-app/core/Prelude": path.join(__dirname, "packages/core/src/Prelude.code.ts")
25
- }
26
- };
27
- console.log(cfg);
28
- return cfg;
29
- }
30
-
31
- // packages/infra/vitest.config.ts
32
- var __vite_injected_original_dirname2 = "/Users/patrickroza/pj/effect-app/libs/packages/infra";
33
- var vitest_config_default = defineConfig(makeConfig(__vite_injected_original_dirname2));
34
- export {
35
- vitest_config_default as default
36
- };
37
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsicGFja2FnZXMvaW5mcmEvdml0ZXN0LmNvbmZpZy50cyIsICJ2aXRlLmNvbmZpZy5iYXNlLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiL1VzZXJzL3BhdHJpY2tyb3phL3BqL2VmZmVjdC1hcHAvbGlicy9wYWNrYWdlcy9pbmZyYVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiL1VzZXJzL3BhdHJpY2tyb3phL3BqL2VmZmVjdC1hcHAvbGlicy9wYWNrYWdlcy9pbmZyYS92aXRlc3QuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9Vc2Vycy9wYXRyaWNrcm96YS9wai9lZmZlY3QtYXBwL2xpYnMvcGFja2FnZXMvaW5mcmEvdml0ZXN0LmNvbmZpZy50c1wiOy8vLyA8cmVmZXJlbmNlIHR5cGVzPVwidml0ZXN0XCIgLz5cbmltcG9ydCB7IGRlZmluZUNvbmZpZyB9IGZyb20gXCJ2aXRlXCJcbmltcG9ydCBtYWtlQ29uZmlnIGZyb20gXCIuLi8uLi92aXRlLmNvbmZpZy5iYXNlXCJcblxuZXhwb3J0IGR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