Skip to content

Commit

Permalink
Merge pull request #1 from pizzahutuk/package-updates
Browse files Browse the repository at this point in the history
Update packages to latest versions
  • Loading branch information
davespanton authored Nov 1, 2018
2 parents 1d1da98 + 831a36b commit ced0c6b
Show file tree
Hide file tree
Showing 5 changed files with 885 additions and 37 deletions.
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

0 comments on commit ced0c6b

Please sign in to comment.