Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packages to latest versions #1

Merged
merged 3 commits into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
defaults: &defaults
shell: /bin/bash --login
docker:
- image: circleci/node:8.12.0-stretch

version: 2
jobs:
test:
<<: *defaults
steps:
- checkout
- run: npm ci
- run: npm test
- run: npm run coverage
- persist_to_workspace:
root: ~/project
paths:
- .
publish:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run: sudo apt-get update
- run: sudo apt-get install -y python-pip
- run: sudo pip install awscli credstash
- run: echo "//registry.npmjs.org/:_authToken=$(credstash -r eu-west-1 get npm-auth-token-circleci)" > ~/.npmrc
- run:
command: |
set -e
PACKAGE_VERSION=$(jq -r '[.name, .version] | join("@")' package.json)
if test -z "$(npm info $PACKAGE_VERSION 2> /dev/null)"
then
echo "Publishing $PACKAGE_VERSION"
npm publish
else
echo "Not publishing $PACKAGE_VERSION, already exists."
fi

workflows:
version: 2
all:
jobs:
- test
- publish:
requires:
- test
filters:
branches:
only: master
17 changes: 0 additions & 17 deletions circle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/decrypter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function decryptedString(stash) {
const value = encoder.decode(stash.contents);
const aesCtr = new aesjs.ModeOfOperation.ctr(key, new aesjs.Counter(1));
const decryptedBytes = aesCtr.decrypt(value);
return decryptedBytes.toString();
return aesjs.utils.utf8.fromBytes(decryptedBytes);
}

module.exports = {
Expand Down
Loading