@dcl/ecs 7.1.7-4745039397.commit-a6aff2b → 7.1.7
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.
|
@@ -31,10 +31,7 @@ export function getComponentValue(componentDefinition, component) {
|
|
|
31
31
|
export function getComponentDefinition(engine, component) {
|
|
32
32
|
const existingComponentDefinition = engine.getComponentOrNull(component.name);
|
|
33
33
|
if (!existingComponentDefinition) {
|
|
34
|
-
if (component.
|
|
35
|
-
return engine.defineComponentFromSchema(component.name, Schemas.fromJson(component.jsonSchema));
|
|
36
|
-
}
|
|
37
|
-
else if (component.name.startsWith('core::')) {
|
|
34
|
+
if (component.name.startsWith('core::')) {
|
|
38
35
|
if (component.name in componentDefinitionByName) {
|
|
39
36
|
return componentDefinitionByName[component.name](engine);
|
|
40
37
|
}
|
|
@@ -42,6 +39,9 @@ export function getComponentDefinition(engine, component) {
|
|
|
42
39
|
throw new Error(`The core component ${component.name} was not found.`);
|
|
43
40
|
}
|
|
44
41
|
}
|
|
42
|
+
else if (component.jsonSchema) {
|
|
43
|
+
return engine.defineComponentFromSchema(component.name, Schemas.fromJson(component.jsonSchema));
|
|
44
|
+
}
|
|
45
45
|
else {
|
|
46
46
|
throw new Error(`${component.name} is not defined and there is no schema to define it.`);
|
|
47
47
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/ecs",
|
|
3
3
|
"description": "Decentraland ECS",
|
|
4
|
-
"version": "7.1.7
|
|
4
|
+
"version": "7.1.7",
|
|
5
5
|
"author": "DCL",
|
|
6
6
|
"bugs": "https://github.com/decentraland/ecs/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@dcl/js-runtime": "7.1.7
|
|
8
|
+
"@dcl/js-runtime": "7.1.7"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"ts-proto": "^1.122.0"
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
},
|
|
35
35
|
"types": "./dist/index.d.ts",
|
|
36
36
|
"typings": "./dist/index.d.ts",
|
|
37
|
-
"commit": "
|
|
37
|
+
"commit": "00dea083dd792e14effb4dec74b29c0a192e0c24"
|
|
38
38
|
}
|