Skip to content

Commit

Permalink
More updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed May 14, 2019
1 parent 3161925 commit 1f35683
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
5 changes: 3 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const request = require('@octokit/request')
import request = require('@octokit/request')

import getCache = require('./lib/get-cache')
import getInstallationAccessToken = require('./lib/get-installation-access-token')
import getSignedJsonWebToken = require('./lib/get-signed-json-web-token')
import lru from 'lru-cache';

export = function App ({ id, privateKey, baseUrl, cache }) {
export = function App ({ id, privateKey, baseUrl, cache }: { id: string, privateKey: string, baseUrl: string, cache: lru.Cache<any, any> }) {
const state = {
id,
privateKey,
Expand Down
2 changes: 1 addition & 1 deletion lib/get-signed-json-web-token.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import jsonwebtoken = require('jsonwebtoken')

export = function getSignedJsonWebToken ({ id, privateKey }) {
export = function getSignedJsonWebToken ({ id, privateKey }: { id: string, privateKey: string }) {
const now = Math.floor(Date.now() / 1000)
const payload = {
iat: now, // Issued at time
Expand Down
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"lru-cache": "^5.1.1"
},
"devDependencies": {
"@types/jsonwebtoken": "^8.3.0",
"@types/lru-cache": "^4.1.1",
"chai": "^4.1.2",
"coveralls": "^3.0.2",
"lolex": "^4.0.1",
Expand Down

0 comments on commit 1f35683

Please sign in to comment.