Comparing version 2.1.0 to 2.2.0
@@ -177,3 +177,3 @@ 'use strict'; | ||
const USER_AGENT = "libhoney-js/2.1.0"; | ||
const USER_AGENT = "libhoney-js/2.2.0"; | ||
@@ -197,2 +197,5 @@ const _global = | ||
// how long (in ms) to give a single POST before we timeout | ||
const deadlineTimeoutMs = 60000; | ||
const emptyResponseCallback = function() {}; | ||
@@ -342,2 +345,3 @@ | ||
this._pendingWorkCapacity = pendingWorkCapacity; | ||
this._timeout = deadlineTimeoutMs; | ||
this._sendTimeoutId = -1; | ||
@@ -362,2 +366,5 @@ this._eventQueue = []; | ||
} | ||
if (typeof options.timeout === "number") { | ||
this._timeout = options.timeout; | ||
} | ||
@@ -491,2 +498,3 @@ this._userAgentAddition = options.userAgentAddition || ""; | ||
.type("json") | ||
.timeout(this._timeout) | ||
.send(encoded) | ||
@@ -911,2 +919,5 @@ .end((err, res) => { | ||
// how long (in ms) to give a single POST before we timeout. | ||
timeout: 60000, | ||
// if this is set to true, all sending is disabled. useful for disabling libhoney when testing | ||
@@ -942,2 +953,3 @@ disabled: false, | ||
* @param {number} [opts.maxResponseQueueSize=1000] - The maximum number of responses we enqueue before dropping them. | ||
* @param {number} [opts.timeout=60000] - How long (in ms) to give a single POST before we timeout. | ||
* @param {boolean} [opts.disabled=false] - Disable transmission of events to the specified `apiHost`, particularly useful for testing or development. | ||
@@ -944,0 +956,0 @@ * @constructor |
@@ -196,3 +196,3 @@ 'use strict'; | ||
const USER_AGENT = "libhoney-js/2.1.0"; | ||
const USER_AGENT = "libhoney-js/2.2.0"; | ||
@@ -216,2 +216,5 @@ const _global = | ||
// how long (in ms) to give a single POST before we timeout | ||
const deadlineTimeoutMs = 60000; | ||
const emptyResponseCallback = function() {}; | ||
@@ -361,2 +364,3 @@ | ||
this._pendingWorkCapacity = pendingWorkCapacity; | ||
this._timeout = deadlineTimeoutMs; | ||
this._sendTimeoutId = -1; | ||
@@ -381,2 +385,5 @@ this._eventQueue = []; | ||
} | ||
if (typeof options.timeout === "number") { | ||
this._timeout = options.timeout; | ||
} | ||
@@ -515,2 +522,3 @@ this._userAgentAddition = options.userAgentAddition || ""; | ||
.type("json") | ||
.timeout(this._timeout) | ||
.send(encoded) | ||
@@ -935,2 +943,5 @@ .end((err, res) => { | ||
// how long (in ms) to give a single POST before we timeout. | ||
timeout: 60000, | ||
// if this is set to true, all sending is disabled. useful for disabling libhoney when testing | ||
@@ -966,2 +977,3 @@ disabled: false, | ||
* @param {number} [opts.maxResponseQueueSize=1000] - The maximum number of responses we enqueue before dropping them. | ||
* @param {number} [opts.timeout=60000] - How long (in ms) to give a single POST before we timeout. | ||
* @param {boolean} [opts.disabled=false] - Disable transmission of events to the specified `apiHost`, particularly useful for testing or development. | ||
@@ -968,0 +980,0 @@ * @constructor |
@@ -173,3 +173,3 @@ import superagent from 'superagent'; | ||
const USER_AGENT = "libhoney-js/2.1.0"; | ||
const USER_AGENT = "libhoney-js/2.2.0"; | ||
@@ -193,2 +193,5 @@ const _global = | ||
// how long (in ms) to give a single POST before we timeout | ||
const deadlineTimeoutMs = 60000; | ||
const emptyResponseCallback = function() {}; | ||
@@ -338,2 +341,3 @@ | ||
this._pendingWorkCapacity = pendingWorkCapacity; | ||
this._timeout = deadlineTimeoutMs; | ||
this._sendTimeoutId = -1; | ||
@@ -358,2 +362,5 @@ this._eventQueue = []; | ||
} | ||
if (typeof options.timeout === "number") { | ||
this._timeout = options.timeout; | ||
} | ||
@@ -492,2 +499,3 @@ this._userAgentAddition = options.userAgentAddition || ""; | ||
.type("json") | ||
.timeout(this._timeout) | ||
.send(encoded) | ||
@@ -912,2 +920,5 @@ .end((err, res) => { | ||
// how long (in ms) to give a single POST before we timeout. | ||
timeout: 60000, | ||
// if this is set to true, all sending is disabled. useful for disabling libhoney when testing | ||
@@ -943,2 +954,3 @@ disabled: false, | ||
* @param {number} [opts.maxResponseQueueSize=1000] - The maximum number of responses we enqueue before dropping them. | ||
* @param {number} [opts.timeout=60000] - How long (in ms) to give a single POST before we timeout. | ||
* @param {boolean} [opts.disabled=false] - Disable transmission of events to the specified `apiHost`, particularly useful for testing or development. | ||
@@ -945,0 +957,0 @@ * @constructor |
{ | ||
"name": "libhoney", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": " Honeycomb.io Javascript library", | ||
@@ -5,0 +5,0 @@ "bugs": "https://github.com/honeycombio/libhoney-js/issues", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
138759
3641