New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mvcjs

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mvcjs - npm Package Compare versions

Comparing version

to
0.1.0-rc10

23

framework/core/logger.js

@@ -170,9 +170,9 @@ "use strict";

if (log.type === 'ERROR') {
console.error(log);
exec_console(console.error, log);
} else if (log.type === 'INFO') {
console.info(log);
exec_console(console.info, log);
} else if (log.type === 'WARNING') {
console.warn(log);
exec_console(console.warn, log);
} else {
console.log(log);
exec_console(console.log, log);
}

@@ -199,3 +199,16 @@ }

}
/**
* Exec console output
* @param func
* @param log
*/
function exec_console(func, log) {
func(
' ' + log.type + '\n',
'CREATED: ' + log.created + '\t ' + '\n',
'MESSAGE: ' + log.message + '\t ' + log.trace + '\n',
!!log.data ? 'DATA:' + log.data + '\n' : '',
'\n'
);
}
},

@@ -202,0 +215,0 @@ /**

@@ -15,3 +15,2 @@ "use strict";

error = di.load('error'),
util = di.load('util'),
Promise = di.load('promise'),

@@ -301,14 +300,17 @@ Request;

key = key.toLowerCase();
value = Type.isString(value) ? value : value.toString();
if (this.hasHeader(key) && !Type.isArray(this.headers[key])) {
item = this.getHeader(key);
this.headers[key] = [];
this.headers[key].push(item);
this.headers[key].push(value);
} else if (this.hasHeader(key) && Type.isArray(this.headers[key])) {
this.headers[key].push(value);
} else {
this.headers[key] = value;
if (!Type.isString(value) && !!value && Type.isFunction(value.toString)) {
value = value.toString();
}
if (Type.isString(value)) {
if (this.hasHeader(key) && !Type.isArray(this.headers[key])) {
item = this.getHeader(key);
this.headers[key] = [];
this.headers[key].push(item);
this.headers[key].push(value);
} else if (this.hasHeader(key) && Type.isArray(this.headers[key])) {
this.headers[key].push(value);
} else {
this.headers[key] = value;
}
}
} else {

@@ -618,5 +620,5 @@ throw new error.HttpError(500, {

return request.parse();
} else if (response.trace) {
} else if (['HttpError', 'DataError', 'Exception'].indexOf(response.name) > -1) {
this.addHeader('Content-Type', 'text/plain');
return this._render(response.trace);
return this._render(response.toString());
} else if (response.stack) {

@@ -627,3 +629,3 @@ this.addHeader('Content-Type', 'text/plain');

this.addHeader('Content-Type', 'text/plain');
return this._render(util.inspect(response));
return this._render(core.inspect(response));
} else {

@@ -703,3 +705,3 @@ return this._render(response);

createUrl: router.createUrl.bind(router),
parsedUrl: core.copy(this.parsedUrl),
parsedUrl: this.parsedUrl,
url: this.url,

@@ -706,0 +708,0 @@ forwardUrl: this.forward.bind(this),

@@ -161,6 +161,2 @@ "use strict";

setPreloaded: function View_setPreloaded(key, value) {
logger.info('View.setPreloaded:', {
key: key,
value: value
});
this.preloaded[key] = value;

@@ -197,3 +193,3 @@ },

} catch (e) {
logger.error('View.isFile:', {path: path, e: e});
logger.warn('View.isFile:', {path: path, e: e});
}

@@ -216,3 +212,3 @@ return false;

} catch (e) {
logger.error('View.isDir:', {path: path, e: e});
logger.warn('View.isDir:', {path: path, e: e});
}

@@ -354,8 +350,2 @@ return false;

});
} finally {
logger.info('ViewLoader.load:', {
path: path,
template: template,
cb: cb
});
}

@@ -362,0 +352,0 @@ return template;

@@ -22,2 +22,3 @@ "use strict";

_construct: function Exception(message, e) {
var stack;
if (!(e instanceof Error)) {

@@ -34,2 +35,6 @@ e = new Error();

e.trace = core.trace(8, 9);
// store stack string reference to avoid multiple to toString conversion loop
// possible bug in js/v8
stack = e.stack;
e.toString = function () {

@@ -48,3 +53,3 @@ var m = this.name + ' ' + this.trace;

m += '\n';
m += this.stack;
m += stack;
return m;

@@ -51,0 +56,0 @@ };

@@ -5,7 +5,7 @@ {

"description": "Powerful lightweight mvc framework for nodejs",
"version": "0.1.0-rc1",
"version": "0.1.0-rc10",
"dependencies": {
"mongoose": "3.8.x",
"swig": "1.4.x",
"promise": "6.0.x",
"promise": "7.0.x",
"static-type-js": "0.3.x",

@@ -12,0 +12,0 @@ "etag": "1.5.x",