transit-core-taf 1.0.15 → 1.0.17

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.
@@ -10,6 +10,7 @@ export declare class TestRailClient {
10
10
  private user;
11
11
  private projectId;
12
12
  private auth;
13
+ private httpsAgent;
13
14
  constructor(options: TestRailClientOptions);
14
15
  private apiPost;
15
16
  createTestRun(suiteId: number, name: string, description: string): Promise<any>;
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TestRailClient = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
+ const https_1 = __importDefault(require("https"));
8
9
  const statusMap = {
9
10
  passed: 1,
10
11
  failed: 5,
@@ -16,6 +17,7 @@ class TestRailClient {
16
17
  user;
17
18
  projectId;
18
19
  auth;
20
+ httpsAgent;
19
21
  constructor(options) {
20
22
  const { host, user, projectId, token, password } = options;
21
23
  if (!host || !user || !projectId || !(token || password)) {
@@ -24,6 +26,9 @@ class TestRailClient {
24
26
  this.host = host;
25
27
  this.user = user;
26
28
  this.projectId = projectId;
29
+ this.httpsAgent = new https_1.default.Agent({
30
+ rejectUnauthorized: false,
31
+ });
27
32
  const credentials = token ?? password;
28
33
  this.auth = `Basic ${Buffer.from(`${this.user}:${credentials}`).toString('base64')}`;
29
34
  }
@@ -35,6 +40,7 @@ class TestRailClient {
35
40
  'Content-Type': 'application/json',
36
41
  Authorization: this.auth,
37
42
  },
43
+ httpsAgent: this.httpsAgent,
38
44
  });
39
45
  return response.data;
40
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "transit-core-taf",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Transit Core Automation Framework",
5
5
  "main": "dist/transit-core-taf/index.js",
6
6
  "types": "dist/transit-core-taf/index.d.ts",