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

deployd

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deployd - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

dashboard/img/bg-old.png

2

lib/internal-routes.js

@@ -5,3 +5,3 @@ module.exports = {

'/resources': './collections/resources',
'/property-types': './collections/property-types'
'/property-types': './collections/property-types',
};

@@ -17,3 +17,3 @@ /**

// get the path parts
var parts = url.parse(req.url).pathname.split('/')
var parts = req.parts = url.parse(req.url).pathname.split('/')
, paths = req.paths = []

@@ -38,2 +38,9 @@ , references = req.references = []

if (path == '/__dashboard') {
req.resource = {
require: './collections/dashboard',
path: '/__dashboard'
};
return next();
}

@@ -51,4 +58,4 @@ // restrict access to internal resources

}

@@ -55,0 +62,0 @@ // first look for a resource at the given path

@@ -15,18 +15,3 @@ /**

var middleware = function (req, res, next) {
if(req.isRemote) {
// allow cross domain access
res.header("Access-Control-Allow-Origin", '*');
res.header('Access-Control-Allow-Credentials', 'true');
res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
if(req.method === 'OPTIONS') {
if(req.header('Access-Control-Request-Headers')) {
res.header("Access-Control-Allow-Headers", req.header('Access-Control-Request-Headers') + ', Content-Type');
}
res.send('OK');
} else {
next();
}
} else {
next();
}
next();
};

@@ -39,3 +24,3 @@

middleware.listen = function (callback) {
var server = this.server = express.createServer(function (req, res, next) {
var server = this.server = middleware.server = express.createServer(function (req, res, next) {
// by default pause the request

@@ -93,2 +78,4 @@ req.pause();

var hostname = url.hostname || 'localhost';
process.url = url;

@@ -95,0 +82,0 @@ // remote flag / remote auth

@@ -38,2 +38,3 @@ // from http://github.com/felixge/node-paperboy

"html":"text/html",
"htm":"text/html",
"ice":"x-conference/x-cooltalk",

@@ -40,0 +41,0 @@ "ico":"image/x-icon",

{
"author": "Ritchie Martori",
"name": "deployd",
"version": "0.3.2",
"version": "0.3.3",
"repository": {

@@ -9,3 +9,3 @@ "url": "git://github.com/deployd/deployd.git"

"engines": {
"node": ">= 0.6.x"
"node": ">= 0.7.x"
},

@@ -19,3 +19,4 @@ "main":"index",

"commander": "0.5.x",
"express": "2.5.x"
"express": "2.5.x",
"formidable": "1.0.x"
},

@@ -22,0 +23,0 @@ "devDependencies": {

@@ -27,2 +27,3 @@ // Testing Dependencies

sessions = client.use('/sessions')
dashboard = client.use('/__dashboard');
UserCollection = require('../lib/types').UserCollection

@@ -29,0 +30,0 @@ data = {

@@ -59,7 +59,10 @@ describe('Resource Actions', function(){

it('should update a single item', function(done) {
todos.post({title: 'a random todo'}, function (e, t) {
todos.post({title: 'a random todo', completed: true}, function (e, t) {
t.title = 'foobar';
todos.use('/' + t._id).put(t, function (error, todo) {
todos.use('/' + todo._id).get(function (err) {
expect(t.title).to.equal('foobar');
todos.use('/' + todo._id).get(function (err, todo) {
expect(todo).to.exist;
expect(todo._id).to.exist;
expect(todo.completed).to.equal(true);
expect(todo.title).to.equal('foobar');
done(err);

@@ -66,0 +69,0 @@ })

@@ -1,23 +0,23 @@

describe('Cross Domain Support', function(){
describe('OPTIONS /todo', function(){
it('should include Access-Control-Allow-Headers', function(done) {
var hdrs = 'GET, POST, PUT, DELETE'
, req = {method: 'OPTIONS', url: todos.url, headers: {'Access-Control-Request-Headers': hdrs}}
;
todos.exec(req, function (err, body, req, res) {
expect(body).to.equal('OK');
done(err);
})
})
})
describe('* /todos', function(){
it('should include Access-Control-Allow-* headers', function(done) {
todos.get(function (err, body, req, res) {
expect(res.headers['Access-Control-Allow-Origin'.toLowerCase()]).to.equal('*');
expect(res.headers['Access-Control-Allow-Methods'.toLowerCase()]).to.equal('GET, POST, PUT, DELETE, OPTIONS');
expect(res.headers['Access-Control-Allow-Credentials'.toLowerCase()]).to.equal('true');
done(err);
})
})
})
})
// describe('Cross Domain Support', function(){
// describe('OPTIONS /todo', function(){
// it('should include Access-Control-Allow-Headers', function(done) {
// var hdrs = 'GET, POST, PUT, DELETE'
// , req = {method: 'OPTIONS', url: todos.url, headers: {'Access-Control-Request-Headers': hdrs}}
// ;
// todos.exec(req, function (err, body, req, res) {
// expect(body).to.equal('OK');
// done(err);
// })
// })
// })
// describe('* /todos', function(){
// it('should include Access-Control-Allow-* headers', function(done) {
// todos.get(function (err, body, req, res) {
// expect(res.headers['Access-Control-Allow-Origin'.toLowerCase()]).to.equal('*');
// expect(res.headers['Access-Control-Allow-Methods'.toLowerCase()]).to.equal('GET, POST, PUT, DELETE, OPTIONS');
// expect(res.headers['Access-Control-Allow-Credentials'.toLowerCase()]).to.equal('true');
// done(err);
// })
// })
// })
// })

Sorry, the diff of this file is not supported yet

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