-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #408 from nextcloud/feature/bundle-improvements
Bundle improvements
- Loading branch information
Showing
13 changed files
with
5,253 additions
and
5,463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Node | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [16, 18] | ||
name: Test Node v${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: 'npm' | ||
- name: install dependencies | ||
run: npm ci | ||
- name: build package | ||
run: npm run build | ||
- name: run tests | ||
run: npm run test | ||
|
||
summary: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: always() | ||
name: test-summary | ||
steps: | ||
- name: Summary status | ||
run: if ${{ needs.test.result != 'success' && needs.test.result != 'skipped' }}; then exit 1; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
# @nextcloud/auth | ||
|
||
Nextcloud helpers related to authentication and the current user | ||
|
||
## Install | ||
|
||
```sh | ||
yarn add @nextcloud/auth | ||
``` | ||
|
||
```sh | ||
npm install @nextcloud/auth --save | ||
``` | ||
|
||
## Usage | ||
|
||
```ts | ||
import { | ||
getRequestToken, | ||
getCurrentUser, | ||
onRequestTokenUpdate, | ||
} from '@nextcloud/auth' | ||
|
||
const user = getCurrentUser() | ||
|
||
if (user.isAdmin) { | ||
// do something | ||
} | ||
``` | ||
|
||
For more imformation check [nextcloud.github.io/nextcloud-auth](https://nextcloud.github.io/nextcloud-auth/index.html) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export { | ||
getRequestToken, | ||
onRequestTokenUpdate | ||
} from './requesttoken' | ||
export type { CsrfTokenObserver } from './requesttoken' | ||
export type { NextcloudUser } from './user' | ||
|
||
export { getRequestToken, onRequestTokenUpdate } from './requesttoken' | ||
export { getCurrentUser } from './user' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.