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

appcd-agent

Package Overview
Dependencies
Maintainers
3
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appcd-agent - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# v1.1.4 (Jan 16, 2019)
* Refactored promises to async/await.
* Updated dependencies.
# v1.1.3 (Nov 27, 2018)

@@ -2,0 +7,0 @@

25

dist/agent.js

@@ -133,2 +133,3 @@ "use strict";

*
* @returns {Promise}
* @access private

@@ -138,3 +139,3 @@ */

poll() {
async poll() {
const cpu = process.cpuUsage(this.initCpu);

@@ -150,10 +151,12 @@ const hrtime = process.hrtime(this.initHrtime);

};
Promise.all(this.collectors.map(async fn => {
const result = await fn();
if (result && typeof result === 'object') {
Object.assign(stats, result);
}
})).then(() => {
// figure out how long it's been since we started the last poll
try {
await Promise.all(this.collectors.map(async fn => {
const result = await fn();
if (result && typeof result === 'object') {
Object.assign(stats, result);
}
})); // figure out how long it's been since we started the last poll
const now = Date.now();

@@ -205,3 +208,5 @@ const delta = this.lastTimestamp ? now - this.lastTimestamp : 0;

this.emit('stats', stats);
}).catch(err => this.emit('error', err));
} catch (err) {
this.emit('error', err);
}
}

@@ -229,2 +234,2 @@ /**

exports.default = Agent;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFnZW50LmpzIl0sIm5hbWVzIjpbIkFnZW50IiwiRXZlbnRFbWl0dGVyIiwiY29uc3RydWN0b3IiLCJvcHRzIiwiVHlwZUVycm9yIiwicG9sbEludGVydmFsIiwiTWF0aCIsIm1heCIsImJ1Y2tldHMiLCJjb2xsZWN0b3JzIiwiZ2V0U3RhdHMiLCJuYW1lIiwiY29sbGVjdGlvbiIsInN0YXRzIiwic3RhcnQiLCJpbml0Q3B1IiwiY3VycmVudENwdSI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dFx0XHRcdC8vIHdhcyByZW1vdmVkIG9yIHRoZSBidWNrZXQgaXMgbm8gbG9uZ2VyIG1vbml0b3JlZCwgc28gcmVtb3ZlIHRoZSBidWNrZXRcblx0XHRcdFx0XHRkZWxldGUgdGhpcy5idWNrZXRzW25hbWVdO1xuXHRcdFx0XHR9XG5cdFx0XHR9XG5cblx0XHRcdC8vIGFkZCBpbiB0aGUgdGltZXN0YW1wXG5cdFx0XHRzdGF0cy50cyA9IHByb2Nlc3MudXB0aW1lKCk7XG5cblx0XHRcdC8vIGVtaXQgdGhlIHN0YXRzIVxuXHRcdFx0dGhpcy5lbWl0KCdzdGF0cycsIHN0YXRzKTtcblx0XHR9IGNhdGNoIChlcnIpIHtcblx0XHRcdHRoaXMuZW1pdCgnZXJyb3InLCBlcnIpO1xuXHRcdH1cblx0fVxuXG5cdC8qKlxuXHQgKiBHZW5lcmF0ZXMgYSBzbmFwc2hvdCBvZiB0aGUgY29sbGVjdGVkIGRhdGEuXG5cdCAqXG5cdCAqIEByZXR1cm5zIHtPYmplY3R9XG5cdCAqIEBhY2Nlc3MgcHVibGljXG5cdCAqL1xuXHRoZWFsdGgoKSB7XG5cdFx0Y29uc3QgcmVzdWx0ID0ge307XG5cdFx0Zm9yIChjb25zdCBbIG5hbWUsIGJ1Y2tldCBdIG9mIE9iamVjdC5lbnRyaWVzKHRoaXMuYnVja2V0cykpIHtcblx0XHRcdHJlc3VsdFtuYW1lXSA9IGJ1Y2tldC5jb2xsZWN0aW9uLnN0YXRzO1xuXHRcdH1cblx0XHRyZXR1cm4gcmVzdWx0O1xuXHR9XG59XG4iXSwiZmlsZSI6ImFnZW50LmpzIn0=

9

package.json
{
"name": "appcd-agent",
"version": "1.1.3",
"version": "1.1.4",
"description": "Monitors a Node.js process and tracks CPU usage, memory usage, and custom metrics.",

@@ -19,8 +19,7 @@ "main": "./dist/index",

"dependencies": {
"nanobuffer": "^1.1.1",
"source-map-support": "^0.5.9"
"nanobuffer": "^1.1.4",
"source-map-support": "^0.5.10"
},
"devDependencies": {
"appcd-gulp": "^1.2.1",
"gulp": "^3.9.1"
"appcd-gulp": "^2.0.0"
},

@@ -27,0 +26,0 @@ "homepage": "https://github.com/appcelerator/appc-daemon/tree/master/packages/appcd-agent",

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