@abtnode/util
Advanced tools
Comparing version 0.6.29 to 0.6.35
@@ -75,7 +75,2 @@ const fs = require('fs'); | ||
// Ensure main | ||
if (attrs.main && !fs.existsSync(path.join(blockletDir, rawAttrs.main))) { | ||
throw new Error('Invalid main path'); | ||
} | ||
const notExistsFields = []; | ||
@@ -89,6 +84,10 @@ // eslint-disable-next-line no-restricted-syntax | ||
if (notExistsFields.length > 0) { | ||
throw new Error( | ||
`Blocklet ${blockletDir} not properly configured: missing required fields: ${notExistsFields.join(',')}` | ||
); | ||
throw new Error(`Blocklet not properly configured, missing required fields: ${notExistsFields.join(',')}`); | ||
} | ||
// Ensure main | ||
if (!selectedAttrs.main || !fs.existsSync(path.join(blockletDir, selectedAttrs.main))) { | ||
throw new Error('`main` field is not properly configured for blocklet'); | ||
} | ||
selectedAttrs.path = `/${selectedAttrs.group}/${selectedAttrs.name}`; | ||
@@ -95,0 +94,0 @@ |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.6.29", | ||
"version": "0.6.35", | ||
"description": "ArcBlock's JavaScript utility", | ||
@@ -20,3 +20,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "0688277ab087d31b89d948316435942531d02e09" | ||
"gitHead": "e0258f2e81ed7ad2ce7d9dee4689678abeecf83c" | ||
} |
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
4808
114