Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.github
.nyc_output
coverage
docs/*
node_modules
64 changes: 64 additions & 0 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

on:
push:
branches: [master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v3 # Uncomment this block if you're using pnpm
# with:
# version: 9 # Not needed if you've set "packageManager" in package.json
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
66 changes: 47 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ in order to get your pull requests accepted.
## Disclose security vulnerabilities

First things first:
This project has strong security implications and we appreciate every help to
This project has strong security implications, and we appreciate every help to
improve security.

**However, please read our [security policy](./SECURITY.md), before taking
actions.**
**However, please read our [security policy](https://github.com/node-oauth/node-oauth2-server/security/policy),
before taking actions.**



## Guiding principles

Before contributing to this project it is important to understand how this
project and it's collaborators views itself regarding it's scope and purpose.
project and it's collaborators views itself regarding its scope and purpose.

### OAuth2 standard compliance

Expand All @@ -38,7 +38,7 @@ Extended readings:
- [RFC 7636 - Proof Key for Code Exchange by OAuth Public Clients](https://datatracker.ietf.org/doc/html/rfc7636)
- [RFC 7591 - OAuth 2.0 Dynamic Client Registration Protocol](https://datatracker.ietf.org/doc/html/rfc7591)

### Framework agnostic
### Framework-agnostic

Design decisions and implementations are always done with keeping in mind, that
there are multiple frameworks out there that use this project.
Expand All @@ -47,8 +47,7 @@ there are multiple frameworks out there that use this project.

## Development

If you want to fix bugs or add new features, **please read this chapter and it's
sections carefully!**
If you want to fix bugs or add new features, **please read this chapter and it's sections carefully!**

### No PR without issue

Expand All @@ -60,24 +59,24 @@ and discuss, whether this is a useful addition to the project.
First, clone and install this project from source via

```bash
$ git clone [email protected]:node-oauth/node-oauth2-server.git
$ cd node-oauth2-server
$ git checkout development # important! do not work on master!
$ npm install
git clone [email protected]:node-oauth/node-oauth2-server.git
cd node-oauth2-server
git checkout development # important! do not work on master!
npm install
```

From here you can run several scripts for development purposes:

```bash
$ npm run test # runs the tests once
$ npm run test:coverage # runs the tests including coverage
$ npm run docs # generates the API docs
npm run test # runs the tests once
npm run test:coverage # runs the tests including coverage
npm run docs # generates the API docs
```

To work on a new feature or a fix please create a new branch:

```bash
$ git checkout -b feature-xyz # or fix-xyz
git checkout -b feature-xyz # or fix-xyz
```

### Coding rules
Expand All @@ -93,8 +92,9 @@ with ticket number at the end of summary:
```
<type>(<scope>): <short summary> #<issue number>
```

Summary in present tense. Not capitalized. No period at the end.
The <type> and <summary> fields are mandatory, the (<scope>) and #<number> field is optional.
The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` and `#<number>` fields are optional.

### Run the tests before committing

Expand All @@ -105,13 +105,13 @@ the history with commits, that are solely targeting lint fixes.
You can run the tests via

```bash
$ npm run test
npm run test
```

or

```bash
$ npm run test:coverage
npm run test:coverage
```

to see your coverage.
Expand Down Expand Up @@ -152,7 +152,7 @@ Also make sure, to comply with the following list:

#### Review process

Finally your PR needs to pass the review process:
Finally, your PR needs to pass the review process:

- A certain amount of maintainers needs to review and accept your PR
- Please **expect change requests**! They will occur and are intended to improve
Expand All @@ -165,3 +165,31 @@ Finally your PR needs to pass the review process:
#### After merge

Please delete your branch after merge.

## Documentation

We use Vitepress+Markdown for our documentation.
If you want to contribute to the docs, please get familiar with Vitepress: https://vitepress.dev

### Setting up docs

You need NPM to set up the docs using the following:

```shell
npm install
npm run docs:setup
```

You can then edit the `guide` section manually.

### API Docs

**DO NOT** edit the `api` section, as API docs are automatically
generated from our internal JSDoc comments.

Instead, update the comments directly within the code and run `npm run docs:api`
to generate the api docs.

### Building the docs

Run `npm run docs:build` to build the docs.
31 changes: 31 additions & 0 deletions docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"hash": "24b4e720",
"configHash": "34606988",
"lockfileHash": "9cc11886",
"browserHash": "4b564f0d",
"optimized": {
"vue": {
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "cc782b89",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "c1dd3448",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../../node_modules/@vueuse/core/dist/index.js",
"file": "vitepress___@vueuse_core.js",
"fileHash": "372eff28",
"needsInterop": false
}
},
"chunks": {
"chunk-ADVWCYKY": {
"file": "chunk-ADVWCYKY.js"
}
}
}
Loading