@stackbit/sdk
Advanced tools
Comparing version
@@ -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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
429475
0.06%7784
0.08%