@cedarjs/auth-supertokens-setup 7.0.1-next.467 → 7.1.0-rc.34

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;AAGjC,eAAO,MAAM,OAAO,gBAAgB,CAAA;AACpC,eAAO,MAAM,WAAW,oCAAoC,CAAA;AAE5D,wBAAsB,OAAO,CAAC,KAAK,EAAE,IAAI;;;;IAExC;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;AAIjC,eAAO,MAAM,OAAO,gBAAgB,CAAA;AACpC,eAAO,MAAM,WAAW,oCAAoC,CAAA;AAE5D,wBAAsB,OAAO,CAAC,KAAK,EAAE,IAAI;;;;IAExC;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/auth/setupHelpers";
1
+ import { standardAuthBuilder } from "@cedarjs/cli-helpers";
2
2
  const command = "supertokens";
3
3
  const description = "Set up auth for for SuperTokens";
4
4
  async function builder(yargs) {
@@ -1 +1 @@
1
- {"version":3,"file":"setupHandler.d.ts","sourceRoot":"","sources":["../src/setupHandler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,wBAAsB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,IAAI,iBAgCtD;AAGD,eAAO,MAAM,eAAe;;;CAqD3B,CAAA"}
1
+ {"version":3,"file":"setupHandler.d.ts","sourceRoot":"","sources":["../src/setupHandler.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,wBAAsB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,IAAI,iBAgCtD;AAGD,eAAO,MAAM,eAAe;;;CAqD3B,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "path";
3
- import { standardAuthHandler } from "@cedarjs/cli-helpers/auth/setupHelpers";
4
- import { getPaths } from "@cedarjs/cli-helpers/paths";
3
+ import { getPaths, standardAuthHandler } from "@cedarjs/cli-helpers";
5
4
  async function handler({ force: forceArg }) {
6
5
  const { version } = JSON.parse(
7
6
  fs.readFileSync(
@@ -1,4 +1,3 @@
1
- import type { AuthContextPayload, Decoded } from '@cedarjs/api'
2
1
  import { parseJWT } from '@cedarjs/api'
3
2
  import { AuthenticationError, ForbiddenError } from '@cedarjs/graphql-server'
4
3
 
@@ -29,12 +28,12 @@ type RedwoodUser = Record<string, unknown> & { roles?: string[] }
29
28
  * @returns RedwoodUser
30
29
  */
31
30
  export const getCurrentUser = async (
32
- decoded: Decoded,
31
+ decoded,
33
32
  /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */
34
- { token, type }: AuthContextPayload[1],
33
+ { token, type },
35
34
  /* eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars */
36
- { event, context }: Partial<AuthContextPayload[2]> = {}
37
- ): Promise<RedwoodUser | null> => {
35
+ { event, context }
36
+ ): Promise<RedwoodUser> => {
38
37
  if (!decoded) {
39
38
  return null
40
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/auth-supertokens-setup",
3
- "version": "7.0.1-next.467",
3
+ "version": "7.1.0-rc.34",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -39,14 +39,14 @@
39
39
  "test:watch": "vitest watch"
40
40
  },
41
41
  "dependencies": {
42
- "@cedarjs/cli-helpers": "7.0.1-next.467"
42
+ "@cedarjs/cli-helpers": "7.1.0-rc.34"
43
43
  },
44
44
  "devDependencies": {
45
- "@cedarjs/framework-tools": "7.0.1-next.467",
45
+ "@cedarjs/framework-tools": "7.1.0-rc.34",
46
46
  "@types/yargs": "17.0.35",
47
- "concurrently": "9.2.5",
48
- "memfs": "4.80.0",
49
- "publint": "0.3.25",
47
+ "concurrently": "9.2.4",
48
+ "memfs": "4.78.1",
49
+ "publint": "0.3.24",
50
50
  "typescript": "5.9.3",
51
51
  "vitest": "4.1.11"
52
52
  },