Compare commits
3 Commits
@nhost/das
...
@nhost/rea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
614c20cbbf | ||
|
|
aef4a0a4fc | ||
|
|
d0c9f4cd17 |
@@ -1,5 +1,12 @@
|
||||
# @nhost/dashboard
|
||||
|
||||
## 1.16.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react-apollo@12.0.0
|
||||
- @nhost/nextjs@2.1.14
|
||||
|
||||
## 1.16.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/dashboard",
|
||||
"version": "1.16.0",
|
||||
"version": "1.16.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost-examples/cli
|
||||
|
||||
## 0.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.3
|
||||
|
||||
## 0.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/cli",
|
||||
"version": "0.3.4",
|
||||
"version": "0.3.5",
|
||||
"main": "src/index.mjs",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost-examples/codegen-react-apollo
|
||||
|
||||
## 0.4.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/react@3.5.0
|
||||
- @nhost/react-apollo@12.0.0
|
||||
|
||||
## 0.4.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/codegen-react-apollo",
|
||||
"version": "0.4.4",
|
||||
"version": "0.4.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"codegen": "graphql-codegen",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost-examples/codegen-react-query
|
||||
|
||||
## 0.4.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/react@3.5.0
|
||||
|
||||
## 0.4.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/codegen-react-query",
|
||||
"version": "0.4.4",
|
||||
"version": "0.4.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"codegen": "graphql-codegen",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost-examples/react-urql
|
||||
|
||||
## 0.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/react@3.5.0
|
||||
- @nhost/react-urql@9.0.0
|
||||
|
||||
## 0.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/codegen-react-urql",
|
||||
"private": true,
|
||||
"version": "0.3.4",
|
||||
"version": "0.3.5",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost-examples/multi-tenant-one-to-many
|
||||
|
||||
## 2.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.3
|
||||
|
||||
## 2.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/multi-tenant-one-to-many",
|
||||
"private": true,
|
||||
"version": "2.2.4",
|
||||
"version": "2.2.5",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @nhost-examples/nextjs
|
||||
|
||||
## 0.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/react@3.5.0
|
||||
- @nhost/react-apollo@12.0.0
|
||||
- @nhost/nextjs@2.1.14
|
||||
|
||||
## 0.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/nextjs",
|
||||
"version": "0.3.4",
|
||||
"version": "0.3.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost-examples/node-storage
|
||||
|
||||
## 0.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.3
|
||||
|
||||
## 0.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/node-storage",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"private": true,
|
||||
"description": "This is an example of how to use the Storage with Node.js",
|
||||
"main": "src/index.mjs",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost-examples/nextjs-server-components
|
||||
|
||||
## 0.4.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.3
|
||||
|
||||
## 0.4.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/nextjs-server-components",
|
||||
"version": "0.4.4",
|
||||
"version": "0.4.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @nhost-examples/react-apollo
|
||||
|
||||
## 0.8.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- aef4a0a: fix: resolve e2e test issues
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/react@3.5.0
|
||||
- @nhost/react-apollo@12.0.0
|
||||
|
||||
## 0.8.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -119,7 +119,7 @@ export async function verifyMagicLink({
|
||||
|
||||
await page
|
||||
.frameLocator('#preview-html')
|
||||
.getByRole('link', { name: /sign in/i })
|
||||
.getByRole('link', { name: /verify email/i })
|
||||
.click()
|
||||
|
||||
const authenticatedPage = await authenticatedPagePromise
|
||||
@@ -154,7 +154,7 @@ export async function resetPassword({
|
||||
|
||||
await page
|
||||
.frameLocator('#preview-html')
|
||||
.getByRole('link', { name: /reset password/i })
|
||||
.getByRole('link', { name: /verify email/i })
|
||||
.click()
|
||||
|
||||
const authenticatedPage = await authenticatedPagePromise
|
||||
|
||||
@@ -1,12 +1,38 @@
|
||||
[
|
||||
{
|
||||
"value": "disabled",
|
||||
"op": "replace",
|
||||
"path": "/auth/method/webauthn/relyingParty/origins/0",
|
||||
"value": "http://localhost:3000"
|
||||
"path": "/auth/elevatedPrivileges/mode"
|
||||
},
|
||||
{
|
||||
"op": "remove",
|
||||
"path": "/auth/method/oauth/apple/clientId"
|
||||
},
|
||||
{
|
||||
"value": false,
|
||||
"op": "replace",
|
||||
"path": "/auth/redirections/clientUrl",
|
||||
"value": "http://localhost:3000"
|
||||
"path": "/auth/method/oauth/apple/enabled"
|
||||
},
|
||||
{
|
||||
"op": "remove",
|
||||
"path": "/auth/method/oauth/apple/keyId"
|
||||
},
|
||||
{
|
||||
"op": "remove",
|
||||
"path": "/auth/method/oauth/apple/privateKey"
|
||||
},
|
||||
{
|
||||
"op": "remove",
|
||||
"path": "/auth/method/oauth/apple/teamId"
|
||||
},
|
||||
{
|
||||
"value": "http://localhost:3000",
|
||||
"op": "replace",
|
||||
"path": "/auth/method/webauthn/relyingParty/origins/0"
|
||||
},
|
||||
{
|
||||
"value": "http://localhost:3000",
|
||||
"op": "replace",
|
||||
"path": "/auth/redirections/clientUrl"
|
||||
}
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/react-apollo",
|
||||
"version": "0.8.4",
|
||||
"version": "0.8.5",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.9.9",
|
||||
@@ -22,9 +22,9 @@
|
||||
"scripts": {
|
||||
"dev": "vite --host localhost --port 3000",
|
||||
"generate": "graphql-codegen --config graphql.config.yaml",
|
||||
"install-browsers": "pnpm dlx playwright@1.31.0 install --with-deps",
|
||||
"install-browsers": "pnpm playwright install && pnpm playwright install-deps",
|
||||
"e2e": "pnpm e2e:start-backend && pnpm e2e:test",
|
||||
"e2e:test": "pnpm install-browsers && pnpm dlx playwright@1.31.0 test; nhost down",
|
||||
"e2e:test": "pnpm install-browsers && pnpm playwright test",
|
||||
"e2e:start-backend": "cp .secrets.example .secrets && nhost up",
|
||||
"e2e:start-ui": "run-s build preview",
|
||||
"build": "vite build",
|
||||
@@ -52,7 +52,7 @@
|
||||
"@faker-js/faker": "^7.6.0",
|
||||
"@graphql-codegen/cli": "^5.0.2",
|
||||
"@nuintun/qrcode": "^3.4.0",
|
||||
"@playwright/test": "1.31.0",
|
||||
"@playwright/test": "1.41.0",
|
||||
"@types/pngjs": "^6.0.4",
|
||||
"@types/react": "^18.2.73",
|
||||
"@types/react-dom": "^18.2.23",
|
||||
|
||||
4
examples/react-apollo/pnpm-lock.yaml
generated
4
examples/react-apollo/pnpm-lock.yaml
generated
@@ -1241,7 +1241,7 @@ packages:
|
||||
'@simplewebauthn/browser': 6.2.2
|
||||
fetch-ponyfill: 7.1.0
|
||||
js-cookie: 3.0.5
|
||||
jwt-decode: 3.1.2
|
||||
jwt-decode: 4.0.0
|
||||
xstate: 4.38.3
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
@@ -1299,7 +1299,7 @@ packages:
|
||||
dependencies:
|
||||
'@nhost/nhost-js': 3.0.2(graphql@16.8.1)
|
||||
'@xstate/react': 3.2.2(@types/react@18.2.48)(react@18.2.0)(xstate@4.38.3)
|
||||
jwt-decode: 3.1.2
|
||||
jwt-decode: 4.0.0
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
xstate: 4.38.3
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost-examples/react-gqty
|
||||
|
||||
## 1.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/react@3.5.0
|
||||
|
||||
## 1.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/react-gqty",
|
||||
"private": true,
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @nhost-examples/vue-apollo
|
||||
|
||||
## 0.6.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/apollo@7.1.0
|
||||
- @nhost/vue@2.6.0
|
||||
- @nhost/nhost-js@3.1.3
|
||||
|
||||
## 0.6.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@nhost-examples/vue-apollo",
|
||||
"private": true,
|
||||
"version": "0.6.4",
|
||||
"version": "0.6.5",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost-examples/vue-quickstart
|
||||
|
||||
## 0.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/apollo@7.1.0
|
||||
- @nhost/vue@2.6.0
|
||||
|
||||
## 0.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost-examples/vue-quickstart",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @nhost/apollo
|
||||
|
||||
## 7.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- d0c9f4c: fix: replace `jose` with `jwt-decode` version 4.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.3
|
||||
|
||||
## 7.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/apollo",
|
||||
"version": "7.0.2",
|
||||
"version": "7.1.0",
|
||||
"description": "Nhost Apollo Client library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -66,7 +66,7 @@
|
||||
"dependencies": {
|
||||
"graphql": "16.8.1",
|
||||
"graphql-ws": "^5.16.0",
|
||||
"jwt-decode": "^3.1.2"
|
||||
"jwt-decode": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@apollo/client": "^3.9.9",
|
||||
|
||||
@@ -12,7 +12,7 @@ import { setContext } from '@apollo/client/link/context'
|
||||
import { GraphQLWsLink } from '@apollo/client/link/subscriptions'
|
||||
import { getMainDefinition } from '@apollo/client/utilities'
|
||||
import { AuthContext, NhostClient } from '@nhost/nhost-js'
|
||||
import jwtDecode, { JwtPayload } from 'jwt-decode'
|
||||
import { jwtDecode, JwtPayload } from 'jwt-decode'
|
||||
|
||||
import { createRestartableClient } from './ws'
|
||||
const isBrowser = typeof window !== 'undefined'
|
||||
@@ -67,7 +67,7 @@ export const createApolloClient = ({
|
||||
const marginInSeconds = 3
|
||||
const marginInMilliseconds = marginInSeconds * 1000
|
||||
|
||||
let decodedToken: JwtPayload = jwtDecode(accessToken.value)
|
||||
let decodedToken = jwtDecode(accessToken.value) as JwtPayload
|
||||
return decodedToken.exp! * 1000 > Date.now() - marginInMilliseconds
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost/react-apollo
|
||||
|
||||
## 12.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/apollo@7.1.0
|
||||
- @nhost/react@3.5.0
|
||||
|
||||
## 11.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-apollo",
|
||||
"version": "11.0.4",
|
||||
"version": "12.0.0",
|
||||
"description": "Nhost React Apollo client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost/react-urql
|
||||
|
||||
## 9.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/react@3.5.0
|
||||
|
||||
## 8.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-urql",
|
||||
"version": "8.0.4",
|
||||
"version": "9.0.0",
|
||||
"description": "Nhost React URQL client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/graphql-js
|
||||
|
||||
## 0.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- d0c9f4c: fix: replace `jose` with `jwt-decode` version 4.0.0
|
||||
|
||||
## 0.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/graphql-js",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.0",
|
||||
"description": "Nhost GraphQL client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -54,14 +54,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@graphql-typed-document-node/core": "^3.2.0",
|
||||
"base-64": "^1.0.0",
|
||||
"isomorphic-unfetch": "^3.1.0",
|
||||
"jose": "^5.2.3"
|
||||
"jwt-decode": "^4.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nhost/docgen": "workspace:*",
|
||||
"@types/base-64": "^1.0.2",
|
||||
"graphql": "16.8.1"
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
Variables
|
||||
} from './types'
|
||||
|
||||
import * as jose from 'jose'
|
||||
import { jwtDecode, JwtPayload } from 'jwt-decode'
|
||||
|
||||
/**
|
||||
* @alias GraphQL
|
||||
@@ -37,7 +37,7 @@ export class NhostGraphqlClient {
|
||||
}
|
||||
|
||||
try {
|
||||
const decodedToken = jose.decodeJwt<jose.JWTPayload>(this.accessToken)
|
||||
const decodedToken = jwtDecode(this.accessToken) as JwtPayload
|
||||
return decodedToken.exp != null && decodedToken.exp * 1000 > Date.now()
|
||||
} catch (error) {
|
||||
console.error('Error decoding token:', error)
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/hasura-auth-js
|
||||
|
||||
## 2.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- d0c9f4c: fix: replace `jose` with `jwt-decode` version 4.0.0
|
||||
|
||||
## 2.4.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/hasura-auth-js",
|
||||
"version": "2.4.2",
|
||||
"version": "2.5.0",
|
||||
"description": "Hasura-auth client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -66,8 +66,8 @@
|
||||
"dependencies": {
|
||||
"@simplewebauthn/browser": "^9.0.1",
|
||||
"fetch-ponyfill": "^7.1.0",
|
||||
"jose": "^5.2.3",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"xstate": "^4.38.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as jose from 'jose'
|
||||
import { jwtDecode } from 'jwt-decode'
|
||||
import { interpret } from 'xstate'
|
||||
import {
|
||||
EMAIL_NEEDS_VERIFICATION,
|
||||
@@ -664,7 +664,7 @@ export class HasuraAuthClient {
|
||||
public getDecodedAccessToken(): JWTClaims | null {
|
||||
const jwt = this.getAccessToken()
|
||||
if (!jwt) return null
|
||||
return jose.decodeJwt<JWTClaims>(jwt)
|
||||
return jwtDecode<JWTClaims>(jwt)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost/nextjs
|
||||
|
||||
## 2.1.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/react@3.5.0
|
||||
|
||||
## 2.1.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nextjs",
|
||||
"version": "2.1.13",
|
||||
"version": "2.1.14",
|
||||
"description": "Nhost NextJS library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost/nhost-js
|
||||
|
||||
## 3.1.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d0c9f4c]
|
||||
- @nhost/hasura-auth-js@2.5.0
|
||||
- @nhost/graphql-js@0.3.0
|
||||
|
||||
## 3.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nhost-js",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.3",
|
||||
"description": "Nhost JavaScript SDK",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @nhost/react
|
||||
|
||||
## 3.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- d0c9f4c: fix: replace `jose` with `jwt-decode` version 4.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.3
|
||||
|
||||
## 3.4.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react",
|
||||
"version": "3.4.4",
|
||||
"version": "3.5.0",
|
||||
"description": "Nhost React library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -64,7 +64,7 @@
|
||||
"dependencies": {
|
||||
"@nhost/nhost-js": "workspace:*",
|
||||
"@xstate/react": "^3.2.2",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"xstate": "^4.38.3"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { JWTClaims } from '@nhost/nhost-js'
|
||||
import jwt_decode from 'jwt-decode'
|
||||
import { jwtDecode } from 'jwt-decode'
|
||||
import { useAccessToken } from './useAccessToken'
|
||||
|
||||
/**
|
||||
@@ -14,5 +14,5 @@ import { useAccessToken } from './useAccessToken'
|
||||
*/
|
||||
export const useDecodedAccessToken = (): JWTClaims | null => {
|
||||
const jwt = useAccessToken()
|
||||
return jwt ? jwt_decode<JWTClaims>(jwt) : null
|
||||
return jwt ? jwtDecode<JWTClaims>(jwt) : null
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @nhost/vue
|
||||
|
||||
## 2.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- d0c9f4c: fix: replace `jose` with `jwt-decode` version 4.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@3.1.3
|
||||
|
||||
## 2.5.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/vue",
|
||||
"version": "2.5.4",
|
||||
"version": "2.6.0",
|
||||
"description": "Nhost Vue library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -68,7 +68,7 @@
|
||||
"@nhost/nhost-js": "workspace:*",
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"@xstate/vue": "^2.0.0",
|
||||
"jwt-decode": "^3.1.2"
|
||||
"jwt-decode": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nhost/docgen": "workspace:*",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { JWTClaims } from '@nhost/nhost-js'
|
||||
import jwt_decode from 'jwt-decode'
|
||||
import { jwtDecode } from 'jwt-decode'
|
||||
import { computed, ComputedRef } from 'vue'
|
||||
import { useAccessToken } from './useAccessToken'
|
||||
|
||||
@@ -15,5 +15,5 @@ import { useAccessToken } from './useAccessToken'
|
||||
*/
|
||||
export const useDecodedAccessToken = (): ComputedRef<JWTClaims | null> => {
|
||||
const jwt = useAccessToken()
|
||||
return computed(() => (jwt.value ? jwt_decode<JWTClaims>(jwt.value) : null))
|
||||
return computed(() => (jwt.value ? jwtDecode<JWTClaims>(jwt.value) : null))
|
||||
}
|
||||
|
||||
73
pnpm-lock.yaml
generated
73
pnpm-lock.yaml
generated
@@ -1122,8 +1122,8 @@ importers:
|
||||
specifier: ^3.4.0
|
||||
version: 3.4.0
|
||||
'@playwright/test':
|
||||
specifier: 1.31.0
|
||||
version: 1.31.0
|
||||
specifier: 1.41.0
|
||||
version: 1.41.0
|
||||
'@types/pngjs':
|
||||
specifier: ^6.0.4
|
||||
version: 6.0.4
|
||||
@@ -1413,8 +1413,8 @@ importers:
|
||||
specifier: ^5.16.0
|
||||
version: 5.16.0(graphql@16.8.1)
|
||||
jwt-decode:
|
||||
specifier: ^3.1.2
|
||||
version: 3.1.2
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
devDependencies:
|
||||
'@apollo/client':
|
||||
specifier: ^3.9.9
|
||||
@@ -1580,16 +1580,22 @@ importers:
|
||||
'@graphql-typed-document-node/core':
|
||||
specifier: ^3.2.0
|
||||
version: 3.2.0(graphql@16.8.1)
|
||||
base-64:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
isomorphic-unfetch:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
jose:
|
||||
specifier: ^5.2.3
|
||||
version: 5.2.3
|
||||
jwt-decode:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
devDependencies:
|
||||
'@nhost/docgen':
|
||||
specifier: workspace:*
|
||||
version: link:../docgen
|
||||
'@types/base-64':
|
||||
specifier: ^1.0.2
|
||||
version: 1.0.2
|
||||
graphql:
|
||||
specifier: 16.8.1
|
||||
version: 16.8.1
|
||||
@@ -1602,12 +1608,12 @@ importers:
|
||||
fetch-ponyfill:
|
||||
specifier: ^7.1.0
|
||||
version: 7.1.0
|
||||
jose:
|
||||
specifier: ^5.2.3
|
||||
version: 5.2.3
|
||||
js-cookie:
|
||||
specifier: ^3.0.5
|
||||
version: 3.0.5
|
||||
jwt-decode:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
xstate:
|
||||
specifier: ^4.38.3
|
||||
version: 4.38.3
|
||||
@@ -1727,8 +1733,8 @@ importers:
|
||||
specifier: ^3.2.2
|
||||
version: 3.2.2(@types/react@18.2.73)(react@18.2.0)(xstate@4.38.3)
|
||||
jwt-decode:
|
||||
specifier: ^3.1.2
|
||||
version: 3.1.2
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
react-dom:
|
||||
specifier: ^18.2.0
|
||||
version: 18.2.0(react@18.2.0)
|
||||
@@ -1792,8 +1798,8 @@ importers:
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0(vue@3.4.21)(xstate@4.38.3)
|
||||
jwt-decode:
|
||||
specifier: ^3.1.2
|
||||
version: 3.1.2
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
devDependencies:
|
||||
'@nhost/docgen':
|
||||
specifier: workspace:*
|
||||
@@ -7813,17 +7819,6 @@ packages:
|
||||
requiresBuild: true
|
||||
optional: true
|
||||
|
||||
/@playwright/test@1.31.0:
|
||||
resolution: {integrity: sha512-Ys5s/06Dg9g3zAIdCIb/UOBYim3U7Zjb3DvC6XBtnRmnglH5O47iwYzmtxXu9fhSyzI2Jn28apkXIOD81GgCdw==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@types/node': 18.19.28
|
||||
playwright-core: 1.31.0
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
dev: true
|
||||
|
||||
/@playwright/test@1.41.0:
|
||||
resolution: {integrity: sha512-Grvzj841THwtpBOrfiHOeYTJQxDRnKofMSzCiV8XeyLWu3o89qftQ4BCKfkziJhSUQRd0utKhrddtIsiraIwmw==}
|
||||
engines: {node: '>=16'}
|
||||
@@ -10474,6 +10469,10 @@ packages:
|
||||
'@babel/types': 7.24.0
|
||||
dev: true
|
||||
|
||||
/@types/base-64@1.0.2:
|
||||
resolution: {integrity: sha512-uPgKMmM9fmn7I+Zi6YBqctOye4SlJsHKcisjHIMWpb2YKZRc36GpKyNuQ03JcT+oNXg1m7Uv4wU94EVltn8/cw==}
|
||||
dev: true
|
||||
|
||||
/@types/bcryptjs@2.4.6:
|
||||
resolution: {integrity: sha512-9xlo6R2qDs5uixm0bcIqCeMCE6HiQsIyel9KQySStiyqNl2tnj2mP3DX1Nf56MD6KMenNNlBBsy3LJ7gUEQPXQ==}
|
||||
dev: true
|
||||
@@ -10861,7 +10860,7 @@ packages:
|
||||
resolution: {integrity: sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==}
|
||||
dependencies:
|
||||
'@types/caseless': 0.12.5
|
||||
'@types/node': 16.18.93
|
||||
'@types/node': 18.19.28
|
||||
'@types/tough-cookie': 4.0.5
|
||||
form-data: 2.5.1
|
||||
dev: false
|
||||
@@ -12458,9 +12457,6 @@ packages:
|
||||
|
||||
/ajv-formats@2.1.1:
|
||||
resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==}
|
||||
peerDependenciesMeta:
|
||||
ajv:
|
||||
optional: true
|
||||
dependencies:
|
||||
ajv: 8.12.0
|
||||
dev: true
|
||||
@@ -13200,6 +13196,10 @@ packages:
|
||||
/balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
|
||||
/base-64@1.0.0:
|
||||
resolution: {integrity: sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==}
|
||||
dev: false
|
||||
|
||||
/base64-js@1.5.1:
|
||||
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
||||
|
||||
@@ -19522,6 +19522,7 @@ packages:
|
||||
|
||||
/jose@5.2.3:
|
||||
resolution: {integrity: sha512-KUXdbctm1uHVL8BYhnyHkgp3zDX5KW8ZhAKVFEfUbU2P8Alpzjb+48hHvjOdQIyPshoblhzsuqOwEEAbtHVirA==}
|
||||
dev: true
|
||||
|
||||
/jpeg-js@0.4.4:
|
||||
resolution: {integrity: sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==}
|
||||
@@ -19820,6 +19821,12 @@ packages:
|
||||
|
||||
/jwt-decode@3.1.2:
|
||||
resolution: {integrity: sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==}
|
||||
dev: true
|
||||
|
||||
/jwt-decode@4.0.0:
|
||||
resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==}
|
||||
engines: {node: '>=18'}
|
||||
dev: false
|
||||
|
||||
/katex@0.16.10:
|
||||
resolution: {integrity: sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==}
|
||||
@@ -22891,12 +22898,6 @@ packages:
|
||||
pathe: 1.1.2
|
||||
dev: true
|
||||
|
||||
/playwright-core@1.31.0:
|
||||
resolution: {integrity: sha512-/KquBjS5DcASCh8cGeNVHuC0kyb7c9plKTwaKxgOGtxT7+DZO2fjmFvPDBSXslEIK5CeOO/2kk5rOCktFXKEdA==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/playwright-core@1.41.0:
|
||||
resolution: {integrity: sha512-UGKASUhXmvqm2Lxa1fNr8sFwAtqjpgBRr9jQ7XBI8Rn5uFiEowGUGwrruUQsVPIom4bk7Lt+oLGpXobnXzrBIw==}
|
||||
engines: {node: '>=16'}
|
||||
@@ -23420,7 +23421,7 @@ packages:
|
||||
'@protobufjs/path': 1.1.2
|
||||
'@protobufjs/pool': 1.1.0
|
||||
'@protobufjs/utf8': 1.1.0
|
||||
'@types/node': 16.18.93
|
||||
'@types/node': 18.19.28
|
||||
long: 5.2.3
|
||||
dev: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user