@ja-platform/parser-schema-json 0.0.0-dev-20261021194038
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 +68 -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 +37 -0
|
@@ -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,68 @@
|
|
|
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
|
+
const type = data.type === 'query'
|
|
29
|
+
? new parser_schema_1.QueryType(schema.getType(data.object))
|
|
30
|
+
: data.type === 'array'
|
|
31
|
+
? new parser_type_system_1.ArrayType(schema.getType(data.object))
|
|
32
|
+
: schema.getType(data.type);
|
|
33
|
+
const field = data.required != null || data.provideValue != null ? schema.param(name, type) : schema.field(name, type);
|
|
34
|
+
if (field instanceof parser_schema_1.Param) {
|
|
35
|
+
if (data.required != null)
|
|
36
|
+
field.required = data.required;
|
|
37
|
+
if (data.provideValue != null)
|
|
38
|
+
field.provideValue = (0, parser_schema_1.parseParameterValueProvider)(data.provideValue);
|
|
39
|
+
}
|
|
40
|
+
if (data.relationship) {
|
|
41
|
+
field.relationship = data.relationship;
|
|
42
|
+
field.isRelationshipId = data.isRelationshipId;
|
|
43
|
+
}
|
|
44
|
+
return applyFieldMetadata({ field, data });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Reconstruct the resolved model graph from the existing runtime wire format.
|
|
48
|
+
*/
|
|
49
|
+
function deserializeSchema({ data, schema = new parser_schema_1.Schema() }) {
|
|
50
|
+
const models = Object.entries(data.objects).map(([name, model]) => {
|
|
51
|
+
const result = schema.newObjectType(name);
|
|
52
|
+
result.label = model.label;
|
|
53
|
+
result.displayFormat = parser_schema_1.SchemaObjectDisplayExpression.parse(model.display);
|
|
54
|
+
return result;
|
|
55
|
+
});
|
|
56
|
+
schema.objects = Object.fromEntries(models.map((model) => [model.name, model]));
|
|
57
|
+
for (const [name, model] of Object.entries(data.objects)) {
|
|
58
|
+
const target = schema.objects[name];
|
|
59
|
+
const fields = Object.entries(model.attributes).map(([name, field]) => deserializeField({ schema, name, data: field }));
|
|
60
|
+
for (const field of fields)
|
|
61
|
+
target.addAttribute(field);
|
|
62
|
+
for (const [name, relationship] of Object.entries(model.belongsTo)) {
|
|
63
|
+
target.addBelongsTo({ schema, name, type: relationship.type, foreignName: relationship.foreignName });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return schema;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=schemaDeserializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaDeserializer.js","sourceRoot":"","sources":["../src/schemaDeserializer.ts"],"names":[],"mappings":"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","sourcesContent":["import {\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 } 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 const type =\n data.type === 'query'\n ? new QueryType(schema.getType(data.object))\n : data.type === 'array'\n ? new ArrayType(schema.getType(data.object))\n : schema.getType(data.type);\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,CAAC;QAC3B,IAAI,KAAK,CAAC,QAAQ,IAAI,IAAI;YAAE,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC7D,IAAI,KAAK,CAAC,YAAY,IAAI,IAAI;YAAE,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;IACjF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,yBAAgC,MAAc;IAC5C,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,WAAW,CACzB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,0BAAC;YACpD,IAAI;YACJ;gBACE,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,UAAU,EAAE,MAAM,CAAC,WAAW,CAC5B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CACrF;gBACD,SAAS,EAAE,MAAM,CAAC,WAAW,CAC3B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC;oBAC3D,GAAG;oBACH;wBACE,IAAI,EAAE,YAAY,CAAC,WAAW,CAAC,IAAI;wBACnC,WAAW,EAAE,YAAY,CAAC,WAAW;qBACtC;iBACF,CAAC,CACH;gBACD,OAAO,EAAE,EAAE;gBACX,OAAO,QAAE,MAAA,KAAK,CAAC,aAAa,0CAAE,GAAG,EAAE,mCAAI,EAAE;aAC1C;SACF,GAAA,CAAC,CACH;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { Schema, SchemaModelType, Field, Param } from '@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":[[160,162]],"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/DelimiterToken.d.ts","../../expressions/dist/@types/tokens/EnumToken.d.ts","../../expressions/dist/@types/tokens/text/TextToken.d.ts","../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/index.d.ts","../../expressions/dist/@types/tokens/code/CodeToken.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","../../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/tokens/text/PlaceholderToken.d.ts","../../expressions/dist/@types/utils/tokenUtils.d.ts","../../expressions/dist/@types/tokens/index.d.ts","../../expressions/dist/@types/ExpressionParser.d.ts","../../expressions/dist/@types/CombinedParser.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/constant/ConstantExpression.d.ts","../../expressions/dist/@types/expressions/function/FunctionExpression.d.ts","../../expressions/dist/@types/expressions/text/AbstractFormatExpression.d.ts","../../expressions/dist/@types/expressions/text/FormatStringExpression.d.ts","../../expressions/dist/@types/expressions/index.d.ts","../../expressions/dist/@types/utils/parserUtils.d.ts","../../expressions/dist/@types/code-parsers/CodeParser.d.ts","../../expressions/dist/@types/code-parsers/JavaScriptParser.d.ts","../../expressions/dist/@types/utils/valueFormatting.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/attachments/Attachment.d.ts","../../schema/dist/@types/types/primitives/Text.d.ts","../../schema/dist/@types/types/EnumOption.d.ts","../../schema/dist/@types/types/primitives/Boolean.d.ts","../../schema/dist/@types/types/primitives/Location.d.ts","../../schema/dist/@types/types/primitives/GeoTrack.d.ts","../../schema/dist/@types/types/primitives/ChoiceType.d.ts","../../schema/dist/@types/types/primitives/SingleChoice.d.ts","../../schema/dist/@types/types/primitives/SingleChoiceInteger.d.ts","../../schema/dist/@types/types/primitives/MultipleChoice.d.ts","../../schema/dist/@types/types/primitives/MultipleChoiceInteger.d.ts","../../schema/dist/@types/day/Day.d.ts","../../schema/dist/@types/types/primitives/Date.d.ts","../../schema/dist/@types/types/primitives/Datetime.d.ts","../../schema/dist/@types/types/primitives/attachments/Photo.d.ts","../../schema/dist/@types/types/primitives/attachments/Signature.d.ts","../../schema/dist/@types/types/primitives/index.d.ts","../../schema/dist/@types/types/SchemaModelType.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/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","ae63a2414b6a326b93ee65bba693d617","57845437bcd4011990eb52478f02c4a0","f25290e9ca5aee09a0210e2a454437f8",{"version":"3575b2b8e50b5a5b3acce219e08900c5","impliedNodeFormat":99},"968dbf07ccc13a1a84f319c26e9909b3","354fc88481ff608fcbbfaf7851a29043","bf6d579deb9596ec514083ea94789be0","3058c9c4ad1200a2ff62094072deed53","e5fb7990b84f5089ba92554ea3614810","770ee32ef332fd48bfef508442b30edb","5c1b5931ee0c894699ca56f5b573f88a","822b842ad7efa3485d65fbeb2f919865","89b6053090a8d01f57cb8f521fae777d","26302a8b72d74f944dcf8f6452e54f7c","bc95bdb594a5aece18248fbf4387dd2e","90125a76f2ae701181f7e09dea41f3ad","ac52bb76ccad935a013384d2a71ab267","2c96eeb69afb823580d4e1e5f1b188e0","c06213bcb24cd658dfcd1239777159bd","ada7f0921b6eace272ee48028595ff4e","e518fcc525a72f156f4235f97e942e72","cf3121ca4479d3afdaceb690d14cf086","d33a7d16b8bb10392237228466f959f8","e2bb800214278396da6f4dfb9210a507","c0cbc64b7a419382086b8d30226b8f0f","bb9d86257bed6b06d027b9b561ba2c31","ddac5ec2816a79b75ca0b28b073126c9","e62a96adf38e2e5adbeb996a1bbb0ca6","358284d17020fff7c8988fe49465ebce","788ca99c9132de5f347c0c196085cc16","74a85c95eb3b8b1bd5c7d0822fe65312","f85883c070822e429d13802a651146bc","038c82b1bfec7b11761d58241d68970f","fa4b9cdace3ba0abd1e6547b87390de6","b5fa992ef592b85d4851433a12195162","6844f7dcecd5297f9a25fe55fe7aeacc","e78cf9dc5bca6011a220581f56da19cb","25aba7d58ecafcf7098f9bcca63ea72a","90506d77482148f93c56044616613958","3a5ea1baf065ad0e1794aeb15153114c","aa250c74fe5a950a7dea8c41eba97441","88ae61f99ea8bab323e2e743e4ee8a90","44ebda1090b59085d1eeda6c2c25e4af","2d1c84be972f91834168ee8b45ef3260","01d13385ca95028b548f57422632cd10","e1421b701f3826a978db13ebc309e2db","c5f116e28ed4d9b893b3bb22615c4a6e","4fdad46f00f0e8c18ff903eacb5cab67","4538c220c4065a35c60d00ac0baa8e76","363c6b7126845050cea9bd1b53a77a66","a017252f6e0a3f0b8f7812273df80ece","0b856f0bab913d03af59d1f4f0f59562","8264702ad4ee79cdcbea078c3da56f14","5d7211f45479b46afb44d4d8e573535b","ec0bba0a0909104c137edc876deb700c","e18c2c8b2f19905e6ee32e3885543768","96ee6501eee7a02a19ea7ff1f53d661c","d964aada007f95d0dd07460963f68a0c","402d2259e74ccac3588d639c08e81545","e95214003cc4a559b833b4ecf52f2d92","69f847a0a3ca0c866ac328c9348cbe04","632deda2127ca3a142ca076cf54d1143","4cb877c523b96073f4dd0de7f41e9803","dcd337aeff86227b569df4951219b6b6","699585d6b5731578b044e283b9363e6f","a2614d5bf8c8a719715fad139f7d2849","df8eef6e7eccf796eb60b204e7fb0f8c","eb7b402991957b09b77be3d8046faa56","205c6187ac6e4ef53474b4a23ba47e42","8ff324d87ffc8c78c0de87df2c82fa62",{"version":"222f8d744860798dddf036f0d1f640ef","signature":"a9cb7db3e6ebdc7dfeb38db57a3aeb5d","impliedNodeFormat":1},{"version":"37985d869bd19b8b022864428f075ac6","signature":"e5d415f0381ddb34f0e9c9952eb97e0b","impliedNodeFormat":1},"cc3673c4d204c643e8b2eaecfc67cb5d"],"fileIdsList":[[110,113,114],[110,113],[93,126],[108,113],[109,113],[108,110,113,114],[110,113,114,117],[110,116,117,118,119,120,121,122,123],[113,114,118],[108,109,110,113,114],[109,110,113,114],[113,117,118,122],[109,113,114,115,124,125,126,127,128],[89],[93,94],[89,90,91,92,94,95,96,97,111,112],[89,110],[113,124],[89,94,95],[108],[160,161],[108,159,160],[159],[129],[108,130,131,132,133,136,145,150,151,152,153,154,155,156,157,158],[108,131,132,150,151,152,153],[131,132,150,151,153,154],[108,152],[108,129,131,152],[151,152],[108,130,131,132,133,150,152,154],[108,136],[108,145],[140],[134],[108,134,135,137,138,139,140,141,142,143,144,146,147,148,149],[99],[99,103],[98],[98,99,100,101,102,103,104,105,106,107]],"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":[[115,1],[114,2],[127,3],[109,4],[110,5],[117,1],[116,1],[120,6],[121,7],[124,8],[119,9],[118,10],[122,11],[123,12],[129,13],[90,14],[91,14],[94,14],[97,14],[95,15],[96,14],[113,16],[111,17],[92,14],[125,18],[112,19],[128,20],[162,21],[161,22],[160,23],[130,24],[158,24],[159,25],[154,26],[152,27],[131,28],[153,29],[155,20],[132,30],[151,31],[137,32],[140,32],[146,33],[147,20],[139,20],[138,20],[143,34],[144,34],[141,34],[142,34],[135,20],[134,20],[148,35],[149,35],[150,36],[101,37],[107,38],[106,38],[105,38],[100,37],[103,37],[104,38],[99,39],[102,37],[108,40]],"latestChangedDtsFile":"./@types/index.d.ts"}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ja-platform/parser-schema-json",
|
|
3
|
+
"engines": {
|
|
4
|
+
"node": "^22.19.0 || ^24.11.0 || >=26.0.0"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.0.0-dev-20261021194038",
|
|
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": "^0.0.0-dev-20261021194038",
|
|
15
|
+
"@ja-platform/parser-type-system": "^0.0.0-dev-20261021194038"
|
|
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
|
+
}
|
|
37
|
+
}
|