New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.2.1 to 0.2.2

2

package.json
{
"name": "yog2-kernel",
"version": "0.2.1",
"version": "0.2.2",
"description": "yog2 kernel",

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

@@ -186,5 +186,12 @@ 'use strict';

function createBaseRouter() {
var baseRouter = express.Router();
var rootRouter = new express.Router();
var rootRouterInjector = null;
function createBaseRouter(injector) {
var baseRouter = new express.Router();
rootRouterInjector = injector;
rootRouterInjector(rootRouter);
baseRouter.use(function (req, res, next) {
rootRouter(req, res, next);
});
baseRouter.all('/:router*', baseRouterHandler);

@@ -200,4 +207,7 @@ baseRouter.all('*', baseRouterHandler);

actions = {};
// update root router
rootRouter = new express.Router();
rootRouterInjector(rootRouter);
},
middleware: createBaseRouter(),
middleware: createBaseRouter,
router: getRouter,

@@ -204,0 +214,0 @@ action: function (name) {

@@ -6,13 +6,9 @@ 'use strict';

module.exports.dispatcher = function(app, conf){
module.exports.dispatcher = function (app, conf) {
conf.appPath = conf.appPath || yog.ROOT_PATH + '/app';
var dispatcherIns = new dispatcher(conf);
//用户自定义rootRouter
var rootRouter = new express.Router();
yog.dispatcher = dispatcherIns;
conf.rootRouter(rootRouter);
//自动路由
var autoRouter = dispatcherIns.middleware;
return function(){
app.use(rootRouter);
var autoRouter = dispatcherIns.middleware(conf.rootRouter);
return function () {
app.use(autoRouter);

@@ -23,5 +19,5 @@ };

module.exports.dispatcher.defaultConf = {
rootRouter: function(router){
rootRouter: function (router) {
}
};
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