Socket
Socket
Sign inDemoInstall

yukon

Package Overview
Dependencies
32
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.5 to 1.5.0

.travis.yml

6

demoServer.js

@@ -5,2 +5,3 @@ var express = require('express');

var demoApp = require('./demo/demoApp');
var altDemoApp = require('./demo/altDemoApp');

@@ -10,5 +11,6 @@ app.set('view engine', 'jade');

app.use(bodyParser());
app.use(bodyParser.urlencoded({extended: false, limit: "500kb"}));
app.use(bodyParser.json({limit: "500kb"}));
demoApp(app);
(process.argv[2] === '--alt') ? altDemoApp(app) : demoApp(app);

@@ -15,0 +17,0 @@ app.listen(process.env.PORT || 3000);

{
"name": "yukon",
"version": "1.4.5",
"version": "1.5.0",
"description": "Self-discovering data-driven web components",

@@ -47,6 +47,8 @@ "main": "yukon.js",

"glob": "^4.3.2",
"istanbul": "^0.3.5",
"jade": "^1.8.2",
"mocha": "^2.1.0",
"mocha-lcov-reporter": "0.0.1",
"supertest": "^0.15.0"
}
}

@@ -12,3 +12,3 @@ // NOTE: WORK IN PROGRESS, NOT TESTABLE YET

var middleware = require('./doQuery')(app, _.merge(defaultConfig, config));
var middleware = require('./doQuery')(app, _.merge(_.cloneDeep(defaultConfig), config));

@@ -15,0 +15,0 @@ return {

@@ -13,3 +13,3 @@ // plugins return 2 properties:

// but any properties set in the app config should always override both
var mergedConfig = _.merge(defaultConfig, config);
var mergedConfig = _.merge(_.cloneDeep(defaultConfig), config);

@@ -16,0 +16,0 @@ var middleware = require('./parallelApi')(app, mergedConfig);

@@ -12,3 +12,3 @@ // NOTE: WORK IN PROGRESS, NOT TESTABLE YET

var middleware = require('./doQuery')(app, _.merge(defaultConfig, config));
var middleware = require('./doQuery')(app, _.merge(_.cloneDeep(defaultConfig), config));

@@ -15,0 +15,0 @@ return {

@@ -336,8 +336,7 @@               ![North to the Yukon!](http://i.imgur.com/gBj7RWo.gif)

[npm-url]: https://www.npmjs.com/package/yukon
[downloads-image]: https://img.shields.io/npm/dm/yukon.svg?style=flat
[downloads-image]: https://img.shields.io/npm/dm/yukon.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/yukon
[travis-image]: https://img.shields.io/travis/yukon/yukon/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/yukon/yukon
[coveralls-image]: https://img.shields.io/coveralls/yukon/yukon/master.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/yukon/yukon?branch=master
[travis-image]: https://travis-ci.org/jackspaniel/yukon.svg
[travis-url]: https://travis-ci.org/jackspaniel/yukon?branch=master
[coveralls-image]: https://coveralls.io/repos/jackspaniel/yukon/badge.svg
[coveralls-url]: https://coveralls.io/r/jackspaniel/yukon?branch=master

@@ -7,4 +7,6 @@ // add yukon default config to nodulejs default config

module.exports = function(app, config) {
var yukonConfig = _.merge(defaultConfig, config);
var yukonConfig = _.merge(_.cloneDeep(defaultConfig), config);
yukonConfig.customDebug = yukonConfig.customDebug || customDebug;
var debug = yukonConfig.customDebug('yukon->index');

@@ -24,15 +26,15 @@ debug('initializing');

config.middlewares.start, // app-defined
yukonConfig.middlewares.start, // app-defined
require('./middlewares/preProcessor')(app, yukonConfig), // preprocessing logic before APIs are called
config.middlewares.preData, // app-defined
yukonConfig.middlewares.preData, // app-defined
getDataMiddleware, // can be app-defined or use yukon parallel plugin caller by default
config.middlewares.postData, // app-defined
yukonConfig.middlewares.postData, // app-defined
require('./middlewares/postProcessor')(app, yukonConfig), // common post-processing logic after all APIs return
config.middlewares.finish, // app-defined
yukonConfig.middlewares.finish, // app-defined

@@ -54,5 +56,13 @@ require('./middlewares/finish')(app, yukonConfig), // finish with json or html

}
// default debug function
function customDebug(identifier) {
return function(msg) {
if (yukonConfig.debugToConsole) console.log(identifier+': '+msg);
};
}
};
function passThrough(req, res, next) {
req.nodule.debug('passThrough middleware');
next();

@@ -86,9 +96,2 @@ }

// default debug function
customDebug: function(identifier) {
return function(msg) {
if (defaultConfig.debugToConsole) console.log(identifier+': '+msg);
};
},
noduleDefaults: {

@@ -95,0 +98,0 @@ // Properties inherited from nodule.js (see nodule conf (TODO:link here) as these may get out of date):

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc