@cedarjs/auth-azure-active-directory-api 5.0.7-next.338 → 5.0.7

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.
package/dist/decoder.js CHANGED
@@ -1,5 +1,38 @@
1
- import jwt from "jsonwebtoken";
2
- import jwksClient from "jwks-rsa";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var decoder_exports = {};
30
+ __export(decoder_exports, {
31
+ authDecoder: () => authDecoder
32
+ });
33
+ module.exports = __toCommonJS(decoder_exports);
34
+ var import_jsonwebtoken = __toESM(require("jsonwebtoken"));
35
+ var import_jwks_rsa = __toESM(require("jwks-rsa"));
3
36
  const authDecoder = async (token, type) => {
4
37
  if (type !== "azureActiveDirectory") {
5
38
  return null;
@@ -13,10 +46,10 @@ const authDecoder = async (token, type) => {
13
46
  throw new Error("AZURE_ACTIVE_DIRECTORY_AUTHORITY env var is not set.");
14
47
  }
15
48
  return new Promise((resolve, reject) => {
16
- const client = jwksClient({
49
+ const client = (0, import_jwks_rsa.default)({
17
50
  jwksUri: `${AZURE_ACTIVE_DIRECTORY_AUTHORITY}/discovery/v2.0/keys`
18
51
  });
19
- jwt.verify(
52
+ import_jsonwebtoken.default.verify(
20
53
  token,
21
54
  (header, callback) => {
22
55
  client.getSigningKey(header.kid, (error, key) => {
@@ -46,6 +79,7 @@ const authDecoder = async (token, type) => {
46
79
  );
47
80
  });
48
81
  };
49
- export {
82
+ // Annotate the CommonJS export names for ESM import in node:
83
+ 0 && (module.exports = {
50
84
  authDecoder
51
- };
85
+ });
package/dist/index.js CHANGED
@@ -1,4 +1,28 @@
1
- import { authDecoder } from "./decoder.js";
2
- export {
3
- authDecoder
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
4
17
  };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_exports = {};
20
+ __export(index_exports, {
21
+ authDecoder: () => import_decoder.authDecoder
22
+ });
23
+ module.exports = __toCommonJS(index_exports);
24
+ var import_decoder = require("./decoder.js");
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ authDecoder
28
+ });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@cedarjs/auth-azure-active-directory-api",
3
- "version": "5.0.7-next.338",
3
+ "version": "5.0.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
7
7
  "directory": "packages/auth-providers/azureActiveDirectory/api"
8
8
  },
9
9
  "license": "MIT",
10
- "type": "module",
10
+ "type": "commonjs",
11
11
  "exports": {
12
12
  ".": {
13
13
  "default": {
@@ -28,9 +28,9 @@
28
28
  "dist"
29
29
  ],
30
30
  "scripts": {
31
- "build": "node ./build.mts",
31
+ "build": "node ./build.mts && yarn build:types",
32
32
  "build:pack": "yarn pack -o cedarjs-auth-azure-active-directory-api.tgz",
33
- "build:types": "tsc --build --verbose ./tsconfig.build.json",
33
+ "build:types": "tsc --build --verbose ./tsconfig.json",
34
34
  "build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx,template\" --ignore dist --exec \"yarn build\"",
35
35
  "check:attw": "yarn cedar-fwtools-attw",
36
36
  "check:package": "concurrently npm:check:attw yarn:publint",
@@ -43,14 +43,15 @@
43
43
  "jwks-rsa": "3.2.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@cedarjs/api": "5.0.7-next.338",
47
- "@cedarjs/framework-tools": "5.0.7-next.338",
46
+ "@arethetypeswrong/cli": "0.18.4",
47
+ "@cedarjs/api": "5.0.7",
48
+ "@cedarjs/framework-tools": "5.0.7",
48
49
  "@types/aws-lambda": "8.10.162",
49
50
  "@types/jsonwebtoken": "9.0.10",
50
51
  "concurrently": "9.2.4",
51
- "publint": "0.3.23",
52
+ "publint": "0.3.21",
52
53
  "typescript": "5.9.3",
53
- "vitest": "4.1.10"
54
+ "vitest": "3.2.6"
54
55
  },
55
56
  "engines": {
56
57
  "node": ">=24"