@ja-platform/parser-schema-json 0.0.0-stage → 0.1.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/dist/@types/index.d.ts +2 -0
- package/dist/@types/schemaDeserializer.d.ts +21 -0
- package/dist/@types/schemaSerializer.d.ts +29 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/schemaDeserializer.js +73 -0
- package/dist/schemaDeserializer.js.map +1 -0
- package/dist/schemaSerializer.js +49 -0
- package/dist/schemaSerializer.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +34 -3
- package/README.md +0 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Schema, Field } from '@ja-platform/parser-schema';
|
|
2
|
+
import type { FieldJson, serializeSchema } from './schemaSerializer';
|
|
3
|
+
/**
|
|
4
|
+
* Restore metadata on a field whose type has already been resolved.
|
|
5
|
+
*/
|
|
6
|
+
export declare function applyFieldMetadata({ field, data }: {
|
|
7
|
+
field: Field;
|
|
8
|
+
data: FieldJson;
|
|
9
|
+
}): Field;
|
|
10
|
+
export declare function deserializeField({ schema, data, name }: {
|
|
11
|
+
schema: Schema;
|
|
12
|
+
data: FieldJson;
|
|
13
|
+
name?: string;
|
|
14
|
+
}): Field;
|
|
15
|
+
/**
|
|
16
|
+
* Reconstruct the resolved model graph from the existing runtime wire format.
|
|
17
|
+
*/
|
|
18
|
+
export declare function deserializeSchema({ data, schema }: {
|
|
19
|
+
data: ReturnType<typeof serializeSchema>;
|
|
20
|
+
schema?: Schema;
|
|
21
|
+
}): Schema;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Schema, Field } from '@ja-platform/parser-schema';
|
|
2
|
+
export interface FieldJson {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export declare function serializeField(field: Field): FieldJson;
|
|
9
|
+
/**
|
|
10
|
+
* Preserve the existing runtime wire format; XML-only metadata is not serialized.
|
|
11
|
+
*/
|
|
12
|
+
export declare function serializeSchema(schema: Schema): {
|
|
13
|
+
objects: {
|
|
14
|
+
[k: string]: {
|
|
15
|
+
label: string;
|
|
16
|
+
attributes: {
|
|
17
|
+
[k: string]: FieldJson;
|
|
18
|
+
};
|
|
19
|
+
belongsTo: {
|
|
20
|
+
[k: string]: {
|
|
21
|
+
type: string;
|
|
22
|
+
foreignName: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
hasMany: {};
|
|
26
|
+
display: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schemaDeserializer"), exports);
|
|
18
|
+
__exportStar(require("./schemaSerializer"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,qDAAmC","sourcesContent":["export * from './schemaDeserializer';\nexport * from './schemaSerializer';\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyFieldMetadata = applyFieldMetadata;
|
|
4
|
+
exports.deserializeField = deserializeField;
|
|
5
|
+
exports.deserializeSchema = deserializeSchema;
|
|
6
|
+
const parser_schema_1 = require("@ja-platform/parser-schema");
|
|
7
|
+
const parser_type_system_1 = require("@ja-platform/parser-type-system");
|
|
8
|
+
/**
|
|
9
|
+
* Restore metadata on a field whose type has already been resolved.
|
|
10
|
+
*/
|
|
11
|
+
function applyFieldMetadata({ field, data }) {
|
|
12
|
+
field.label = data.label;
|
|
13
|
+
if (parser_schema_1.TextType.isInstanceOf(field.type)) {
|
|
14
|
+
if (data.spec)
|
|
15
|
+
field.type.spec = data.spec;
|
|
16
|
+
if (data.subType)
|
|
17
|
+
field.type.subType = data.subType;
|
|
18
|
+
}
|
|
19
|
+
if (parser_schema_1.DateType.isInstanceOf(field.type))
|
|
20
|
+
field.type.isDay = !!data.isDay;
|
|
21
|
+
if (data.options && parser_schema_1.ChoiceType.isInstanceOf(field.type)) {
|
|
22
|
+
for (const option of data.options)
|
|
23
|
+
field.type.addOption(option.value, option.label, option.index);
|
|
24
|
+
}
|
|
25
|
+
return field;
|
|
26
|
+
}
|
|
27
|
+
function deserializeField({ schema, data, name = data.name }) {
|
|
28
|
+
let type;
|
|
29
|
+
if (data.type === parser_schema_1.QueryType.TYPE) {
|
|
30
|
+
type = new parser_schema_1.QueryType(schema.getType(data.object));
|
|
31
|
+
}
|
|
32
|
+
else if (data.type === parser_type_system_1.ArrayType.TYPE) {
|
|
33
|
+
type = new parser_type_system_1.ArrayType(schema.getType(data.object));
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
type = schema.getType(data.type);
|
|
37
|
+
}
|
|
38
|
+
const field = data.required != null || data.provideValue != null ? schema.param(name, type) : schema.field(name, type);
|
|
39
|
+
if (field instanceof parser_schema_1.Param) {
|
|
40
|
+
if (data.required != null)
|
|
41
|
+
field.required = data.required;
|
|
42
|
+
if (data.provideValue != null)
|
|
43
|
+
field.provideValue = (0, parser_schema_1.parseParameterValueProvider)(data.provideValue);
|
|
44
|
+
}
|
|
45
|
+
if (data.relationship) {
|
|
46
|
+
field.relationship = data.relationship;
|
|
47
|
+
field.isRelationshipId = data.isRelationshipId;
|
|
48
|
+
}
|
|
49
|
+
return applyFieldMetadata({ field, data });
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Reconstruct the resolved model graph from the existing runtime wire format.
|
|
53
|
+
*/
|
|
54
|
+
function deserializeSchema({ data, schema = new parser_schema_1.Schema() }) {
|
|
55
|
+
const models = Object.entries(data.objects).map(([name, model]) => {
|
|
56
|
+
const result = schema.newObjectType(name);
|
|
57
|
+
result.label = model.label;
|
|
58
|
+
result.displayFormat = parser_schema_1.SchemaObjectDisplayExpression.parse(model.display);
|
|
59
|
+
return result;
|
|
60
|
+
});
|
|
61
|
+
schema.objects = Object.fromEntries(models.map((model) => [model.name, model]));
|
|
62
|
+
for (const [name, model] of Object.entries(data.objects)) {
|
|
63
|
+
const target = schema.objects[name];
|
|
64
|
+
const fields = Object.entries(model.attributes).map(([name, field]) => deserializeField({ schema, name, data: field }));
|
|
65
|
+
for (const field of fields)
|
|
66
|
+
target.addAttribute(field);
|
|
67
|
+
for (const [name, relationship] of Object.entries(model.belongsTo)) {
|
|
68
|
+
target.addBelongsTo({ schema, name, type: relationship.type, foreignName: relationship.foreignName });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return schema;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=schemaDeserializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaDeserializer.js","sourceR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n Schema,\n Field,\n Param,\n QueryType,\n ChoiceType,\n TextType,\n DateType,\n parseParameterValueProvider,\n SchemaObjectDisplayExpression\n} from '@ja-platform/parser-schema';\nimport { ArrayType, type Type } from '@ja-platform/parser-type-system';\nimport type { FieldJson, serializeSchema } from './schemaSerializer';\n\n/**\n * Restore metadata on a field whose type has already been resolved.\n */\nexport function applyFieldMetadata({ field, data }: { field: Field; data: FieldJson }): Field {\n field.label = data.label;\n if (TextType.isInstanceOf(field.type)) {\n if (data.spec) field.type.spec = data.spec;\n if (data.subType) field.type.subType = data.subType;\n }\n if (DateType.isInstanceOf(field.type)) field.type.isDay = !!data.isDay;\n if (data.options && ChoiceType.isInstanceOf(field.type)) {\n for (const option of data.options) field.type.addOption(option.value, option.label, option.index);\n }\n return field;\n}\n\nexport function deserializeField({\n schema,\n data,\n name = data.name\n}: {\n schema: Schema;\n data: FieldJson;\n name?: string;\n}): Field {\n let type: Type;\n if (data.type === QueryType.TYPE) {\n type = new QueryType(schema.getType(data.object));\n } else if (data.type === ArrayType.TYPE) {\n type = new ArrayType(schema.getType(data.object));\n } else {\n type = schema.getType(data.type);\n }\n\n const field =\n data.required != null || data.provideValue != null ? schema.param(name, type) : schema.field(name, type);\n if (field instanceof Param) {\n if (data.required != null) field.required = data.required;\n if (data.provideValue != null) field.provideValue = parseParameterValueProvider(data.provideValue);\n }\n if (data.relationship) {\n field.relationship = data.relationship;\n field.isRelationshipId = data.isRelationshipId;\n }\n return applyFieldMetadata({ field, data });\n}\n\n/**\n * Reconstruct the resolved model graph from the existing runtime wire format.\n */\nexport function deserializeSchema({\n data,\n schema = new Schema()\n}: {\n data: ReturnType<typeof serializeSchema>;\n schema?: Schema;\n}): Schema {\n const models = Object.entries(data.objects).map(([name, model]) => {\n const result = schema.newObjectType(name);\n result.label = model.label;\n result.displayFormat = SchemaObjectDisplayExpression.parse(model.display);\n return result;\n });\n schema.objects = Object.fromEntries(models.map((model) => [model.name, model]));\n for (const [name, model] of Object.entries(data.objects)) {\n const target = schema.objects[name];\n const fields = Object.entries(model.attributes).map(([name, field]) =>\n deserializeField({ schema, name, data: field })\n );\n for (const field of fields) target.addAttribute(field);\n for (const [name, relationship] of Object.entries(model.belongsTo)) {\n target.addBelongsTo({ schema, name, type: relationship.type, foreignName: relationship.foreignName });\n }\n }\n return schema;\n}\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serializeField = serializeField;
|
|
4
|
+
exports.serializeSchema = serializeSchema;
|
|
5
|
+
const parser_schema_1 = require("@ja-platform/parser-schema");
|
|
6
|
+
function serializeField(field) {
|
|
7
|
+
var _a;
|
|
8
|
+
const result = { name: field.name, type: (_a = field.type) === null || _a === void 0 ? void 0 : _a.name };
|
|
9
|
+
if (field.label !== undefined)
|
|
10
|
+
result.label = field.label;
|
|
11
|
+
if (field.type != null && !parser_schema_1.SchemaModelType.isInstanceOf(field.type)) {
|
|
12
|
+
Object.assign(result, field.type.toJSON());
|
|
13
|
+
}
|
|
14
|
+
if (field.relationship != null) {
|
|
15
|
+
result.relationship = field.relationship;
|
|
16
|
+
result.isRelationshipId = field.isRelationshipId;
|
|
17
|
+
}
|
|
18
|
+
if (field instanceof parser_schema_1.Param) {
|
|
19
|
+
if (field.required != null)
|
|
20
|
+
result.required = field.required;
|
|
21
|
+
if (field.provideValue != null)
|
|
22
|
+
result.provideValue = field.provideValue.raw();
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Preserve the existing runtime wire format; XML-only metadata is not serialized.
|
|
28
|
+
*/
|
|
29
|
+
function serializeSchema(schema) {
|
|
30
|
+
return {
|
|
31
|
+
objects: Object.fromEntries(Object.entries(schema.objects).map(([name, model]) => { var _a; var _b; return [
|
|
32
|
+
name,
|
|
33
|
+
{
|
|
34
|
+
label: model.label,
|
|
35
|
+
attributes: Object.fromEntries(Object.entries(model.attributes).map(([key, field]) => [key, serializeField(field)])),
|
|
36
|
+
belongsTo: Object.fromEntries(Object.entries(model.belongsTo).map(([key, relationship]) => [
|
|
37
|
+
key,
|
|
38
|
+
{
|
|
39
|
+
type: relationship.foreignType.name,
|
|
40
|
+
foreignName: relationship.foreignName
|
|
41
|
+
}
|
|
42
|
+
])),
|
|
43
|
+
hasMany: {},
|
|
44
|
+
display: (_b = (_a = model.displayFormat) === null || _a === void 0 ? void 0 : _a.raw()) !== null && _b !== void 0 ? _b : ''
|
|
45
|
+
}
|
|
46
|
+
]; }))
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=schemaSerializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaSerializer.js","sourceRoot":"","sources":["../src/schemaSerializer.ts"],"names":[],"mappings":";;;;AAAA,8DAAmF;AASnF,wBAA+B,KAAY;;IACzC,MAAM,MAAM,GAAc,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAI,EAAE,CAAC;IACvE,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;QAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1D,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,+BAAe,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,KAAK,CAAC,YAAY,IAAI,IAAI,EAAE,CAAC;QAC/B,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QACzC,MAAM,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;IACnD,CAAC;IACD,IAAI,KAAK,YAAY,qBAAK,EAAE,CA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'@ja-platform/parser-schema';\n\nexport interface FieldJson {\n name: string;\n type: string;\n label?: string;\n [key: string]: any;\n}\n\nexport function serializeField(field: Field): FieldJson {\n const result: FieldJson = { name: field.name, type: field.type?.name };\n if (field.label !== undefined) result.label = field.label;\n if (field.type != null && !SchemaModelType.isInstanceOf(field.type)) {\n Object.assign(result, field.type.toJSON());\n }\n if (field.relationship != null) {\n result.relationship = field.relationship;\n result.isRelationshipId = field.isRelationshipId;\n }\n if (field instanceof Param) {\n if (field.required != null) result.required = field.required;\n if (field.provideValue != null) result.provideValue = field.provideValue.raw();\n }\n return result;\n}\n\n/**\n * Preserve the existing runtime wire format; XML-only metadata is not serialized.\n */\nexport function serializeSchema(schema: Schema) {\n return {\n objects: Object.fromEntries(\n Object.entries(schema.objects).map(([name, model]) => [\n name,\n {\n label: model.label,\n attributes: Object.fromEntries(\n Object.entries(model.attributes).map(([key, field]) => [key, serializeField(field)])\n ),\n belongsTo: Object.fromEntries(\n Object.entries(model.belongsTo).map(([key, relationship]) => [\n key,\n {\n type: relationship.foreignType.name,\n foreignName: relationship.foreignName\n }\n ])\n ),\n hasMany: {},\n display: model.displayFormat?.raw() ?? ''\n }\n ])\n )\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"7.0.2","root":[[159,161]],"packageJsons":["../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/package.json","../../expressions/package.json","../package.json","../../schema/package.json","../../type-system/package.json"],"missingPackageJsons":["../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../../expressions/dist/@types/tokens/AbstractToken.d.ts","../../expressions/dist/@types/tokens/code/CodeToken.d.ts","../../type-system/dist/@types/Formatter.d.ts","../../type-system/dist/@types/Type.d.ts","../../type-system/dist/@types/ObjectType.d.ts","../../type-system/dist/@types/ArrayType.d.ts","../../type-system/dist/@types/UnknownType.d.ts","../../type-system/dist/@types/ScalarType.d.ts","../../type-system/dist/@types/TextType.d.ts","../../type-system/dist/@types/NumberType.d.ts","../../type-system/dist/@types/IntegerType.d.ts","../../type-system/dist/@types/BooleanType.d.ts","../../type-system/dist/@types/index.d.ts","../../expressions/dist/@types/definitions/ValidationContext.d.ts","../../expressions/dist/@types/expressions/AbstractExpression.d.ts","../../expressions/dist/@types/ExpressionParser.d.ts","../../expressions/dist/@types/CombinedParser.d.ts","../../expressions/dist/@types/utils/parserUtils.d.ts","../../expressions/dist/@types/code-parsers/CodeParser.d.ts","../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/index.d.ts","../../expressions/dist/@types/code-parsers/JavaScriptParser.d.ts","../../expressions/dist/@types/utils/valueFormatting.d.ts","../../expressions/dist/@types/expressions/constant/ConstantExpression.d.ts","../../expressions/dist/@types/tokens/DelimiterToken.d.ts","../../expressions/dist/@types/expressions/ListExpression.d.ts","../../expressions/dist/@types/expressions/EvaluatedExpression.d.ts","../../expressions/dist/@types/expressions/shorthand/ShorthandExpression.d.ts","../../expressions/dist/@types/expressions/shorthand/FormatShorthandExpression.d.ts","../../expressions/dist/@types/expressions/function/FunctionExpression.d.ts","../../expressions/dist/@types/tokens/text/TextToken.d.ts","../../expressions/dist/@types/tokens/text/PlaceholderToken.d.ts","../../expressions/dist/@types/expressions/text/AbstractFormatExpression.d.ts","../../expressions/dist/@types/expressions/text/FormatStringExpression.d.ts","../../expressions/dist/@types/tokens/EnumToken.d.ts","../../expressions/dist/@types/tokens/code/JSToken.d.ts","../../expressions/dist/@types/tokens/code/PrefixToken.d.ts","../../expressions/dist/@types/tokens/code/IdentifierToken.d.ts","../../expressions/dist/@types/utils/tokenUtils.d.ts","../../expressions/dist/@types/index.d.ts","../../schema/dist/@types/expressions/SchemaObjectDisplayExpression.d.ts","../../schema/dist/@types/types/Field.d.ts","../../schema/dist/@types/types/Relationship.d.ts","../../schema/dist/@types/schema/ModelIndex.d.ts","../../schema/dist/@types/types/primitives/TextType.d.ts","../../schema/dist/@types/types/SchemaModelType.d.ts","../../schema/dist/@types/types/primitives/attachments/AttachmentType.d.ts","../../schema/dist/@types/types/EnumOption.d.ts","../../schema/dist/@types/types/primitives/BooleanType.d.ts","../../schema/dist/@types/types/primitives/LocationType.d.ts","../../schema/dist/@types/types/primitives/GeoTrackType.d.ts","../../schema/dist/@types/types/primitives/ChoiceType.d.ts","../../schema/dist/@types/types/primitives/SingleChoiceType.d.ts","../../schema/dist/@types/types/primitives/SingleChoiceIntegerType.d.ts","../../schema/dist/@types/types/primitives/MultipleChoiceType.d.ts","../../schema/dist/@types/types/primitives/MultipleChoiceIntegerType.d.ts","../../schema/dist/@types/day/Day.d.ts","../../schema/dist/@types/types/primitives/DateType.d.ts","../../schema/dist/@types/types/primitives/DatetimeType.d.ts","../../schema/dist/@types/types/primitives/attachments/PhotoType.d.ts","../../schema/dist/@types/types/primitives/attachments/SignatureType.d.ts","../../schema/dist/@types/types/primitives/PrimitiveTypes.d.ts","../../schema/dist/@types/schema/TypeFactory.d.ts","../../schema/dist/@types/types/Param.d.ts","../../schema/dist/@types/schema/Schema.d.ts","../../schema/dist/@types/schema/SchemaError.d.ts","../../schema/dist/@types/types/QueryType.d.ts","../../schema/dist/@types/day/utils.d.ts","../../schema/dist/@types/schema/fieldMetadata.d.ts","../../schema/dist/@types/expressions/parseParameterValueProvider.d.ts","../../schema/dist/@types/index.d.ts","../src/schemaSerializer.ts","../src/schemaDeserializer.ts","../src/index.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},"510b0b622fafd6eff2bf5d020de046ee","968dbf07ccc13a1a84f319c26e9909b3","e5fb7990b84f5089ba92554ea3614810","770ee32ef332fd48bfef508442b30edb","5c1b5931ee0c894699ca56f5b573f88a","e37fe31d1631404aaee1668c9a2acfdd","89b6053090a8d01f57cb8f521fae777d","26302a8b72d74f944dcf8f6452e54f7c","bc95bdb594a5aece18248fbf4387dd2e","90125a76f2ae701181f7e09dea41f3ad","ac52bb76ccad935a013384d2a71ab267","2c96eeb69afb823580d4e1e5f1b188e0","c06213bcb24cd658dfcd1239777159bd","84519ebe510a4219ef71e5a0a973c591","0c68f6d853b53c3d34189f5c99c4b624","18408a4ba98e42e70324ba5c0b71f379","d6ca1e855d5b6554555a009a40e806a2","92d25cb01f547225fee7d19311179220","e78cf9dc5bca6011a220581f56da19cb",{"version":"3575b2b8e50b5a5b3acce219e08900c5","impliedNodeFormat":99},"25aba7d58ecafcf7098f9bcca63ea72a","90506d77482148f93c56044616613958","c3b9b5f9be217e9fabbfc9f5b48da439","ae63a2414b6a326b93ee65bba693d617","a950824f78fe1cb40eeff5cf89a2245d","cc36a10654ee721a890569de343ee4a0","81bde6b904e09fb337a80f52526d0c49","61b4c95d7a2ba531a5faae6b4e0694f1","be6a700c7b2a3007e5ff5eccccd1e6ca","f25290e9ca5aee09a0210e2a454437f8","cf3121ca4479d3afdaceb690d14cf086","c115de0a80c101e99244da31e79527d1","cabc47d72ba300dd603c14a7bb2b7cde","57845437bcd4011990eb52478f02c4a0","354fc88481ff608fcbbfaf7851a29043","bf6d579deb9596ec514083ea94789be0","3058c9c4ad1200a2ff62094072deed53","d33a7d16b8bb10392237228466f959f8","4678acee57e4a32f080f3a53600abf18","aa250c74fe5a950a7dea8c41eba97441","e42b7c5c230dedd906cbc7e576efbfe2","c8cddf03dfecaa822330026d82db7da8","2d1c84be972f91834168ee8b45ef3260","e1421b701f3826a978db13ebc309e2db","37da33245ab4f3fd1011d9b382dcad27","01d13385ca95028b548f57422632cd10","c5f116e28ed4d9b893b3bb22615c4a6e","4fdad46f00f0e8c18ff903eacb5cab67","4538c220c4065a35c60d00ac0baa8e76","363c6b7126845050cea9bd1b53a77a66","d2a7a9d26b7a78a458799d08f36040e4","0b856f0bab913d03af59d1f4f0f59562","8264702ad4ee79cdcbea078c3da56f14","5d7211f45479b46afb44d4d8e573535b","ec0bba0a0909104c137edc876deb700c","656f58418f5ca993800324d1e272bf2f","96ee6501eee7a02a19ea7ff1f53d661c","d964aada007f95d0dd07460963f68a0c","f063601c5b39dd0ae3fe66459e8ccea2","97867d951e0249277164096f5bbadc20","05ebce4882d0c7d1c066b51e55f93685","6030b59fbf00d2b0aecb059c3352c479","dcd337aeff86227b569df4951219b6b6","a1121cd5843eb7bba687673dfc04b5cb","51f034a28414596588750aeca1878c98","821245fb6716a92b8a110ff76e16faeb","df8eef6e7eccf796eb60b204e7fb0f8c","eb7b402991957b09b77be3d8046faa56","205c6187ac6e4ef53474b4a23ba47e42","c50035832d4308e4867baeda73d9b34a",{"version":"222f8d744860798dddf036f0d1f640ef","signature":"a9cb7db3e6ebdc7dfeb38db57a3aeb5d","impliedNodeFormat":1},{"version":"d9c274ffc61b668026d761eb95551b56","signature":"e5d415f0381ddb34f0e9c9952eb97e0b","impliedNodeFormat":1},"cc3673c4d204c643e8b2eaecfc67cb5d"],"fileIdsList":[[89,103,104],[89,103],[107,108],[90,101],[89,102],[89,90,103,104],[89,101,103,104,111,112],[89,101,103,104],[89,90,103,104,114],[89,104,115],[89,90,101,102,103,104],[89,102,103,104,118,119],[89,114,115,120],[89,90,102,103,104,105,106,107,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126],[89],[90,108],[89,90,123],[101],[159,160],[101,158,159],[158],[127],[101,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157],[101,129,130,133,149,150,151],[129,130,133,149,151,152],[101,150],[101,127,129,150],[133,150],[101,128,129,130,131,132,150,152],[101,135],[101,144],[139],[101,132,134,136,137,138,140,141,142,143,145,146,147,148],[134],[92],[92,96],[91],[91,92,93,94,95,96,97,98,99,100]],"options":{"composite":true,"declaration":true,"declarationDir":"./@types","inlineSources":true,"module":199,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":false,"stripInternal":true,"sourceMap":true,"target":4,"tsBuildInfoFile":"./tsconfig.tsbuildinfo","esModuleInterop":true},"referencedMap":[[105,1],[104,2],[109,3],[102,4],[103,5],[114,6],[113,7],[111,8],[117,9],[116,10],[115,11],[120,12],[121,13],[127,14],[112,15],[122,15],[90,15],[125,15],[123,16],[124,15],[119,2],[118,15],[106,2],[126,17],[110,18],[161,19],[160,20],[159,21],[128,22],[157,22],[158,23],[152,24],[150,25],[129,26],[151,27],[154,18],[130,28],[133,29],[136,30],[139,30],[145,31],[146,18],[138,18],[137,18],[143,32],[142,32],[149,33],[141,32],[140,32],[132,18],[134,18],[147,34],[148,34],[94,35],[100,36],[99,36],[98,36],[93,35],[96,35],[97,36],[92,37],[95,35],[101,38]],"latestChangedDtsFile":"./@types/index.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ja-platform/parser-schema-json",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
"engines": {
|
|
4
|
+
"node": "^22.19.0 || ^24.11.0 || >=26.0.0"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"description": "JourneyApps Platform schema JSON serialization and deserialization",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"typings": "./dist/@types/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@ja-platform/parser-schema": "9.0.0",
|
|
15
|
+
"@ja-platform/parser-type-system": "1.0.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"vitest": "^5.0.5",
|
|
19
|
+
"@vitest/browser": "^5.0.5",
|
|
20
|
+
"@vitest/browser-webdriverio": "^5.0.0",
|
|
21
|
+
"webdriverio": "^10.1.0"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"registry": "https://registry.npmjs.org/",
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/journeyapps-platform/parser.git",
|
|
30
|
+
"directory": "packages/schema-json"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"test": "pnpm test:node && pnpm test:browser",
|
|
34
|
+
"test:browser": "vitest --run --configLoader runner --config vitest.config.browser.ts",
|
|
35
|
+
"test:node": "vitest --run --configLoader runner --config vitest.config.unit.ts"
|
|
36
|
+
}
|
|
6
37
|
}
|
package/README.md
DELETED