lambda-essentials-ts 6.1.0 → 6.1.1

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/CHANGELOG.md CHANGED
@@ -4,7 +4,19 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
 
7
- ## [6.0.0] - 2022-02-22
7
+ ## [6.1.1] - 2025-10-27
8
+
9
+ ### Changed
10
+
11
+ - TokenProviderHttpClient now uses the http client with retries as default.
12
+
13
+ ## [6.1.0] - 2024-09-30
14
+
15
+ ### Changed
16
+
17
+ - Preserve the original message in ClientException
18
+
19
+ ## [6.0.0] - 2024-02-22
8
20
 
9
21
  ### Changed
10
22
 
@@ -23,7 +23,8 @@ export interface Auth0Secret {
23
23
  }
24
24
  export interface TokenProviderOptions {
25
25
  /**
26
- * Either an Axios instance or an @atsquad/httpclient instance, by default it creates an axios instance
26
+ * Either an Axios instance or an @atsquad/httpclient instance, by default it creates an @atsquad/httpclient instance without cache
27
+ * with retries
27
28
  */
28
29
  httpClient?: TokenProviderHttpClient;
29
30
  /**
@@ -4,14 +4,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
7
- const axios_1 = __importDefault(require("axios"));
7
+ const httpClient_1 = __importDefault(require("../httpClient/httpClient"));
8
8
  class TokenProvider {
9
9
  /**
10
10
  * Create a new Instance of the TokenProvider
11
11
  */
12
12
  constructor(options) {
13
13
  var _a;
14
- this.httpClient = (_a = options.httpClient) !== null && _a !== void 0 ? _a : axios_1.default.create();
14
+ this.httpClient =
15
+ (_a = options.httpClient) !== null && _a !== void 0 ? _a : new httpClient_1.default({
16
+ enableCache: false,
17
+ enableRetry: true,
18
+ retryOptions: {
19
+ retry: 3,
20
+ },
21
+ });
15
22
  this.configuration = options.tokenConfiguration;
16
23
  }
17
24
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-essentials-ts",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "A selection of the finest modules supporting authorization, API routing, error handling, logging and sending HTTP requests.",
5
5
  "main": "lib/index.js",
6
6
  "private": false,