@hestia-earth/schema-convert
Advanced tools
Comparing version 7.11.0 to 8.0.0
@@ -264,3 +264,4 @@ "use strict"; | ||
var data = schema ? mapContent(schemas, schema, _i)(schemaRefValue(value, schemaType)) : safeParseJSON(value); | ||
return utils_1.isEmpty(data) ? {} : (schema ? extendDataFromSchema(data, schema, schemaType, _i) : data); | ||
var includeDefaults = [schema_1.SchemaType.Actor].includes(schemaType); // only nested node allowed | ||
return utils_1.isEmpty(data) ? {} : (schema ? extendDataFromSchema(data, schema, schemaType, _i, includeDefaults) : data); | ||
} | ||
@@ -309,7 +310,7 @@ }; | ||
}; | ||
var extendDataFromSchema = function (_a, schema, type, ignoreInternal, top) { | ||
var extendDataFromSchema = function (_a, schema, type, ignoreInternal, addDefaults) { | ||
if (ignoreInternal === void 0) { ignoreInternal = false; } | ||
if (top === void 0) { top = false; } | ||
if (addDefaults === void 0) { addDefaults = false; } | ||
var id = _a.id, _t = _a.type, data = __rest(_a, ["id", "type"]); | ||
return utils_1.reduceUndefinedValues(__assign(__assign(__assign({}, filterProperties(data, ignoreInternal ? [] : internalProperties(schema))), (top && schema ? | ||
return utils_1.reduceUndefinedValues(__assign(__assign(__assign({}, filterProperties(data, ignoreInternal ? [] : internalProperties(schema))), (addDefaults && !('@id' in data) && schema ? | ||
getDefaultProperties(schema, data, ignoreInternal).reduce(function (prev, _a) { | ||
@@ -316,0 +317,0 @@ var _b; |
{ | ||
"name": "@hestia-earth/schema-convert", | ||
"version": "7.11.0", | ||
"version": "8.0.0", | ||
"description": "Hestia Schema Converters", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48294
1020