@stackbit/sdk
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -22,2 +22,3 @@ import { Config } from '../config/config-loader'; | ||
export interface ContentLoaderResult { | ||
valid: boolean; | ||
contentItems: ContentItem[]; | ||
@@ -24,0 +25,0 @@ errors: Error[]; |
@@ -22,5 +22,7 @@ "use strict"; | ||
const validationResult = content_validator_1.validate({ contentItems, config }); | ||
const errors = lodash_1.default.concat(dataErrors, pageErrors, validationResult.errors); | ||
return { | ||
valid: lodash_1.default.isEmpty(errors), | ||
contentItems: validationResult.value, | ||
errors: lodash_1.default.concat(dataErrors, pageErrors, validationResult.errors) | ||
errors: errors | ||
}; | ||
@@ -27,0 +29,0 @@ } |
{ | ||
"name": "@stackbit/sdk", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"description": "Stackbit SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -58,2 +58,3 @@ import _ from 'lodash'; | ||
export interface ContentLoaderResult { | ||
valid: boolean; | ||
contentItems: ContentItem[]; | ||
@@ -68,5 +69,7 @@ errors: Error[]; | ||
const validationResult = validate({ contentItems, config }); | ||
const errors = _.concat(dataErrors, pageErrors, validationResult.errors); | ||
return { | ||
valid: _.isEmpty(errors), | ||
contentItems: validationResult.value, | ||
errors: _.concat(dataErrors, pageErrors, validationResult.errors) | ||
errors: errors | ||
}; | ||
@@ -73,0 +76,0 @@ } |
Sorry, the diff of this file is not supported yet
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
429475
7784