@revisium/schema-toolkit 0.20.2 → 0.21.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/README.md +216 -0
- package/dist/FormulaPathBuilder-BUJRR0Am.d.cts +48 -0
- package/dist/FormulaPathBuilder-QR0htn-e.d.ts +48 -0
- package/dist/{chunk-VGADCIBG.cjs → chunk-2PIMJSWJ.cjs} +12 -8
- package/dist/chunk-3MJP73IJ.js +1 -0
- package/dist/{chunk-LLHQWDAR.js → chunk-4U2RZHMX.js} +19 -21
- package/dist/{chunk-Q2UOTIMG.js → chunk-5DUMJHCA.js} +0 -2
- package/dist/{chunk-V6JTSET2.cjs → chunk-7JWCZZPJ.cjs} +49 -51
- package/dist/{chunk-YFWOURZL.js → chunk-7PEC6ZYY.js} +0 -2
- package/dist/chunk-AV5EZUMZ.cjs +2 -0
- package/dist/{chunk-3JZKQWQH.js → chunk-AWFMSOHM.js} +5 -7
- package/dist/{chunk-X2VRR7V7.cjs → chunk-ERW5XVED.cjs} +0 -2
- package/dist/{chunk-XNFSFT7T.cjs → chunk-EVD5ZI55.cjs} +0 -2
- package/dist/{chunk-ZRNFSUOV.cjs → chunk-FL6PWPVJ.cjs} +0 -2
- package/dist/{chunk-55AMH44G.js → chunk-FTBRJODD.js} +28 -30
- package/dist/{chunk-R3MS2N4A.js → chunk-GJM63Q4K.js} +0 -2
- package/dist/{chunk-U5YDA3LA.js → chunk-HFMZITNE.js} +238 -31
- package/dist/{chunk-EGC32GPY.cjs → chunk-ITYABUR5.cjs} +19 -21
- package/dist/{chunk-R4CFU33U.js → chunk-IZMBM36H.js} +10 -9
- package/dist/chunk-J4RVO37K.cjs +2 -0
- package/dist/{chunk-QEV4Q4TR.js → chunk-JLXX3SGF.js} +30 -32
- package/dist/{chunk-MPF6VCB5.js → chunk-NO655UI5.js} +0 -2
- package/dist/chunk-OAUVP6CU.js +1 -0
- package/dist/{chunk-B3T6YB2D.cjs → chunk-ONW2OVNQ.cjs} +28 -30
- package/dist/{chunk-32FZHFIO.cjs → chunk-QKA7DJDN.cjs} +0 -2
- package/dist/{chunk-46ME2TAU.cjs → chunk-RCCBUOGY.cjs} +5 -7
- package/dist/{chunk-IPL2CGVA.cjs → chunk-RQBW7ATZ.cjs} +0 -2
- package/dist/{chunk-FZ2MS4Q5.cjs → chunk-S5SRXND6.cjs} +307 -97
- package/dist/{chunk-WSPFHUHU.cjs → chunk-T3QQSHAC.cjs} +0 -2
- package/dist/{chunk-J6SCHJKG.cjs → chunk-VMELKZXD.cjs} +0 -2
- package/dist/{chunk-5VDDLW7U.js → chunk-WE4OLW5U.js} +0 -2
- package/dist/{chunk-JUOGJFTL.js → chunk-XKWWCXGB.js} +0 -2
- package/dist/{chunk-ZBPUTF3Q.js → chunk-ZPRBA4AQ.js} +0 -2
- package/dist/consts/index.cjs +4 -6
- package/dist/consts/index.js +2 -4
- package/dist/core/index.cjs +65 -69
- package/dist/core/index.d.cts +6 -4
- package/dist/core/index.d.ts +6 -4
- package/dist/core/index.js +4 -8
- package/dist/formula/index.cjs +7 -9
- package/dist/formula/index.d.cts +1 -1
- package/dist/formula/index.d.ts +1 -1
- package/dist/formula/index.js +1 -3
- package/dist/index.cjs +269 -248
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +15 -18
- package/dist/{json-patch.types-DY7k9hxy.d.ts → json-patch.types-BpVnp08Z.d.ts} +1 -1
- package/dist/{json-patch.types-Cu0Medki.d.cts → json-patch.types-eM6pYC2P.d.cts} +1 -1
- package/dist/{json-string.store-C58zbl31.d.ts → json-string.store-DfdLcgnM.d.ts} +11 -11
- package/dist/{json-string.store-DuI--IL2.d.cts → json-string.store-cAOADo23.d.cts} +11 -11
- package/dist/lib/index.cjs +51 -54
- package/dist/lib/index.d.cts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +7 -10
- package/dist/mocks/index.cjs +30 -21
- package/dist/mocks/index.d.cts +22 -8
- package/dist/mocks/index.d.ts +22 -8
- package/dist/mocks/index.js +2 -5
- package/dist/model/index.cjs +85 -78
- package/dist/model/index.d.cts +171 -346
- package/dist/model/index.d.ts +171 -346
- package/dist/model/index.js +4 -9
- package/dist/plugins/index.cjs +20 -23
- package/dist/plugins/index.d.cts +10 -10
- package/dist/plugins/index.d.ts +10 -10
- package/dist/plugins/index.js +2 -5
- package/dist/{schema.types-B5OgKLpV.d.cts → schema.types-On_VGw2m.d.cts} +7 -6
- package/dist/{schema.types-B5OgKLpV.d.ts → schema.types-On_VGw2m.d.ts} +7 -6
- package/dist/typed-BRZhUqGG.d.ts +502 -0
- package/dist/typed-Cri0IYAn.d.cts +502 -0
- package/dist/types/index.cjs +6 -9
- package/dist/types/index.d.cts +7 -5
- package/dist/types/index.d.ts +7 -5
- package/dist/types/index.js +2 -5
- package/dist/{FormulaPathBuilder-DwlKOvVB.d.ts → types-BIvIURgy.d.cts} +37 -82
- package/dist/{FormulaPathBuilder-D9LkBcSv.d.cts → types-C_pTFtSY.d.ts} +37 -82
- package/dist/validation-schemas/index.cjs +18 -20
- package/dist/validation-schemas/index.js +1 -3
- package/package.json +1 -1
- package/dist/chunk-32FZHFIO.cjs.map +0 -1
- package/dist/chunk-3FJZMVWA.js +0 -3
- package/dist/chunk-3FJZMVWA.js.map +0 -1
- package/dist/chunk-3IKI64T2.js +0 -3
- package/dist/chunk-3IKI64T2.js.map +0 -1
- package/dist/chunk-3JZKQWQH.js.map +0 -1
- package/dist/chunk-46ME2TAU.cjs.map +0 -1
- package/dist/chunk-55AMH44G.js.map +0 -1
- package/dist/chunk-5VDDLW7U.js.map +0 -1
- package/dist/chunk-B3T6YB2D.cjs.map +0 -1
- package/dist/chunk-EGC32GPY.cjs.map +0 -1
- package/dist/chunk-FZ2MS4Q5.cjs.map +0 -1
- package/dist/chunk-G6ZKEVVU.cjs +0 -4
- package/dist/chunk-G6ZKEVVU.cjs.map +0 -1
- package/dist/chunk-IPL2CGVA.cjs.map +0 -1
- package/dist/chunk-J6SCHJKG.cjs.map +0 -1
- package/dist/chunk-JUOGJFTL.js.map +0 -1
- package/dist/chunk-L6HE7QPU.cjs +0 -4
- package/dist/chunk-L6HE7QPU.cjs.map +0 -1
- package/dist/chunk-LLHQWDAR.js.map +0 -1
- package/dist/chunk-MPF6VCB5.js.map +0 -1
- package/dist/chunk-NY3H6C7K.js +0 -3
- package/dist/chunk-NY3H6C7K.js.map +0 -1
- package/dist/chunk-Q2UOTIMG.js.map +0 -1
- package/dist/chunk-QEV4Q4TR.js.map +0 -1
- package/dist/chunk-R3MS2N4A.js.map +0 -1
- package/dist/chunk-R4CFU33U.js.map +0 -1
- package/dist/chunk-TBFTADML.cjs +0 -4
- package/dist/chunk-TBFTADML.cjs.map +0 -1
- package/dist/chunk-U5YDA3LA.js.map +0 -1
- package/dist/chunk-V6JTSET2.cjs.map +0 -1
- package/dist/chunk-VGADCIBG.cjs.map +0 -1
- package/dist/chunk-WSPFHUHU.cjs.map +0 -1
- package/dist/chunk-X2VRR7V7.cjs.map +0 -1
- package/dist/chunk-XNFSFT7T.cjs.map +0 -1
- package/dist/chunk-YFWOURZL.js.map +0 -1
- package/dist/chunk-ZBPUTF3Q.js.map +0 -1
- package/dist/chunk-ZRNFSUOV.cjs.map +0 -1
- package/dist/consts/index.cjs.map +0 -1
- package/dist/consts/index.js.map +0 -1
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/formula/index.cjs.map +0 -1
- package/dist/formula/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/json-value-patch.types-CgiEpchp.d.ts +0 -24
- package/dist/json-value-patch.types-LEJxcIWR.d.cts +0 -24
- package/dist/lib/index.cjs.map +0 -1
- package/dist/lib/index.js.map +0 -1
- package/dist/mocks/index.cjs.map +0 -1
- package/dist/mocks/index.js.map +0 -1
- package/dist/model/index.cjs.map +0 -1
- package/dist/model/index.js.map +0 -1
- package/dist/plugins/index.cjs.map +0 -1
- package/dist/plugins/index.js.map +0 -1
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/validation-schemas/index.cjs.map +0 -1
- package/dist/validation-schemas/index.js.map +0 -1
|
@@ -1,6 +1,40 @@
|
|
|
1
|
-
import { h as JsonPatch } from './json-patch.types-DY7k9hxy.js';
|
|
2
1
|
import { ASTNode } from '@revisium/formula';
|
|
3
|
-
import {
|
|
2
|
+
import { h as JsonPatch } from './json-patch.types-eM6pYC2P.cjs';
|
|
3
|
+
|
|
4
|
+
type DiagnosticSeverity = 'error' | 'warning';
|
|
5
|
+
interface Diagnostic {
|
|
6
|
+
readonly severity: DiagnosticSeverity;
|
|
7
|
+
readonly type: string;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly params?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
interface SchemaLike {
|
|
13
|
+
readonly type?: string;
|
|
14
|
+
readonly required?: boolean;
|
|
15
|
+
readonly pattern?: string;
|
|
16
|
+
readonly minLength?: number;
|
|
17
|
+
readonly maxLength?: number;
|
|
18
|
+
readonly minimum?: number;
|
|
19
|
+
readonly maximum?: number;
|
|
20
|
+
readonly enum?: readonly (string | number)[];
|
|
21
|
+
readonly foreignKey?: string;
|
|
22
|
+
readonly [key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
interface ValidationContext {
|
|
25
|
+
readonly value: unknown;
|
|
26
|
+
readonly schema: SchemaLike;
|
|
27
|
+
readonly nodeName: string;
|
|
28
|
+
}
|
|
29
|
+
interface Validator {
|
|
30
|
+
readonly type: string;
|
|
31
|
+
validate(context: ValidationContext): Diagnostic | null;
|
|
32
|
+
}
|
|
33
|
+
interface ValidatorRule {
|
|
34
|
+
readonly validatorType: string;
|
|
35
|
+
shouldApply(context: ValidationContext): boolean;
|
|
36
|
+
}
|
|
37
|
+
type ValidatorFactoryFn = () => Validator;
|
|
4
38
|
|
|
5
39
|
interface FormulaDependency {
|
|
6
40
|
targetNodeId(): string;
|
|
@@ -87,26 +121,6 @@ interface Path extends BasePath<PathSegment, Path> {
|
|
|
87
121
|
childItems(): Path;
|
|
88
122
|
}
|
|
89
123
|
|
|
90
|
-
interface SchemaTree {
|
|
91
|
-
root(): SchemaNode;
|
|
92
|
-
nodeById(id: string): SchemaNode;
|
|
93
|
-
nodeAt(path: Path): SchemaNode;
|
|
94
|
-
pathOf(id: string): Path;
|
|
95
|
-
nodeIds(): IterableIterator<string>;
|
|
96
|
-
countNodes(): number;
|
|
97
|
-
clone(): SchemaTree;
|
|
98
|
-
trackReplacement(oldNodeId: string, newNodeId: string): void;
|
|
99
|
-
replacements(): IterableIterator<[string, string]>;
|
|
100
|
-
clearReplacements(): void;
|
|
101
|
-
addChildTo(parentId: string, node: SchemaNode): void;
|
|
102
|
-
insertChildAt(parentId: string, index: number, node: SchemaNode): void;
|
|
103
|
-
removeNodeAt(path: Path): boolean;
|
|
104
|
-
renameNode(nodeId: string, newName: string): void;
|
|
105
|
-
moveNode(nodeId: string, newParentId: string): void;
|
|
106
|
-
setNodeAt(path: Path, node: SchemaNode): void;
|
|
107
|
-
replaceRoot(newRoot: SchemaNode): void;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
124
|
type DefaultValueType = string | number | boolean | undefined;
|
|
111
125
|
type PropertyName = 'formula' | 'default' | 'description' | 'deprecated' | 'foreignKey' | 'contentMediaType' | 'ref' | 'title';
|
|
112
126
|
interface PropertyChange {
|
|
@@ -139,63 +153,4 @@ interface TreeFormulaValidationError {
|
|
|
139
153
|
fieldPath?: string;
|
|
140
154
|
}
|
|
141
155
|
|
|
142
|
-
type DiagnosticSeverity
|
|
143
|
-
interface Diagnostic {
|
|
144
|
-
readonly severity: DiagnosticSeverity;
|
|
145
|
-
readonly type: string;
|
|
146
|
-
readonly message: string;
|
|
147
|
-
readonly path: string;
|
|
148
|
-
readonly params?: Record<string, unknown>;
|
|
149
|
-
}
|
|
150
|
-
interface SchemaLike {
|
|
151
|
-
readonly type?: string;
|
|
152
|
-
readonly required?: boolean;
|
|
153
|
-
readonly pattern?: string;
|
|
154
|
-
readonly minLength?: number;
|
|
155
|
-
readonly maxLength?: number;
|
|
156
|
-
readonly minimum?: number;
|
|
157
|
-
readonly maximum?: number;
|
|
158
|
-
readonly enum?: readonly (string | number)[];
|
|
159
|
-
readonly foreignKey?: string;
|
|
160
|
-
readonly [key: string]: unknown;
|
|
161
|
-
}
|
|
162
|
-
interface ValidationContext {
|
|
163
|
-
readonly value: unknown;
|
|
164
|
-
readonly schema: SchemaLike;
|
|
165
|
-
readonly nodeName: string;
|
|
166
|
-
}
|
|
167
|
-
interface Validator {
|
|
168
|
-
readonly type: string;
|
|
169
|
-
validate(context: ValidationContext): Diagnostic | null;
|
|
170
|
-
}
|
|
171
|
-
interface ValidatorRule {
|
|
172
|
-
readonly validatorType: string;
|
|
173
|
-
shouldApply(context: ValidationContext): boolean;
|
|
174
|
-
}
|
|
175
|
-
type ValidatorFactoryFn = () => Validator;
|
|
176
|
-
|
|
177
|
-
interface SerializeOptions {
|
|
178
|
-
readonly strict?: boolean;
|
|
179
|
-
}
|
|
180
|
-
declare class FormulaSerializer {
|
|
181
|
-
private readonly tree;
|
|
182
|
-
private readonly formulaNodeId;
|
|
183
|
-
private readonly formula;
|
|
184
|
-
private readonly pathBuilder;
|
|
185
|
-
constructor(tree: SchemaTree, formulaNodeId: string, formula: Formula$1);
|
|
186
|
-
static toXFormula(tree: SchemaTree, formulaNodeId: string, formula: Formula$1): XFormula;
|
|
187
|
-
static serializeExpression(tree: SchemaTree, formulaNodeId: string, formula: Formula$1, options?: SerializeOptions): string;
|
|
188
|
-
serialize(options?: SerializeOptions): string;
|
|
189
|
-
private buildPathReplacements;
|
|
190
|
-
private needsReplacement;
|
|
191
|
-
private normalizeArrayNotation;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
declare class FormulaPathBuilder {
|
|
195
|
-
buildWithArrayNotation(fromPath: Path, toPath: Path): string;
|
|
196
|
-
private findCommonPrefixLength;
|
|
197
|
-
private buildPartsWithArrayNotation;
|
|
198
|
-
private formatPartsWithArrayNotation;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export { type BasePath as B, type Diagnostic as D, EMPTY_METADATA as E, type FormulaDependency as F, type NodeType as N, type Path as P, ResolvedDependency as R, type SchemaLike as S, type TreeFormulaValidationError as T, type ValidationContext as V, FormulaSerializer as a, FormulaPathBuilder as b, type PathSegment as c, type DiagnosticSeverity as d, type Validator as e, type ValidatorRule as f, type ValidatorFactoryFn as g, type SchemaValidationError as h, type SchemaValidationErrorType as i, type NodeMetadata as j, type Formula as k, type SchemaNode as l, type SchemaTree as m, type SchemaPatch as n, type DefaultValueType as o, type PropertyChange as p, type PropertyName as q, type BasePathSegment as r, type Formula$1 as s };
|
|
156
|
+
export { type BasePath as B, type Diagnostic as D, EMPTY_METADATA as E, type FormulaDependency as F, type NodeType as N, type Path as P, ResolvedDependency as R, type SchemaLike as S, type TreeFormulaValidationError as T, type ValidationContext as V, type PathSegment as a, type DiagnosticSeverity as b, type Validator as c, type ValidatorRule as d, type ValidatorFactoryFn as e, type SchemaValidationError as f, type SchemaValidationErrorType as g, type NodeMetadata as h, type Formula as i, type SchemaNode as j, type SchemaPatch as k, type DefaultValueType as l, type PropertyChange as m, type PropertyName as n, type Formula$1 as o, type BasePathSegment as p };
|
|
@@ -1,6 +1,40 @@
|
|
|
1
|
-
import { h as JsonPatch } from './json-patch.types-Cu0Medki.cjs';
|
|
2
1
|
import { ASTNode } from '@revisium/formula';
|
|
3
|
-
import {
|
|
2
|
+
import { h as JsonPatch } from './json-patch.types-BpVnp08Z.js';
|
|
3
|
+
|
|
4
|
+
type DiagnosticSeverity = 'error' | 'warning';
|
|
5
|
+
interface Diagnostic {
|
|
6
|
+
readonly severity: DiagnosticSeverity;
|
|
7
|
+
readonly type: string;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly params?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
interface SchemaLike {
|
|
13
|
+
readonly type?: string;
|
|
14
|
+
readonly required?: boolean;
|
|
15
|
+
readonly pattern?: string;
|
|
16
|
+
readonly minLength?: number;
|
|
17
|
+
readonly maxLength?: number;
|
|
18
|
+
readonly minimum?: number;
|
|
19
|
+
readonly maximum?: number;
|
|
20
|
+
readonly enum?: readonly (string | number)[];
|
|
21
|
+
readonly foreignKey?: string;
|
|
22
|
+
readonly [key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
interface ValidationContext {
|
|
25
|
+
readonly value: unknown;
|
|
26
|
+
readonly schema: SchemaLike;
|
|
27
|
+
readonly nodeName: string;
|
|
28
|
+
}
|
|
29
|
+
interface Validator {
|
|
30
|
+
readonly type: string;
|
|
31
|
+
validate(context: ValidationContext): Diagnostic | null;
|
|
32
|
+
}
|
|
33
|
+
interface ValidatorRule {
|
|
34
|
+
readonly validatorType: string;
|
|
35
|
+
shouldApply(context: ValidationContext): boolean;
|
|
36
|
+
}
|
|
37
|
+
type ValidatorFactoryFn = () => Validator;
|
|
4
38
|
|
|
5
39
|
interface FormulaDependency {
|
|
6
40
|
targetNodeId(): string;
|
|
@@ -87,26 +121,6 @@ interface Path extends BasePath<PathSegment, Path> {
|
|
|
87
121
|
childItems(): Path;
|
|
88
122
|
}
|
|
89
123
|
|
|
90
|
-
interface SchemaTree {
|
|
91
|
-
root(): SchemaNode;
|
|
92
|
-
nodeById(id: string): SchemaNode;
|
|
93
|
-
nodeAt(path: Path): SchemaNode;
|
|
94
|
-
pathOf(id: string): Path;
|
|
95
|
-
nodeIds(): IterableIterator<string>;
|
|
96
|
-
countNodes(): number;
|
|
97
|
-
clone(): SchemaTree;
|
|
98
|
-
trackReplacement(oldNodeId: string, newNodeId: string): void;
|
|
99
|
-
replacements(): IterableIterator<[string, string]>;
|
|
100
|
-
clearReplacements(): void;
|
|
101
|
-
addChildTo(parentId: string, node: SchemaNode): void;
|
|
102
|
-
insertChildAt(parentId: string, index: number, node: SchemaNode): void;
|
|
103
|
-
removeNodeAt(path: Path): boolean;
|
|
104
|
-
renameNode(nodeId: string, newName: string): void;
|
|
105
|
-
moveNode(nodeId: string, newParentId: string): void;
|
|
106
|
-
setNodeAt(path: Path, node: SchemaNode): void;
|
|
107
|
-
replaceRoot(newRoot: SchemaNode): void;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
124
|
type DefaultValueType = string | number | boolean | undefined;
|
|
111
125
|
type PropertyName = 'formula' | 'default' | 'description' | 'deprecated' | 'foreignKey' | 'contentMediaType' | 'ref' | 'title';
|
|
112
126
|
interface PropertyChange {
|
|
@@ -139,63 +153,4 @@ interface TreeFormulaValidationError {
|
|
|
139
153
|
fieldPath?: string;
|
|
140
154
|
}
|
|
141
155
|
|
|
142
|
-
type DiagnosticSeverity
|
|
143
|
-
interface Diagnostic {
|
|
144
|
-
readonly severity: DiagnosticSeverity;
|
|
145
|
-
readonly type: string;
|
|
146
|
-
readonly message: string;
|
|
147
|
-
readonly path: string;
|
|
148
|
-
readonly params?: Record<string, unknown>;
|
|
149
|
-
}
|
|
150
|
-
interface SchemaLike {
|
|
151
|
-
readonly type?: string;
|
|
152
|
-
readonly required?: boolean;
|
|
153
|
-
readonly pattern?: string;
|
|
154
|
-
readonly minLength?: number;
|
|
155
|
-
readonly maxLength?: number;
|
|
156
|
-
readonly minimum?: number;
|
|
157
|
-
readonly maximum?: number;
|
|
158
|
-
readonly enum?: readonly (string | number)[];
|
|
159
|
-
readonly foreignKey?: string;
|
|
160
|
-
readonly [key: string]: unknown;
|
|
161
|
-
}
|
|
162
|
-
interface ValidationContext {
|
|
163
|
-
readonly value: unknown;
|
|
164
|
-
readonly schema: SchemaLike;
|
|
165
|
-
readonly nodeName: string;
|
|
166
|
-
}
|
|
167
|
-
interface Validator {
|
|
168
|
-
readonly type: string;
|
|
169
|
-
validate(context: ValidationContext): Diagnostic | null;
|
|
170
|
-
}
|
|
171
|
-
interface ValidatorRule {
|
|
172
|
-
readonly validatorType: string;
|
|
173
|
-
shouldApply(context: ValidationContext): boolean;
|
|
174
|
-
}
|
|
175
|
-
type ValidatorFactoryFn = () => Validator;
|
|
176
|
-
|
|
177
|
-
interface SerializeOptions {
|
|
178
|
-
readonly strict?: boolean;
|
|
179
|
-
}
|
|
180
|
-
declare class FormulaSerializer {
|
|
181
|
-
private readonly tree;
|
|
182
|
-
private readonly formulaNodeId;
|
|
183
|
-
private readonly formula;
|
|
184
|
-
private readonly pathBuilder;
|
|
185
|
-
constructor(tree: SchemaTree, formulaNodeId: string, formula: Formula$1);
|
|
186
|
-
static toXFormula(tree: SchemaTree, formulaNodeId: string, formula: Formula$1): XFormula;
|
|
187
|
-
static serializeExpression(tree: SchemaTree, formulaNodeId: string, formula: Formula$1, options?: SerializeOptions): string;
|
|
188
|
-
serialize(options?: SerializeOptions): string;
|
|
189
|
-
private buildPathReplacements;
|
|
190
|
-
private needsReplacement;
|
|
191
|
-
private normalizeArrayNotation;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
declare class FormulaPathBuilder {
|
|
195
|
-
buildWithArrayNotation(fromPath: Path, toPath: Path): string;
|
|
196
|
-
private findCommonPrefixLength;
|
|
197
|
-
private buildPartsWithArrayNotation;
|
|
198
|
-
private formatPartsWithArrayNotation;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export { type BasePath as B, type Diagnostic as D, EMPTY_METADATA as E, type FormulaDependency as F, type NodeType as N, type Path as P, ResolvedDependency as R, type SchemaLike as S, type TreeFormulaValidationError as T, type ValidationContext as V, FormulaSerializer as a, FormulaPathBuilder as b, type PathSegment as c, type DiagnosticSeverity as d, type Validator as e, type ValidatorRule as f, type ValidatorFactoryFn as g, type SchemaValidationError as h, type SchemaValidationErrorType as i, type NodeMetadata as j, type Formula as k, type SchemaNode as l, type SchemaTree as m, type SchemaPatch as n, type DefaultValueType as o, type PropertyChange as p, type PropertyName as q, type BasePathSegment as r, type Formula$1 as s };
|
|
156
|
+
export { type BasePath as B, type Diagnostic as D, EMPTY_METADATA as E, type FormulaDependency as F, type NodeType as N, type Path as P, ResolvedDependency as R, type SchemaLike as S, type TreeFormulaValidationError as T, type ValidationContext as V, type PathSegment as a, type DiagnosticSeverity as b, type Validator as c, type ValidatorRule as d, type ValidatorFactoryFn as e, type SchemaValidationError as f, type SchemaValidationErrorType as g, type NodeMetadata as h, type Formula as i, type SchemaNode as j, type SchemaPatch as k, type DefaultValueType as l, type PropertyChange as m, type PropertyName as n, type Formula$1 as o, type BasePathSegment as p };
|
|
@@ -1,76 +1,74 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQKA7DJDN_cjs = require('../chunk-QKA7DJDN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "arrayMetaSchema", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkQKA7DJDN_cjs.arrayMetaSchema; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "baseStringFields", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkQKA7DJDN_cjs.baseStringFields; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "booleanMetaSchema", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkQKA7DJDN_cjs.booleanMetaSchema; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "foreignKeyExcludesFormula", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkQKA7DJDN_cjs.foreignKeyExcludesFormula; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "historyPatchesSchema", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkQKA7DJDN_cjs.historyPatchesSchema; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "jsonPatchSchema", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkQKA7DJDN_cjs.jsonPatchSchema; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "metaSchema", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkQKA7DJDN_cjs.metaSchema; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "noForeignKeyStringMetaSchema", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkQKA7DJDN_cjs.noForeignKeyStringMetaSchema; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "notForeignKeyMetaSchema", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkQKA7DJDN_cjs.notForeignKeyMetaSchema; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "numberMetaSchema", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkQKA7DJDN_cjs.numberMetaSchema; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "objectMetaSchema", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkQKA7DJDN_cjs.objectMetaSchema; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "refMetaSchema", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkQKA7DJDN_cjs.refMetaSchema; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "sharedFields", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkQKA7DJDN_cjs.sharedFields; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "stringMetaSchema", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkQKA7DJDN_cjs.stringMetaSchema; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "tableMigrationsSchema", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkQKA7DJDN_cjs.tableMigrationsSchema; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "xFormulaRequiresReadOnly", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkQKA7DJDN_cjs.xFormulaRequiresReadOnly; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "xFormulaSchema", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkQKA7DJDN_cjs.xFormulaSchema; }
|
|
74
74
|
});
|
|
75
|
-
//# sourceMappingURL=index.cjs.map
|
|
76
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from '../chunk-
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from '../chunk-XKWWCXGB.js';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/validation-schemas/shared-fields.ts","../src/validation-schemas/meta-schema.ts","../src/validation-schemas/json-patch-schema.ts","../src/validation-schemas/history-patches-schema.ts","../src/validation-schemas/table-migrations-schema.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAA,GAAe;AAAA,EAC1B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AAAA,EACA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM;AAAA;AAEV;;;ACLO,IAAM,cAAA,GAAyB;AAAA,EACpC,IAAA,EAAM,QAAA;AAAA,EACN,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,EAAE,KAAA,EAAO,CAAA,EAAE;AAAA,IACpB,YAAY,EAAE,IAAA,EAAM,UAAU,SAAA,EAAW,CAAA,EAAG,WAAW,GAAA;AAAM,GAC/D;AAAA,EACA,QAAA,EAAU,CAAC,SAAA,EAAW,YAAY,CAAA;AAAA,EAClC,oBAAA,EAAsB;AACxB;AAGO,IAAM,wBAAA,GAAmC;AAAA,EAC9C,EAAA,EAAI;AAAA,IACF,YAAY,EAAE,WAAA,EAAa,EAAE,IAAA,EAAM,UAAS,EAAE;AAAA,IAC9C,QAAA,EAAU,CAAC,WAAW;AAAA,GACxB;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,YAAY,EAAE,QAAA,EAAU,EAAE,KAAA,EAAO,MAAK,EAAE;AAAA,IACxC,QAAA,EAAU,CAAC,UAAU;AAAA;AAEzB;AAGO,IAAM,yBAAA,GAAoC;AAAA,EAC/C,EAAA,EAAI;AAAA,IACF,YAAY,EAAE,UAAA,EAAY,EAAE,IAAA,EAAM,UAAS,EAAE;AAAA,IAC7C,QAAA,EAAU,CAAC,YAAY;AAAA,GACzB;AAAA,EACA,IAAA,EAAM;AAAA,IACJ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AAM,QAAA,EAAU,OAAO,QAAA,EAAS;AAAA,QAC9C,EAAA,EAAI,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,QACrB,OAAA,EAAS,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,QAC1B,WAAA,EAAa,EAAE,IAAA,EAAM,QAAA;AAAS;AAChC,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,IAAA,EAAM,QAAA;AAAA,MACN,oBAAA,EAAsB,KAAA;AAAA,MACtB,QAAA,EAAU,CAAC,YAAA,EAAc,IAAA,EAAM,SAAS,CAAA;AAAA,MACxC,UAAA,EAAY;AAAA,QACV,UAAA,EAAY,EAAE,IAAA,EAAM,QAAA,EAAU,OAAO,QAAA,EAAS;AAAA,QAC9C,EAAA,EAAI,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,QACrB,OAAA,EAAS,EAAE,IAAA,EAAM,QAAA;AAAS;AAC5B;AACF,GACF;AAAA,EACA,KAAA,EAAO;AACT","file":"chunk-32FZHFIO.cjs","sourcesContent":["export const sharedFields = {\n deprecated: {\n type: 'boolean',\n },\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n};\n","import { Schema } from 'ajv/dist/2020';\nimport { sharedFields } from './shared-fields.js';\n\n// https://json-schema.org/specification#single-vocabulary-meta-schemas\n\nexport const xFormulaSchema: Schema = {\n type: 'object',\n properties: {\n version: { const: 1 },\n expression: { type: 'string', minLength: 1, maxLength: 10000 },\n },\n required: ['version', 'expression'],\n additionalProperties: false,\n};\n\n// When x-formula is present, readOnly must be true\nexport const xFormulaRequiresReadOnly: Schema = {\n if: {\n properties: { 'x-formula': { type: 'object' } },\n required: ['x-formula'],\n },\n then: {\n properties: { readOnly: { const: true } },\n required: ['readOnly'],\n },\n};\n\n// foreignKey and x-formula are mutually exclusive\nexport const foreignKeyExcludesFormula: Schema = {\n if: {\n properties: { foreignKey: { type: 'string' } },\n required: ['foreignKey'],\n },\n then: {\n not: { required: ['x-formula'] },\n },\n};\n\nexport const refMetaSchema: Schema = {\n type: 'object',\n properties: {\n ...sharedFields,\n $ref: {\n type: 'string',\n },\n },\n additionalProperties: false,\n required: ['$ref'],\n};\n\nexport const baseStringFields: Schema = {\n type: {\n const: 'string',\n },\n default: {\n type: 'string',\n },\n readOnly: {\n type: 'boolean',\n },\n pattern: {\n type: 'string',\n format: 'regex',\n },\n enum: {\n type: 'array',\n items: { type: 'string' },\n minItems: 1,\n uniqueItems: true,\n },\n format: {\n type: 'string',\n enum: ['date-time', 'date', 'time', 'email', 'regex'],\n },\n contentMediaType: {\n type: 'string',\n enum: [\n 'text/plain',\n 'text/markdown',\n 'text/html',\n 'application/json',\n 'application/schema+json',\n 'application/yaml',\n ],\n },\n 'x-formula': xFormulaSchema,\n ...sharedFields,\n};\n\nexport const stringMetaSchema: Schema = {\n type: 'object',\n properties: {\n ...baseStringFields,\n foreignKey: {\n type: 'string',\n },\n },\n additionalProperties: false,\n required: ['type', 'default'],\n allOf: [xFormulaRequiresReadOnly, foreignKeyExcludesFormula],\n};\n\nexport const noForeignKeyStringMetaSchema: Schema = {\n type: 'object',\n properties: {\n ...baseStringFields,\n },\n additionalProperties: false,\n required: ['type', 'default'],\n ...xFormulaRequiresReadOnly,\n};\n\nexport const numberMetaSchema: Schema = {\n type: 'object',\n properties: {\n type: {\n const: 'number',\n },\n default: {\n type: 'number',\n },\n readOnly: {\n type: 'boolean',\n },\n 'x-formula': xFormulaSchema,\n ...sharedFields,\n },\n additionalProperties: false,\n required: ['type', 'default'],\n ...xFormulaRequiresReadOnly,\n};\n\nexport const booleanMetaSchema: Schema = {\n type: 'object',\n properties: {\n type: {\n const: 'boolean',\n },\n default: {\n type: 'boolean',\n },\n readOnly: {\n type: 'boolean',\n },\n 'x-formula': xFormulaSchema,\n ...sharedFields,\n },\n additionalProperties: false,\n required: ['type', 'default'],\n ...xFormulaRequiresReadOnly,\n};\n\nexport const objectMetaSchema: Schema = {\n type: 'object',\n properties: {\n type: {\n const: 'object',\n },\n ...sharedFields,\n properties: {\n type: 'object',\n additionalProperties: { $dynamicRef: '#meta' },\n default: {},\n },\n additionalProperties: { const: false },\n required: { $ref: '#/$defs/stringArray' },\n },\n additionalProperties: false,\n required: ['type', 'properties', 'additionalProperties', 'required'],\n};\n\nexport const arrayMetaSchema: Schema = {\n type: 'object',\n properties: {\n type: {\n const: 'array',\n },\n ...sharedFields,\n items: {\n oneOf: [\n { $ref: '#/$defs/refSchema' },\n { $ref: '#/$defs/objectSchema' },\n { $ref: '#/$defs/arraySchema' },\n { $ref: '#/$defs/stringSchema' },\n { $ref: '#/$defs/numberSchema' },\n { $ref: '#/$defs/booleanSchema' },\n ],\n },\n },\n additionalProperties: false,\n required: ['type', 'items'],\n};\n\nexport const metaSchema: Schema = {\n $id: 'meta-schema.json',\n type: 'object',\n $dynamicAnchor: 'meta',\n oneOf: [\n { $ref: '#/$defs/refSchema' },\n { $ref: '#/$defs/objectSchema' },\n { $ref: '#/$defs/arraySchema' },\n { $ref: '#/$defs/stringSchema' },\n { $ref: '#/$defs/numberSchema' },\n { $ref: '#/$defs/booleanSchema' },\n ],\n $defs: {\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n default: [],\n },\n refSchema: refMetaSchema,\n objectSchema: objectMetaSchema,\n stringSchema: stringMetaSchema,\n numberSchema: numberMetaSchema,\n booleanSchema: booleanMetaSchema,\n arraySchema: arrayMetaSchema,\n },\n};\n\nexport const notForeignKeyMetaSchema: Schema = {\n type: 'object',\n $dynamicAnchor: 'meta',\n oneOf: [\n { $ref: '#/$defs/refSchema' },\n { $ref: '#/$defs/objectSchema' },\n { $ref: '#/$defs/arraySchema' },\n { $ref: '#/$defs/stringSchema' },\n { $ref: '#/$defs/numberSchema' },\n { $ref: '#/$defs/booleanSchema' },\n ],\n $defs: {\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n default: [],\n },\n refSchema: refMetaSchema,\n objectSchema: objectMetaSchema,\n stringSchema: noForeignKeyStringMetaSchema,\n numberSchema: numberMetaSchema,\n booleanSchema: booleanMetaSchema,\n arraySchema: arrayMetaSchema,\n },\n};\n","import { Schema } from 'ajv/dist/2020';\nimport {\n arrayMetaSchema,\n booleanMetaSchema,\n numberMetaSchema,\n objectMetaSchema,\n stringMetaSchema,\n} from './meta-schema.js';\n\n// copied and modified from https://json.schemastore.org/json-patch\n\nexport const jsonPatchSchema: Schema = {\n $id: 'json-patch-schema.json',\n definitions: {\n path: {\n description: 'A JSON Pointer path.',\n type: 'string',\n },\n objectSchema: objectMetaSchema,\n stringSchema: stringMetaSchema,\n numberSchema: numberMetaSchema,\n booleanSchema: booleanMetaSchema,\n arraySchema: arrayMetaSchema,\n },\n minItems: 1,\n items: {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n required: ['value', 'op', 'path'],\n properties: {\n path: {\n $ref: '#/definitions/path',\n },\n op: {\n description: 'The operation to perform.',\n type: 'string',\n enum: ['add', 'replace'],\n },\n value: {\n $ref: 'meta-schema.json',\n description: 'The value to add, replace or test.',\n },\n },\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['op', 'path'],\n properties: {\n path: {\n $ref: '#/definitions/path',\n },\n op: {\n description: 'The operation to perform.',\n type: 'string',\n enum: ['remove'],\n },\n },\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['from', 'op', 'path'],\n properties: {\n path: {\n $ref: '#/definitions/path',\n },\n op: {\n description: 'The operation to perform.',\n type: 'string',\n enum: ['move', 'copy'],\n },\n from: {\n $ref: '#/definitions/path',\n description:\n 'A JSON Pointer path pointing to the location to move/copy from.',\n },\n },\n },\n ],\n },\n title: 'JSON schema for JSONPatch files',\n type: 'array',\n};\n","import { Schema } from 'ajv/dist/2020';\n\nexport const historyPatchesSchema: Schema = {\n $id: 'history-patches-schema.json',\n type: 'array',\n minItems: 1,\n items: {\n type: 'object',\n properties: {\n patches: {\n $ref: 'json-patch-schema.json',\n },\n hash: {\n type: 'string',\n },\n },\n required: ['patches', 'hash'],\n },\n};\n","import { Schema } from 'ajv/dist/2020';\n\nexport const tableMigrationsSchema: Schema = {\n $id: 'table-migrations-schema.json',\n oneOf: [\n { $ref: '#/definitions/InitMigration' },\n { $ref: '#/definitions/UpdateMigration' },\n { $ref: '#/definitions/RenameMigration' },\n { $ref: '#/definitions/RemoveMigration' },\n ],\n definitions: {\n InitMigration: {\n type: 'object',\n additionalProperties: false,\n required: ['changeType', 'tableId', 'hash', 'id', 'schema'],\n properties: {\n changeType: { type: 'string', const: 'init' },\n tableId: { type: 'string' },\n hash: { type: 'string' },\n id: { type: 'string' },\n schema: { $ref: 'meta-schema.json' },\n },\n },\n UpdateMigration: {\n type: 'object',\n additionalProperties: false,\n required: ['changeType', 'tableId', 'hash', 'id', 'patches'],\n properties: {\n changeType: { type: 'string', const: 'update' },\n tableId: { type: 'string' },\n hash: { type: 'string' },\n id: { type: 'string' },\n patches: { $ref: 'json-patch-schema.json' },\n },\n },\n RenameMigration: {\n type: 'object',\n additionalProperties: false,\n required: ['changeType', 'id', 'tableId', 'nextTableId'],\n properties: {\n changeType: { type: 'string', const: 'rename' },\n id: { type: 'string' },\n tableId: { type: 'string' },\n nextTableId: { type: 'string' },\n },\n },\n RemoveMigration: {\n type: 'object',\n additionalProperties: false,\n required: ['changeType', 'id', 'tableId'],\n properties: {\n changeType: { type: 'string', const: 'remove' },\n id: { type: 'string' },\n tableId: { type: 'string' },\n },\n },\n },\n title: 'JSON Schema for a Single Migration',\n};\n"]}
|
package/dist/chunk-3FJZMVWA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-3FJZMVWA.js"}
|
package/dist/chunk-3IKI64T2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-3IKI64T2.js"}
|