@regle/schemas 1.9.4 → 1.9.5
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/dist/regle-schemas.d.ts +3 -2
- package/package.json +3 -3
package/dist/regle-schemas.d.ts
CHANGED
|
@@ -2054,7 +2054,8 @@ type RegleCollectionStatus<TState extends any[] = any[], TRules extends ReglePar
|
|
|
2054
2054
|
type RegleErrorTree<TState = MaybeRef<Record<string, any> | any[]>, TIssue extends boolean = false> = { readonly [K in keyof JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>]: RegleValidationErrors<JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>[K], false, TIssue> };
|
|
2055
2055
|
type RegleIssuesTree<TState = MaybeRef<Record<string, any> | any[]>> = { readonly [K in keyof JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>]: RegleValidationErrors<JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>[K], false, true> };
|
|
2056
2056
|
type RegleExternalErrorTree<TState = MaybeRef<Record<string, any> | any[]>> = { readonly [K in keyof JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>]?: RegleValidationErrors<JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>[K], true> };
|
|
2057
|
-
type
|
|
2057
|
+
type ErrorMessageOrIssue<TIssue extends boolean> = TIssue extends true ? RegleFieldIssue[] : string[];
|
|
2058
|
+
type RegleValidationErrors<TState extends Record<string, any> | any[] | unknown = never, TExternal extends boolean = false, TIssue extends boolean = false> = HasNamedKeys<TState> extends true ? IsAny$1<TState> extends true ? any : NonNullable<TState> extends Array<infer U> ? U extends Record<string, any> ? TExternal extends false ? ExtendOnlyRealRecord<U> extends true ? RegleCollectionErrors<U, TIssue> : ErrorMessageOrIssue<TIssue> : RegleExternalCollectionErrors<U, TIssue> : ErrorMessageOrIssue<TIssue> : NonNullable<TState> extends Date | File ? ErrorMessageOrIssue<TIssue> : NonNullable<TState> extends Record<string, any> ? TExternal extends false ? RegleErrorTree<TState, TIssue> : RegleExternalErrorTree<TState> : ErrorMessageOrIssue<TIssue> : any;
|
|
2058
2059
|
type RegleCollectionErrors<TState extends Record<string, any>, TIssue extends boolean = false> = {
|
|
2059
2060
|
readonly $self: TIssue extends true ? RegleFieldIssue[] : string[];
|
|
2060
2061
|
readonly $each: RegleValidationErrors<TState, false, TIssue>[];
|
|
@@ -2956,7 +2957,7 @@ type RegleSchemaStatus<TState extends Record<string, any> = Record<string, any>,
|
|
|
2956
2957
|
/**
|
|
2957
2958
|
* @public
|
|
2958
2959
|
*/
|
|
2959
|
-
type InferRegleSchemaStatusType<TSchema extends unknown, TState extends unknown, TShortcuts extends RegleShortcutDefinition = {}> = NonNullable<TSchema> extends Array<infer A extends Record<string, any
|
|
2960
|
+
type InferRegleSchemaStatusType<TSchema extends unknown, TState extends unknown, TShortcuts extends RegleShortcutDefinition = {}> = NonNullable<TSchema> extends Array<infer A> ? A extends Record<string, any> ? RegleSchemaCollectionStatus<A, TState extends Array<any> ? TState : [], TShortcuts> : RegleSchemaFieldStatus<TSchema, TState, TShortcuts> : NonNullable<TState> extends Date | File ? RegleSchemaFieldStatus<TSchema, TState, TShortcuts> : unknown extends TState ? RegleSchemaFieldStatus<TSchema extends EmptyObject ? unknown : TSchema, TState, TShortcuts> : NonNullable<TSchema> extends Record<string, any> ? RegleSchemaStatus<NonNullable<TState> extends Record<string, any> ? NonNullable<TState> : {}, NonNullable<TSchema>, TShortcuts> : RegleSchemaFieldStatus<TSchema, TState, TShortcuts>;
|
|
2960
2961
|
/**
|
|
2961
2962
|
* @public
|
|
2962
2963
|
*/
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regle/schemas",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"description": "Schemas adapter for Regle",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@standard-schema/spec": "1.0.0",
|
|
7
|
-
"@regle/
|
|
8
|
-
"@regle/
|
|
7
|
+
"@regle/rules": "1.9.5",
|
|
8
|
+
"@regle/core": "1.9.5"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
11
|
"valibot": "^1.0.0",
|