Skip to content

Commit

Permalink
refacto: correct import path
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximeMRF committed Oct 16, 2024
1 parent d07cd7d commit 6351732
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion factories/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JwtUserProviderContract } from '../src/jwt.js'
import { JwtUserProviderContract } from '../src/types.js'
import { symbols } from '@adonisjs/auth'
import jwt from 'jsonwebtoken'

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
"ts-node": "^10.9.2",
"typescript": "^5.4.2"
},
"dependencies": {
"@types/jsonwebtoken": "^9.0.6",
"jsonwebtoken": "^9.0.2"
},
"peerDependencies": {
"@adonisjs/core": "^6.2.0"
},
Expand All @@ -67,6 +71,10 @@
"jwt",
"authentication"
],
"eslintConfig": {
"extends": "@adonisjs/eslint-config/package"
},
"prettier": "@adonisjs/prettier-config",
"publishConfig": {
"access": "public",
"tag": "latest"
Expand All @@ -85,13 +93,5 @@
"exclude": [
"tests/**"
]
},
"eslintConfig": {
"extends": "@adonisjs/eslint-config/package"
},
"prettier": "@adonisjs/prettier-config",
"dependencies": {
"@types/jsonwebtoken": "^9.0.6",
"jsonwebtoken": "^9.0.2"
}
}
3 changes: 2 additions & 1 deletion src/define_config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { GuardConfigProvider } from '@adonisjs/auth/types'
import type { HttpContext } from '@adonisjs/core/http'
import { JwtGuard, JwtGuardUser, JwtUserProviderContract } from './jwt.js'
import { JwtGuardUser, JwtUserProviderContract } from './types.js'
import { JwtGuard } from './jwt.js'
import { Secret } from '@adonisjs/core/helpers'

export function jwtGuard<UserProvider extends JwtUserProviderContract<unknown>>(config: {
Expand Down
3 changes: 2 additions & 1 deletion tests/guard.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test } from '@japa/runner'
import { JwtGuard, JwtGuardUser } from '../src/jwt.js'
import { JwtGuard } from '../src/jwt.js'
import { JwtGuardUser } from '../src/types.js'
import { HttpContextFactory } from '@adonisjs/core/factories/http'
import { errors } from '@adonisjs/auth'
import { JwtAuthFakeUser, JwtFakeUserProvider } from '../factories/main.js'
Expand Down

0 comments on commit 6351732

Please sign in to comment.