Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yog2-kernel

Package Overview
Dependencies
Maintainers
2
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yog2-kernel - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

1

index.js

@@ -11,2 +11,3 @@ 'use strict';

this.express = express;
this.loader = loader;
this.require = null;

@@ -13,0 +14,0 @@ this.plugins = {};

2

package.json
{
"name": "yog2-kernel",
"version": "0.0.4",
"version": "0.0.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -39,12 +39,21 @@ var _ = require('lodash');

for (var i = 0; i < conf.middleware.length; i++) {
var component = yog.plugins[conf.middleware[i]];
var middleware = conf.middleware[i];
// 如果是直接配置的中间件,则直接加载
if (typeof middleware === 'function'){
app.use(middleware);
continue;
}
var component = yog.plugins[middleware];
var start = +(new Date());
if (MIDDLEWARE_DEBUG){
app.use(startTime(conf.middleware[i]));
app.use(startTime(middleware));
}
component && component();
if (!component){
throw new Error('middleware ' + middleware + ' not found');
}
component();
if (MIDDLEWARE_DEBUG){
app.use(endTime(conf.middleware[i]));
app.use(endTime(middleware));
}
debuglog('middleware [%s] loaded in %d ms', conf.middleware[i], new Date() - start);
debuglog('middleware [%s] loaded in %d ms', middleware, new Date() - start);
}

@@ -76,2 +85,6 @@ }

tasks = _.remove(tasks, function(middleware){
return !_.isFunction(middleware);
});
tasks.push(core);

@@ -78,0 +91,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc