effect-app 0.175.1 → 0.176.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,25 @@
1
1
  # @effect-app/prelude
2
2
 
3
+ ## 0.176.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0b514ad]
8
+ - @effect-app/schema@0.201.1
9
+
10
+ ## 0.176.0
11
+
12
+ ### Minor Changes
13
+
14
+ - e8e8ee2: update packages
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [e8e8ee2]
19
+ - @effect-app/fluent-extensions@0.142.0
20
+ - @effect-app/schema@0.201.0
21
+ - @effect-app/core@0.149.0
22
+
3
23
  ## 0.175.1
4
24
 
5
25
  ### Patch Changes
@@ -1,15 +1,15 @@
1
1
  import { S } from "../lib.js";
2
2
  declare const NotFoundError_base: import("@effect/schema/Schema").Class<{
3
3
  readonly _tag: "NotFoundError";
4
- readonly id: unknown;
5
4
  readonly type: string;
5
+ readonly id: unknown;
6
6
  }, {
7
7
  readonly _tag: "NotFoundError";
8
- readonly id: unknown;
9
8
  readonly type: string;
10
- }, never, {
11
9
  readonly id: unknown;
10
+ }, never, {
12
11
  readonly type: string;
12
+ readonly id: unknown;
13
13
  }, NotFoundError<ItemType>, {
14
14
  type: S.Schema<string, string, never>;
15
15
  id: S.Schema<unknown, unknown, never>;
@@ -130,16 +130,16 @@ export declare class OptimisticConcurrencyException extends OptimisticConcurrenc
130
130
  message: string;
131
131
  }, disableValidation?: boolean);
132
132
  }
