schemair 0.2.0 → 0.3.0
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/README.md +140 -39
- package/dist/authoring/index.d.cts +1 -1
- package/dist/authoring/index.d.ts +1 -1
- package/dist/authoring/index.js +1 -1
- package/dist/{authoring-D3V0iyTe.js → authoring-DyJNYs5o.js} +1 -1
- package/dist/compatibility/index.cjs +43 -0
- package/dist/compatibility/index.d.cts +2 -0
- package/dist/compatibility/index.d.ts +2 -0
- package/dist/compatibility/index.js +42 -0
- package/dist/definition/index.d.cts +2 -2
- package/dist/definition/index.d.ts +2 -2
- package/dist/definition/index.js +1 -1
- package/dist/{index-DDMwVy2I.d.cts → index-1sDuqu05.d.ts} +6 -1
- package/dist/index-BFSMT_2d.d.ts +53 -0
- package/dist/{index-DM5DSLLL.d.ts → index-BGz7L_Fq.d.cts} +4 -30
- package/dist/{index-bQy-C-1l.d.ts → index-BTtdqi_M.d.ts} +9 -9
- package/dist/index-BfbClf6R.d.cts +20 -0
- package/dist/{index-CQynt7ft.d.cts → index-CK7Is7vy.d.cts} +9 -9
- package/dist/index-CUGhtuwA.d.cts +53 -0
- package/dist/{index-DXWoNYFB.d.ts → index-CV8EZQy8.d.ts} +1 -1
- package/dist/index-CzNxjqVg.d.cts +47 -0
- package/dist/{index-CIim1dG7.d.cts → index-DGHMUZ5m.d.cts} +1 -1
- package/dist/{index-CBbd4hXJ.d.ts → index-DxvfPmw6.d.ts} +4 -11
- package/dist/index-T6nFhvGQ.d.ts +20 -0
- package/dist/{index-CNjYUKvu.d.cts → index-ba_52Yu9.d.cts} +4 -11
- package/dist/index-hrcM9oJe.d.ts +47 -0
- package/dist/{index-4aMF0cTE.d.ts → index-i7Au-FQ6.d.cts} +6 -1
- package/dist/{index-DhmHCGpT.d.cts → index-mu1znI1F.d.ts} +4 -30
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +9 -7
- package/dist/integrations/json-schema/index.d.cts +1 -1
- package/dist/integrations/json-schema/index.d.ts +1 -1
- package/dist/integrations/json-schema/index.js +1 -1
- package/dist/integrations/standard-schema/index.cjs +4 -4
- package/dist/integrations/standard-schema/index.d.cts +5 -5
- package/dist/integrations/standard-schema/index.d.ts +5 -5
- package/dist/integrations/standard-schema/index.js +5 -5
- package/dist/payload/index.cjs +44 -81
- package/dist/payload/index.d.cts +2 -2
- package/dist/payload/index.d.ts +2 -2
- package/dist/payload/index.js +45 -81
- package/dist/relations/index.cjs +2 -5
- package/dist/relations/index.d.cts +2 -2
- package/dist/relations/index.d.ts +2 -2
- package/dist/relations/index.js +2 -2
- package/dist/{relations-Cymx4iTc.cjs → relations-NUVJkAG8.cjs} +11 -232
- package/dist/{relations-ysXDmi-Z.js → relations-QtnCRW9x.js} +13 -216
- package/dist/resolve/index.cjs +308 -0
- package/dist/resolve/index.d.cts +2 -0
- package/dist/resolve/index.d.ts +2 -0
- package/dist/resolve/index.js +305 -0
- package/dist/schema-ref-key-BHVFVfj1.cjs +26 -0
- package/dist/schema-ref-key-DR__tPr-.js +14 -0
- package/dist/spec/index.d.cts +2 -2
- package/dist/spec/index.d.ts +2 -2
- package/dist/spec/index.js +1 -1
- package/dist/standard/index.d.cts +2 -2
- package/dist/standard/index.d.ts +2 -2
- package/dist/standard/index.js +2 -2
- package/dist/type-interpreter/index.cjs +2 -6
- package/dist/type-interpreter/index.d.cts +2 -2
- package/dist/type-interpreter/index.d.ts +2 -2
- package/dist/type-interpreter/index.js +2 -2
- package/dist/{type-interpreter-DnrId8aM.js → type-interpreter-BA8gcLUU.js} +57 -280
- package/dist/{type-interpreter-OLt2W2yd.cjs → type-interpreter-D8xETgq1.cjs} +55 -302
- package/package.json +23 -3
- package/dist/index-BqfGAU1K.d.ts +0 -56
- package/dist/index-D3mfwaSO.d.cts +0 -56
- /package/dist/{chunk-BgLxgFZR.js → chunk-bFfwrPtJ.js} +0 -0
- /package/dist/{definition-DmYnDmQO.js → definition-BH_LzXGc.js} +0 -0
- /package/dist/{standard-DhKsxu9U.js → standard-BGMgbbEQ.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { d as RelationResult, i as RelationContext } from "./index-ba_52Yu9.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compatibility/index.d.ts
|
|
4
|
+
type CompatibilityStatus = 'compatible' | 'breaking' | 'unknown' | 'invalid';
|
|
5
|
+
interface CompatibilityCheck {
|
|
6
|
+
readonly status: CompatibilityStatus;
|
|
7
|
+
readonly relation: RelationResult;
|
|
8
|
+
}
|
|
9
|
+
interface CompatibilityReport {
|
|
10
|
+
/** Values accepted by the previous declaration are accepted by the next one. */
|
|
11
|
+
readonly previousToNext: CompatibilityCheck;
|
|
12
|
+
/** Values accepted by the next declaration are accepted by the previous one. */
|
|
13
|
+
readonly nextToPrevious: CompatibilityCheck;
|
|
14
|
+
/** Both directional checks are compatible. */
|
|
15
|
+
readonly status: CompatibilityStatus;
|
|
16
|
+
}
|
|
17
|
+
declare function reportSchemaCompatibility(previous: unknown, next: unknown, context?: RelationContext): CompatibilityReport;
|
|
18
|
+
declare function reportOperationCompatibility(previous: unknown, next: unknown, context?: RelationContext): CompatibilityReport;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { reportSchemaCompatibility as a, reportOperationCompatibility as i, CompatibilityReport as n, CompatibilityStatus as r, CompatibilityCheck as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as OperationChannelDefinition, H as SchemaVariantSelector, L as SchemaTypeTerm, _t as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { G as OperationChannelDefinition, H as SchemaVariantSelector, L as SchemaTypeTerm, _t as SchemaSelfRefNode, a as StandardSemanticDefinition, at as SchemaConstraint, bt as SchemaTaggedUnionVariant, ct as SchemaNode, dt as SchemaNumberNode, ft as SchemaPrimitiveNode, gt as SchemaRefNode, i as StandardConstraintDefinition, it as SchemaBooleanNode, lt as SchemaNullNode, mt as SchemaRecordNode, ot as SchemaLiteralNode, p as SchemaFieldSelector, pt as SchemaRecordField, q as OperationDefinition, rt as SchemaArrayNode, st as SchemaLiteralUnionNode, tt as LiteralValue, ut as SchemaNullableNode, vt as SchemaStringNode, xt as SchemaTupleNode, y as SchemaTypeExpr, yt as SchemaTaggedUnionNode } from "./index-i7Au-FQ6.cjs";
|
|
2
|
+
import { s as PayloadValidationContext, t as ConstraintProvider, u as SemanticProvider } from "./index-CzNxjqVg.cjs";
|
|
3
|
+
import { i as RelationContext } from "./index-ba_52Yu9.cjs";
|
|
4
4
|
|
|
5
5
|
//#region rolldown:runtime
|
|
6
6
|
//#endregion
|
|
@@ -73,13 +73,13 @@ declare function isStandardConstraintOwner(node: SchemaNode): node is StandardCo
|
|
|
73
73
|
declare function buildStandardConstraintProfile(node: StandardConstraintOwner, options?: BuildStandardConstraintProfileOptions): StandardConstraintProfile;
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/standard/payload.d.ts
|
|
76
|
-
declare const standardSemanticProvider:
|
|
76
|
+
declare const standardSemanticProvider: SemanticProvider;
|
|
77
77
|
declare function standardConstraintTarget(node: SchemaNode): string;
|
|
78
|
-
declare const standardConstraintProvider:
|
|
79
|
-
declare const standardSemanticRegistry: Readonly<Record<string,
|
|
80
|
-
declare const standardConstraintRegistry: Readonly<Record<string,
|
|
78
|
+
declare const standardConstraintProvider: ConstraintProvider;
|
|
79
|
+
declare const standardSemanticRegistry: Readonly<Record<string, SemanticProvider>>;
|
|
80
|
+
declare const standardConstraintRegistry: Readonly<Record<string, ConstraintProvider>>;
|
|
81
81
|
/** Opt in explicitly; core validation never silently installs vocabulary policy. */
|
|
82
|
-
declare const standardPayloadContext:
|
|
82
|
+
declare const standardPayloadContext: PayloadValidationContext;
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/standard/operations.d.ts
|
|
85
85
|
type StandardSchemaOperationResult = {
|
|
@@ -103,7 +103,7 @@ interface StandardProviderContext {
|
|
|
103
103
|
declare function createStandardRelationContext(options?: StandardProviderContext): RelationContext;
|
|
104
104
|
declare const standardRelationContext: RelationContext;
|
|
105
105
|
declare const standardVocabularyProvider: Readonly<{
|
|
106
|
-
payload:
|
|
106
|
+
payload: PayloadValidationContext;
|
|
107
107
|
relation: RelationContext;
|
|
108
108
|
refine: typeof refineStandardSchema;
|
|
109
109
|
intersect: typeof intersectStandardSchemas;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ct as SchemaNode, gt as SchemaRefNode, ht as SchemaRefEntry, q as OperationDefinition } from "./index-i7Au-FQ6.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/resolve/schema-closure.d.ts
|
|
4
|
+
interface SchemaClosureDiagnostic {
|
|
5
|
+
readonly code: string;
|
|
6
|
+
readonly path: readonly (string | number)[];
|
|
7
|
+
readonly message: string;
|
|
8
|
+
}
|
|
9
|
+
type SchemaRefResolution = SchemaNode | {
|
|
10
|
+
readonly status: 'resolved';
|
|
11
|
+
readonly schema: SchemaNode;
|
|
12
|
+
} | {
|
|
13
|
+
readonly status: 'unknown' | 'unsupported';
|
|
14
|
+
readonly message?: string;
|
|
15
|
+
} | undefined;
|
|
16
|
+
interface ResolvedSchemaGraph {
|
|
17
|
+
readonly refs: readonly SchemaRefEntry[];
|
|
18
|
+
/** External graph edges that point back to an active ref during loading. */
|
|
19
|
+
readonly cycles: readonly (readonly string[])[];
|
|
20
|
+
}
|
|
21
|
+
type SchemaClosureStatus = 'resolved' | 'incomplete' | 'rejected';
|
|
22
|
+
interface SchemaClosureResult {
|
|
23
|
+
readonly status: SchemaClosureStatus;
|
|
24
|
+
readonly graph: ResolvedSchemaGraph;
|
|
25
|
+
readonly issues: readonly SchemaClosureDiagnostic[];
|
|
26
|
+
}
|
|
27
|
+
interface SchemaClosureContext {
|
|
28
|
+
readonly resolveRef?: (refPath: readonly string[], context: SchemaClosureResolutionContext) => SchemaRefResolution;
|
|
29
|
+
readonly refs?: readonly SchemaRefEntry[];
|
|
30
|
+
readonly maxDepth?: number;
|
|
31
|
+
readonly maxNodes?: number;
|
|
32
|
+
readonly maxSteps?: number;
|
|
33
|
+
}
|
|
34
|
+
/** Async loading accepts both synchronous and asynchronous host resolvers. */
|
|
35
|
+
interface AsyncSchemaClosureContext extends Omit<SchemaClosureContext, 'resolveRef'> {
|
|
36
|
+
readonly resolveRef?: (refPath: readonly string[], context: SchemaClosureResolutionContext) => SchemaRefResolution | PromiseLike<SchemaRefResolution>;
|
|
37
|
+
}
|
|
38
|
+
/** Context supplied while the host resolves one ref during closure loading. */
|
|
39
|
+
interface SchemaClosureResolutionContext {
|
|
40
|
+
readonly path: readonly (string | number)[];
|
|
41
|
+
readonly refPath: readonly string[];
|
|
42
|
+
readonly ref: SchemaRefNode;
|
|
43
|
+
readonly depth: number;
|
|
44
|
+
}
|
|
45
|
+
/** Load references using a synchronous host resolver. */
|
|
46
|
+
declare function resolveSchemaReferences(entry: unknown, context?: SchemaClosureContext): SchemaClosureResult;
|
|
47
|
+
/** Load references using a synchronous or asynchronous host resolver. */
|
|
48
|
+
declare function resolveSchemaReferencesAsync(entry: unknown, context?: AsyncSchemaClosureContext): Promise<SchemaClosureResult>;
|
|
49
|
+
/** Resolve all external schema refs reachable from an operation declaration. */
|
|
50
|
+
declare function resolveOperationClosure(entry: OperationDefinition, context?: SchemaClosureContext): SchemaClosureResult;
|
|
51
|
+
declare function resolveOperationClosureAsync(entry: OperationDefinition, context?: AsyncSchemaClosureContext): Promise<SchemaClosureResult>;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { SchemaClosureResolutionContext as a, SchemaRefResolution as c, resolveSchemaReferences as d, resolveSchemaReferencesAsync as f, SchemaClosureDiagnostic as i, resolveOperationClosure as l, ResolvedSchemaGraph as n, SchemaClosureResult as o, SchemaClosureContext as r, SchemaClosureStatus as s, AsyncSchemaClosureContext as t, resolveOperationClosureAsync as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as OperationContainerDefinition, L as SchemaTypeTerm, Q as StructuredOperationDefinition, Z as StructuredOperationContainerDefinition, ct as SchemaNode, q as OperationDefinition, y as SchemaTypeExpr } from "./index-
|
|
1
|
+
import { K as OperationContainerDefinition, L as SchemaTypeTerm, Q as StructuredOperationDefinition, Z as StructuredOperationContainerDefinition, ct as SchemaNode, q as OperationDefinition, y as SchemaTypeExpr } from "./index-1sDuqu05.js";
|
|
2
2
|
|
|
3
3
|
//#region src/definition/validator.d.ts
|
|
4
4
|
type SchemaNodeDefinitionPath = readonly (string | number)[];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ct as SchemaNode, ht as SchemaRefEntry } from "./index-i7Au-FQ6.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/payload/validator.d.ts
|
|
4
|
+
type PayloadPath = readonly (string | number)[];
|
|
5
|
+
interface PayloadValidationDiagnostic {
|
|
6
|
+
readonly code: string;
|
|
7
|
+
readonly path: PayloadPath;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
}
|
|
10
|
+
type PayloadValidationResult = {
|
|
11
|
+
readonly status: 'accepted';
|
|
12
|
+
readonly issues: readonly [];
|
|
13
|
+
} | {
|
|
14
|
+
readonly status: 'rejected' | 'unknown';
|
|
15
|
+
readonly issues: readonly PayloadValidationDiagnostic[];
|
|
16
|
+
};
|
|
17
|
+
type PayloadProviderDecision = boolean | {
|
|
18
|
+
readonly status: 'accepted' | 'rejected' | 'unknown' | 'unsupported';
|
|
19
|
+
readonly message?: string;
|
|
20
|
+
};
|
|
21
|
+
interface PayloadProviderContext {
|
|
22
|
+
readonly path: PayloadPath;
|
|
23
|
+
readonly schema: SchemaNode;
|
|
24
|
+
readonly rootSchema: SchemaNode;
|
|
25
|
+
}
|
|
26
|
+
interface PayloadResolutionContext extends PayloadProviderContext {
|
|
27
|
+
readonly refPath: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
type PayloadResolution = SchemaNode | {
|
|
30
|
+
readonly status: 'resolved';
|
|
31
|
+
readonly schema: SchemaNode;
|
|
32
|
+
} | {
|
|
33
|
+
readonly status: 'unknown' | 'unsupported';
|
|
34
|
+
readonly message?: string;
|
|
35
|
+
} | undefined;
|
|
36
|
+
type SemanticProvider = (semanticPath: readonly string[], value: unknown, context: PayloadProviderContext) => PayloadProviderDecision | undefined;
|
|
37
|
+
type ConstraintProvider = (constraintPath: readonly string[], args: unknown, value: unknown, context: PayloadProviderContext) => PayloadProviderDecision | undefined;
|
|
38
|
+
interface PayloadValidationContext {
|
|
39
|
+
/** Pre-resolved external schemas supplied as portable refPath entries. */
|
|
40
|
+
readonly refs?: readonly SchemaRefEntry[];
|
|
41
|
+
readonly resolveRef?: (refPath: readonly string[], context: PayloadResolutionContext) => PayloadResolution;
|
|
42
|
+
readonly semanticProvider?: SemanticProvider;
|
|
43
|
+
readonly constraintProvider?: ConstraintProvider;
|
|
44
|
+
}
|
|
45
|
+
declare function validatePayload(value: unknown, schema: SchemaNode, context?: PayloadValidationContext): PayloadValidationResult;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { PayloadResolution as a, PayloadValidationDiagnostic as c, validatePayload as d, PayloadProviderDecision as i, PayloadValidationResult as l, PayloadPath as n, PayloadResolutionContext as o, PayloadProviderContext as r, PayloadValidationContext as s, ConstraintProvider as t, SemanticProvider as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as OperationContainerDefinition, L as SchemaTypeTerm, Q as StructuredOperationDefinition, Z as StructuredOperationContainerDefinition, ct as SchemaNode, q as OperationDefinition, y as SchemaTypeExpr } from "./index-
|
|
1
|
+
import { K as OperationContainerDefinition, L as SchemaTypeTerm, Q as StructuredOperationDefinition, Z as StructuredOperationContainerDefinition, ct as SchemaNode, q as OperationDefinition, y as SchemaTypeExpr } from "./index-i7Au-FQ6.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/definition/validator.d.ts
|
|
4
4
|
type SchemaNodeDefinitionPath = readonly (string | number)[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { at as SchemaConstraint, ct as SchemaNode } from "./index-
|
|
1
|
+
import { at as SchemaConstraint, ct as SchemaNode, ht as SchemaRefEntry } from "./index-1sDuqu05.js";
|
|
2
2
|
|
|
3
3
|
//#region src/relations/validator.d.ts
|
|
4
4
|
type RelationPath = readonly (string | number)[];
|
|
@@ -37,19 +37,14 @@ type RelationResolution = SchemaNode | {
|
|
|
37
37
|
readonly message?: string;
|
|
38
38
|
} | undefined;
|
|
39
39
|
interface RelationContext {
|
|
40
|
+
/** Pre-resolved external schemas supplied as portable refPath entries. */
|
|
41
|
+
readonly refs?: readonly SchemaRefEntry[];
|
|
40
42
|
readonly resolveRef?: (refPath: readonly string[], context: RelationResolutionContext) => RelationResolution;
|
|
41
43
|
readonly semanticProvider?: (sourcePath: readonly string[] | undefined, targetPath: readonly string[] | undefined, context: RelationProviderContext) => RelationProviderDecision;
|
|
42
44
|
readonly constraintProvider?: (sourceConstraints: readonly SchemaConstraint[] | undefined, targetConstraints: readonly SchemaConstraint[] | undefined, context: RelationProviderContext) => RelationProviderDecision;
|
|
43
45
|
}
|
|
44
|
-
interface AsyncRelationContext {
|
|
45
|
-
readonly resolveRef?: (refPath: readonly string[], context: RelationResolutionContext) => Promise<RelationResolution> | RelationResolution;
|
|
46
|
-
readonly semanticProvider?: (sourcePath: readonly string[] | undefined, targetPath: readonly string[] | undefined, context: RelationProviderContext) => Promise<RelationProviderDecision> | RelationProviderDecision;
|
|
47
|
-
readonly constraintProvider?: (sourceConstraints: readonly SchemaConstraint[] | undefined, targetConstraints: readonly SchemaConstraint[] | undefined, context: RelationProviderContext) => Promise<RelationProviderDecision> | RelationProviderDecision;
|
|
48
|
-
}
|
|
49
46
|
declare function checkSchemaRelation(source: unknown, target: unknown, context?: RelationContext): RelationResult;
|
|
50
47
|
declare const checkSchemaAssignability: typeof checkSchemaRelation;
|
|
51
|
-
declare function checkSchemaRelationAsync(source: unknown, target: unknown, context?: AsyncRelationContext): Promise<RelationResult>;
|
|
52
|
-
declare const checkSchemaAssignabilityAsync: typeof checkSchemaRelationAsync;
|
|
53
48
|
//#endregion
|
|
54
49
|
//#region src/relations/operation.d.ts
|
|
55
50
|
type OperationRelationComponent = 'definition' | 'input' | 'output' | 'error' | 'emission';
|
|
@@ -58,7 +53,5 @@ type OperationRelationDirection = 'source-to-target' | 'target-to-source';
|
|
|
58
53
|
* Provider contexts describe each directed schema comparison; input reverses sides.
|
|
59
54
|
*/
|
|
60
55
|
declare function checkOperationRelation(source: unknown, target: unknown, context?: RelationContext): RelationResult;
|
|
61
|
-
/** Async companion with the same substitution rules and schema-local providers. */
|
|
62
|
-
declare function checkOperationRelationAsync(source: unknown, target: unknown, context?: AsyncRelationContext): Promise<RelationResult>;
|
|
63
56
|
//#endregion
|
|
64
|
-
export {
|
|
57
|
+
export { RelationDiagnostic as a, RelationProviderDecision as c, RelationResult as d, RelationSide as f, checkSchemaRelation as h, RelationContext as i, RelationResolution as l, checkSchemaAssignability as m, OperationRelationDirection as n, RelationPath as o, RelationStatus as p, checkOperationRelation as r, RelationProviderContext as s, OperationRelationComponent as t, RelationResolutionContext as u };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { d as RelationResult, i as RelationContext } from "./index-DxvfPmw6.js";
|
|
2
|
+
|
|
3
|
+
//#region src/compatibility/index.d.ts
|
|
4
|
+
type CompatibilityStatus = 'compatible' | 'breaking' | 'unknown' | 'invalid';
|
|
5
|
+
interface CompatibilityCheck {
|
|
6
|
+
readonly status: CompatibilityStatus;
|
|
7
|
+
readonly relation: RelationResult;
|
|
8
|
+
}
|
|
9
|
+
interface CompatibilityReport {
|
|
10
|
+
/** Values accepted by the previous declaration are accepted by the next one. */
|
|
11
|
+
readonly previousToNext: CompatibilityCheck;
|
|
12
|
+
/** Values accepted by the next declaration are accepted by the previous one. */
|
|
13
|
+
readonly nextToPrevious: CompatibilityCheck;
|
|
14
|
+
/** Both directional checks are compatible. */
|
|
15
|
+
readonly status: CompatibilityStatus;
|
|
16
|
+
}
|
|
17
|
+
declare function reportSchemaCompatibility(previous: unknown, next: unknown, context?: RelationContext): CompatibilityReport;
|
|
18
|
+
declare function reportOperationCompatibility(previous: unknown, next: unknown, context?: RelationContext): CompatibilityReport;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { reportSchemaCompatibility as a, reportOperationCompatibility as i, CompatibilityReport as n, CompatibilityStatus as r, CompatibilityCheck as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { at as SchemaConstraint, ct as SchemaNode } from "./index-
|
|
1
|
+
import { at as SchemaConstraint, ct as SchemaNode, ht as SchemaRefEntry } from "./index-i7Au-FQ6.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/relations/validator.d.ts
|
|
4
4
|
type RelationPath = readonly (string | number)[];
|
|
@@ -37,19 +37,14 @@ type RelationResolution = SchemaNode | {
|
|
|
37
37
|
readonly message?: string;
|
|
38
38
|
} | undefined;
|
|
39
39
|
interface RelationContext {
|
|
40
|
+
/** Pre-resolved external schemas supplied as portable refPath entries. */
|
|
41
|
+
readonly refs?: readonly SchemaRefEntry[];
|
|
40
42
|
readonly resolveRef?: (refPath: readonly string[], context: RelationResolutionContext) => RelationResolution;
|
|
41
43
|
readonly semanticProvider?: (sourcePath: readonly string[] | undefined, targetPath: readonly string[] | undefined, context: RelationProviderContext) => RelationProviderDecision;
|
|
42
44
|
readonly constraintProvider?: (sourceConstraints: readonly SchemaConstraint[] | undefined, targetConstraints: readonly SchemaConstraint[] | undefined, context: RelationProviderContext) => RelationProviderDecision;
|
|
43
45
|
}
|
|
44
|
-
interface AsyncRelationContext {
|
|
45
|
-
readonly resolveRef?: (refPath: readonly string[], context: RelationResolutionContext) => Promise<RelationResolution> | RelationResolution;
|
|
46
|
-
readonly semanticProvider?: (sourcePath: readonly string[] | undefined, targetPath: readonly string[] | undefined, context: RelationProviderContext) => Promise<RelationProviderDecision> | RelationProviderDecision;
|
|
47
|
-
readonly constraintProvider?: (sourceConstraints: readonly SchemaConstraint[] | undefined, targetConstraints: readonly SchemaConstraint[] | undefined, context: RelationProviderContext) => Promise<RelationProviderDecision> | RelationProviderDecision;
|
|
48
|
-
}
|
|
49
46
|
declare function checkSchemaRelation(source: unknown, target: unknown, context?: RelationContext): RelationResult;
|
|
50
47
|
declare const checkSchemaAssignability: typeof checkSchemaRelation;
|
|
51
|
-
declare function checkSchemaRelationAsync(source: unknown, target: unknown, context?: AsyncRelationContext): Promise<RelationResult>;
|
|
52
|
-
declare const checkSchemaAssignabilityAsync: typeof checkSchemaRelationAsync;
|
|
53
48
|
//#endregion
|
|
54
49
|
//#region src/relations/operation.d.ts
|
|
55
50
|
type OperationRelationComponent = 'definition' | 'input' | 'output' | 'error' | 'emission';
|
|
@@ -58,7 +53,5 @@ type OperationRelationDirection = 'source-to-target' | 'target-to-source';
|
|
|
58
53
|
* Provider contexts describe each directed schema comparison; input reverses sides.
|
|
59
54
|
*/
|
|
60
55
|
declare function checkOperationRelation(source: unknown, target: unknown, context?: RelationContext): RelationResult;
|
|
61
|
-
/** Async companion with the same substitution rules and schema-local providers. */
|
|
62
|
-
declare function checkOperationRelationAsync(source: unknown, target: unknown, context?: AsyncRelationContext): Promise<RelationResult>;
|
|
63
56
|
//#endregion
|
|
64
|
-
export {
|
|
57
|
+
export { RelationDiagnostic as a, RelationProviderDecision as c, RelationResult as d, RelationSide as f, checkSchemaRelation as h, RelationContext as i, RelationResolution as l, checkSchemaAssignability as m, OperationRelationDirection as n, RelationPath as o, RelationStatus as p, checkOperationRelation as r, RelationProviderContext as s, OperationRelationComponent as t, RelationResolutionContext as u };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ct as SchemaNode, ht as SchemaRefEntry } from "./index-1sDuqu05.js";
|
|
2
|
+
|
|
3
|
+
//#region src/payload/validator.d.ts
|
|
4
|
+
type PayloadPath = readonly (string | number)[];
|
|
5
|
+
interface PayloadValidationDiagnostic {
|
|
6
|
+
readonly code: string;
|
|
7
|
+
readonly path: PayloadPath;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
}
|
|
10
|
+
type PayloadValidationResult = {
|
|
11
|
+
readonly status: 'accepted';
|
|
12
|
+
readonly issues: readonly [];
|
|
13
|
+
} | {
|
|
14
|
+
readonly status: 'rejected' | 'unknown';
|
|
15
|
+
readonly issues: readonly PayloadValidationDiagnostic[];
|
|
16
|
+
};
|
|
17
|
+
type PayloadProviderDecision = boolean | {
|
|
18
|
+
readonly status: 'accepted' | 'rejected' | 'unknown' | 'unsupported';
|
|
19
|
+
readonly message?: string;
|
|
20
|
+
};
|
|
21
|
+
interface PayloadProviderContext {
|
|
22
|
+
readonly path: PayloadPath;
|
|
23
|
+
readonly schema: SchemaNode;
|
|
24
|
+
readonly rootSchema: SchemaNode;
|
|
25
|
+
}
|
|
26
|
+
interface PayloadResolutionContext extends PayloadProviderContext {
|
|
27
|
+
readonly refPath: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
type PayloadResolution = SchemaNode | {
|
|
30
|
+
readonly status: 'resolved';
|
|
31
|
+
readonly schema: SchemaNode;
|
|
32
|
+
} | {
|
|
33
|
+
readonly status: 'unknown' | 'unsupported';
|
|
34
|
+
readonly message?: string;
|
|
35
|
+
} | undefined;
|
|
36
|
+
type SemanticProvider = (semanticPath: readonly string[], value: unknown, context: PayloadProviderContext) => PayloadProviderDecision | undefined;
|
|
37
|
+
type ConstraintProvider = (constraintPath: readonly string[], args: unknown, value: unknown, context: PayloadProviderContext) => PayloadProviderDecision | undefined;
|
|
38
|
+
interface PayloadValidationContext {
|
|
39
|
+
/** Pre-resolved external schemas supplied as portable refPath entries. */
|
|
40
|
+
readonly refs?: readonly SchemaRefEntry[];
|
|
41
|
+
readonly resolveRef?: (refPath: readonly string[], context: PayloadResolutionContext) => PayloadResolution;
|
|
42
|
+
readonly semanticProvider?: SemanticProvider;
|
|
43
|
+
readonly constraintProvider?: ConstraintProvider;
|
|
44
|
+
}
|
|
45
|
+
declare function validatePayload(value: unknown, schema: SchemaNode, context?: PayloadValidationContext): PayloadValidationResult;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { PayloadResolution as a, PayloadValidationDiagnostic as c, validatePayload as d, PayloadProviderDecision as i, PayloadValidationResult as l, PayloadPath as n, PayloadResolutionContext as o, PayloadProviderContext as r, PayloadValidationContext as s, ConstraintProvider as t, SemanticProvider as u };
|
|
@@ -82,6 +82,11 @@ interface SchemaSelfRefNode {
|
|
|
82
82
|
}
|
|
83
83
|
/** Closed serializable SchemaIR contract model. */
|
|
84
84
|
type SchemaNode = SchemaPrimitiveNode | SchemaLiteralNode | SchemaRecordNode | SchemaArrayNode | SchemaTupleNode | SchemaLiteralUnionNode | SchemaNullableNode | SchemaTaggedUnionNode | SchemaRefNode | SchemaSelfRefNode;
|
|
85
|
+
/** A host-provided schema bound for an external `refPath`. */
|
|
86
|
+
interface SchemaRefEntry {
|
|
87
|
+
readonly refPath: readonly string[];
|
|
88
|
+
readonly schema: SchemaNode;
|
|
89
|
+
}
|
|
85
90
|
//#endregion
|
|
86
91
|
//#region src/spec/operation.d.ts
|
|
87
92
|
type OperationBinaryMetadata = {
|
|
@@ -365,4 +370,4 @@ declare const STANDARD_SEMANTIC_DEFINITIONS: ReadonlyArray<StandardSemanticDefin
|
|
|
365
370
|
declare const STANDARD_SEMANTIC_RELATIONS: ReadonlyArray<StandardSemanticRelation>;
|
|
366
371
|
declare const STANDARD_CONSTRAINT_DEFINITIONS: ReadonlyArray<StandardConstraintDefinition>;
|
|
367
372
|
//#endregion
|
|
368
|
-
export { StructuredOperationPayloadDefinition as $, SchemaTypeOpaqueHostExpr as A, SchemaTypeValueOfExpr as B, SchemaTypeIntersectExpr as C, SchemaTypeNeverExpr as D, SchemaTypeMergeRecordsExpr as E, SchemaTypeRequiredFieldsExpr as F, OperationChannelDefinition as G, SchemaVariantSelector as H, SchemaTypeTaggedUnionExpr as I, OperationErrorDefinition as J, OperationContainerDefinition as K, SchemaTypeTerm as L, SchemaTypePickFieldsExpr as M, SchemaTypeRecordExpr as N, SchemaTypeNullableExpr as O, SchemaTypeRefineExpr as P, StructuredOperationDefinition as Q, SchemaTypeTupleExpr as R, SchemaTypeFieldsOfExpr as S, SchemaTypeMaybeAbsentExpr as T, Operation as U, SchemaTypeVariableExpr as V, OperationBinaryMetadata as W, StructuredOperationChannelDefinition as X, OperationPayloadDefinition as Y, StructuredOperationContainerDefinition as Z, SchemaTypeElementOfExpr as _,
|
|
373
|
+
export { StructuredOperationPayloadDefinition as $, SchemaTypeOpaqueHostExpr as A, SchemaTypeValueOfExpr as B, SchemaTypeIntersectExpr as C, SchemaTypeNeverExpr as D, SchemaTypeMergeRecordsExpr as E, SchemaTypeRequiredFieldsExpr as F, OperationChannelDefinition as G, SchemaVariantSelector as H, SchemaTypeTaggedUnionExpr as I, OperationErrorDefinition as J, OperationContainerDefinition as K, SchemaTypeTerm as L, SchemaTypePickFieldsExpr as M, SchemaTypeRecordExpr as N, SchemaTypeNullableExpr as O, SchemaTypeRefineExpr as P, StructuredOperationDefinition as Q, SchemaTypeTupleExpr as R, SchemaTypeFieldsOfExpr as S, SchemaTypeMaybeAbsentExpr as T, Operation as U, SchemaTypeVariableExpr as V, OperationBinaryMetadata as W, StructuredOperationChannelDefinition as X, OperationPayloadDefinition as Y, StructuredOperationContainerDefinition as Z, SchemaTypeElementOfExpr as _, SchemaSelfRefNode as _t, StandardSemanticDefinition as a, SchemaConstraint as at, SchemaTypeExtractVariantsExpr as b, SchemaTaggedUnionVariant as bt, STANDARD_CONSTRAINT_PATH_LIST as c, SchemaNode as ct, Expression as d, SchemaNumberNode as dt, JsonValue as et, ExpressionArgument as f, SchemaPrimitiveNode as ft, SchemaTypeElementAtExpr as g, SchemaRefNode as gt, SchemaTypeArrayExpr as h, SchemaRefEntry as ht, StandardConstraintDefinition as i, SchemaBooleanNode as it, SchemaTypePartialFieldsExpr as j, SchemaTypeOmitFieldsExpr as k, STANDARD_SEMANTIC_PATHS as l, SchemaNullNode as lt, SchemaTypeAbsentExpr as m, SchemaRecordNode as mt, STANDARD_SEMANTIC_DEFINITIONS as n, PrimitiveName as nt, StandardSemanticRelation as o, SchemaLiteralNode as ot, SchemaFieldSelector as p, SchemaRecordField as pt, OperationDefinition as q, STANDARD_SEMANTIC_RELATIONS as r, SchemaArrayNode as rt, STANDARD_CONSTRAINT_PATHS as s, SchemaLiteralUnionNode as st, STANDARD_CONSTRAINT_DEFINITIONS as t, LiteralValue as tt, STANDARD_SEMANTIC_PATH_LIST as u, SchemaNullableNode as ut, SchemaTypeExcludeVariantsExpr as v, SchemaStringNode as vt, SchemaTypeKeyOfExpr as w, SchemaTypeFieldOfExpr as x, SchemaTupleNode as xt, SchemaTypeExpr as y, SchemaTaggedUnionNode as yt, SchemaTypeUnknownExpr as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as SchemaTypeTerm, ct as SchemaNode, y as SchemaTypeExpr } from "./index-
|
|
2
|
-
import {
|
|
1
|
+
import { L as SchemaTypeTerm, ct as SchemaNode, ht as SchemaRefEntry, y as SchemaTypeExpr } from "./index-1sDuqu05.js";
|
|
2
|
+
import { d as RelationResult, i as RelationContext } from "./index-DxvfPmw6.js";
|
|
3
3
|
|
|
4
4
|
//#region src/type-interpreter/interpreter.d.ts
|
|
5
5
|
type TypeInterpreterPath = readonly (string | number)[];
|
|
@@ -23,30 +23,14 @@ type TypeInterpreterResult = {
|
|
|
23
23
|
readonly status: 'rejected';
|
|
24
24
|
readonly issues: readonly TypeInterpreterDiagnostic[];
|
|
25
25
|
};
|
|
26
|
-
type TypeInterpreterRefResolution = SchemaNode | {
|
|
27
|
-
readonly status: 'resolved';
|
|
28
|
-
readonly schema: SchemaNode;
|
|
29
|
-
} | {
|
|
30
|
-
readonly status: 'unknown' | 'unsupported';
|
|
31
|
-
readonly message?: string;
|
|
32
|
-
} | undefined;
|
|
33
|
-
type AsyncTypeInterpreterRefResolution = TypeInterpreterRefResolution | PromiseLike<TypeInterpreterRefResolution>;
|
|
34
26
|
interface TypeInterpreterContext {
|
|
35
27
|
readonly typeVars?: Readonly<Record<string, SchemaTypeTerm>>;
|
|
36
|
-
readonly
|
|
37
|
-
readonly maxDepth?: number;
|
|
38
|
-
readonly maxSteps?: number;
|
|
39
|
-
}
|
|
40
|
-
interface AsyncTypeInterpreterContext {
|
|
41
|
-
readonly typeVars?: Readonly<Record<string, SchemaTypeTerm>>;
|
|
42
|
-
readonly resolveRef?: (refPath: readonly string[]) => AsyncTypeInterpreterRefResolution;
|
|
28
|
+
readonly refs?: readonly SchemaRefEntry[];
|
|
43
29
|
readonly maxDepth?: number;
|
|
44
30
|
readonly maxSteps?: number;
|
|
45
31
|
}
|
|
46
32
|
declare function evaluateExpression(term: unknown, context?: TypeInterpreterContext): TypeInterpreterResult;
|
|
47
|
-
declare function evaluateExpressionAsync(term: unknown, context?: AsyncTypeInterpreterContext): Promise<TypeInterpreterResult>;
|
|
48
33
|
declare const evaluateSchemaTypeTerm: typeof evaluateExpression;
|
|
49
|
-
declare const evaluateSchemaTypeTermAsync: typeof evaluateExpressionAsync;
|
|
50
34
|
//#endregion
|
|
51
35
|
//#region src/type-interpreter/term-relation.d.ts
|
|
52
36
|
interface TypeTermRelationContext {
|
|
@@ -54,17 +38,11 @@ interface TypeTermRelationContext {
|
|
|
54
38
|
readonly relation?: RelationContext;
|
|
55
39
|
readonly hostTypeRelation?: (sourcePath: readonly string[], targetPath: readonly string[]) => HostTypeRelationDecision;
|
|
56
40
|
}
|
|
57
|
-
interface AsyncTypeTermRelationContext {
|
|
58
|
-
readonly interpreter?: AsyncTypeInterpreterContext;
|
|
59
|
-
readonly relation?: AsyncRelationContext;
|
|
60
|
-
readonly hostTypeRelation?: (sourcePath: readonly string[], targetPath: readonly string[]) => HostTypeRelationDecision | PromiseLike<HostTypeRelationDecision>;
|
|
61
|
-
}
|
|
62
41
|
type HostTypeRelationDecision = boolean | {
|
|
63
42
|
readonly status: 'assignable' | 'incompatible' | 'unknown' | 'unsupported';
|
|
64
43
|
readonly message?: string;
|
|
65
44
|
};
|
|
66
45
|
declare function checkTypeTermRelation(source: SchemaTypeTerm, target: SchemaTypeTerm, context?: TypeTermRelationContext): RelationResult;
|
|
67
|
-
declare function checkTypeTermRelationAsync(source: SchemaTypeTerm, target: SchemaTypeTerm, context?: AsyncTypeTermRelationContext): Promise<RelationResult>;
|
|
68
46
|
//#endregion
|
|
69
47
|
//#region src/type-interpreter/type-variable-solver.d.ts
|
|
70
48
|
interface TypeVariableConstraint {
|
|
@@ -90,10 +68,6 @@ interface TypeVariableSolverResult {
|
|
|
90
68
|
interface TypeVariableSolverContext extends TypeTermRelationContext {
|
|
91
69
|
readonly interpreter?: TypeInterpreterContext;
|
|
92
70
|
}
|
|
93
|
-
interface AsyncTypeVariableSolverContext extends AsyncTypeTermRelationContext {
|
|
94
|
-
readonly interpreter?: AsyncTypeInterpreterContext;
|
|
95
|
-
}
|
|
96
71
|
declare function solveTypeVariables(input: TypeVariableSolverInput, context?: TypeVariableSolverContext): TypeVariableSolverResult;
|
|
97
|
-
declare function solveTypeVariablesAsync(input: TypeVariableSolverInput, context?: AsyncTypeVariableSolverContext): Promise<TypeVariableSolverResult>;
|
|
98
72
|
//#endregion
|
|
99
|
-
export {
|
|
73
|
+
export { evaluateSchemaTypeTerm as _, TypeVariableSolverResult as a, TypeTermRelationContext as c, TypeInterpreterContext as d, TypeInterpreterDiagnostic as f, evaluateExpression as g, TypeInterpreterStatus as h, TypeVariableSolverIssue as i, checkTypeTermRelation as l, TypeInterpreterResult as m, TypeVariableSolverContext as n, solveTypeVariables as o, TypeInterpreterPath as p, TypeVariableSolverInput as r, HostTypeRelationDecision as s, TypeVariableConstraint as t, EvaluatedTypeTerm as u };
|
package/dist/index.cjs
CHANGED
|
@@ -3,8 +3,10 @@ const require_standard = require('./standard-etPFZDJI.cjs');
|
|
|
3
3
|
require('./spec/index.cjs');
|
|
4
4
|
const require_definition = require('./definition-BLLBpLKv.cjs');
|
|
5
5
|
const require_payload_index = require('./payload/index.cjs');
|
|
6
|
-
const require_relations = require('./relations-
|
|
7
|
-
const
|
|
6
|
+
const require_relations = require('./relations-NUVJkAG8.cjs');
|
|
7
|
+
const require_compatibility_index = require('./compatibility/index.cjs');
|
|
8
|
+
const require_type_interpreter = require('./type-interpreter-D8xETgq1.cjs');
|
|
9
|
+
const require_resolve_index = require('./resolve/index.cjs');
|
|
8
10
|
const require_standard_index = require('./standard/index.cjs');
|
|
9
11
|
|
|
10
12
|
exports.DEFAULT_EXACT_RATIONAL_MAX_BITS = require_standard_index.DEFAULT_EXACT_RATIONAL_MAX_BITS;
|
|
@@ -19,19 +21,13 @@ exports.STANDARD_SEMANTIC_PATH_LIST = require_standard.STANDARD_SEMANTIC_PATH_LI
|
|
|
19
21
|
exports.STANDARD_SEMANTIC_RELATIONS = require_standard.STANDARD_SEMANTIC_RELATIONS;
|
|
20
22
|
exports.buildStandardConstraintProfile = require_standard_index.buildStandardConstraintProfile;
|
|
21
23
|
exports.checkOperationRelation = require_relations.checkOperationRelation;
|
|
22
|
-
exports.checkOperationRelationAsync = require_relations.checkOperationRelationAsync;
|
|
23
24
|
exports.checkSchemaAssignability = require_relations.checkSchemaAssignability;
|
|
24
|
-
exports.checkSchemaAssignabilityAsync = require_relations.checkSchemaAssignabilityAsync;
|
|
25
25
|
exports.checkSchemaRelation = require_relations.checkSchemaRelation;
|
|
26
|
-
exports.checkSchemaRelationAsync = require_relations.checkSchemaRelationAsync;
|
|
27
26
|
exports.checkTypeTermRelation = require_type_interpreter.checkTypeTermRelation;
|
|
28
|
-
exports.checkTypeTermRelationAsync = require_type_interpreter.checkTypeTermRelationAsync;
|
|
29
27
|
exports.classifySemanticPath = require_standard_index.classifySemanticPath;
|
|
30
28
|
exports.createStandardRelationContext = require_standard_index.createStandardRelationContext;
|
|
31
29
|
exports.evaluateExpression = require_type_interpreter.evaluateExpression;
|
|
32
|
-
exports.evaluateExpressionAsync = require_type_interpreter.evaluateExpressionAsync;
|
|
33
30
|
exports.evaluateSchemaTypeTerm = require_type_interpreter.evaluateSchemaTypeTerm;
|
|
34
|
-
exports.evaluateSchemaTypeTermAsync = require_type_interpreter.evaluateSchemaTypeTermAsync;
|
|
35
31
|
exports.exactRationalFromFiniteNumber = require_standard_index.exactRationalFromFiniteNumber;
|
|
36
32
|
exports.exactRationalIsIntegerMultiple = require_standard_index.exactRationalIsIntegerMultiple;
|
|
37
33
|
Object.defineProperty(exports, 'expression', {
|
|
@@ -51,6 +47,12 @@ exports.isStructuredOperationDefinition = require_definition.isStructuredOperati
|
|
|
51
47
|
exports.leastCommonMultipleRationals = require_standard_index.leastCommonMultipleRationals;
|
|
52
48
|
exports.pathKey = require_standard_index.pathKey;
|
|
53
49
|
exports.refineStandardSchema = require_standard_index.refineStandardSchema;
|
|
50
|
+
exports.reportOperationCompatibility = require_compatibility_index.reportOperationCompatibility;
|
|
51
|
+
exports.reportSchemaCompatibility = require_compatibility_index.reportSchemaCompatibility;
|
|
52
|
+
exports.resolveOperationClosure = require_resolve_index.resolveOperationClosure;
|
|
53
|
+
exports.resolveOperationClosureAsync = require_resolve_index.resolveOperationClosureAsync;
|
|
54
|
+
exports.resolveSchemaReferences = require_resolve_index.resolveSchemaReferences;
|
|
55
|
+
exports.resolveSchemaReferencesAsync = require_resolve_index.resolveSchemaReferencesAsync;
|
|
54
56
|
Object.defineProperty(exports, 'schema', {
|
|
55
57
|
enumerable: true,
|
|
56
58
|
get: function () {
|
|
@@ -58,7 +60,6 @@ Object.defineProperty(exports, 'schema', {
|
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
62
|
exports.solveTypeVariables = require_type_interpreter.solveTypeVariables;
|
|
61
|
-
exports.solveTypeVariablesAsync = require_type_interpreter.solveTypeVariablesAsync;
|
|
62
63
|
exports.standardConstraintProvider = require_standard_index.standardConstraintProvider;
|
|
63
64
|
exports.standardConstraintRegistry = require_standard_index.standardConstraintRegistry;
|
|
64
65
|
exports.standardConstraintTarget = require_standard_index.standardConstraintTarget;
|
|
@@ -72,7 +73,6 @@ exports.standardVocabularyRegistry = require_standard_index.standardVocabularyRe
|
|
|
72
73
|
exports.validateOperationContainerDefinition = require_definition.validateOperationContainerDefinition;
|
|
73
74
|
exports.validateOperationDefinition = require_definition.validateOperationDefinition;
|
|
74
75
|
exports.validatePayload = require_payload_index.validatePayload;
|
|
75
|
-
exports.validatePayloadAsync = require_payload_index.validatePayloadAsync;
|
|
76
76
|
exports.validateSchemaNodeDefinition = require_definition.validateSchemaNodeDefinition;
|
|
77
77
|
exports.validateSchemaTypeExprDefinition = require_definition.validateSchemaTypeExprDefinition;
|
|
78
78
|
exports.validateSchemaTypeTermDefinition = require_definition.validateSchemaTypeTermDefinition;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { $ as isExtensionSemanticPath, A as BuildStandardConstraintProfileOptions, B as ExactRationalFailureReason, C as standardSchemaSatisfiability, D as standardPayloadContext, E as standardConstraintTarget, F as StandardConstraintSatisfiability, G as greatestCommonDivisorRationals, H as exactRationalFromFiniteNumber, I as buildStandardConstraintProfile, J as STANDARD_CONSTRAINT_DEFINITION_MAP, K as leastCommonMultipleRationals, L as isStandardConstraintOwner, M as StandardConstraintInterval, N as StandardConstraintOwner, O as standardSemanticProvider, P as StandardConstraintProfile, Q as classifySemanticPath, R as DEFAULT_EXACT_RATIONAL_MAX_BITS, S as refineStandardSchema, T as standardConstraintRegistry, U as exactRationalIsIntegerMultiple, V as ExactRationalResult, W as formatExactRational, X as StandardSemanticResolution, Y as STANDARD_SEMANTIC_DEFINITION_MAP, Z as StandardVocabularyRegistry, _ as createStandardRelationContext, a as InferOperationOutput, b as StandardSchemaOperationResult, c as expression_d_exports, d as InferFailureReason, et as isStandardSemanticNamespace, f as InferRef, g as StandardProviderContext, h as StaticSchemaRegistryEntry, i as InferOperationInput, j as StandardConstraintBound, k as standardSemanticRegistry, l as schema_d_exports, m as StaticSchemaRegistry, n as InferOperationEmits, nt as standardVocabularyRegistry, o as InferOperationPayload, p as InferResult, q as ClassifiedSemanticPath, r as InferOperationErrors, s as OperationRegistry, t as InferOperation, tt as pathKey, u as Infer, v as standardRelationContext, w as standardConstraintProvider, x as intersectStandardSchemas, y as standardVocabularyProvider, z as ExactRational } from "./index-
|
|
2
|
-
import { $ as StructuredOperationPayloadDefinition, A as SchemaTypeOpaqueHostExpr, B as SchemaTypeValueOfExpr, C as SchemaTypeIntersectExpr, D as SchemaTypeNeverExpr, E as SchemaTypeMergeRecordsExpr, F as SchemaTypeRequiredFieldsExpr, G as OperationChannelDefinition, H as SchemaVariantSelector, I as SchemaTypeTaggedUnionExpr, J as OperationErrorDefinition, K as OperationContainerDefinition, L as SchemaTypeTerm, M as SchemaTypePickFieldsExpr, N as SchemaTypeRecordExpr, O as SchemaTypeNullableExpr, P as SchemaTypeRefineExpr, Q as StructuredOperationDefinition, R as SchemaTypeTupleExpr, S as SchemaTypeFieldsOfExpr, T as SchemaTypeMaybeAbsentExpr, U as Operation, V as SchemaTypeVariableExpr, W as OperationBinaryMetadata, X as StructuredOperationChannelDefinition, Y as OperationPayloadDefinition, Z as StructuredOperationContainerDefinition, _ as SchemaTypeElementOfExpr, _t as
|
|
3
|
-
import { _ as validateStructuredOperationDefinition, a as validateSchemaTypeTermDefinition, b as SchemaNodeDefinitionValidationResult, c as OperationDefinitionPath, d as StructuredOperationDefinitionValidationResult, f as isStructuredOperationContainerDefinition, g as validateStructuredOperationContainerDefinition, h as validateOperationDefinition, i as validateSchemaTypeExprDefinition, l as OperationDefinitionValidationResult, m as validateOperationContainerDefinition, n as SchemaTypeExprDefinitionValidationResult, o as OperationContainerDefinitionValidationResult, p as isStructuredOperationDefinition, r as SchemaTypeTermDefinitionValidationResult, s as OperationDefinitionDiagnostic, t as SchemaTypeDefinitionDiagnostic, u as StructuredOperationContainerDefinitionValidationResult, v as SchemaNodeDefinitionDiagnostic, x as validateSchemaNodeDefinition, y as SchemaNodeDefinitionPath } from "./index-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { $ as isExtensionSemanticPath, A as BuildStandardConstraintProfileOptions, B as ExactRationalFailureReason, C as standardSchemaSatisfiability, D as standardPayloadContext, E as standardConstraintTarget, F as StandardConstraintSatisfiability, G as greatestCommonDivisorRationals, H as exactRationalFromFiniteNumber, I as buildStandardConstraintProfile, J as STANDARD_CONSTRAINT_DEFINITION_MAP, K as leastCommonMultipleRationals, L as isStandardConstraintOwner, M as StandardConstraintInterval, N as StandardConstraintOwner, O as standardSemanticProvider, P as StandardConstraintProfile, Q as classifySemanticPath, R as DEFAULT_EXACT_RATIONAL_MAX_BITS, S as refineStandardSchema, T as standardConstraintRegistry, U as exactRationalIsIntegerMultiple, V as ExactRationalResult, W as formatExactRational, X as StandardSemanticResolution, Y as STANDARD_SEMANTIC_DEFINITION_MAP, Z as StandardVocabularyRegistry, _ as createStandardRelationContext, a as InferOperationOutput, b as StandardSchemaOperationResult, c as expression_d_exports, d as InferFailureReason, et as isStandardSemanticNamespace, f as InferRef, g as StandardProviderContext, h as StaticSchemaRegistryEntry, i as InferOperationInput, j as StandardConstraintBound, k as standardSemanticRegistry, l as schema_d_exports, m as StaticSchemaRegistry, n as InferOperationEmits, nt as standardVocabularyRegistry, o as InferOperationPayload, p as InferResult, q as ClassifiedSemanticPath, r as InferOperationErrors, s as OperationRegistry, t as InferOperation, tt as pathKey, u as Infer, v as standardRelationContext, w as standardConstraintProvider, x as intersectStandardSchemas, y as standardVocabularyProvider, z as ExactRational } from "./index-CK7Is7vy.cjs";
|
|
2
|
+
import { $ as StructuredOperationPayloadDefinition, A as SchemaTypeOpaqueHostExpr, B as SchemaTypeValueOfExpr, C as SchemaTypeIntersectExpr, D as SchemaTypeNeverExpr, E as SchemaTypeMergeRecordsExpr, F as SchemaTypeRequiredFieldsExpr, G as OperationChannelDefinition, H as SchemaVariantSelector, I as SchemaTypeTaggedUnionExpr, J as OperationErrorDefinition, K as OperationContainerDefinition, L as SchemaTypeTerm, M as SchemaTypePickFieldsExpr, N as SchemaTypeRecordExpr, O as SchemaTypeNullableExpr, P as SchemaTypeRefineExpr, Q as StructuredOperationDefinition, R as SchemaTypeTupleExpr, S as SchemaTypeFieldsOfExpr, T as SchemaTypeMaybeAbsentExpr, U as Operation, V as SchemaTypeVariableExpr, W as OperationBinaryMetadata, X as StructuredOperationChannelDefinition, Y as OperationPayloadDefinition, Z as StructuredOperationContainerDefinition, _ as SchemaTypeElementOfExpr, _t as SchemaSelfRefNode, a as StandardSemanticDefinition, at as SchemaConstraint, b as SchemaTypeExtractVariantsExpr, bt as SchemaTaggedUnionVariant, c as STANDARD_CONSTRAINT_PATH_LIST, ct as SchemaNode, d as Expression, dt as SchemaNumberNode, et as JsonValue, f as ExpressionArgument, ft as SchemaPrimitiveNode, g as SchemaTypeElementAtExpr, gt as SchemaRefNode, h as SchemaTypeArrayExpr, ht as SchemaRefEntry, i as StandardConstraintDefinition, it as SchemaBooleanNode, j as SchemaTypePartialFieldsExpr, k as SchemaTypeOmitFieldsExpr, l as STANDARD_SEMANTIC_PATHS, lt as SchemaNullNode, m as SchemaTypeAbsentExpr, mt as SchemaRecordNode, n as STANDARD_SEMANTIC_DEFINITIONS, nt as PrimitiveName, o as StandardSemanticRelation, ot as SchemaLiteralNode, p as SchemaFieldSelector, pt as SchemaRecordField, q as OperationDefinition, r as STANDARD_SEMANTIC_RELATIONS, rt as SchemaArrayNode, s as STANDARD_CONSTRAINT_PATHS, st as SchemaLiteralUnionNode, t as STANDARD_CONSTRAINT_DEFINITIONS, tt as LiteralValue, u as STANDARD_SEMANTIC_PATH_LIST, ut as SchemaNullableNode, v as SchemaTypeExcludeVariantsExpr, vt as SchemaStringNode, w as SchemaTypeKeyOfExpr, x as SchemaTypeFieldOfExpr, xt as SchemaTupleNode, y as SchemaTypeExpr, yt as SchemaTaggedUnionNode, z as SchemaTypeUnknownExpr } from "./index-i7Au-FQ6.cjs";
|
|
3
|
+
import { _ as validateStructuredOperationDefinition, a as validateSchemaTypeTermDefinition, b as SchemaNodeDefinitionValidationResult, c as OperationDefinitionPath, d as StructuredOperationDefinitionValidationResult, f as isStructuredOperationContainerDefinition, g as validateStructuredOperationContainerDefinition, h as validateOperationDefinition, i as validateSchemaTypeExprDefinition, l as OperationDefinitionValidationResult, m as validateOperationContainerDefinition, n as SchemaTypeExprDefinitionValidationResult, o as OperationContainerDefinitionValidationResult, p as isStructuredOperationDefinition, r as SchemaTypeTermDefinitionValidationResult, s as OperationDefinitionDiagnostic, t as SchemaTypeDefinitionDiagnostic, u as StructuredOperationContainerDefinitionValidationResult, v as SchemaNodeDefinitionDiagnostic, x as validateSchemaNodeDefinition, y as SchemaNodeDefinitionPath } from "./index-DGHMUZ5m.cjs";
|
|
4
|
+
import { a as PayloadResolution, c as PayloadValidationDiagnostic, d as validatePayload, i as PayloadProviderDecision, l as PayloadValidationResult, n as PayloadPath, o as PayloadResolutionContext, r as PayloadProviderContext, s as PayloadValidationContext, t as ConstraintProvider, u as SemanticProvider } from "./index-CzNxjqVg.cjs";
|
|
5
|
+
import { a as RelationDiagnostic, c as RelationProviderDecision, d as RelationResult, f as RelationSide, h as checkSchemaRelation, i as RelationContext, l as RelationResolution, m as checkSchemaAssignability, n as OperationRelationDirection, o as RelationPath, p as RelationStatus, r as checkOperationRelation, s as RelationProviderContext, t as OperationRelationComponent, u as RelationResolutionContext } from "./index-ba_52Yu9.cjs";
|
|
6
|
+
import { a as reportSchemaCompatibility, i as reportOperationCompatibility, n as CompatibilityReport, r as CompatibilityStatus, t as CompatibilityCheck } from "./index-BfbClf6R.cjs";
|
|
7
|
+
import { _ as evaluateSchemaTypeTerm, a as TypeVariableSolverResult, c as TypeTermRelationContext, d as TypeInterpreterContext, f as TypeInterpreterDiagnostic, g as evaluateExpression, h as TypeInterpreterStatus, i as TypeVariableSolverIssue, l as checkTypeTermRelation, m as TypeInterpreterResult, n as TypeVariableSolverContext, o as solveTypeVariables, p as TypeInterpreterPath, r as TypeVariableSolverInput, s as HostTypeRelationDecision, t as TypeVariableConstraint, u as EvaluatedTypeTerm } from "./index-BGz7L_Fq.cjs";
|
|
8
|
+
import { a as SchemaClosureResolutionContext, c as SchemaRefResolution, d as resolveSchemaReferences, f as resolveSchemaReferencesAsync, i as SchemaClosureDiagnostic, l as resolveOperationClosure, n as ResolvedSchemaGraph, o as SchemaClosureResult, r as SchemaClosureContext, s as SchemaClosureStatus, t as AsyncSchemaClosureContext, u as resolveOperationClosureAsync } from "./index-CUGhtuwA.cjs";
|
|
9
|
+
export { AsyncSchemaClosureContext, BuildStandardConstraintProfileOptions, ClassifiedSemanticPath, CompatibilityCheck, CompatibilityReport, CompatibilityStatus, ConstraintProvider, DEFAULT_EXACT_RATIONAL_MAX_BITS, EvaluatedTypeTerm, ExactRational, ExactRationalFailureReason, ExactRationalResult, Expression, ExpressionArgument, HostTypeRelationDecision, Infer, InferFailureReason, InferOperation, InferOperationEmits, InferOperationErrors, InferOperationInput, InferOperationOutput, InferOperationPayload, InferRef, InferResult, JsonValue, LiteralValue, Operation, OperationBinaryMetadata, OperationChannelDefinition, OperationContainerDefinition, OperationContainerDefinitionValidationResult, OperationDefinition, OperationDefinitionDiagnostic, OperationDefinitionPath, OperationDefinitionValidationResult, OperationErrorDefinition, OperationPayloadDefinition, OperationRegistry, OperationRelationComponent, OperationRelationDirection, PayloadPath, PayloadProviderContext, PayloadProviderDecision, PayloadResolution, PayloadResolutionContext, PayloadValidationContext, PayloadValidationDiagnostic, PayloadValidationResult, PrimitiveName, RelationContext, RelationDiagnostic, RelationPath, RelationProviderContext, RelationProviderDecision, RelationResolution, RelationResolutionContext, RelationResult, RelationSide, RelationStatus, ResolvedSchemaGraph, STANDARD_CONSTRAINT_DEFINITIONS, STANDARD_CONSTRAINT_DEFINITION_MAP, STANDARD_CONSTRAINT_PATHS, STANDARD_CONSTRAINT_PATH_LIST, STANDARD_SEMANTIC_DEFINITIONS, STANDARD_SEMANTIC_DEFINITION_MAP, STANDARD_SEMANTIC_PATHS, STANDARD_SEMANTIC_PATH_LIST, STANDARD_SEMANTIC_RELATIONS, SchemaArrayNode, SchemaBooleanNode, SchemaClosureContext, SchemaClosureDiagnostic, SchemaClosureResolutionContext, SchemaClosureResult, SchemaClosureStatus, SchemaConstraint, SchemaFieldSelector, SchemaLiteralNode, SchemaLiteralUnionNode, SchemaNode, SchemaNodeDefinitionDiagnostic, SchemaNodeDefinitionPath, SchemaNodeDefinitionValidationResult, SchemaNullNode, SchemaNullableNode, SchemaNumberNode, SchemaPrimitiveNode, SchemaRecordField, SchemaRecordNode, SchemaRefEntry, SchemaRefNode, SchemaRefResolution, SchemaSelfRefNode, SchemaStringNode, SchemaTaggedUnionNode, SchemaTaggedUnionVariant, SchemaTupleNode, SchemaTypeAbsentExpr, SchemaTypeArrayExpr, SchemaTypeDefinitionDiagnostic, SchemaTypeElementAtExpr, SchemaTypeElementOfExpr, SchemaTypeExcludeVariantsExpr, SchemaTypeExpr, SchemaTypeExprDefinitionValidationResult, SchemaTypeExtractVariantsExpr, SchemaTypeFieldOfExpr, SchemaTypeFieldsOfExpr, SchemaTypeIntersectExpr, SchemaTypeKeyOfExpr, SchemaTypeMaybeAbsentExpr, SchemaTypeMergeRecordsExpr, SchemaTypeNeverExpr, SchemaTypeNullableExpr, SchemaTypeOmitFieldsExpr, SchemaTypeOpaqueHostExpr, SchemaTypePartialFieldsExpr, SchemaTypePickFieldsExpr, SchemaTypeRecordExpr, SchemaTypeRefineExpr, SchemaTypeRequiredFieldsExpr, SchemaTypeTaggedUnionExpr, SchemaTypeTerm, SchemaTypeTermDefinitionValidationResult, SchemaTypeTupleExpr, SchemaTypeUnknownExpr, SchemaTypeValueOfExpr, SchemaTypeVariableExpr, SchemaVariantSelector, SemanticProvider, StandardConstraintBound, StandardConstraintDefinition, StandardConstraintInterval, StandardConstraintOwner, StandardConstraintProfile, StandardConstraintSatisfiability, StandardProviderContext, StandardSchemaOperationResult, StandardSemanticDefinition, StandardSemanticRelation, StandardSemanticResolution, StandardVocabularyRegistry, StaticSchemaRegistry, StaticSchemaRegistryEntry, StructuredOperationChannelDefinition, StructuredOperationContainerDefinition, StructuredOperationContainerDefinitionValidationResult, StructuredOperationDefinition, StructuredOperationDefinitionValidationResult, StructuredOperationPayloadDefinition, TypeInterpreterContext, TypeInterpreterDiagnostic, TypeInterpreterPath, TypeInterpreterResult, TypeInterpreterStatus, TypeTermRelationContext, TypeVariableConstraint, TypeVariableSolverContext, TypeVariableSolverInput, TypeVariableSolverIssue, TypeVariableSolverResult, buildStandardConstraintProfile, checkOperationRelation, checkSchemaAssignability, checkSchemaRelation, checkTypeTermRelation, classifySemanticPath, createStandardRelationContext, evaluateExpression, evaluateSchemaTypeTerm, exactRationalFromFiniteNumber, exactRationalIsIntegerMultiple, expression_d_exports as expression, formatExactRational, greatestCommonDivisorRationals, intersectStandardSchemas, isExtensionSemanticPath, isStandardConstraintOwner, isStandardSemanticNamespace, isStructuredOperationContainerDefinition, isStructuredOperationDefinition, leastCommonMultipleRationals, pathKey, refineStandardSchema, reportOperationCompatibility, reportSchemaCompatibility, resolveOperationClosure, resolveOperationClosureAsync, resolveSchemaReferences, resolveSchemaReferencesAsync, schema_d_exports as schema, solveTypeVariables, standardConstraintProvider, standardConstraintRegistry, standardConstraintTarget, standardPayloadContext, standardRelationContext, standardSchemaSatisfiability, standardSemanticProvider, standardSemanticRegistry, standardVocabularyProvider, standardVocabularyRegistry, validateOperationContainerDefinition, validateOperationDefinition, validatePayload, validateSchemaNodeDefinition, validateSchemaTypeExprDefinition, validateSchemaTypeTermDefinition, validateStructuredOperationContainerDefinition, validateStructuredOperationDefinition };
|