universal-github-app-jwt
Advanced tools
Comparing version 1.1.0 to 2.0.0
{ | ||
"name": "universal-github-app-jwt", | ||
"type": "module", | ||
"version": "2.0.0", | ||
"exports": "./index.js", | ||
"imports": { | ||
"#get-token": { | ||
"node": "./lib/get-token-node.js", | ||
"default": "./lib/get-token.js" | ||
} | ||
}, | ||
"description": "Calculate GitHub App bearer tokens for Node & modern browsers", | ||
"version": "1.1.0", | ||
"license": "MIT", | ||
"files": [ | ||
"dist-*/", | ||
"bin/" | ||
], | ||
"pika": true, | ||
"sideEffects": false, | ||
"repository": "github:gr2m/universal-github-app-jwt", | ||
"keywords": [ | ||
@@ -19,34 +21,31 @@ "github", | ||
], | ||
"homepage": "https://github.com/gr2m/universal-github-app-jwt#readme", | ||
"bugs": { | ||
"url": "https://github.com/gr2m/universal-github-app-jwt/issues" | ||
"author": "Gregor Martynus (https://github.com/gr2m)", | ||
"scripts": { | ||
"test": "npm run test:code && npm run test:tsc && npm run test:tsd && npm run lint", | ||
"test:code": "c8 --100 ava test/node.test.js", | ||
"test:deno": "deno test test/deno.test.js", | ||
"test:tsc": "tsc --allowJs --noEmit --esModuleInterop --skipLibCheck --lib es2020 index.js", | ||
"test:tsd": "tsd", | ||
"lint": "prettier --check '{src,test}/**/*' README.md package.json", | ||
"lint:fix": "prettier --write '{src,test}/**/*' README.md package.json", | ||
"coverage": "c8 report --reporter html", | ||
"postcoverage": "open-cli coverage/index.html", | ||
"build": "npm run build:default && npm run build:node", | ||
"build:default": "esbuild index.js --bundle --outfile=dist/default.js --platform=browser --target=es2020 --format=esm", | ||
"build:node": "esbuild index.js --bundle --outfile=dist/node.js --platform=node --target=es2020 --format=esm" | ||
}, | ||
"repository": "https://github.com/gr2m/universal-github-app-jwt", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@types/jsonwebtoken": "^8.3.3", | ||
"jsonwebtoken": "^8.5.1" | ||
}, | ||
"devDependencies": { | ||
"@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", | ||
"@pika/pack": "^0.5.0", | ||
"@pika/plugin-build-node": "^0.9.1", | ||
"@pika/plugin-bundle-web": "^0.9.1", | ||
"@pika/plugin-ts-standard-pkg": "^0.9.1", | ||
"@types/jest": "^25.1.0", | ||
"@types/lolex": "^5.1.0", | ||
"jest": "^25.1.0", | ||
"lolex": "^6.0.0", | ||
"playwright": "^1.0.1", | ||
"prettier": "^2.0.0", | ||
"rollup-plugin-json": "^4.0.0", | ||
"semantic-release": "^17.0.0", | ||
"serve-handler": "^6.1.1", | ||
"ts-jest": "^26.0.0", | ||
"typescript": "^3.6.2" | ||
}, | ||
"source": "dist-src/index.js", | ||
"types": "dist-types/index.d.ts", | ||
"main": "dist-node/index.js", | ||
"module": "dist-web/index.js", | ||
"browser": "dist-web/index.bundled.js" | ||
"ava": "^5.1.0", | ||
"c8": "^7.12.0", | ||
"esbuild": "^0.16.10", | ||
"mockdate": "^3.0.5", | ||
"open-cli": "^7.1.0", | ||
"prettier": "^2.8.1", | ||
"tsd": "^0.25.0", | ||
"typescript": "^4.9.4" | ||
} | ||
} |
@@ -5,5 +5,4 @@ # universal-github-app-jwt | ||
[![@latest](https://img.shields.io/npm/v/universal-github-app-jwt.svg)](https://www.npmjs.com/package/universal-github-app-jwt) | ||
![Build status](https://github.com/gr2m/universal-github-app-jwt/workflows/Test/badge.svg) | ||
[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-github-app-jwt.svg)](https://greenkeeper.io/) | ||
[![@latest](https://img.shields.io/npm/vuniversal-github-app-jwt.svg)](https://www.npmjs.com/packageuniversal-github-app-jwt) | ||
[![Build Status](https://github.com/gr2m/universal-github-app-jwt/workflows/Test/badge.svg)](https://github.com/gr2m/universal-github-app-jwt/actions?query=workflow%3ATest+branch%3Amaster) | ||
@@ -43,8 +42,7 @@ ⚠ The private keys provide by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You can see the difference in the first line, `PKCS#1` format starts with `-----BEGIN RSA PRIVATE KEY-----` while `PKCS#8` starts with `-----BEGIN PRIVATE KEY-----`. You can convert one format to the other using `oppenssl`: | ||
</th><td width=100%> | ||
Load `universal-github-app-jwt` directly from [cdn.pika.dev](https://cdn.pika.dev) | ||
Load <code>universal-github-app-jwt</code> directly from <a href="https://esm.sh">esm.sh</a> | ||
```html | ||
<script type="module"> | ||
import { githubAppJwt } from "https://cdn.pika.dev/universal-github-app-jwt"; | ||
import githubAppJwt from "https://esm.sh/universal-github-app-jwt"; | ||
</script> | ||
@@ -61,7 +59,17 @@ ``` | ||
```js | ||
const { githubAppJwt } = require("universal-github-app-jwt"); | ||
// or: import { githubAppJwt } from "universal-github-app-jwt"; | ||
import githubAppJwt from "universal-github-app-jwt"; | ||
``` | ||
</td></tr> | ||
<tr><th> | ||
Deno | ||
</th><td> | ||
Load <code>universal-github-app-jwt</code> directly from <a href="https://esm.sh">esm.sh</a>, including types. | ||
```js | ||
import githubAppJwt from "https://esm.sh/universal-github-app-jwt"; | ||
``` | ||
</td></tr> | ||
</tbody> | ||
@@ -71,8 +79,6 @@ </table> | ||
```js | ||
(async () => { | ||
const { token, appId, expiration } = await githubAppJwt({ | ||
id: APP_ID, | ||
privateKey: PRIVATE_KEY | ||
}); | ||
})(); | ||
const { token, appId, expiration } = await githubAppJwt({ | ||
id: APP_ID, | ||
privateKey: PRIVATE_KEY, | ||
}); | ||
``` | ||
@@ -85,4 +91,4 @@ | ||
headers: { | ||
authorization: `bearer ${token}` | ||
} | ||
authorization: `bearer ${token}`, | ||
}, | ||
}); | ||
@@ -132,2 +138,13 @@ ``` | ||
</tr> | ||
<tr> | ||
<th> | ||
<code>options.now</code> | ||
</th> | ||
<th> | ||
<code>number</code> | ||
</th> | ||
<td> | ||
An optional override for the current time in seconds since the UNIX epoch. Defaults to <code>Math.floor(Date.now() / 1000))</code>. This value can be overridden to account for a time skew between the local machine and the authentication server. | ||
</td> | ||
</tr> | ||
</tbody> | ||
@@ -134,0 +151,0 @@ </table> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1
8
337
203
Yes
25293
16
1
2
- Removed@types/jsonwebtoken@^8.3.3
- Removed@types/jsonwebtoken@8.5.9(transitive)
- Removed@types/node@22.7.4(transitive)
- Removedundici-types@6.19.8(transitive)