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

birdv3

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

birdv3 - npm Package Compare versions

Comparing version 0.1.0-rc5 to 0.1.0-rc6

2

package.json
{
"name": "birdv3",
"version": "0.1.0-rc5",
"version": "0.1.0-rc6",
"description": "birdv2 is a proxy server with cas auth built in, originate from `bird`",

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

@@ -23,3 +23,3 @@ var express = require('express')

var config = configParser.parse(configPath);
var config = configParser.parse(path.resolve(configPath));

@@ -60,81 +60,4 @@ // config 检测过程

// var ROUTER = config.router;
// var COOKIE = config.cookie;
// // var AUTO_INDEX = config.autoIndex ? config.autoIndex.split(/\x20+/) : ['index.html']
// //保证路径完整
// var TARGET_SERVER = config.server.slice('-1') === '/' ? config.server : config.server + '/';
// var jar = request.jar(); // jar to store cookies
// config = configResolver(config, jar);
// var auth = config.auth;
// auth(config, jar).then(function () {
//
// if (config.middleware) {
// console.log('or @debug, am i here?', config)
// function compose(middleware) {
// return function (req, res, next) {
// connect.apply(null, middleware.concat(next.bind(null, null))).call(null, req, res)
// }
// }
//
// // http://stackoverflow.com/questions/20274483/how-do-i-combine-connect-middleware-into-one-middleware
// return compose([proxy, require('./lib/mock')(config), require('./lib/change-user')(config), require('./lib/logout')(config)]);
// } else {
// console.log('@debug, am i here?')
// // setup bird app
// var app = new express()
// app.all('*', require('./lib/mock')(config))
// app.all('*', require('./lib/static')(config))
// app.all('*', require('./lib/change-user')(config))
// app.all('*', require('./lib/logout')(config))
// app.all('*', proxy)
//
// // go!
// app.listen(config.bird_port)
// console.info('BIRD'.rainbow, '============', config.name, 'RUNNING at', 'http://localhost:' + config.bird_port, '===============', 'BIRD'.rainbow);
// }
// }).catch(function (e) {
// console.log(e)
// })
//
// function configResolver(originConfig, jar) {
// var config = Object.assign({}, originConfig);
// config.auth = require('./auths/' + (originConfig.authType || originConfig.auth_standalone || 'uuap'));
// config.birdPort = originConfig.bird_port;
// config.jar = jar;
// return config;
// }
};
/**
* resolve static file path,, take care of welcome file
* @param {String} staticFileRootDirPath
* @param {String} pathname
* @return {String} working path
*/
function resolveFilePath(staticFileRootDirPath, pathname) {
if (pathname === '/') { // resolve welcome file
return path.join(staticFileRootDirPath, 'index.html')
}
return path.join(staticFileRootDirPath, pathname);
}
function router(url, router) {
var path = '';
var reg;
if (router) {
for (var i in router) {
reg = new RegExp(i)
if (reg.test(url)) {
path = url.replace(reg, router[i]);
console.log('special route mapping found! converting...', url, 'to', path)
}
}
} else {
path = url;
}
return path;
}

@@ -49,3 +49,3 @@ var url = require('url')

if (!newLocationParsed && (statusCode >= 300 && statusCode < 400) || statusCode == 403 || statusCode == 401 || statusCode == 407) {
needRetry()
return needRetry()
}

@@ -66,8 +66,8 @@

if (retryMethod(statusCode, rawBody)) {
needRetry()
return needRetry()
}
// console.info(body)
return callback(false)
res.end();
callback(false)
});

@@ -74,0 +74,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