Comparing version 1.1.1 to 1.1.2
1.1.2 / 2014-10-08 | ||
================== | ||
* pgk: add serve command | ||
* Merge pull request #18 from phgrey/master | ||
* formatting && making the method private | ||
* correcting jsdocs | ||
* some memory leaks fixing | ||
* Merge pull request #11 from codeHatcher/master | ||
* fixing alert example when setting multiple values | ||
* alert example for object incorrect, fixing | ||
1.1.1 / 2014-03-24 | ||
@@ -3,0 +15,0 @@ ================== |
@@ -11,3 +11,3 @@ /*! | ||
exports.version = '1.1.1'; | ||
exports.version = '1.1.2'; | ||
@@ -14,0 +14,0 @@ /*! |
@@ -54,2 +54,32 @@ /*! | ||
/** | ||
* ._reconnect() | ||
* | ||
* Establish the broken connection again | ||
* | ||
* @name _reconnect | ||
* @api private | ||
*/ | ||
Agent.prototype._reconnect = function(){ | ||
var self = this | ||
, gwe = self.meta.gatewayError | ||
, pos = 0; | ||
if (gwe && 'undefined' !== typeof gwe.identifier) { | ||
debug('(cache) since: %d', gwe.identifier); | ||
self.cache.sinceId(gwe.identifier, function (obj, id) { | ||
debug('(queue) push: %d', id); | ||
self.queue.pushAt(pos++, obj); | ||
}); | ||
} | ||
debug('(gateway) reconnecting'); | ||
self.connect(function (err) { | ||
if (err) return; | ||
debug('(gateway) reconnected'); | ||
self.emit('gateway:reconnect'); | ||
}); | ||
}; | ||
/** | ||
* .connect (callback) | ||
@@ -65,3 +95,2 @@ * | ||
*/ | ||
Agent.prototype.connect = function (cb) { | ||
@@ -89,23 +118,2 @@ cb = cb || function () {}; | ||
// how to perform a reconnect | ||
function reconnect () { | ||
var gwe = self.meta.gatewayError | ||
, pos = 0; | ||
if (gwe && 'undefined' !== typeof gwe.identifier) { | ||
debug('(cache) since: %d', gwe.identifier); | ||
self.cache.sinceId(gwe.identifier, function (obj, id) { | ||
debug('(queue) push: %d', id); | ||
self.queue.pushAt(pos++, obj); | ||
}); | ||
} | ||
debug('(gateway) reconnecting'); | ||
self.connect(function (err) { | ||
if (err) return; | ||
debug('(gateway) reconnected'); | ||
self.emit('gateway:reconnect'); | ||
}); | ||
} | ||
// reset state | ||
@@ -143,3 +151,3 @@ this.meta.gatewayError = null; | ||
self.connected = false; | ||
self.meta.timer = setTimeout(reconnect, ms(delay)); | ||
self.meta.timer = setTimeout(self._reconnect.bind(self), ms(delay)); | ||
} else { | ||
@@ -146,0 +154,0 @@ debug('(gateway) closed - %s:%d', opts.host, opts.port); |
@@ -118,3 +118,3 @@ /*! | ||
* // set multiple values | ||
* msg.set({ | ||
* msg.alert({ | ||
* body: 'Hello Universe' | ||
@@ -121,0 +121,0 @@ * , 'launch-image': 'notif.png' |
100
package.json
{ | ||
"name": "apnagent" | ||
, "version": "1.1.1" | ||
, "description": "Node adapter for Apple Push Notification (APN) service." | ||
, "author": "Jake Luer <jake@qualiancy.com> (http://qualiancy.com)" | ||
, "license": "MIT" | ||
, "homepage": "http://apnagent.qualiancy.com" | ||
, "contributors": [ | ||
"Jake Luer <jake@qualiancy.com>" | ||
] | ||
, "keywords": [ | ||
"apn" | ||
, "apple" | ||
, "push" | ||
, "notifications" | ||
, "ios" | ||
, "iphone" | ||
, "ipad" | ||
] | ||
, "repository": { | ||
"type": "git" | ||
, "url": "git@github.com:qualiancy/apnagent.git" | ||
} | ||
, "bugs": { | ||
"url": "https://github.com/qualiancy/apnagent/issues" | ||
} | ||
, "engines": { | ||
"node": ">= 0.8.0" | ||
} | ||
, "main": "./index" | ||
, "scripts": { | ||
"test": "make test" | ||
} | ||
, "dependencies": { | ||
"breeze-async": "0.1.x" | ||
, "breeze-queue": "0.4.x" | ||
, "drip": "1.1.x" | ||
, "facet": "0.4.x" | ||
, "lotus": "~1.0.1" | ||
, "tea-error": "0.1.x" | ||
, "tea-extend": "0.2.x" | ||
, "tea-inherits": "0.1.x" | ||
, "tea-ms": "0.1.x" | ||
, "sherlock": "*" | ||
} | ||
, "devDependencies": { | ||
"chai": "*" | ||
, "chai-spies": "*" | ||
, "mocha": "*" | ||
} | ||
"name": "apnagent", | ||
"version": "1.1.2", | ||
"description": "Node adapter for Apple Push Notification (APN) service.", | ||
"author": "Jake Luer <jake@qualiancy.com> (http://qualiancy.com)", | ||
"license": "MIT", | ||
"homepage": "http://apnagent.qualiancy.com", | ||
"contributors": [ | ||
"Jake Luer <jake@qualiancy.com>" | ||
], | ||
"keywords": [ | ||
"apn", | ||
"apple", | ||
"push", | ||
"notifications", | ||
"ios", | ||
"iphone", | ||
"ipad" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:qualiancy/apnagent.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/qualiancy/apnagent/issues" | ||
}, | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
}, | ||
"main": "./index", | ||
"scripts": { | ||
"test": "make test", | ||
"serve": "serve -L -D --compress docs/out" | ||
}, | ||
"dependencies": { | ||
"breeze-async": "0.1.x", | ||
"breeze-queue": "0.4.x", | ||
"drip": "1.1.x", | ||
"facet": "0.4.x", | ||
"lotus": "~1.0.1", | ||
"tea-error": "0.1.x", | ||
"tea-extend": "0.2.x", | ||
"tea-inherits": "0.1.x", | ||
"tea-ms": "0.1.x", | ||
"sherlock": "*" | ||
}, | ||
"devDependencies": { | ||
"chai": "*", | ||
"chai-spies": "*", | ||
"mocha": "*", | ||
"serve": "^1.4.0" | ||
} | ||
} |
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
69729
24
2258
4