playwright-slack-report-burak 3.0.34 → 3.0.36

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.
@@ -481,34 +481,25 @@ class ResultsParser {
481
481
  fs.mkdirSync(FINAL_OUTPUT_DIR, { recursive: true });
482
482
  }
483
483
 
484
- // Extract blob files before merging (Playwright merge-reports expects extracted blob directories)
485
- // We'll extract them temporarily for merging, then extract again for resource copying
486
- const tempMergeDir = path.join(NODE_ARTIFACTS_DIR, 'temp-merge');
487
- if (!fs.existsSync(tempMergeDir)) {
488
- fs.mkdirSync(tempMergeDir, { recursive: true });
489
- }
490
-
491
- // Extract all blob zip files to temp directory for merging
492
- if (!AdmZip) {
493
- console.error('adm-zip is required for blob extraction. Please install it: npm install adm-zip');
494
- return;
495
- }
484
+ // Copy blob files before merging (Playwright merge-reports expects blob files)
485
+ // We'll copy them to FINAL_OUTPUT_DIR for merging, then extract later for resource copying
496
486
 
487
+ // Copy all blob zip files to FINAL_OUTPUT_DIR for merging
497
488
  for (let i = 1; i <= this.totalShardCount; i++) {
498
489
  const blobZipFile = path.join(NODE_ARTIFACTS_DIR, `blob-report-node-${i}.zip`);
499
490
  if (fs.existsSync(blobZipFile)) {
500
491
  try {
501
- const zip = new AdmZip(blobZipFile);
502
- zip.extractAllTo(tempMergeDir, true);
503
- console.log(`Extracted blob-report-node-${i}.zip for merging`);
492
+ const destFile = path.join(FINAL_OUTPUT_DIR, `blob-report-node-${i}.zip`);
493
+ fs.copyFileSync(blobZipFile, destFile);
494
+ console.log(`Copied blob-report-node-${i}.zip for merging`);
504
495
  } catch (error) {
505
- console.warn(`Failed to extract blob-report-node-${i}.zip for merging:`, error.message);
496
+ console.warn(`Failed to copy blob-report-node-${i}.zip for merging:`, error.message);
506
497
  }
507
498
  }
508
499
  }
509
500
 
510
- // Execute the command to merge reports FROM tempMergeDir INTO finalOutput
511
- exec(`npx playwright merge-reports --reporter html ${tempMergeDir} ${FINAL_OUTPUT_DIR}`);
501
+ // Execute the command to merge reports IN FINAL_OUTPUT_DIR
502
+ exec(`npx playwright merge-reports --reporter html ${FINAL_OUTPUT_DIR}`);
512
503
 
513
504
  // Wait until index.html exists in finalOutput
514
505
  while (!fs.existsSync(path.join(FINAL_OUTPUT_DIR, 'index.html'))) {
package/package.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "lint-fix": "npx eslint . --ext .ts --fix"
33
33
  },
34
34
  "name": "playwright-slack-report-burak",
35
- "version": "3.0.34",
35
+ "version": "3.0.36",
36
36
  "main": "index.js",
37
37
  "types": "dist/index.d.ts",
38
38
  "author": "Burak B. <burak.boluk@hotmail.com>",