@abyss-project/storage 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
28
28
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
29
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
30
  };
31
+ var _a;
31
32
  Object.defineProperty(exports, "__esModule", { value: true });
32
33
  exports.AbyssStorageCore = exports.WEBHOOK_SIGNATURE_ALGORITHM = exports.HEADER_WEBHOOK_SIGNATURE_NAME = exports.ADMIN_TOKEN_HEADER = exports.API_KEY_APPLICATION_HEADER = void 0;
33
34
  const axios_1 = __importDefault(require("axios"));
@@ -70,15 +71,16 @@ class AbyssStorageCore {
70
71
  retries: NUMBER_RETRY_API,
71
72
  retryDelay: (retryCount) => retryCount * BASE_DELAY_BETWEEN_RETRY,
72
73
  retryCondition: (error) => {
73
- var _a;
74
+ var _b;
74
75
  return (0, axios_retry_1.isNetworkOrIdempotentRequestError)(error) ||
75
- RETRY_CODES.includes(((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) || 502);
76
+ RETRY_CODES.includes(((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) || 502);
76
77
  },
77
78
  ...axiosRetryConfig,
78
79
  });
79
80
  }
80
81
  }
81
82
  exports.AbyssStorageCore = AbyssStorageCore;
83
+ _a = AbyssStorageCore;
82
84
  AbyssStorageCore.config = {
83
85
  token: '',
84
86
  applicationApiKey: '',
@@ -86,4 +88,4 @@ AbyssStorageCore.config = {
86
88
  adminToken: '',
87
89
  baseURL: MONITOR_DEFAULT_BASE_URL,
88
90
  };
89
- AbyssStorageCore.axios = axios_1.default.create({ baseURL: `` });
91
+ AbyssStorageCore.axios = axios_1.default.create({ baseURL: _a.config.baseURL });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/storage",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Core package to interact with Abyss-Storage",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",