@cedarjs/auth-supabase-setup 7.0.1-next.333 → 7.0.1-next.466

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import type { AuthContextPayload, Decoded } from '@cedarjs/api'
1
2
  import { parseJWT } from '@cedarjs/api'
2
3
  import { AuthenticationError, ForbiddenError } from '@cedarjs/graphql-server'
3
4
 
@@ -28,12 +29,12 @@ type RedwoodUser = Record<string, unknown> & { roles?: string[] }
28
29
  * @returns RedwoodUser
29
30
  */
30
31
  export const getCurrentUser = async (
31
- decoded,
32
+ decoded: Decoded,
32
33
  /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */
33
- { token, type },
34
+ { token, type }: AuthContextPayload[1],
34
35
  /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */
35
- { event, context }
36
- ): Promise<RedwoodUser> => {
36
+ { event, context }: Partial<AuthContextPayload[2]> = {}
37
+ ): Promise<RedwoodUser | null> => {
37
38
  if (!decoded) {
38
39
  return null
39
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/auth-supabase-setup",
3
- "version": "7.0.1-next.333",
3
+ "version": "7.0.1-next.466",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -37,13 +37,13 @@
37
37
  "prepublishOnly": "NODE_ENV=production yarn build"
38
38
  },
39
39
  "dependencies": {
40
- "@cedarjs/cli-helpers": "7.0.1-next.333"
40
+ "@cedarjs/cli-helpers": "7.0.1-next.466"
41
41
  },
42
42
  "devDependencies": {
43
- "@cedarjs/framework-tools": "7.0.1-next.333",
43
+ "@cedarjs/framework-tools": "7.0.1-next.466",
44
44
  "@types/yargs": "17.0.35",
45
- "concurrently": "9.2.4",
46
- "publint": "0.3.24",
45
+ "concurrently": "9.2.5",
46
+ "publint": "0.3.25",
47
47
  "typescript": "5.9.3"
48
48
  },
49
49
  "engines": {