133
- export declare const SupportedErrors: S.Schema<NotFoundError<ItemType> | InvalidStateError | ValidationError | NotLoggedInError | LoginError | UnauthorizedError | OptimisticConcurrencyException, {
134
- readonly _tag: "NotFoundError";
135
- readonly id: unknown;
136
- readonly type: string;
137
- } | {
133
+ export declare const SupportedErrors: S.Schema<InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | LoginError | UnauthorizedError | ValidationError, {
138
134
  readonly _tag: "InvalidStateError";
139
135
  readonly message: string;
140
136
  } | {
141
- readonly _tag: "ValidationError";
142
- readonly errors: readonly unknown[];
137
+ readonly _tag: "OptimisticConcurrencyException";
138
+ readonly message: string;
139
+ } | {
140
+ readonly _tag: "NotFoundError";
141
+ readonly type: string;
142
+ readonly id: unknown;
143
143
  } | {
144
144
  readonly _tag: "NotLoggedInError";
145
145
  readonly message?: string | undefined;
@@ -150,20 +150,20 @@ export declare const SupportedErrors: S.Schema<NotFoundError<ItemType> | Invalid
150
150
  readonly _tag: "UnauthorizedError";
151
151
  readonly message?: string | undefined;
152
152
  } | {
153
- readonly _tag: "OptimisticConcurrencyException";
154
- readonly message: string;
153
+ readonly _tag: "ValidationError";
154
+ readonly errors: readonly unknown[];
155
155
  }, never>;
156
156
  export type SupportedErrors = S.Schema.To<typeof SupportedErrors>;
157
- export declare const MutationErrors: S.Schema<NotFoundError<ItemType> | InvalidStateError | ValidationError | NotLoggedInError | LoginError | UnauthorizedError | OptimisticConcurrencyException, {
158
- readonly _tag: "NotFoundError";
159
- readonly id: unknown;
160
- readonly type: string;
161
- } | {
157
+ export declare const MutationErrors: S.Schema<InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | LoginError | UnauthorizedError | ValidationError, {
162
158
  readonly _tag: "InvalidStateError";
163
159
  readonly message: string;
164
160
  } | {
165
- readonly _tag: "ValidationError";
166
- readonly errors: readonly unknown[];
161
+ readonly _tag: "OptimisticConcurrencyException";
162
+ readonly message: string;
163
+ } | {
164
+ readonly _tag: "NotFoundError";
165
+ readonly type: string;
166
+ readonly id: unknown;
167
167
  } | {
168
168
  readonly _tag: "NotLoggedInError";
169
169
  readonly message?: string | undefined;
@@ -174,19 +174,19 @@ export declare const MutationErrors: S.Schema<NotFoundError<ItemType> | InvalidS
174
174
  readonly _tag: "UnauthorizedError";
175
175
  readonly message?: string | undefined;
176
176
  } | {
177
- readonly _tag: "OptimisticConcurrencyException";
178
- readonly message: string;
177
+ readonly _tag: "ValidationError";
178
+ readonly errors: readonly unknown[];
179
179
  }, never>;
180
- export declare const QueryErrors: S.Schema<NotFoundError<ItemType> | InvalidStateError | ValidationError | NotLoggedInError | LoginError | UnauthorizedError | OptimisticConcurrencyException, {
181
- readonly _tag: "NotFoundError";
182
- readonly id: unknown;
183
- readonly type: string;
184
- } | {
180
+ export declare const QueryErrors: S.Schema<InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | LoginError | UnauthorizedError | ValidationError, {
185
181
  readonly _tag: "InvalidStateError";
186
182
  readonly message: string;
187
183
  } | {
188
- readonly _tag: "ValidationError";
189
- readonly errors: readonly unknown[];
184
+ readonly _tag: "OptimisticConcurrencyException";
185
+ readonly message: string;
186
+ } | {
187
+ readonly _tag: "NotFoundError";
188
+ readonly type: string;
189
+ readonly id: unknown;
190
190
  } | {
191
191
  readonly _tag: "NotLoggedInError";
192
192
  readonly message?: string | undefined;
@@ -197,8 +197,8 @@ export declare const QueryErrors: S.Schema<NotFoundError<ItemType> | InvalidStat
197
197
  readonly _tag: "UnauthorizedError";
198
198
  readonly message?: string | undefined;
199
199
  } | {
200
- readonly _tag: "OptimisticConcurrencyException";
201
- readonly message: string;
200
+ readonly _tag: "ValidationError";
201
+ readonly errors: readonly unknown[];
202
202
  }, never>;
203
203
  export type MutationErrors = S.Schema.To<typeof MutationErrors>;
204
204
  export type QueryErrors = S.Schema.To<typeof QueryErrors>;
@@ -16,12 +16,12 @@ export declare function fetchApi(method: Method, path: string, body?: unknown):
16
16
  status: number;
17
17
  body: unknown;
18
18
  headers: import("@effect/platform/Http/Headers").Headers;
19
- } | FetchResponse<unknown>, NotFoundError<ItemType> | InvalidStateError | ValidationError | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | OptimisticConcurrencyException | HttpRequestError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, ApiConfig | HttpClient.Client.Default>;
19
+ } | FetchResponse<unknown>, HttpRequestError | InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | ValidationError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, HttpClient.Client.Default | ApiConfig>;
20
20
  export declare function fetchApi2S<RequestR, RequestFrom, RequestTo, ResponseR, ResponseFrom, ResponseTo>(request: Schema<RequestTo, RequestFrom, RequestR>, response: Schema<ResponseTo, ResponseFrom, ResponseR>): (method: Method, path: Path) => (req: RequestTo) => Effect.Effect<{
21
21
  body: ResponseTo;
22
22
  headers: Headers;
23
23
  status: number;
24
- }, S.ParseResult.ParseError | NotFoundError<ItemType> | InvalidStateError | ValidationError | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | OptimisticConcurrencyException | HttpRequestError | ResError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, ApiConfig | HttpClient.Client.Default | RequestR | ResponseR>;
24
+ }, S.ParseResult.ParseError | HttpRequestError | ResError | InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | ValidationError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, HttpClient.Client.Default | ApiConfig | RequestR | ResponseR>;
25
25
  export declare function fetchApi3S<RequestA, RequestE, ResponseE = unknown, ResponseA = void>({ Request, Response }: {
26
26
  Request: REST.RequestSchemed<RequestA, RequestE>;
27
27
  Response: REST.ReqRes<ResponseA, ResponseE, any>;
@@ -29,11 +29,11 @@ export declare function fetchApi3S<RequestA, RequestE, ResponseE = unknown, Resp
29
29
  body: ResponseA;
30
30
  headers: Headers;
31
31
  status: number;
32
- }, S.ParseResult.ParseError | NotFoundError<ItemType> | InvalidStateError | ValidationError | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | OptimisticConcurrencyException | HttpRequestError | ResError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, any>;
32
+ }, S.ParseResult.ParseError | HttpRequestError | ResError | InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | ValidationError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, any>;
33
33
  export declare function fetchApi3SE<RequestA, RequestE, ResponseE = unknown, ResponseA = void>({ Request, Response }: {
34
34
  Request: REST.RequestSchemed<RequestA, RequestE>;
35
35
  Response: REST.ReqRes<ResponseA, ResponseE, any>;
36
- }): (req: RequestA) => Effect.Effect<FetchResponse<ResponseE>, S.ParseResult.ParseError | NotFoundError<ItemType> | InvalidStateError | ValidationError | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | OptimisticConcurrencyException | HttpRequestError | ResError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, any>;
36
+ }): (req: RequestA) => Effect.Effect<FetchResponse<ResponseE>, S.ParseResult.ParseError | HttpRequestError | ResError | InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | ValidationError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, any>;
37
37
  export declare function makePathWithQuery(path: Path, pars: Record<string, string | number | boolean | readonly string[] | readonly number[] | readonly boolean[] | null>): string;
