@cedarjs/auth-auth0-setup 7.0.1-next.466 → 7.1.0-rc.32

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,UAAU,CAAA;AAC9B,eAAO,MAAM,WAAW,8BAA8B,CAAA;AAEtD,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;AAIjC,eAAO,MAAM,OAAO,UAAU,CAAA;AAC9B,eAAO,MAAM,WAAW,8BAA8B,CAAA;AAEtD,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/auth/setupHelpers";
1
+ import { standardAuthBuilder } from "@cedarjs/cli-helpers";
2
2
  const command = "auth0";
3
3
  const description = "Set up auth for for Auth0";
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/auth/setupHelpers";
3
+ import { standardAuthHandler } from "@cedarjs/cli-helpers";
4
4
  const { version } = JSON.parse(
5
5
  fs.readFileSync(
6
6
  path.resolve(import.meta.dirname, "../package.json"),
@@ -3,10 +3,9 @@ import { AuthenticationError, ForbiddenError } from '@cedarjs/graphql-server'
3
3
 
4
4
  /**
5
5
  * Represents the user attributes returned by the decoding the
6
- * Authentication provider's JWT together with an optional role or list of
7
- * roles.
6
+ * Authentication provider's JWT together with an optional list of roles.
8
7
  */
9
- type RedwoodUser = Record<string, unknown> & { roles?: string | string[] }
8
+ type RedwoodUser = Record<string, unknown> & { roles?: string[] }
10
9
 
11
10
  /**
12
11
  * getCurrentUser returns the user information together with
@@ -39,11 +38,7 @@ export const getCurrentUser = async (
39
38
 
40
39
  const roles = decoded[process.env.AUTH0_AUDIENCE + '/roles']
41
40
 
42
- if (
43
- typeof roles === 'string' ||
44
- (Array.isArray(roles) &&
45
- roles.every((role): role is string => typeof role === 'string'))
46
- ) {
41
+ if (roles) {
47
42
  return { ...decoded, roles }
48
43
  }
49
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/auth-auth0-setup",
3
- "version": "7.0.1-next.466",
3
+ "version": "7.1.0-rc.32",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -39,13 +39,13 @@
39
39
  "test:watch": "vitest watch"
40
40
  },
41
41
  "dependencies": {
42
- "@cedarjs/cli-helpers": "7.0.1-next.466"
42
+ "@cedarjs/cli-helpers": "7.1.0-rc.32"
43
43
  },
44
44
  "devDependencies": {
45
- "@cedarjs/framework-tools": "7.0.1-next.466",
45
+ "@cedarjs/framework-tools": "7.1.0-rc.32",
46
46
  "@types/yargs": "17.0.35",
47
- "concurrently": "9.2.5",
48
- "publint": "0.3.25",
47
+ "concurrently": "9.2.4",
48
+ "publint": "0.3.24",
49
49
  "typescript": "5.9.3",
50
50
  "vitest": "4.1.11"
51
51
  },