Skip to content

Commit

Permalink
feat: add types
Browse files Browse the repository at this point in the history
  • Loading branch information
herrmannplatz committed Aug 12, 2023
1 parent de7e3d8 commit 9295c6f
Show file tree
Hide file tree
Showing 5 changed files with 4,987 additions and 7,910 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '14.17'
node-version: "lts/*"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci
npm install semantic-release @semantic-release/git @semantic-release/changelog @semantic-release/exec
npx semantic-release
4 changes: 2 additions & 2 deletions __snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`generate should generate a token 1`] = `
Object {
{
"exp": 3600,
"iat": 0,
"iss": "A1A1A1A1A1",
Expand All @@ -10,7 +10,7 @@ Object {
`;

exports[`generate should generate a token without ttl and origin 1`] = `
Object {
{
"exp": 1800,
"iat": 0,
"iss": "A1A1A1A1A1",
Expand Down
4 changes: 4 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Secret } from 'jsonwebtoken'

function generate(authKey: Secret, keyId: string, teamId: string, ttl?: number, origin?: string): void;
export = generate;
Loading

0 comments on commit 9295c6f

Please sign in to comment.