@foal/core
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -46,2 +46,8 @@ "use strict"; | ||
} | ||
function getColoredStatus(status) { | ||
if (status === 'error') { | ||
return `\u001b[31m${status}\u001b[39m`; | ||
} | ||
return `\u001b[32m${status}\u001b[39m`; | ||
} | ||
function formatMessageToDevText(level, message, params, now) { | ||
@@ -60,2 +66,6 @@ const levelColorCodes = { | ||
} | ||
const socketioMessagePrefix = 'Socket.io message received - '; | ||
if (message.startsWith(socketioMessagePrefix)) { | ||
message = `Socket.io ${message.slice(socketioMessagePrefix.length)} ${getColoredStatus(params.status)}`; | ||
} | ||
return `${timestamp} ${logLevel} ${message}` + formatParamsToText({ error: params.error }); | ||
@@ -62,0 +72,0 @@ } |
@@ -33,2 +33,3 @@ "use strict"; | ||
useDefaults: core_1.Config.get('settings.ajv.useDefaults', 'boolean|string', true), | ||
strict: core_1.Config.get('settings.ajv.strict', 'boolean|string'), | ||
}); | ||
@@ -35,0 +36,0 @@ exports._instanceWrapper.instance.addKeyword({ keyword: 'components' }); |
@@ -103,3 +103,5 @@ "use strict"; | ||
// Serve static files. | ||
app.use(core_1.Config.get('settings.staticPathPrefix', 'string', ''), express.static(core_1.Config.get('settings.staticPath', 'string', 'public'))); | ||
app.use(core_1.Config.get('settings.staticPathPrefix', 'string', ''), express.static(core_1.Config.get('settings.staticPath', 'string', 'public'), { | ||
cacheControl: core_1.Config.get('settings.staticFiles.cacheControl', 'boolean') | ||
})); | ||
// Parse request body. | ||
@@ -106,0 +108,0 @@ const limit = core_1.Config.get('settings.bodyParser.limit', 'number|string'); |
{ | ||
"name": "@foal/core", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Full-featured Node.js framework, with no complexity", | ||
@@ -70,3 +70,3 @@ "main": "./lib/index.js", | ||
"devDependencies": { | ||
"@foal/internal-test": "^4.1.0", | ||
"@foal/internal-test": "^4.2.0", | ||
"@types/mocha": "10.0.1", | ||
@@ -86,3 +86,3 @@ "@types/node": "18.18.6", | ||
}, | ||
"gitHead": "b877ef3ad39de86385e412276f20d9b90f6fe854" | ||
"gitHead": "359331eb0b82cd8aed8c4124002b7f2ba8222284" | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
396670
9380
16