Skip to content

Commit

Permalink
Merge pull request #26 from rwtombaugh/master
Browse files Browse the repository at this point in the history
Update Webtask-tools npm dependency versions
  • Loading branch information
tjanczuk committed Aug 13, 2018
2 parents 5e02541 + fb988ca commit 3da48e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions lib/index.js
Expand Up @@ -7,7 +7,7 @@ exports.fromServer = exports.fromRestify = fromServer;
var app = new (require('express'))();
app.get('/', function (req, res) {
res.send('Hello, world');
res.send('Hello, world');
});
module.exports = app;
Expand Down Expand Up @@ -41,13 +41,13 @@ function render(options, cb, render) {
cb(null, (ctx, req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' });
var html = render(options.script);
res.end(html);
});
}
res.end(html);
});
}

/*
async (dynamic context) => {
return "Hello, world!";
return "Hello, world!";
}
*/
exports.cs = function (options, cb) {
Expand Down Expand Up @@ -121,7 +121,7 @@ function createRouteNormalizationRx(claims) {
var name = claims.jtn
? claims.jtn.replace(SANITIZE_RX, '\\$&')
: '';

if (claims.url_format === USE_SHARED_DOMAIN) {
return new RegExp(`^\/api/run/${container}/(?:${name}\/?)?`);
}
Expand Down Expand Up @@ -174,9 +174,9 @@ function attachStorageHelpers(context) {
qs: { path: path },
json: true,
}, function (err, res, body) {
if (err) return cb(Boom.wrap(err, 502));
if (err) return cb(Boom.boomify(err, { statusCode: 502 }));
if (res.statusCode === 404 && Object.hasOwnProperty.call(options, 'defaultValue')) return cb(null, options.defaultValue);
if (res.statusCode >= 400) return cb(Boom.create(res.statusCode, body && body.message));
if (res.statusCode >= 400) return cb(new Boom(body && body.message, { statusCode: res.statusCode }));

cb(null, body);
});
Expand Down Expand Up @@ -209,8 +209,8 @@ function attachStorageHelpers(context) {
qs: { path: path },
body: data,
}, function (err, res, body) {
if (err) return cb(Boom.wrap(err, 502));
if (res.statusCode >= 400) return cb(Boom.create(res.statusCode, body && body.message));
if (err) return cb(Boom.boomify(err, { statusCode: 502 }));
if (res.statusCode >= 400) return cb(new Boom(body && body.message, { statusCode: res.statusCode }));

cb(null);
});
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "webtask-tools",
"version": "3.3.0",
"version": "3.4.0",
"description": "Tools to facilitate working in a webtask context",
"main": "./lib/index.js",
"scripts": {
Expand All @@ -24,10 +24,10 @@
"homepage": "https://github.com/auth0/webtask-tools#readme",
"devDependencies": {},
"dependencies": {
"boom": "^2.7.2",
"boom": "^7.2.0",
"jsonwebtoken": "^5.7.0",
"pug": "^0.1.0",
"safe-buffer": "^5.0.1",
"superagent": "^1.8.3"
"superagent": "^3.8.3"
}
}

0 comments on commit 3da48e1

Please sign in to comment.