Skip to content

Commit

Permalink
update deps. Override getProperies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Kuzmin committed Dec 4, 2019
1 parent 2ef19ba commit 7852cd9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alertlogic/paws-collector",
"version": "1.0.4",
"version": "1.0.5",
"license": "MIT",
"description": "Alert Logic AWS based API Poll Log Collector Library",
"repository": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"sinon": "^7.5.0"
},
"dependencies": {
"@alertlogic/al-aws-collector-js": "2.0.2",
"@alertlogic/al-aws-collector-js": "2.0.3",
"async": "3.1.0",
"debug": "4.1.1",
"moment": "2.24.0"
Expand Down
17 changes: 12 additions & 5 deletions paws_collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ class PawsCollector extends AlAwsCollector {
this.pollInterval = process.env.paws_poll_interval;
};

getProperties() {
const baseProps = super.getProperties();
let pawsProps = {
pawsCollectorType : this._pawsCollectorType
};
return Object.assign(pawsProps, baseProps);
};

register(event) {
let collector = this;
let stack = {
pawsCollectorType : collector._pawsCollectorType,
let pawsRegisterProps = {
pawsEndpoint : process.env.paws_endpoint
};

Expand All @@ -51,22 +58,22 @@ class PawsCollector extends AlAwsCollector {
console.err('PAWS000101 Error during registration', err);
return collector.done(err);
} else {
let registerProps = Object.assign(stack, customRegister);
let registerProps = Object.assign(pawsRegisterProps, customRegister);
return AlAwsCollector.prototype.register.call(collector, event, registerProps);
}
});
};

deregister(event) {
let collector = this;
let stack = {
let pawsRegisterProps = {
pawsCollectorType : collector._pawsCollectorType
};
let custom = collector.pawsGetRegisterParameters(event, function(err, customRegister) {
if (err) {
console.warn('PAWS000102 Error during deregistration', err);
}
let registerProps = Object.assign(stack, customRegister);
let registerProps = Object.assign(pawsRegisterProps, customRegister);
return AlAwsCollector.prototype.deregister.call(collector, event, registerProps);
});
};
Expand Down

0 comments on commit 7852cd9

Please sign in to comment.