playwright-slack-report-burak 2.0.15 → 2.0.16

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.
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const fs = require('fs');
10
10
  const path = require('path');
11
11
  const axios = require('axios');
12
- const { exec } = require('child_process');
12
+ const { execSync } = require('child_process');
13
13
 
14
14
  class ResultsParser {
15
15
  result;
@@ -93,15 +93,7 @@ class ResultsParser {
93
93
  fs.writeFileSync(nodeSummaryFile, JSON.stringify(nodeSummary, null, 2));
94
94
 
95
95
  if (this.shardIndex === 0 && this.totalShardCount > 1) {
96
- if (process.env.CI) {
97
- console.log('Fetching all artifacts...');
98
- await this.fetchAllArtifacts();
99
- } else {
100
- while (!this.allNodeSummaryFilesExist() || !this.allBlobZipsExist()) {
101
- console.log('Waiting for all both to exist...');
102
- await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for 1 second
103
- }
104
- }
96
+ await this.fetchAllArtifacts();
105
97
  }
106
98
 
107
99
  console.log('Contents of playwright-report for node', this.shardIndex, ':', fs.readdirSync(summariesDir));
@@ -341,7 +333,7 @@ class ResultsParser {
341
333
  mergeReports() {
342
334
  try {
343
335
  // Execute the command to merge reports
344
- exec(`npx playwright merge-reports --reporter html -c ./playwright-report playwright-report`);
336
+ execSync(`npx playwright merge-reports --reporter html -c ./playwright-report playwright-report`);
345
337
  //new Promise(resolve => setTimeout(resolve, 5000));
346
338
  console.log('Reports merged successfully.');
347
339
  console.log('Contents of playwright-report:', fs.readdirSync('./playwright-report'));
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "lint-fix": "npx eslint . --ext .ts --fix"
31
31
  },
32
32
  "name": "playwright-slack-report-burak",
33
- "version": "2.0.15",
33
+ "version": "2.0.16",
34
34
  "main": "index.js",
35
35
  "types": "dist/index.d.ts",
36
36
  "repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",