38
38
  export declare function makePathWithBody(path: Path, pars: Record<string, string | number | boolean | readonly string[] | readonly number[] | readonly boolean[] | null>): string;
39
39
  export declare function mapResponse<T, A>(map: (t: T) => A): (r: FetchResponse<T>) => FetchResponse<A>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effect-app",
3
- "version": "0.175.1",
3
+ "version": "0.176.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -13,26 +13,26 @@
13
13
  "ts-pattern": "^5.0.8",
14
14
  "uuid": "^9.0.1",
15
15
  "validator": "^13.11.0",
16
- "@effect-app/core": "0.148.0",
17
- "@effect-app/fluent-extensions": "0.141.0",
18
- "@effect-app/schema": "0.200.0"
16
+ "@effect-app/core": "0.149.0",
17
+ "@effect-app/schema": "0.201.1",
18
+ "@effect-app/fluent-extensions": "0.142.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@babel/cli": "^7.23.9",
22
22
  "@faker-js/faker": "^8.4.1",
23
- "@types/node": "~20.11.20",
23
+ "@types/node": "~20.11.21",
24
24
  "@types/uuid": "^9.0.8",
25
25
  "@types/validator": "^13.11.9",
26
26
  "fast-check": "~3.15.1",
27
27
  "ts-node": "^10.9.2",
28
28
  "typescript": "^5.3.3",
29
29
  "vitest": "^1.3.1",
30
- "@effect-app/compiler": "0.69.0"
30
+ "@effect-app/compiler": "0.70.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@effect/platform": "^0.46.1",
33
+ "@effect/platform": "^0.46.2",
34
34
  "effect": "^2.4.0",
35
- "@effect/schema": "^0.63.0",
35
+ "@effect/schema": "^0.63.1",
36
36
  "@fp-ts/optic": "0.22.0"
37
37
  },
38
38
  "typesVersions": {
@@ -1,23 +0,0 @@
1
- // vitest.config.ts
2
- import { defineConfig } from "file:///Users/patrickroza/Projects/Personal/effect-ts-app/libs/node_modules/.pnpm/vite@4.0.0_@types+node@18.11.12/node_modules/vite/dist/node/index.js";
3
-
4
- // ../../vite.config.base.ts
5
- import { tsPlugin } from "file:///Users/patrickroza/Projects/Personal/effect-ts-app/libs/packages/compiler/dist/vitePlugin.js";
6
- function makeConfig() {
7
- return {
8
- plugins: [tsPlugin({})],
9
- test: {
10
- include: ["./_src/**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
11
- exclude: ["./_test/**/*"],
12
- reporters: "verbose",
13
- globals: true
14
- }
15
- };
16
- }
17
-
18
- // vitest.config.ts
19
- var vitest_config_default = defineConfig(makeConfig());
20
- export {
21
- vitest_config_default as default
22
- };
23
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZXN0LmNvbmZpZy50cyIsICIuLi8uLi92aXRlLmNvbm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