forest-express
Advanced tools
Comparing version 10.2.6 to 10.2.7
@@ -173,9 +173,11 @@ "use strict"; | ||
metaSent = content.meta; | ||
_context3.next = 29; | ||
_context3.next = 31; | ||
break; | ||
case 13: | ||
_context3.prev = 13; | ||
logger.warn('NODE_ENV is not set to "development", the schema file will not be updated.'); | ||
logger.info('Loading the current version of .forestadmin-schema.json file…'); | ||
_context3.prev = 15; | ||
_content = fs.readFileSync(pathSchemaFile); | ||
if (_content) { | ||
_context3.next = 19; | ||
_context3.next = 21; | ||
break; | ||
@@ -186,11 +188,11 @@ } | ||
return _context3.abrupt("return", null); | ||
case 19: | ||
case 21: | ||
contentParsed = JSON.parse(_content.toString()); | ||
collectionsSent = contentParsed.collections; | ||
metaSent = contentParsed.meta; | ||
_context3.next = 29; | ||
_context3.next = 31; | ||
break; | ||
case 24: | ||
_context3.prev = 24; | ||
_context3.t0 = _context3["catch"](13); | ||
case 26: | ||
_context3.prev = 26; | ||
_context3.t0 = _context3["catch"](15); | ||
if (_context3.t0.code === 'ENOENT') { | ||
@@ -203,9 +205,10 @@ logger.error('The .forestadmin-schema.json file does not exist.'); | ||
return _context3.abrupt("return", null); | ||
case 29: | ||
case 31: | ||
if (!DISABLE_AUTO_SCHEMA_APPLY) { | ||
_context3.next = 31; | ||
_context3.next = 34; | ||
break; | ||
} | ||
logger.warn('FOREST_DISABLE_AUTO_SCHEMA_APPLY is set to true, the schema file will not be sent to Forest.'); | ||
return _context3.abrupt("return", Promise.resolve()); | ||
case 31: | ||
case 34: | ||
schemaSent = schemaSerializer.perform(collectionsSent, metaSent); | ||
@@ -228,7 +231,7 @@ hash = crypto.createHash('sha1'); | ||
})); | ||
case 37: | ||
case 40: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
}, _callee3, null, [[13, 24]]); | ||
}, _callee3, null, [[15, 26]]); | ||
})); | ||
@@ -235,0 +238,0 @@ return _generateAndSendSchema.apply(this, arguments); |
{ | ||
"name": "forest-express", | ||
"description": "Official package for all Forest Express Lianas", | ||
"version": "10.2.6", | ||
"version": "10.2.7", | ||
"author": "Sandro Munda <sandro@munda.me>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
890954
17431
18