Skip to content

Commit

Permalink
Merge 1fc9ed5 into b041255
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Nov 25, 2021
2 parents b041255 + 1fc9ed5 commit 1bbaa83
Show file tree
Hide file tree
Showing 8 changed files with 1,603 additions and 1,269 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- id: yarn-cache
name: Get Yarn cache path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
with:
node-version: 14.x
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6
- uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
name: Load Yarn cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
- id: yarn-cache
name: Get Yarn cache path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
with:
node-version: 14.x
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6
- uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
name: Load Yarn cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
Expand All @@ -32,7 +32,7 @@ jobs:
name: Install dependencies
- run: yarn ci
name: Run integration tests
- uses: coverallsapp/github-action@8cbef1dea373ebce56de0a14c68d6267baa10b44
- uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057
name: Report code coverage
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn ci
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ nodemon.json
.volumes/
yarn-error.log
coverage/
.husky/
41 changes: 21 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,32 @@
"build:clean": "rm -rf ./dist && rm -f ./node_modules/.bin/cloak",
"build:ts": "tsc",
"build": "run-s build:clean build:ts",
"ci": "run-s build test"
"ci": "run-s build test",
"prepare": "husky install"
},
"dependencies": {
"@47ng/codec": "^1.0.0",
"@stablelib/base64": "^1.0.0",
"@stablelib/hex": "^1.0.0",
"@stablelib/utf8": "^1.0.0",
"chalk": "^4.1.0",
"commander": "^7.0.0",
"dotenv": "^8.2.0",
"@47ng/codec": "^1.0.1",
"@stablelib/base64": "^1.0.1",
"@stablelib/hex": "^1.0.1",
"@stablelib/utf8": "^1.0.1",
"chalk": "^4.1.2",
"commander": "^8.3.0",
"dotenv": "^10.0.0",
"s-ago": "^2.2.0"
},
"devDependencies": {
"@commitlint/config-conventional": "^11.0.0",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.5",
"commitlint": "^11.0.0",
"husky": "4.x",
"jest": "^26.6.1",
"jest-extended": "^0.11.5",
"@commitlint/config-conventional": "^15.0.0",
"@types/jest": "^27.0.3",
"@types/node": "^16.11.10",
"commitlint": "^15.0.0",
"husky": "7.x",
"jest": "^27.3.1",
"jest-extended": "^1.1.0",
"npm-run-all": "^4.1.5",
"parcel-bundler": "^1.12.4",
"ts-jest": "^26.4.3",
"ts-node": "^9.0.0",
"typescript": "^4.0.5"
"parcel-bundler": "^1.12.5",
"ts-jest": "^27.0.7",
"ts-node": "^10.4.0",
"typescript": "^4.5.2"
},
"jest": {
"verbose": true,
Expand All @@ -65,7 +66,7 @@
"<rootDir>/src"
],
"setupFilesAfterEnv": [
"jest-extended"
"jest-extended/all"
],
"testEnvironment": "node"
},
Expand Down
8 changes: 5 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node

import chalk from 'chalk'
import { Command } from 'commander'
import dotenv from 'dotenv'
import fs from 'fs'
import program from 'commander'
import ago from 's-ago'
import chalk from 'chalk'
import {
generateKey,
getKeyFingerprint,
Expand All @@ -24,6 +24,8 @@ import { encryptString, decryptString } from './message'

dotenv.config()

const program = new Command()

const env = {
keychain: process.env.CLOAK_KEYCHAIN,
masterKey: process.env.CLOAK_MASTER_KEY
Expand Down Expand Up @@ -145,7 +147,7 @@ program
const cleartext = await decryptString(message, key)
console.log(cleartext)
} catch (error) {
console.error(chalk.redBright('Error:', error.message))
console.error(chalk.redBright('Error:', error))
}
}
})
Expand Down
Loading

0 comments on commit 1bbaa83

Please sign in to comment.