Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Typescript definitions #184

Merged
merged 37 commits into from
Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
844b005
feat: Add Typescript definitions
theogravity Sep 5, 2019
85de168
apply some feedback
panva Sep 5, 2019
a345a75
fix(typescript): apply JSONWebKeySet, remove DeviceFlowHandle def
theogravity Sep 5, 2019
74e5cef
fix(typescript): fix initialAccessToken, jwks to be optional
theogravity Sep 5, 2019
2a5cf24
feat(typescript): add Strategy defs
theogravity Sep 5, 2019
b193286
fix(typescript): remove extraneous import
theogravity Sep 5, 2019
8dd0fe8
feat(typescript): add generators defs
theogravity Sep 5, 2019
05707f5
feat(typescript): add custom defs, fix generator defs
theogravity Sep 5, 2019
50a34cf
feat(typescript): add error defs
theogravity Sep 5, 2019
1e4d866
fix(typescript): fix Strategy defs
theogravity Sep 5, 2019
6bf92e4
fix(typescript): change custom, generator type to const
theogravity Sep 5, 2019
a4e7a7a
fix(typescript): change generator to namespace
theogravity Sep 5, 2019
7dee238
fix(typescript): remove tslint directives
theogravity Sep 5, 2019
75a2939
feat(typescript): add CustomHttpOptionsProvider
theogravity Sep 5, 2019
d22fd0e
fix(typescript): fix lint issues
theogravity Sep 5, 2019
8847b30
fix(typescript): add missing got reference, fix setHttpOptionsDefaults
theogravity Sep 5, 2019
e54642c
docs: put ts back in the readme
panva Sep 6, 2019
99173cb
missing custom clock tolerance, formatting
panva Sep 6, 2019
d96ba4b
ci: remove nightly build
panva Sep 6, 2019
98fd78e
generator bytes param are optional
panva Sep 6, 2019
804a9e3
fix(typescript): remove module def
theogravity Sep 6, 2019
8aac582
add some missing bits
panva Sep 6, 2019
ae3cb65
fix double jwt, add body
panva Sep 6, 2019
627b162
userinfo and introspection responses
panva Sep 6, 2019
a8512dd
idtoken.claims() interface
panva Sep 6, 2019
2e184c6
cleanup
panva Sep 6, 2019
0d989b3
chore: trigger ci
panva Sep 6, 2019
1eb7ba0
refactor
panva Sep 7, 2019
bd76e8f
refactor, add ts types tests
panva Sep 7, 2019
dc3e043
feat(typescript): add generics w/ tests
theogravity Sep 7, 2019
a727fee
fix(typescript): fix lint issues
theogravity Sep 7, 2019
b74df08
extend authorizationUrl with known params and claims
panva Sep 9, 2019
171ec7b
cleanup strategy
panva Sep 9, 2019
1effdaa
formatting
panva Sep 9, 2019
d0f1c57
extend interfaces
panva Sep 9, 2019
5be4810
docs: put ts definition to semver
panva Sep 9, 2019
20437b7
test: remove dev dep install from ts lint
panva Sep 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
node-version: 12
- run: npm install
- run: npm run lint
- run: npx dtslint --onlyTestTsNext types

test:
name: Node Tests + Coverage
Expand Down Expand Up @@ -44,23 +45,6 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: npx codecov

test-nightly:
name: Node Nightly Tests + Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: npm run coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/ nvm install node
npm install
npm run coverage
npx codecov

test-electron:
name: Electron - Tests
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ standard Node.js OpenSSL.

#### Semver?

**Yes.** Everything that's [documented][documentation] is subject to
**Yes.** Everything that's either exported in the TypeScript definitions file or
[documented][documentation] is subject to
[Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). The rest is to be considered
private API and is subject to change between any versions.

Expand All @@ -260,6 +261,7 @@ results.
- Added support for any additional token exchange parameters to support specifications such as
Resource Indicators
- Typed [errors][documentation-errors]
- TypeScript definitions

#### How to make the client send client_id and client_secret in the body?

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
"license": "MIT",
"author": "Filip Skokan <[email protected]>",
"files": [
"lib"
"lib",
"types/index.d.ts"
],
"main": "lib/index.js",
"types": "types/index.d.ts",
"scripts": {
"coverage": "nyc mocha",
"lint": "eslint lib test",
Expand All @@ -50,6 +52,7 @@
"devDependencies": {
"@commitlint/cli": "^8.1.0",
"@commitlint/config-conventional": "^8.1.0",
"@types/got": "^9.6.7",
"chai": "^4.2.0",
"eslint": "^6.2.2",
"eslint-config-airbnb-base": "^14.0.0",
Expand Down
Loading