@bigbinary/neeto-playwright-reporter 1.3.4 → 1.3.6

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/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Reporter, FullConfig, Suite, TestCase, TestResult, FullResult } from '@
3
3
  interface ReporterOptionParams {
4
4
  projectKey: string;
5
5
  baseURL: string;
6
+ apiKey: string;
6
7
  ciBuildId: string;
7
8
  }
8
9
  declare class MyReporter implements Reporter {
package/index.js CHANGED
@@ -18558,19 +18558,18 @@ const sendHeartBeatSignal = async (ciBuildId) => {
18558
18558
  }
18559
18559
  };
18560
18560
 
18561
- const setAuthHeaders = (projectKey) => {
18562
- var _a;
18561
+ const setAuthHeaders = ({ projectKey, apiKey, }) => {
18563
18562
  axios.defaults.headers = {
18564
18563
  ...axios.defaults.headers,
18565
18564
  [HEADERS_KEYS.projectKey]: projectKey,
18566
- [HEADERS_KEYS.apiKey]: (_a = process.env.API_KEY) !== null && _a !== void 0 ? _a : "",
18565
+ [HEADERS_KEYS.apiKey]: apiKey !== null && apiKey !== void 0 ? apiKey : "",
18567
18566
  [HEADERS_KEYS.accept]: "application/json",
18568
18567
  [HEADERS_KEYS.contentType]: "application/json",
18569
18568
  };
18570
18569
  };
18571
- function initializeAxios({ projectKey, baseURL, }) {
18572
- axios.defaults.baseURL = baseURL;
18573
- setAuthHeaders(projectKey);
18570
+ function initializeAxios({ projectKey, baseURL, apiKey, }) {
18571
+ axios.defaults.baseURL = baseURL !== null && baseURL !== void 0 ? baseURL : "https://connect.neetoplaydash.net";
18572
+ setAuthHeaders({ projectKey, apiKey });
18574
18573
  }
18575
18574
 
18576
18575
  const create = (ciBuildId, payload) => axios.post(`${API_BASE_URL}/reporter/runs/${ciBuildId}/test_entities`, {