@mastra/schema-compat 1.3.11-alpha.0 → 1.3.11-alpha.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/dist/_types/@internal_ai-sdk-v4/dist/index.d.ts +1 -1
- package/dist/_types/@internal_ai-sdk-v4/package.json +1 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +1 -1
- package/dist/_types/@internal_ai-sdk-v5/package.json +1 -0
- package/dist/_types/@internal_ai-v6/dist/index.d.ts +1 -1
- package/dist/_types/@internal_ai-v6/package.json +1 -0
- package/dist/_types/@standard-schema_spec/package.json +1 -0
- package/dist/_types/@types_json-schema/package.json +1 -0
- package/dist/_types/ajv/dist/ajv.d.ts +18 -0
- package/dist/_types/ajv/dist/compile/codegen/code.d.ts +40 -0
- package/dist/_types/ajv/dist/compile/codegen/index.d.ts +79 -0
- package/dist/_types/ajv/dist/compile/codegen/scope.d.ts +79 -0
- package/dist/_types/ajv/dist/compile/errors.d.ts +13 -0
- package/dist/_types/ajv/dist/compile/index.d.ts +80 -0
- package/dist/_types/ajv/dist/compile/ref_error.d.ts +6 -0
- package/dist/_types/ajv/dist/compile/resolve.d.ts +12 -0
- package/dist/_types/ajv/dist/compile/rules.d.ts +28 -0
- package/dist/_types/ajv/dist/compile/util.d.ts +40 -0
- package/dist/_types/ajv/dist/compile/validate/dataType.d.ts +17 -0
- package/dist/_types/ajv/dist/compile/validate/index.d.ts +42 -0
- package/dist/_types/ajv/dist/compile/validate/subschema.d.ts +47 -0
- package/dist/_types/ajv/dist/core.d.ts +174 -0
- package/dist/_types/ajv/dist/runtime/validation_error.d.ts +7 -0
- package/dist/_types/ajv/dist/types/index.d.ts +183 -0
- package/dist/_types/ajv/dist/types/json-schema.d.ts +125 -0
- package/dist/_types/ajv/dist/types/jtd-schema.d.ts +174 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
- package/dist/_types/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
- package/dist/_types/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
- package/dist/_types/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
- package/dist/_types/ajv/dist/vocabularies/errors.d.ts +9 -0
- package/dist/_types/ajv/dist/vocabularies/format/format.d.ts +8 -0
- package/dist/_types/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
- package/dist/_types/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
- package/dist/_types/ajv/dist/vocabularies/validation/const.d.ts +6 -0
- package/dist/_types/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
- package/dist/_types/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
- package/dist/_types/ajv/dist/vocabularies/validation/index.d.ts +16 -0
- package/dist/_types/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
- package/dist/_types/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
- package/dist/_types/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
- package/dist/_types/ajv/dist/vocabularies/validation/required.d.ts +8 -0
- package/dist/_types/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
- package/dist/_types/ajv/package.json +1 -0
- package/dist/_types/fast-uri/package.json +1 -0
- package/dist/_types/fast-uri/types/index.d.ts +60 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/json-schema/utils.d.ts +1 -1
- package/dist/{json-schema-C7Uhaeop.cjs → json-schema-8xkiEZVb.cjs} +3 -3
- package/dist/{json-schema-C7Uhaeop.cjs.map → json-schema-8xkiEZVb.cjs.map} +1 -1
- package/dist/{json-schema-BKit3LVN.js → json-schema-DaHLYDhg.js} +3 -3
- package/dist/{json-schema-BKit3LVN.js.map → json-schema-DaHLYDhg.js.map} +1 -1
- package/dist/json-schema.d.ts +3 -3
- package/dist/provider-compats/anthropic.d.ts +2 -2
- package/dist/provider-compats/deepseek.d.ts +2 -2
- package/dist/provider-compats/google.d.ts +1 -1
- package/dist/provider-compats/google.d.ts.map +1 -1
- package/dist/provider-compats/meta.d.ts +2 -2
- package/dist/provider-compats/openai.d.ts +1 -1
- package/dist/{schema-D_ikovK6.js → schema-BwlBcZRB.js} +2 -2
- package/dist/{schema-D_ikovK6.js.map → schema-BwlBcZRB.js.map} +1 -1
- package/dist/{schema-5p36X0wR.cjs → schema-D35TsNfD.cjs} +2 -2
- package/dist/{schema-5p36X0wR.cjs.map → schema-D35TsNfD.cjs.map} +1 -1
- package/dist/schema.cjs +1 -1
- package/dist/schema.js +1 -1
- package/dist/schema.types.d.ts +4 -4
- package/dist/standard-schema/adapters/ai-sdk.d.ts +2 -2
- package/dist/standard-schema/adapters/json-schema.cjs +1 -1
- package/dist/standard-schema/adapters/json-schema.d.ts +2 -2
- package/dist/standard-schema/adapters/json-schema.d.ts.map +1 -1
- package/dist/standard-schema/adapters/json-schema.js +1 -1
- package/dist/standard-schema/adapters/zod-v4.d.ts +1 -1
- package/dist/standard-schema/standard-schema.d.ts +2 -2
- package/dist/standard-schema/standard-schema.types.d.ts +1 -1
- package/dist/zod-to-json.d.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition, SchemaMap, AnySchema } from "../../types";
|
|
2
|
+
import type { KeywordCxt } from "../../compile/validate";
|
|
3
|
+
export type PropertyDependencies = {
|
|
4
|
+
[K in string]?: string[];
|
|
5
|
+
};
|
|
6
|
+
export interface DependenciesErrorParams {
|
|
7
|
+
property: string;
|
|
8
|
+
missingProperty: string;
|
|
9
|
+
depsCount: number;
|
|
10
|
+
deps: string;
|
|
11
|
+
}
|
|
12
|
+
export type DependenciesError = ErrorObject<"dependencies", DependenciesErrorParams, {
|
|
13
|
+
[K in string]?: string[] | AnySchema;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const error: KeywordErrorDefinition;
|
|
16
|
+
declare const def: CodeKeywordDefinition;
|
|
17
|
+
export declare function validatePropertyDeps(cxt: KeywordCxt, propertyDeps?: {
|
|
18
|
+
[K in string]?: string[];
|
|
19
|
+
}): void;
|
|
20
|
+
export declare function validateSchemaDeps(cxt: KeywordCxt, schemaDeps?: SchemaMap): void;
|
|
21
|
+
export default def;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ErrorNoParams, Vocabulary } from "../../types";
|
|
2
|
+
import { AdditionalItemsError } from "./additionalItems";
|
|
3
|
+
import { ItemsError } from "./items2020";
|
|
4
|
+
import { ContainsError } from "./contains";
|
|
5
|
+
import { DependenciesError } from "./dependencies";
|
|
6
|
+
import { PropertyNamesError } from "./propertyNames";
|
|
7
|
+
import { AdditionalPropertiesError } from "./additionalProperties";
|
|
8
|
+
import { NotKeywordError } from "./not";
|
|
9
|
+
import { AnyOfError } from "./anyOf";
|
|
10
|
+
import { OneOfError } from "./oneOf";
|
|
11
|
+
import { IfKeywordError } from "./if";
|
|
12
|
+
export default function getApplicator(draft2020?: boolean): Vocabulary;
|
|
13
|
+
export type ApplicatorKeywordError = ErrorNoParams<"false schema"> | AdditionalItemsError | ItemsError | ContainsError | AdditionalPropertiesError | DependenciesError | IfKeywordError | AnyOfError | OneOfError | NotKeywordError | PropertyNamesError;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CodeKeywordDefinition } from "../../types";
|
|
2
|
+
import { DiscrError, DiscrErrorObj } from "../discriminator/types";
|
|
3
|
+
export type DiscriminatorError = DiscrErrorObj<DiscrError.Tag> | DiscrErrorObj<DiscrError.Mapping>;
|
|
4
|
+
declare const def: CodeKeywordDefinition;
|
|
5
|
+
export default def;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ErrorObject } from "../../types";
|
|
2
|
+
export declare enum DiscrError {
|
|
3
|
+
Tag = "tag",
|
|
4
|
+
Mapping = "mapping"
|
|
5
|
+
}
|
|
6
|
+
export type DiscrErrorObj<E extends DiscrError> = ErrorObject<"discriminator", {
|
|
7
|
+
error: E;
|
|
8
|
+
tag: string;
|
|
9
|
+
tagValue: unknown;
|
|
10
|
+
}, string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TypeError } from "../compile/validate/dataType";
|
|
2
|
+
import type { ApplicatorKeywordError } from "./applicator";
|
|
3
|
+
import type { ValidationKeywordError } from "./validation";
|
|
4
|
+
import type { FormatError } from "./format/format";
|
|
5
|
+
import type { UnevaluatedPropertiesError } from "./unevaluated/unevaluatedProperties";
|
|
6
|
+
import type { UnevaluatedItemsError } from "./unevaluated/unevaluatedItems";
|
|
7
|
+
import type { DependentRequiredError } from "./validation/dependentRequired";
|
|
8
|
+
import type { DiscriminatorError } from "./discriminator";
|
|
9
|
+
export type DefinedError = TypeError | ApplicatorKeywordError | ValidationKeywordError | FormatError | UnevaluatedPropertiesError | UnevaluatedItemsError | DependentRequiredError | DiscriminatorError;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
|
|
2
|
+
export type UnevaluatedPropertiesError = ErrorObject<"unevaluatedProperties", {
|
|
3
|
+
unevaluatedProperty: string;
|
|
4
|
+
}, AnySchema>;
|
|
5
|
+
declare const def: CodeKeywordDefinition;
|
|
6
|
+
export default def;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
|
|
2
|
+
import { DependenciesErrorParams, PropertyDependencies } from "../applicator/dependencies";
|
|
3
|
+
export type DependentRequiredError = ErrorObject<"dependentRequired", DependenciesErrorParams, PropertyDependencies>;
|
|
4
|
+
declare const def: CodeKeywordDefinition;
|
|
5
|
+
export default def;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ErrorObject, Vocabulary } from "../../types";
|
|
2
|
+
import { LimitNumberError } from "./limitNumber";
|
|
3
|
+
import { MultipleOfError } from "./multipleOf";
|
|
4
|
+
import { PatternError } from "./pattern";
|
|
5
|
+
import { RequiredError } from "./required";
|
|
6
|
+
import { UniqueItemsError } from "./uniqueItems";
|
|
7
|
+
import { ConstError } from "./const";
|
|
8
|
+
import { EnumError } from "./enum";
|
|
9
|
+
declare const validation: Vocabulary;
|
|
10
|
+
export default validation;
|
|
11
|
+
type LimitError = ErrorObject<"maxItems" | "minItems" | "minProperties" | "maxProperties" | "minLength" | "maxLength", {
|
|
12
|
+
limit: number;
|
|
13
|
+
}, number | {
|
|
14
|
+
$data: string;
|
|
15
|
+
}>;
|
|
16
|
+
export type ValidationKeywordError = LimitError | LimitNumberError | MultipleOfError | PatternError | RequiredError | UniqueItemsError | ConstError | EnumError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
|
|
2
|
+
type Kwd = "maximum" | "minimum" | "exclusiveMaximum" | "exclusiveMinimum";
|
|
3
|
+
type Comparison = "<=" | ">=" | "<" | ">";
|
|
4
|
+
export type LimitNumberError = ErrorObject<Kwd, {
|
|
5
|
+
limit: number;
|
|
6
|
+
comparison: Comparison;
|
|
7
|
+
}, number | {
|
|
8
|
+
$data: string;
|
|
9
|
+
}>;
|
|
10
|
+
declare const def: CodeKeywordDefinition;
|
|
11
|
+
export default def;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
|
|
2
|
+
export type UniqueItemsError = ErrorObject<"uniqueItems", {
|
|
3
|
+
i: number;
|
|
4
|
+
j: number;
|
|
5
|
+
}, boolean | {
|
|
6
|
+
$data: string;
|
|
7
|
+
}>;
|
|
8
|
+
declare const def: CodeKeywordDefinition;
|
|
9
|
+
export default def;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
type FastUri = typeof fastUri
|
|
2
|
+
|
|
3
|
+
declare namespace fastUri {
|
|
4
|
+
export interface URIComponent {
|
|
5
|
+
scheme?: string;
|
|
6
|
+
userinfo?: string;
|
|
7
|
+
host?: string;
|
|
8
|
+
port?: number | string;
|
|
9
|
+
path?: string;
|
|
10
|
+
query?: string;
|
|
11
|
+
fragment?: string;
|
|
12
|
+
reference?: string;
|
|
13
|
+
nid?: string;
|
|
14
|
+
nss?: string;
|
|
15
|
+
resourceName?: string;
|
|
16
|
+
secure?: boolean;
|
|
17
|
+
uuid?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface Options {
|
|
21
|
+
scheme?: string;
|
|
22
|
+
reference?: string;
|
|
23
|
+
unicodeSupport?: boolean;
|
|
24
|
+
domainHost?: boolean;
|
|
25
|
+
absolutePath?: boolean;
|
|
26
|
+
tolerant?: boolean;
|
|
27
|
+
skipEscape?: boolean;
|
|
28
|
+
nid?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use Options instead
|
|
33
|
+
*/
|
|
34
|
+
export type options = Options
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use URIComponent instead
|
|
37
|
+
*/
|
|
38
|
+
export type URIComponents = URIComponent
|
|
39
|
+
|
|
40
|
+
export function normalize (uri: string, opts?: Options): string
|
|
41
|
+
export function normalize (uri: URIComponent, opts?: Options): URIComponent
|
|
42
|
+
export function normalize (uri: any, opts?: Options): any
|
|
43
|
+
|
|
44
|
+
export function resolve (baseURI: string, relativeURI: string, options?: Options): string
|
|
45
|
+
|
|
46
|
+
export function resolveComponent (base: URIComponent, relative: URIComponent, options?: Options, skipNormalization?: boolean): URIComponent
|
|
47
|
+
|
|
48
|
+
export function parse (uri: string, opts?: Options): URIComponent
|
|
49
|
+
|
|
50
|
+
export function serialize (component: URIComponent, opts?: Options): string
|
|
51
|
+
|
|
52
|
+
export function equal (uriA: string, uriB: string): boolean
|
|
53
|
+
|
|
54
|
+
export function resolve (base: string, path: string): string
|
|
55
|
+
|
|
56
|
+
export const fastUri: FastUri
|
|
57
|
+
export { fastUri as default }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export = fastUri
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_json_schema_traverse$1 = require("./json-schema-traverse-DbuWNYgg.cjs");
|
|
3
3
|
const require_zod_to_json = require("./zod-to-json.cjs");
|
|
4
|
-
const require_schema = require("./schema-
|
|
4
|
+
const require_schema = require("./schema-D35TsNfD.cjs");
|
|
5
5
|
let zod_v3 = require("zod/v3");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
let zod_from_json_schema = require("zod-from-json-schema");
|
|
@@ -6058,6 +6058,7 @@ var GoogleSchemaCompatLayer = class extends SchemaCompatLayer {
|
|
|
6058
6058
|
return "jsonSchema7";
|
|
6059
6059
|
}
|
|
6060
6060
|
shouldApply() {
|
|
6061
|
+
if (this.getModel().modelId.includes("claude")) return false;
|
|
6061
6062
|
return this.getModel().provider.includes("google") || this.getModel().modelId.includes("gemini-") || this.getModel().modelId.includes("google");
|
|
6062
6063
|
}
|
|
6063
6064
|
processZodType(value) {
|