-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade to sailor 2.6.19 * Annual audit of the component code to check if it exposes a sensitive data in the logs * Annual npm vulnerabilities audit
- Loading branch information
Showing
14 changed files
with
2,394 additions
and
1,153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
echo "Building slug" | ||
id=$(git archive $CIRCLE_BRANCH | docker run -e "NPM_CONFIG_PRODUCTION=false" -i -a stdin elasticio/appbuilder) | ||
docker attach $id | ||
RC=$? | ||
if [ $RC -eq 0 ];then | ||
echo "Build ok." | ||
else | ||
echo "Build failed" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 2 | ||
jobs: | ||
test: | ||
docker: | ||
- image: circleci/node:14-stretch | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
- run: | ||
name: Audit Dependencies | ||
command: npm audit --audit-level=high | ||
- run: | ||
name: Installing Dependencies | ||
command: npm install | ||
- save_cache: | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
paths: | ||
- node_modules | ||
- run: | ||
name: Running Mocha Tests | ||
command: npm test | ||
- run: | ||
name: Running Integration Tests | ||
command: npm run integration-test | ||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
'extends': 'airbnb-base', | ||
'env': { | ||
'mocha': true | ||
}, | ||
'rules' : { | ||
'no-plusplus' : 'off', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## 1.0.1 (December 4, 2020) | ||
|
||
* Upgrade to sailor 2.6.19 | ||
* Annual audit of the component code to check if it exposes a sensitive data in the logs | ||
* Annual npm vulnerabilities audit | ||
|
||
## 1.0.0 (December 5, 2016) | ||
|
||
* Initial release of component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
'use strict'; | ||
|
||
const {messages} = require('elasticio-node'); | ||
const {createClient} = require('../baseClient'); | ||
const { messages } = require('elasticio-node'); | ||
const { createClient } = require('../baseClient'); | ||
|
||
exports.process = async function (msg, cfg) { | ||
const client = await createClient(cfg); | ||
const client = await createClient.call(this, cfg); | ||
|
||
const searchOpts = { | ||
scope: msg.body.scope, | ||
filter: msg.body.filter | ||
filter: msg.body.filter, | ||
}; | ||
const searchResults = await client.search(msg.body.base, searchOpts); | ||
searchResults.entries.forEach(entry => { | ||
this.emit('data', messages.newMessageWithBody(entry.object)); | ||
}); | ||
const { entries } = searchResults; | ||
|
||
for (let i = 0; i < entries.length; i++) { | ||
// eslint-disable-next-line no-await-in-loop | ||
await this.emit('data', messages.newMessageWithBody(entries[i].object)); | ||
} | ||
|
||
await client.unbind(); | ||
client.unbind(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.