@cedarjs/auth-supabase-setup 7.1.0 → 7.1.1-next.468

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 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAIjC,eAAO,MAAM,OAAO,aAAa,CAAA;AACjC,eAAO,MAAM,WAAW,iCAAiC,CAAA;AAEzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI;;;;GAElC;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,OAAO,CAAA;CACf;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,IAAI,iBAG1C"}
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,eAAO,MAAM,OAAO,aAAa,CAAA;AACjC,eAAO,MAAM,WAAW,iCAAiC,CAAA;AAEzD,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI;;;;GAElC;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,OAAO,CAAA;CACf;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,IAAI,iBAG1C"}
package/dist/setup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { standardAuthBuilder } from "@cedarjs/cli-helpers";
1
+ import { standardAuthBuilder } from "@cedarjs/cli-helpers/auth/setupHelpers";
2
2
  const command = "supabase";
3
3
  const description = "Set up auth for for Supabase";
4
4
  function builder(yargs) {
@@ -1,6 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "path";
3
- import { standardAuthHandler } from "@cedarjs/cli-helpers";
3
+ import { standardAuthHandler } from "@cedarjs/cli-helpers/auth/setupHelpers";
4
4
  const { version } = JSON.parse(
5
5
  fs.readFileSync(
6
6
  path.resolve(import.meta.dirname, "../package.json"),
@@ -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.1.0",
3
+ "version": "7.1.1-next.468",
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.1.0"
40
+ "@cedarjs/cli-helpers": "7.1.1-next.468"
41
41
  },
42
42
  "devDependencies": {
43
- "@cedarjs/framework-tools": "7.1.0",
43
+ "@cedarjs/framework-tools": "7.1.1-next.468",
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": {