@revisium/schema-toolkit 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-22K22MMD.js +112 -0
- package/dist/chunk-22K22MMD.js.map +1 -0
- package/dist/chunk-2GCG6HJO.cjs +545 -0
- package/dist/chunk-2GCG6HJO.cjs.map +1 -0
- package/dist/chunk-3E7UGCRR.js +519 -0
- package/dist/chunk-3E7UGCRR.js.map +1 -0
- package/dist/chunk-47AQWLHU.cjs +122 -0
- package/dist/chunk-47AQWLHU.cjs.map +1 -0
- package/dist/chunk-5VDDLW7U.js +9 -0
- package/dist/chunk-5VDDLW7U.js.map +1 -0
- package/dist/chunk-AORPUIKD.js +81 -0
- package/dist/chunk-AORPUIKD.js.map +1 -0
- package/dist/chunk-ASXCDIN2.js +365 -0
- package/dist/chunk-ASXCDIN2.js.map +1 -0
- package/dist/chunk-DEPJRTVT.js +3 -0
- package/dist/chunk-DEPJRTVT.js.map +1 -0
- package/dist/chunk-EJYILFAK.cjs +92 -0
- package/dist/chunk-EJYILFAK.cjs.map +1 -0
- package/dist/chunk-FD57PCAC.cjs +4 -0
- package/dist/chunk-FD57PCAC.cjs.map +1 -0
- package/dist/chunk-H7W4QNMA.js +3 -0
- package/dist/chunk-H7W4QNMA.js.map +1 -0
- package/dist/chunk-IPL2CGVA.cjs +11 -0
- package/dist/chunk-IPL2CGVA.cjs.map +1 -0
- package/dist/chunk-JLIZ7QT2.cjs +787 -0
- package/dist/chunk-JLIZ7QT2.cjs.map +1 -0
- package/dist/chunk-ODCH3PP2.cjs +4 -0
- package/dist/chunk-ODCH3PP2.cjs.map +1 -0
- package/dist/chunk-Q2UOTIMG.js +17 -0
- package/dist/chunk-Q2UOTIMG.js.map +1 -0
- package/dist/chunk-V2SSSD5X.cjs +15 -0
- package/dist/chunk-V2SSSD5X.cjs.map +1 -0
- package/dist/chunk-VGTHMWJJ.cjs +380 -0
- package/dist/chunk-VGTHMWJJ.cjs.map +1 -0
- package/dist/chunk-WCFA4226.js +757 -0
- package/dist/chunk-WCFA4226.js.map +1 -0
- package/dist/chunk-XNFSFT7T.cjs +19 -0
- package/dist/chunk-XNFSFT7T.cjs.map +1 -0
- package/dist/chunk-ZXLLJAMQ.js +13 -0
- package/dist/chunk-ZXLLJAMQ.js.map +1 -0
- package/dist/consts/index.cjs +11 -20
- package/dist/consts/index.cjs.map +1 -1
- package/dist/consts/index.js +2 -21
- package/dist/consts/index.js.map +1 -1
- package/dist/index.cjs +372 -1869
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -1785
- package/dist/index.js.map +1 -1
- package/dist/{json-string.store-O1J0j-a1.d.cts → json-string.store-BNF1Y93E.d.cts} +1 -0
- package/dist/{json-string.store-S9FXT39Q.d.ts → json-string.store-qHcWNv07.d.ts} +1 -0
- package/dist/lib/index.cjs +128 -1342
- package/dist/lib/index.cjs.map +1 -1
- package/dist/lib/index.d.cts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +5 -1313
- package/dist/lib/index.js.map +1 -1
- package/dist/mocks/index.cjs +38 -81
- package/dist/mocks/index.cjs.map +1 -1
- package/dist/mocks/index.js +2 -79
- package/dist/mocks/index.js.map +1 -1
- package/dist/model/index.cjs +99 -711
- package/dist/model/index.cjs.map +1 -1
- package/dist/model/index.d.cts +8 -4
- package/dist/model/index.d.ts +8 -4
- package/dist/model/index.js +3 -695
- package/dist/model/index.js.map +1 -1
- package/dist/plugins/index.cjs +41 -118
- package/dist/plugins/index.cjs.map +1 -1
- package/dist/plugins/index.js +2 -110
- package/dist/plugins/index.js.map +1 -1
- package/dist/types/index.cjs +9 -11
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js +2 -11
- package/dist/types/index.js.map +1 -1
- package/dist/validation-schemas/index.cjs +57 -373
- package/dist/validation-schemas/index.cjs.map +1 -1
- package/dist/validation-schemas/index.js +1 -363
- package/dist/validation-schemas/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// src/plugins/row-id.schema.ts
|
|
2
|
+
var rowIdSchema = {
|
|
3
|
+
type: "string" /* String */,
|
|
4
|
+
default: "",
|
|
5
|
+
readOnly: true
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
// src/plugins/row-version-id.schema.ts
|
|
9
|
+
var rowVersionIdSchema = {
|
|
10
|
+
type: "string" /* String */,
|
|
11
|
+
default: "",
|
|
12
|
+
readOnly: true
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// src/plugins/row-created-id.schema.ts
|
|
16
|
+
var rowCreatedIdSchema = {
|
|
17
|
+
type: "string" /* String */,
|
|
18
|
+
default: "",
|
|
19
|
+
readOnly: true
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// src/plugins/row-created-at.schema.ts
|
|
23
|
+
var rowCreatedAtSchema = {
|
|
24
|
+
type: "string" /* String */,
|
|
25
|
+
default: "",
|
|
26
|
+
readOnly: true
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/plugins/row-published-at.schema.ts
|
|
30
|
+
var rowPublishedAtSchema = {
|
|
31
|
+
type: "string" /* String */,
|
|
32
|
+
default: ""
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/plugins/row-updated-at.schema.ts
|
|
36
|
+
var rowUpdatedAtSchema = {
|
|
37
|
+
type: "string" /* String */,
|
|
38
|
+
default: "",
|
|
39
|
+
readOnly: true
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// src/plugins/row-hash.schema.ts
|
|
43
|
+
var rowHashSchema = {
|
|
44
|
+
type: "string" /* String */,
|
|
45
|
+
default: "",
|
|
46
|
+
readOnly: true
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// src/plugins/row-schema-hash.schema.ts
|
|
50
|
+
var rowSchemaHashSchema = {
|
|
51
|
+
type: "string" /* String */,
|
|
52
|
+
default: "",
|
|
53
|
+
readOnly: true
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// src/plugins/file-schema.ts
|
|
57
|
+
var fileSchema = {
|
|
58
|
+
type: "object" /* Object */,
|
|
59
|
+
properties: {
|
|
60
|
+
status: { type: "string" /* String */, default: "", readOnly: true },
|
|
61
|
+
fileId: { type: "string" /* String */, default: "", readOnly: true },
|
|
62
|
+
url: { type: "string" /* String */, default: "", readOnly: true },
|
|
63
|
+
fileName: { type: "string" /* String */, default: "" },
|
|
64
|
+
hash: {
|
|
65
|
+
type: "string" /* String */,
|
|
66
|
+
default: "",
|
|
67
|
+
readOnly: true
|
|
68
|
+
},
|
|
69
|
+
extension: {
|
|
70
|
+
type: "string" /* String */,
|
|
71
|
+
default: "",
|
|
72
|
+
readOnly: true
|
|
73
|
+
},
|
|
74
|
+
mimeType: {
|
|
75
|
+
type: "string" /* String */,
|
|
76
|
+
default: "",
|
|
77
|
+
readOnly: true
|
|
78
|
+
},
|
|
79
|
+
size: {
|
|
80
|
+
type: "number" /* Number */,
|
|
81
|
+
default: 0,
|
|
82
|
+
readOnly: true
|
|
83
|
+
},
|
|
84
|
+
width: {
|
|
85
|
+
type: "number" /* Number */,
|
|
86
|
+
default: 0,
|
|
87
|
+
readOnly: true
|
|
88
|
+
},
|
|
89
|
+
height: {
|
|
90
|
+
type: "number" /* Number */,
|
|
91
|
+
default: 0,
|
|
92
|
+
readOnly: true
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
required: [
|
|
96
|
+
"status",
|
|
97
|
+
"fileId",
|
|
98
|
+
"url",
|
|
99
|
+
"fileName",
|
|
100
|
+
"hash",
|
|
101
|
+
"extension",
|
|
102
|
+
"mimeType",
|
|
103
|
+
"size",
|
|
104
|
+
"width",
|
|
105
|
+
"height"
|
|
106
|
+
],
|
|
107
|
+
additionalProperties: false
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export { fileSchema, rowCreatedAtSchema, rowCreatedIdSchema, rowHashSchema, rowIdSchema, rowPublishedAtSchema, rowSchemaHashSchema, rowUpdatedAtSchema, rowVersionIdSchema };
|
|
111
|
+
//# sourceMappingURL=chunk-22K22MMD.js.map
|
|
112
|
+
//# sourceMappingURL=chunk-22K22MMD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/plugins/row-id.schema.ts","../src/plugins/row-version-id.schema.ts","../src/plugins/row-created-id.schema.ts","../src/plugins/row-created-at.schema.ts","../src/plugins/row-published-at.schema.ts","../src/plugins/row-updated-at.schema.ts","../src/plugins/row-hash.schema.ts","../src/plugins/row-schema-hash.schema.ts","../src/plugins/file-schema.ts"],"names":[],"mappings":";AAEO,IAAM,WAAA,GAAgC;AAAA,EAC3C,IAAA,EAAA,QAAA;AAAA,EACA,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;;;ACJO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAA,QAAA;AAAA,EACA,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;;;ACJO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAA,QAAA;AAAA,EACA,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;;;ACJO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAA,QAAA;AAAA,EACA,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;;;ACJO,IAAM,oBAAA,GAAyC;AAAA,EACpD,IAAA,EAAA,QAAA;AAAA,EACA,OAAA,EAAS;AACX;;;ACHO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAA,QAAA;AAAA,EACA,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;;;ACJO,IAAM,aAAA,GAAkC;AAAA,EAC7C,IAAA,EAAA,QAAA;AAAA,EACA,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;;;ACJO,IAAM,mBAAA,GAAwC;AAAA,EACnD,IAAA,EAAA,QAAA;AAAA,EACA,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;;;ACJO,IAAM,UAAA,GAA+B;AAAA,EAC1C,IAAA,EAAA,QAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,QAAQ,EAAE,IAAA,EAAA,QAAA,eAAiC,OAAA,EAAS,EAAA,EAAI,UAAU,IAAA,EAAK;AAAA,IACvE,QAAQ,EAAE,IAAA,EAAA,QAAA,eAAiC,OAAA,EAAS,EAAA,EAAI,UAAU,IAAA,EAAK;AAAA,IACvE,KAAK,EAAE,IAAA,EAAA,QAAA,eAAiC,OAAA,EAAS,EAAA,EAAI,UAAU,IAAA,EAAK;AAAA,IACpE,QAAA,EAAU,EAAE,IAAA,EAAA,QAAA,eAAiC,OAAA,EAAS,EAAA,EAAG;AAAA,IACzD,IAAA,EAAM;AAAA,MACJ,IAAA,EAAA,QAAA;AAAA,MACA,OAAA,EAAS,EAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,SAAA,EAAW;AAAA,MACT,IAAA,EAAA,QAAA;AAAA,MACA,OAAA,EAAS,EAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,QAAA,EAAU;AAAA,MACR,IAAA,EAAA,QAAA;AAAA,MACA,OAAA,EAAS,EAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,IAAA,EAAA,QAAA;AAAA,MACA,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,KAAA,EAAO;AAAA,MACL,IAAA,EAAA,QAAA;AAAA,MACA,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,IAAA,EAAA,QAAA;AAAA,MACA,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA;AACZ,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,QAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,WAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,oBAAA,EAAsB;AACxB","file":"chunk-22K22MMD.js","sourcesContent":["import { JsonStringSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const rowIdSchema: JsonStringSchema = {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n};\n","import { JsonStringSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const rowVersionIdSchema: JsonStringSchema = {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n};\n","import { JsonStringSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const rowCreatedIdSchema: JsonStringSchema = {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n};\n","import { JsonStringSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const rowCreatedAtSchema: JsonStringSchema = {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n};\n","import { JsonStringSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const rowPublishedAtSchema: JsonStringSchema = {\n type: JsonSchemaTypeName.String,\n default: '',\n};\n","import { JsonStringSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const rowUpdatedAtSchema: JsonStringSchema = {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n};\n","import { JsonStringSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const rowHashSchema: JsonStringSchema = {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n};\n","import { JsonStringSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const rowSchemaHashSchema: JsonStringSchema = {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n};\n","import { JsonObjectSchema, JsonSchemaTypeName } from '../types/schema.types.js';\n\nexport const fileSchema: JsonObjectSchema = {\n type: JsonSchemaTypeName.Object,\n properties: {\n status: { type: JsonSchemaTypeName.String, default: '', readOnly: true },\n fileId: { type: JsonSchemaTypeName.String, default: '', readOnly: true },\n url: { type: JsonSchemaTypeName.String, default: '', readOnly: true },\n fileName: { type: JsonSchemaTypeName.String, default: '' },\n hash: {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n },\n extension: {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n },\n mimeType: {\n type: JsonSchemaTypeName.String,\n default: '',\n readOnly: true,\n },\n size: {\n type: JsonSchemaTypeName.Number,\n default: 0,\n readOnly: true,\n },\n width: {\n type: JsonSchemaTypeName.Number,\n default: 0,\n readOnly: true,\n },\n height: {\n type: JsonSchemaTypeName.Number,\n default: 0,\n readOnly: true,\n },\n },\n required: [\n 'status',\n 'fileId',\n 'url',\n 'fileName',\n 'hash',\n 'extension',\n 'mimeType',\n 'size',\n 'width',\n 'height',\n ],\n additionalProperties: false,\n};\n"]}
|
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk47AQWLHU_cjs = require('./chunk-47AQWLHU.cjs');
|
|
4
|
+
var chunkJLIZ7QT2_cjs = require('./chunk-JLIZ7QT2.cjs');
|
|
5
|
+
|
|
6
|
+
// src/lib/createJsonSchemaStore.ts
|
|
7
|
+
var createJsonSchemaStore = (schema, refs = {}) => {
|
|
8
|
+
if ("$ref" in schema) {
|
|
9
|
+
const refSchema = refs[schema.$ref];
|
|
10
|
+
if (!refSchema) {
|
|
11
|
+
throw new Error(`Not found schema for $ref="${schema.$ref}"`);
|
|
12
|
+
}
|
|
13
|
+
const refStore = createJsonSchemaStore(refSchema, refs);
|
|
14
|
+
saveSharedFields(refStore, schema);
|
|
15
|
+
refStore.$ref = schema.$ref;
|
|
16
|
+
return refStore;
|
|
17
|
+
} else if (schema.type === "object" /* Object */) {
|
|
18
|
+
const objectStore = createJsonObjectSchemaStore(schema, refs);
|
|
19
|
+
saveSharedFields(objectStore, schema);
|
|
20
|
+
return objectStore;
|
|
21
|
+
} else if (schema.type === "array" /* Array */) {
|
|
22
|
+
const itemsStore = createJsonSchemaStore(schema.items, refs);
|
|
23
|
+
const arrayStore = new chunkJLIZ7QT2_cjs.JsonArrayStore(itemsStore);
|
|
24
|
+
saveSharedFields(arrayStore, schema);
|
|
25
|
+
return arrayStore;
|
|
26
|
+
} else {
|
|
27
|
+
const primitivesStore = createPrimitiveStoreBySchema(schema);
|
|
28
|
+
saveSharedFields(primitivesStore, schema);
|
|
29
|
+
primitivesStore.readOnly = schema.readOnly;
|
|
30
|
+
return primitivesStore;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var createJsonObjectSchemaStore = (value, refs) => {
|
|
34
|
+
const store = new chunkJLIZ7QT2_cjs.JsonObjectStore();
|
|
35
|
+
for (const requiredField of value.required) {
|
|
36
|
+
if (!value.properties[requiredField]) {
|
|
37
|
+
throw new Error(
|
|
38
|
+
`Not found required field "${requiredField}" in "properties"`
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
Object.entries(value.properties).forEach(([name, item]) => {
|
|
43
|
+
store.addPropertyWithStore(name, createJsonSchemaStore(item, refs));
|
|
44
|
+
});
|
|
45
|
+
return store;
|
|
46
|
+
};
|
|
47
|
+
var createPrimitiveStoreBySchema = (schema) => {
|
|
48
|
+
if (schema.type === "string" /* String */) {
|
|
49
|
+
const stringStore = new chunkJLIZ7QT2_cjs.JsonStringStore();
|
|
50
|
+
stringStore.foreignKey = schema.foreignKey;
|
|
51
|
+
stringStore.format = schema.format;
|
|
52
|
+
stringStore.enum = schema.enum;
|
|
53
|
+
stringStore.contentMediaType = schema.contentMediaType;
|
|
54
|
+
stringStore.pattern = schema.pattern;
|
|
55
|
+
return stringStore;
|
|
56
|
+
} else if (schema.type === "number" /* Number */) {
|
|
57
|
+
return new chunkJLIZ7QT2_cjs.JsonNumberStore();
|
|
58
|
+
} else if (schema.type === "boolean" /* Boolean */) {
|
|
59
|
+
return new chunkJLIZ7QT2_cjs.JsonBooleanStore();
|
|
60
|
+
} else {
|
|
61
|
+
throw new Error("this type is not allowed");
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var saveSharedFields = (store, schema) => {
|
|
65
|
+
store.title = schema.title;
|
|
66
|
+
store.description = schema.description;
|
|
67
|
+
store.deprecated = schema.deprecated;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// src/lib/getJsonSchemaStoreByPath.ts
|
|
71
|
+
var getJsonSchemaStoreByPath = (store, path) => {
|
|
72
|
+
if (path === "") {
|
|
73
|
+
return store;
|
|
74
|
+
}
|
|
75
|
+
if (path === "/") {
|
|
76
|
+
throw new Error(
|
|
77
|
+
'invalid root path, need to use path="" instead of path="/"'
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
const tokens = path.split("/");
|
|
81
|
+
tokens.shift();
|
|
82
|
+
let currentStore = store;
|
|
83
|
+
let currentToken = tokens.shift();
|
|
84
|
+
let currentPath = "";
|
|
85
|
+
while (currentToken) {
|
|
86
|
+
if (currentStore.type === "object" /* Object */) {
|
|
87
|
+
if (currentToken !== "properties") {
|
|
88
|
+
throw new Error(
|
|
89
|
+
`Expected "${currentPath}/properties/*" instead of ${currentPath}/${currentToken}/*`
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
currentPath = `${currentPath}/${currentToken}`;
|
|
93
|
+
currentToken = tokens.shift();
|
|
94
|
+
if (!currentToken) {
|
|
95
|
+
throw new Error(`Expected property name after "${currentPath}"`);
|
|
96
|
+
}
|
|
97
|
+
const foundCurrentStore = currentStore.getProperty(currentToken);
|
|
98
|
+
if (!foundCurrentStore) {
|
|
99
|
+
throw new Error(`Not found "${currentToken}" in "${currentPath}"`);
|
|
100
|
+
}
|
|
101
|
+
currentStore = foundCurrentStore;
|
|
102
|
+
currentPath = `${currentPath}/${currentToken}`;
|
|
103
|
+
currentToken = tokens.shift();
|
|
104
|
+
} else if (currentStore.type === "array" /* Array */) {
|
|
105
|
+
if (currentToken !== "items") {
|
|
106
|
+
throw new Error(
|
|
107
|
+
`Expected "${currentPath}/items/*" instead of ${currentPath}/${currentToken}/*`
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
currentPath = `${currentPath}/${currentToken}`;
|
|
111
|
+
currentStore = currentStore.items;
|
|
112
|
+
currentToken = tokens.shift();
|
|
113
|
+
} else {
|
|
114
|
+
throw new Error(`Unexpected "${currentToken}" in "${currentPath}"`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return currentStore;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// src/lib/getParentForPath.ts
|
|
121
|
+
var getParentForPath = (path) => {
|
|
122
|
+
if (path === "" || path === "/") {
|
|
123
|
+
throw new Error("Invalid path");
|
|
124
|
+
}
|
|
125
|
+
const tokens = path.split("/");
|
|
126
|
+
tokens.shift();
|
|
127
|
+
let currentToken = tokens.shift();
|
|
128
|
+
let parentPath = "";
|
|
129
|
+
let field = "";
|
|
130
|
+
while (currentToken) {
|
|
131
|
+
if (currentToken === "properties") {
|
|
132
|
+
currentToken = tokens.shift();
|
|
133
|
+
if (!currentToken) {
|
|
134
|
+
throw new Error("Invalid path");
|
|
135
|
+
}
|
|
136
|
+
field = currentToken;
|
|
137
|
+
currentToken = tokens.shift();
|
|
138
|
+
if (currentToken) {
|
|
139
|
+
parentPath = `${parentPath}/properties/${field}`;
|
|
140
|
+
}
|
|
141
|
+
} else if (currentToken === "items") {
|
|
142
|
+
field = currentToken;
|
|
143
|
+
currentToken = tokens.shift();
|
|
144
|
+
if (currentToken && !["items", "properties"].includes(currentToken)) {
|
|
145
|
+
throw new Error("Invalid path");
|
|
146
|
+
} else if (currentToken) {
|
|
147
|
+
parentPath = `${parentPath}/items`;
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
throw new Error("Invalid path");
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
parentPath,
|
|
155
|
+
field
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// src/lib/validateJsonFieldName.ts
|
|
160
|
+
var maxLength = 64;
|
|
161
|
+
var VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE = `It must contain between 1 and ${maxLength} characters, start with a letter or underscore (_), cannot start with two underscores (__), and can only include letters (a-z, A-Z), numbers (0-9), hyphens (-), and underscores (_).`;
|
|
162
|
+
var validPattern = /^(?!__)[a-zA-Z_][a-zA-Z0-9-_]*$/;
|
|
163
|
+
var validateJsonFieldName = (id) => {
|
|
164
|
+
const isInvalid = id.length < 1 || id.length > maxLength || !validPattern.test(id);
|
|
165
|
+
return !isInvalid;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// src/lib/applyPatches.ts
|
|
169
|
+
var applyReplacePatch = (store, patch, refs = {}) => {
|
|
170
|
+
const patchStore = createJsonSchemaStore(patch.value, refs);
|
|
171
|
+
const foundStore = getJsonSchemaStoreByPath(store, patch.path);
|
|
172
|
+
const parent = foundStore.parent;
|
|
173
|
+
if (!parent) {
|
|
174
|
+
return patchStore;
|
|
175
|
+
}
|
|
176
|
+
if (parent.type === "object" /* Object */) {
|
|
177
|
+
parent.migratePropertyWithStore(foundStore.name, patchStore);
|
|
178
|
+
} else if (parent.type === "array" /* Array */) {
|
|
179
|
+
parent.migrateItems(patchStore);
|
|
180
|
+
} else {
|
|
181
|
+
throw new Error("Invalid parent");
|
|
182
|
+
}
|
|
183
|
+
return store;
|
|
184
|
+
};
|
|
185
|
+
var applyRemovePatch = (rootStore, patch) => {
|
|
186
|
+
const foundStore = getJsonSchemaStoreByPath(rootStore, patch.path);
|
|
187
|
+
const parent = foundStore.parent;
|
|
188
|
+
if (!parent) {
|
|
189
|
+
throw new Error("Parent does not exist");
|
|
190
|
+
}
|
|
191
|
+
if (parent.type !== "object" /* Object */) {
|
|
192
|
+
throw new Error("Cannot remove from non-object");
|
|
193
|
+
}
|
|
194
|
+
parent.removeProperty(foundStore.name);
|
|
195
|
+
};
|
|
196
|
+
var applyAddPatch = (rootStore, patch, refs = {}) => {
|
|
197
|
+
const patchStore = createJsonSchemaStore(patch.value, refs);
|
|
198
|
+
const { parentPath, field } = getParentForPath(patch.path);
|
|
199
|
+
const foundParent = getJsonSchemaStoreByPath(rootStore, parentPath);
|
|
200
|
+
if (!foundParent) {
|
|
201
|
+
throw new Error("Parent does not exist");
|
|
202
|
+
}
|
|
203
|
+
if (foundParent.type !== "object" /* Object */) {
|
|
204
|
+
throw new Error("Cannot add to non-object");
|
|
205
|
+
}
|
|
206
|
+
if (foundParent.getProperty(field)) {
|
|
207
|
+
throw new Error(`Field "${field}" already exists in parent`);
|
|
208
|
+
}
|
|
209
|
+
foundParent.addPropertyWithStore(field, patchStore);
|
|
210
|
+
};
|
|
211
|
+
var applyMovePatch = (store, patch) => {
|
|
212
|
+
const { parentPath: fromParentPath, field: fromField } = getParentForPath(
|
|
213
|
+
patch.from
|
|
214
|
+
);
|
|
215
|
+
const { parentPath: toParentPath, field: toField } = getParentForPath(
|
|
216
|
+
patch.path
|
|
217
|
+
);
|
|
218
|
+
const foundFromParent = getJsonSchemaStoreByPath(store, fromParentPath);
|
|
219
|
+
const foundToParent = getJsonSchemaStoreByPath(store, toParentPath);
|
|
220
|
+
const isValidToField = validateJsonFieldName(toField);
|
|
221
|
+
if (!isValidToField) {
|
|
222
|
+
throw new Error(
|
|
223
|
+
`Invalid name: ${toField}. ${VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE}`
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
if (!foundFromParent || !foundToParent) {
|
|
227
|
+
throw new Error("Cannot move from or to non-existent parent");
|
|
228
|
+
}
|
|
229
|
+
if (foundFromParent.type !== "object" /* Object */) {
|
|
230
|
+
throw new Error("Cannot move from non-object parent");
|
|
231
|
+
}
|
|
232
|
+
const foundFromField = getJsonSchemaStoreByPath(store, patch.from);
|
|
233
|
+
const isMovedPropertyInSameParentPatch = foundFromParent === foundToParent && foundFromParent.type === "object" /* Object */ && foundFromParent.getProperty(fromField);
|
|
234
|
+
if (isMovedPropertyInSameParentPatch) {
|
|
235
|
+
return foundFromParent.changeName(fromField, toField);
|
|
236
|
+
}
|
|
237
|
+
if (foundToParent.type === "object" /* Object */) {
|
|
238
|
+
if (foundToParent.getProperty(toField)) {
|
|
239
|
+
foundToParent.removeProperty(toField);
|
|
240
|
+
}
|
|
241
|
+
foundToParent.addPropertyWithStore(toField, foundFromField);
|
|
242
|
+
foundFromParent.removeProperty(fromField);
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
if (foundToParent.type === "array" /* Array */) {
|
|
246
|
+
foundFromParent.removeProperty(fromField);
|
|
247
|
+
foundToParent.replaceItems(foundFromField);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
throw new Error('Invalid type of "to" parent');
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// src/lib/getDBJsonPathByJsonSchemaStore.ts
|
|
254
|
+
var getDBJsonPathByJsonSchemaStore = (store) => {
|
|
255
|
+
let node = store;
|
|
256
|
+
let path = "";
|
|
257
|
+
while (node.parent) {
|
|
258
|
+
if (node.parent.type === "object" /* Object */) {
|
|
259
|
+
path = `.${node.name}${path}`;
|
|
260
|
+
} else if (node.parent.type === "array" /* Array */) {
|
|
261
|
+
path = `[*]${path}`;
|
|
262
|
+
}
|
|
263
|
+
node = node.parent;
|
|
264
|
+
}
|
|
265
|
+
if (!path) {
|
|
266
|
+
return "$";
|
|
267
|
+
}
|
|
268
|
+
return `$${path}`;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
// src/lib/getPathByStore.ts
|
|
272
|
+
var getPathByStore = (store) => {
|
|
273
|
+
let node = store;
|
|
274
|
+
let path = "";
|
|
275
|
+
while (node.parent) {
|
|
276
|
+
if (node.parent.type === "object" /* Object */) {
|
|
277
|
+
path = `/properties/${node.name}${path}`;
|
|
278
|
+
} else if (node.parent.type === "array" /* Array */) {
|
|
279
|
+
path = `/items${path}`;
|
|
280
|
+
}
|
|
281
|
+
node = node.parent;
|
|
282
|
+
}
|
|
283
|
+
if (!path) {
|
|
284
|
+
return "/";
|
|
285
|
+
}
|
|
286
|
+
return `${path}`;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// src/lib/traverseStore.ts
|
|
290
|
+
var traverseStore = (store, callback) => {
|
|
291
|
+
callback(store);
|
|
292
|
+
if (store.type === "object" /* Object */) {
|
|
293
|
+
Object.values(store.properties).forEach((item) => {
|
|
294
|
+
traverseStore(item, callback);
|
|
295
|
+
});
|
|
296
|
+
} else if (store.type === "array" /* Array */) {
|
|
297
|
+
traverseStore(store.items, callback);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// src/lib/getForeignKeyPatchesFromSchema.ts
|
|
302
|
+
var getForeignKeyPatchesFromSchema = (store, options) => {
|
|
303
|
+
const stores = [];
|
|
304
|
+
traverseStore(store, (item) => {
|
|
305
|
+
if (item.type === "string" /* String */ && item.foreignKey === options.tableId) {
|
|
306
|
+
item.foreignKey = options.nextTableId;
|
|
307
|
+
const patch = {
|
|
308
|
+
op: "replace",
|
|
309
|
+
path: getPathByStore(item),
|
|
310
|
+
value: item.getPlainSchema()
|
|
311
|
+
};
|
|
312
|
+
stores.push(patch);
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
return stores;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
// src/lib/getForeignKeysFromSchema.ts
|
|
319
|
+
var getForeignKeysFromSchema = (store) => {
|
|
320
|
+
const foreignKeys = /* @__PURE__ */ new Set();
|
|
321
|
+
traverseStore(store, (item) => {
|
|
322
|
+
if (item.type === "string" /* String */ && item.foreignKey) {
|
|
323
|
+
foreignKeys.add(item.foreignKey);
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
return [...foreignKeys].sort((a, b) => a.localeCompare(b));
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
// src/lib/traverseValue.ts
|
|
330
|
+
var traverseValue = (store, callback) => {
|
|
331
|
+
callback(store);
|
|
332
|
+
if (store.type === "object" /* Object */) {
|
|
333
|
+
Object.values(store.value).forEach((item) => {
|
|
334
|
+
traverseValue(item, callback);
|
|
335
|
+
});
|
|
336
|
+
} else if (store.type === "array" /* Array */) {
|
|
337
|
+
store.value.forEach((itemValue) => {
|
|
338
|
+
traverseValue(itemValue, callback);
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
// src/lib/getForeignKeysFromValue.ts
|
|
344
|
+
var getForeignKeysFromValue = (value) => {
|
|
345
|
+
const foreignKeys = /* @__PURE__ */ new Map();
|
|
346
|
+
traverseValue(value, (item) => {
|
|
347
|
+
if (item.type === "string" /* String */ && item.foreignKey) {
|
|
348
|
+
let tableForeignKey = foreignKeys.get(item.foreignKey);
|
|
349
|
+
if (!tableForeignKey) {
|
|
350
|
+
tableForeignKey = /* @__PURE__ */ new Set();
|
|
351
|
+
foreignKeys.set(item.foreignKey, tableForeignKey);
|
|
352
|
+
}
|
|
353
|
+
tableForeignKey.add(item.getPlainValue());
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
return [...foreignKeys].map(([tableId, rowIds]) => ({
|
|
357
|
+
tableId,
|
|
358
|
+
rowIds: [...rowIds].sort((a, b) => a.localeCompare(b))
|
|
359
|
+
}));
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
// src/lib/getInvalidFieldNamesInSchema.ts
|
|
363
|
+
var getInvalidFieldNamesInSchema = (schema, refs = {}) => {
|
|
364
|
+
const schemaStore = createJsonSchemaStore(schema, refs);
|
|
365
|
+
const invalidFields = [];
|
|
366
|
+
traverseStore(schemaStore, (item) => {
|
|
367
|
+
if (item.parent?.type === "object" /* Object */) {
|
|
368
|
+
if (!validateJsonFieldName(item.name)) {
|
|
369
|
+
invalidFields.push(item);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
return invalidFields;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
// src/lib/getJsonValueByPath.ts
|
|
377
|
+
var getJsonValueStoreByPath = (root, path) => {
|
|
378
|
+
if (!path) {
|
|
379
|
+
return root;
|
|
380
|
+
}
|
|
381
|
+
const segments = getSegments(path);
|
|
382
|
+
let current = root;
|
|
383
|
+
for (const seg of segments) {
|
|
384
|
+
if (current instanceof chunkJLIZ7QT2_cjs.JsonObjectValueStore) {
|
|
385
|
+
const next = current.value[String(seg)];
|
|
386
|
+
if (!next) {
|
|
387
|
+
throw new Error(`Path not found at segment "${seg}"`);
|
|
388
|
+
}
|
|
389
|
+
current = next;
|
|
390
|
+
} else if (current instanceof chunkJLIZ7QT2_cjs.JsonArrayValueStore) {
|
|
391
|
+
if (typeof seg !== "number") {
|
|
392
|
+
throw new Error(`Invalid array index "${seg}"`);
|
|
393
|
+
}
|
|
394
|
+
const next = current.value[seg];
|
|
395
|
+
if (!next) {
|
|
396
|
+
throw new Error(`Path not found at segment "${seg}"`);
|
|
397
|
+
}
|
|
398
|
+
current = next;
|
|
399
|
+
} else {
|
|
400
|
+
throw new Error(`Cannot navigate into primitive at segment "${seg}"`);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return current;
|
|
404
|
+
};
|
|
405
|
+
var regex = /([^.[\]]+)|\[(\d+)]/g;
|
|
406
|
+
var getSegments = (path) => {
|
|
407
|
+
const segments = [];
|
|
408
|
+
let match;
|
|
409
|
+
while (match = regex.exec(path)) {
|
|
410
|
+
if (match[1] !== void 0) {
|
|
411
|
+
segments.push(match[1]);
|
|
412
|
+
} else if (match[2] !== void 0) {
|
|
413
|
+
segments.push(Number(match[2]));
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return segments;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
// src/lib/replaceForeignKeyValue.ts
|
|
420
|
+
var replaceForeignKeyValue = (options) => {
|
|
421
|
+
let wasUpdated = false;
|
|
422
|
+
traverseValue(options.valueStore, (item) => {
|
|
423
|
+
if (item.type === "string" /* String */ && item.foreignKey === options.foreignKey && item.value === options.value) {
|
|
424
|
+
item.value = options.nextValue;
|
|
425
|
+
wasUpdated = true;
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
return wasUpdated;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// src/lib/resolveRefs.ts
|
|
432
|
+
var pluginRefs = {
|
|
433
|
+
["urn:jsonschema:io:revisium:row-id-schema:1.0.0" /* RowId */]: chunk47AQWLHU_cjs.rowIdSchema,
|
|
434
|
+
["urn:jsonschema:io:revisium:row-version-id-schema:1.0.0" /* RowVersionId */]: chunk47AQWLHU_cjs.rowVersionIdSchema,
|
|
435
|
+
["urn:jsonschema:io:revisium:row-created-id-schema:1.0.0" /* RowCreatedId */]: chunk47AQWLHU_cjs.rowCreatedIdSchema,
|
|
436
|
+
["urn:jsonschema:io:revisium:row-created-at-schema:1.0.0" /* RowCreatedAt */]: chunk47AQWLHU_cjs.rowCreatedAtSchema,
|
|
437
|
+
["urn:jsonschema:io:revisium:row-published-at-schema:1.0.0" /* RowPublishedAt */]: chunk47AQWLHU_cjs.rowPublishedAtSchema,
|
|
438
|
+
["urn:jsonschema:io:revisium:row-updated-at-schema:1.0.0" /* RowUpdatedAt */]: chunk47AQWLHU_cjs.rowUpdatedAtSchema,
|
|
439
|
+
["urn:jsonschema:io:revisium:row-hash-schema:1.0.0" /* RowHash */]: chunk47AQWLHU_cjs.rowHashSchema,
|
|
440
|
+
["urn:jsonschema:io:revisium:row-schema-hash-schema:1.0.0" /* RowSchemaHash */]: chunk47AQWLHU_cjs.rowSchemaHashSchema,
|
|
441
|
+
["urn:jsonschema:io:revisium:file-schema:1.0.0" /* File */]: chunk47AQWLHU_cjs.fileSchema
|
|
442
|
+
};
|
|
443
|
+
var resolveRefs = (schema) => {
|
|
444
|
+
const store = createJsonSchemaStore(schema, pluginRefs);
|
|
445
|
+
return store.getPlainSchema({ skip$Ref: true });
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
// src/lib/schema-table.ts
|
|
449
|
+
var SchemaTable = class {
|
|
450
|
+
constructor(schema, refs = {}) {
|
|
451
|
+
this.refs = refs;
|
|
452
|
+
this.store = createJsonSchemaStore(schema, refs);
|
|
453
|
+
}
|
|
454
|
+
rows = /* @__PURE__ */ new Map();
|
|
455
|
+
store;
|
|
456
|
+
applyPatches(patches) {
|
|
457
|
+
patches.forEach((patch) => {
|
|
458
|
+
switch (patch.op) {
|
|
459
|
+
case "replace": {
|
|
460
|
+
const nextStore = applyReplacePatch(this.store, patch, this.refs);
|
|
461
|
+
if (nextStore !== this.store) {
|
|
462
|
+
this.migrateRows(nextStore);
|
|
463
|
+
}
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
case "remove": {
|
|
467
|
+
applyRemovePatch(this.store, patch);
|
|
468
|
+
break;
|
|
469
|
+
}
|
|
470
|
+
case "add": {
|
|
471
|
+
applyAddPatch(this.store, patch, this.refs);
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
474
|
+
case "move": {
|
|
475
|
+
applyMovePatch(this.store, patch);
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
default:
|
|
479
|
+
throw new Error(`Unsupported patch operation`);
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
getSchema() {
|
|
484
|
+
return this.store.getPlainSchema();
|
|
485
|
+
}
|
|
486
|
+
addRow(rowId, data) {
|
|
487
|
+
const row = chunkJLIZ7QT2_cjs.createJsonValueStore(this.store, rowId, data);
|
|
488
|
+
this.rows.set(rowId, row);
|
|
489
|
+
}
|
|
490
|
+
getRow(id) {
|
|
491
|
+
const row = this.rows.get(id);
|
|
492
|
+
if (!row) {
|
|
493
|
+
throw new Error("Invalid id");
|
|
494
|
+
}
|
|
495
|
+
return row.getPlainValue();
|
|
496
|
+
}
|
|
497
|
+
getRows() {
|
|
498
|
+
return [...this.rows].map(([id, data]) => ({
|
|
499
|
+
id,
|
|
500
|
+
data: data.getPlainValue()
|
|
501
|
+
}));
|
|
502
|
+
}
|
|
503
|
+
migrateRows(nextStore) {
|
|
504
|
+
const transformation = chunkJLIZ7QT2_cjs.getTransformation(this.store, nextStore);
|
|
505
|
+
if (transformation) {
|
|
506
|
+
for (const [rowId, row] of this.rows) {
|
|
507
|
+
const rawNextValue = transformation(
|
|
508
|
+
row.getPlainValue(),
|
|
509
|
+
nextStore.default
|
|
510
|
+
);
|
|
511
|
+
const nextRow = chunkJLIZ7QT2_cjs.createJsonValueStore(nextStore, rowId, rawNextValue);
|
|
512
|
+
this.rows.set(rowId, nextRow);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
this.store = nextStore;
|
|
516
|
+
}
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
exports.SchemaTable = SchemaTable;
|
|
520
|
+
exports.VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE = VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE;
|
|
521
|
+
exports.applyAddPatch = applyAddPatch;
|
|
522
|
+
exports.applyMovePatch = applyMovePatch;
|
|
523
|
+
exports.applyRemovePatch = applyRemovePatch;
|
|
524
|
+
exports.applyReplacePatch = applyReplacePatch;
|
|
525
|
+
exports.createJsonObjectSchemaStore = createJsonObjectSchemaStore;
|
|
526
|
+
exports.createJsonSchemaStore = createJsonSchemaStore;
|
|
527
|
+
exports.createPrimitiveStoreBySchema = createPrimitiveStoreBySchema;
|
|
528
|
+
exports.getDBJsonPathByJsonSchemaStore = getDBJsonPathByJsonSchemaStore;
|
|
529
|
+
exports.getForeignKeyPatchesFromSchema = getForeignKeyPatchesFromSchema;
|
|
530
|
+
exports.getForeignKeysFromSchema = getForeignKeysFromSchema;
|
|
531
|
+
exports.getForeignKeysFromValue = getForeignKeysFromValue;
|
|
532
|
+
exports.getInvalidFieldNamesInSchema = getInvalidFieldNamesInSchema;
|
|
533
|
+
exports.getJsonSchemaStoreByPath = getJsonSchemaStoreByPath;
|
|
534
|
+
exports.getJsonValueStoreByPath = getJsonValueStoreByPath;
|
|
535
|
+
exports.getParentForPath = getParentForPath;
|
|
536
|
+
exports.getPathByStore = getPathByStore;
|
|
537
|
+
exports.pluginRefs = pluginRefs;
|
|
538
|
+
exports.replaceForeignKeyValue = replaceForeignKeyValue;
|
|
539
|
+
exports.resolveRefs = resolveRefs;
|
|
540
|
+
exports.saveSharedFields = saveSharedFields;
|
|
541
|
+
exports.traverseStore = traverseStore;
|
|
542
|
+
exports.traverseValue = traverseValue;
|
|
543
|
+
exports.validateJsonFieldName = validateJsonFieldName;
|
|
544
|
+
//# sourceMappingURL=chunk-2GCG6HJO.cjs.map
|
|
545
|
+
//# sourceMappingURL=chunk-2GCG6HJO.cjs.map
|