diff --git a/package.json b/package.json index 313cbd3d..c5bfd4f6 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@babel/preset-react": "7.16.7", "@babel/register": "^7.16.0", "@babel/runtime-corejs3": "7.16.8", - "@exabyte-io/esse.js": "2022.9.6-0", + "@exabyte-io/esse.js": "2022.10.10-0", "crypto-js": "^4.1.1", "json-schema-merge-allof": "^0.8.1", "lodash": "^4.17.21", diff --git a/src/JSONSchemasInterface.js b/src/JSONSchemasInterface.js index 029178c3..b45f3730 100644 --- a/src/JSONSchemasInterface.js +++ b/src/JSONSchemasInterface.js @@ -12,6 +12,10 @@ export class JSONSchemasInterface { if (!schemasCache.has(schemaId)) { const originalSchema = schemas.find((schema) => schema.schemaId === schemaId); + if (!originalSchema) { + throw new Error(`Schema not found: ${schemaId}`); + } + const schema = mergeAllOf(originalSchema, { resolvers: { defaultResolver: mergeAllOf.options.resolvers.title, diff --git a/src/utils/schemas.js b/src/utils/schemas.js index b91ce79d..a8b01c76 100644 --- a/src/utils/schemas.js +++ b/src/utils/schemas.js @@ -22,6 +22,7 @@ export const baseSchemas = { ReduceUnit: "workflow/unit/reduce", SubworkflowUnit: "workflow/unit", Unit: "workflow/unit", + Project: "project", }; export const entityMix = [ @@ -54,6 +55,8 @@ export const flavorMix = ["system/is-multi-material"]; export const systemEntityMix = ["system/entity"]; +export const projectMix = ["system/status"]; + export const mixSchemas = { Entity: [...entityMix], Material: [...entityMix], @@ -76,6 +79,7 @@ export const mixSchemas = { ReduceUnit: [...unitMix], SubworkflowUnit: [...unitMix], Unit: [...unitMix], + Project: [...entityMix, ...systemEntityMix, ...projectMix], }; export function getSchemaByClassName(className) {