@effect-app/infra 4.0.0-beta.70 → 4.0.0-beta.72
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
|
+
## 4.0.0-beta.72
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0541f0d]
|
|
8
|
+
- effect-app@4.0.0-beta.72
|
|
9
|
+
|
|
10
|
+
## 4.0.0-beta.71
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- beae3a0: Remove `withDefaultConstructor` wrapper, use `S.withConstructorDefault` directly with `Effect.succeed`/`Effect.sync`.
|
|
15
|
+
- Updated dependencies [beae3a0]
|
|
16
|
+
- effect-app@4.0.0-beta.71
|
|
17
|
+
|
|
3
18
|
## 4.0.0-beta.70
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -18,19 +18,19 @@ export declare class ValidationError extends ValidationError_base {
|
|
|
18
18
|
declare const ValidationResult_base: S.EnhancedClass<ValidationResult, S.Struct<{
|
|
19
19
|
/** total number of items in the repository */
|
|
20
20
|
total: S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber"> & {
|
|
21
|
-
withDefault: S.withConstructorDefault<S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber"
|
|
21
|
+
withDefault: S.withConstructorDefault<S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">>;
|
|
22
22
|
};
|
|
23
23
|
/** number of items that were sampled for validation */
|
|
24
24
|
sampled: S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber"> & {
|
|
25
|
-
withDefault: S.withConstructorDefault<S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber"
|
|
25
|
+
withDefault: S.withConstructorDefault<S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">>;
|
|
26
26
|
};
|
|
27
27
|
/** number of items that passed validation */
|
|
28
28
|
valid: S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber"> & {
|
|
29
|
-
withDefault: S.withConstructorDefault<S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber"
|
|
29
|
+
withDefault: S.withConstructorDefault<S.WithDefaults<S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">> & S.brand<import("effect/Schema").Int, "NonNegativeInt" | "Int" | "NonNegativeNumber">>;
|
|
30
30
|
};
|
|
31
31
|
/** list of validation errors with full context */
|
|
32
32
|
errors: S.$Array<typeof ValidationError> & {
|
|
33
|
-
withDefault: S.withConstructorDefault<S.$Array<typeof ValidationError
|
|
33
|
+
withDefault: S.withConstructorDefault<S.$Array<typeof ValidationError>>;
|
|
34
34
|
};
|
|
35
35
|
}>, {}>;
|
|
36
36
|
/**
|
package/dist/RequestContext.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { Context, S } from "effect-app";
|
|
|
2
2
|
export declare const Locale: S.Literals<["en", "de"]> & {
|
|
3
3
|
changeDefault: <A extends "en" | "de">(a: A) => S.Literals<["en", "de"]> & {
|
|
4
4
|
Default: A;
|
|
5
|
-
withDefault: S.withConstructorDefault<S.Literals<["en", "de"]
|
|
5
|
+
withDefault: S.withConstructorDefault<S.Literals<["en", "de"]>>;
|
|
6
6
|
};
|
|
7
7
|
Default: "en";
|
|
8
|
-
withDefault: S.withConstructorDefault<S.Literals<["en", "de"]
|
|
8
|
+
withDefault: S.withConstructorDefault<S.Literals<["en", "de"]>>;
|
|
9
9
|
};
|
|
10
10
|
export type Locale = typeof Locale.Type;
|
|
11
11
|
declare const LocaleRef_base: Context.Reference<"en" | "de">;
|
|
@@ -16,17 +16,17 @@ declare const RequestContext_base: S.EnhancedClass<RequestContext, S.Struct<{
|
|
|
16
16
|
readonly traceId: S.String;
|
|
17
17
|
readonly spanId: S.String;
|
|
18
18
|
readonly sampled: import("effect/Schema").Boolean & {
|
|
19
|
-
withDefault: S.withConstructorDefault<import("effect/Schema").Boolean
|
|
19
|
+
withDefault: S.withConstructorDefault<import("effect/Schema").Boolean>;
|
|
20
20
|
};
|
|
21
21
|
}>;
|
|
22
22
|
name: S.WithDefaults<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString64k" | "NonEmptyString2k" | "NonEmptyString255">> & S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString64k" | "NonEmptyString2k" | "NonEmptyString255">;
|
|
23
23
|
locale: S.Literals<["en", "de"]> & {
|
|
24
24
|
changeDefault: <A extends "en" | "de">(a: A) => S.Literals<["en", "de"]> & {
|
|
25
25
|
Default: A;
|
|
26
|
-
withDefault: S.withConstructorDefault<S.Literals<["en", "de"]
|
|
26
|
+
withDefault: S.withConstructorDefault<S.Literals<["en", "de"]>>;
|
|
27
27
|
};
|
|
28
28
|
Default: "en";
|
|
29
|
-
withDefault: S.withConstructorDefault<S.Literals<["en", "de"]
|
|
29
|
+
withDefault: S.withConstructorDefault<S.Literals<["en", "de"]>>;
|
|
30
30
|
};
|
|
31
31
|
sourceId: S.optional<S.WithDefaults<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString64k" | "NonEmptyString2k" | "NonEmptyString255">> & S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString64k" | "NonEmptyString2k" | "NonEmptyString255">>;
|
|
32
32
|
namespace: S.WithDefaults<S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString64k" | "NonEmptyString2k" | "NonEmptyString255">> & S.brand<import("effect/Schema").NonEmptyString, "NonEmptyString" | "NonEmptyString64k" | "NonEmptyString2k" | "NonEmptyString255">;
|
package/examples/query.ts
CHANGED
|
@@ -12,7 +12,7 @@ export class Something extends S.TaggedClass<Something>()("Something", {
|
|
|
12
12
|
id: S.StringId.withDefault,
|
|
13
13
|
displayName: S.NonEmptyString255,
|
|
14
14
|
n: S.Date.withDefault,
|
|
15
|
-
union: someUnion.pipe(S.
|
|
15
|
+
union: someUnion.pipe(S.withConstructorDefault(Effect.succeed({ _tag: "string" as const, value: "hi" })))
|
|
16
16
|
}) {}
|
|
17
17
|
|
|
18
18
|
export class SomethingElse extends S.TaggedClass<SomethingElse>()("SomethingElse", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.72",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"proper-lockfile": "^4.1.2",
|
|
14
14
|
"pure-rand": "7.0.1",
|
|
15
15
|
"query-string": "^9.3.1",
|
|
16
|
-
"effect-app": "4.0.0-beta.
|
|
16
|
+
"effect-app": "4.0.0-beta.72"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@azure/cosmos": "^4.9.2",
|
package/test/dist/fixtures.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { RpcContextMap, RpcX } from "effect-app/rpc";
|
|
|
4
4
|
declare const UserProfile_base: S.EnhancedClass<UserProfile, S.Struct<{
|
|
5
5
|
id: S.String;
|
|
6
6
|
roles: S.$Array<S.String> & {
|
|
7
|
-
withDefault: S.withConstructorDefault<S.$Array<S.String
|
|
7
|
+
withDefault: S.withConstructorDefault<S.$Array<S.String>>;
|
|
8
8
|
};
|
|
9
9
|
}>, {}> & Context.Opaque<UserProfile, UserProfile>;
|
|
10
10
|
export declare class UserProfile extends UserProfile_base {
|
package/test/query.test.ts
CHANGED
|
@@ -20,7 +20,7 @@ export class Something extends S.Class<Something>("Something")({
|
|
|
20
20
|
displayName: S.NonEmptyString255,
|
|
21
21
|
name: S.NullOr(S.NonEmptyString255).withDefault,
|
|
22
22
|
n: S.Date.withDefault,
|
|
23
|
-
union: someUnion.pipe(S.
|
|
23
|
+
union: someUnion.pipe(S.withConstructorDefault(Effect.succeed({ _tag: "string" as const, value: "hi" })))
|
|
24
24
|
}) {}
|
|
25
25
|
export declare namespace Something {
|
|
26
26
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|