Comparing version 0.0.13 to 0.0.14
52
index.js
@@ -9,3 +9,2 @@ "use strict" | ||
var path = require("path") | ||
var deepcopy = require('deepcopy') | ||
@@ -147,24 +146,31 @@ const DEFAULT_COLLECTOR_URL = "https://metrics-api.iopipe.com" | ||
var new_context = (old_context) => { | ||
var context = deepcopy(old_context) | ||
context.succeed = function(data) { | ||
//console.log("WOLF:CalledContextSucceed.") | ||
generateLog(null, () => { | ||
old_context.succeed(data) | ||
}) | ||
} | ||
context.fail = function(err) { | ||
//console.log("WOLF:CalledContextFail.") | ||
generateLog(err, () => { | ||
old_context.fail(err) | ||
}) | ||
} | ||
context.done = function(err, data) { | ||
//console.log("WOLF:CalledContextDone.") | ||
generateLog(err, () => { | ||
old_context.done(err, data) | ||
}) | ||
} | ||
context.iopipe_log = function(level, data) { | ||
emitter.queue.push([level, data]) | ||
} | ||
var context = Object.assign({ | ||
set callbackWaitsForEmptyEventLoop(value) { | ||
old_context.callbackWaitsForEmptyEventLoop = value | ||
}, | ||
get callbackWaitsForEmptyEventLoop() { | ||
return old_context.callbackWaitsForEmptyEventLoop | ||
}, | ||
succeed: function(data) { | ||
//console.log("WOLF:CalledContextSucceed.") | ||
generateLog(null, () => { | ||
old_context.succeed(data) | ||
}) | ||
}, | ||
fail: function(err) { | ||
//console.log("WOLF:CalledContextFail.") | ||
generateLog(err, () => { | ||
old_context.fail(err) | ||
}) | ||
}, | ||
done: function(err, data) { | ||
//console.log("WOLF:CalledContextDone.") | ||
generateLog(err, () => { | ||
old_context.done(err, data) | ||
}) | ||
}, | ||
iopipe_log: function(level, data) { | ||
emitter.queue.push([level, data]) | ||
} | ||
}, old_context) | ||
@@ -171,0 +177,0 @@ return context |
{ | ||
"name": "iopipe", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "IOpipe Lambda Analytics & Tracing Agent", | ||
@@ -30,3 +30,2 @@ "main": "index.js", | ||
"crypto": "0.0.3", | ||
"deepcopy": "^0.6.3", | ||
"request": "^2.72.0" | ||
@@ -33,0 +32,0 @@ }, |
20227
2
200
- Removeddeepcopy@^0.6.3
- Removeddeepcopy@0.6.3(transitive)