File tree Expand file tree Collapse file tree 4 files changed +14
-16
lines changed Expand file tree Collapse file tree 4 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ test: compile
1414 npm run test
1515
1616publish :
17- npm run publish
17+ npm run rel
1818
1919clean :
2020 rm -rf node_modules
Original file line number Diff line number Diff line change @@ -131,7 +131,8 @@ class AlAwsCollector {
131131 region : this . _region ,
132132 functionName : this . _name ,
133133 version : this . _version ,
134- dataType : this . _ingestType
134+ dataType : this . _ingestType ,
135+ collectorId : this . _collectorId
135136 } ;
136137 }
137138
@@ -198,18 +199,14 @@ class AlAwsCollector {
198199 }
199200 } ,
200201 ( asyncCallback ) => {
201- if ( ! process . env . collector_id || process . env . collector_id === 'none' ) {
202- this . _azcollectc . register ( regValues )
203- . then ( resp => {
204- const newCollectorId = resp . collector ? resp . collector . id : 'none' ;
205- return m_alAws . setEnv ( { collector_id : newCollectorId } , asyncCallback ) ;
206- } )
207- . catch ( exception => {
208- return asyncCallback ( 'AWSC0003 registration error: ' + exception ) ;
209- } ) ;
210- } else {
211- return asyncCallback ( null ) ;
212- }
202+ this . _azcollectc . register ( regValues )
203+ . then ( resp => {
204+ const newCollectorId = resp . collector ? resp . collector . id : 'none' ;
205+ return m_alAws . setEnv ( { collector_id : newCollectorId } , asyncCallback ) ;
206+ } )
207+ . catch ( exception => {
208+ return asyncCallback ( 'AWSC0003 registration error: ' + exception ) ;
209+ } ) ;
213210 }
214211 ] ,
215212 ( err ) => {
Original file line number Diff line number Diff line change 11{
22 "name" : " @alertlogic/al-aws-collector-js" ,
3- "version" : " 2.0.0 " ,
3+ "version" : " 2.0.1 " ,
44 "license" : " MIT" ,
55 "description" : " Alert Logic AWS Collector Common Library" ,
66 "repository" : {
1111 "scripts" : {
1212 "lint" : " jshint --exclude \" ./node_modules/*\" **/*.js" ,
1313 "test" : " JUNIT_REPORT_PATH=./test/report.xml nyc --reporter=cobertura mocha --colors --reporter mocha-jenkins-reporter" ,
14- "publish " : " npm publish --access=public"
14+ "rel " : " npm publish --access=public"
1515 },
1616 "main" : " index.js" ,
1717 "maintainers" : [
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ process.env.aws_lambda_s3_bucket = S3_BUCKET;
1515process . env . stack_name = STACK_NAME ;
1616process . env . aws_lambda_zipfile_name = S3_ZIPFILE ;
1717process . env . aws_lambda_update_config_name = S3_CONFIGURATION_FILE_NAME ;
18+ process . env . collector_id = 'collector-id' ;
1819
1920
2021const AIMS_TEST_CREDS = {
You can’t perform that action at this time.
0 commit comments