@alternative-path/testlens-playwright-reporter 0.3.7
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/LICENSE +21 -0
- package/README.md +163 -0
- package/cross-env.js +24 -0
- package/index.d.ts +192 -0
- package/index.js +1126 -0
- package/index.ts +1407 -0
- package/package.json +82 -0
- package/postinstall.js +39 -0
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alternative-path/testlens-playwright-reporter",
|
|
3
|
+
"version": "0.3.7",
|
|
4
|
+
"description": "Universal Playwright reporter for TestLens - works with both TypeScript and JavaScript projects",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"testlens-cross-env": "cross-env.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"index.js",
|
|
12
|
+
"index.d.ts",
|
|
13
|
+
"index.ts",
|
|
14
|
+
"lib/",
|
|
15
|
+
"postinstall.js",
|
|
16
|
+
"cross-env.js",
|
|
17
|
+
"README.md",
|
|
18
|
+
"CHANGELOG.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"postinstall": "node postinstall.js",
|
|
22
|
+
"prepack": "node build-embed-env.js",
|
|
23
|
+
"prepublishOnly": "npm run lint && npm run test",
|
|
24
|
+
"test": "echo 'Tests will be added in future versions'",
|
|
25
|
+
"lint": "echo 'Linting passed - no linter configured yet'",
|
|
26
|
+
"build": "tsc",
|
|
27
|
+
"dev": "node index.js"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"playwright",
|
|
31
|
+
"reporter",
|
|
32
|
+
"testing",
|
|
33
|
+
"testlens",
|
|
34
|
+
"typescript",
|
|
35
|
+
"javascript",
|
|
36
|
+
"e2e",
|
|
37
|
+
"automation",
|
|
38
|
+
"ci-cd",
|
|
39
|
+
"dashboard",
|
|
40
|
+
"test-reporting"
|
|
41
|
+
],
|
|
42
|
+
"author": {
|
|
43
|
+
"name": "TestLens Team",
|
|
44
|
+
"email": "support@alternative-path.com",
|
|
45
|
+
"url": "https://testlens.qa-path.com"
|
|
46
|
+
},
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@playwright/test": ">=1.40.0"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@aws-sdk/client-s3": "^3.624.0",
|
|
53
|
+
"@aws-sdk/s3-request-presigner": "^3.624.0",
|
|
54
|
+
"axios": "^1.11.0",
|
|
55
|
+
"cross-env": "^7.0.3",
|
|
56
|
+
"dotenv": "^16.4.5",
|
|
57
|
+
"form-data": "^4.0.1",
|
|
58
|
+
"mime": "^4.0.4",
|
|
59
|
+
"tslib": "^2.8.1"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=16.0.0",
|
|
63
|
+
"npm": ">=8.0.0"
|
|
64
|
+
},
|
|
65
|
+
"repository": {
|
|
66
|
+
"type": "git",
|
|
67
|
+
"url": "git+https://github.com/alternative-path/testlens-reporter.git",
|
|
68
|
+
"directory": "."
|
|
69
|
+
},
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/alternative-path/testlens-reporter/issues"
|
|
72
|
+
},
|
|
73
|
+
"homepage": "https://github.com/alternative-path/testlens-reporter#readme",
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"access": "public",
|
|
76
|
+
"registry": "https://registry.npmjs.org/"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@types/node": "^24.3.1",
|
|
80
|
+
"typescript": "^5.9.2"
|
|
81
|
+
}
|
|
82
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
// Get the parent project's node_modules/.bin directory
|
|
6
|
+
// When installed, we are in: project/node_modules/testlens-playwright-reporter/
|
|
7
|
+
// We need to go to: project/node_modules/.bin/
|
|
8
|
+
const parentBinDir = path.resolve(__dirname, '..', '.bin');
|
|
9
|
+
const localBinDir = path.resolve(__dirname, 'node_modules', '.bin');
|
|
10
|
+
|
|
11
|
+
// Check if parent bin directory exists
|
|
12
|
+
if (!fs.existsSync(parentBinDir)) {
|
|
13
|
+
console.log('Parent .bin directory not found, skipping cross-env setup');
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Check if cross-env exists in our node_modules
|
|
18
|
+
const crossEnvCmd = process.platform === 'win32' ? 'cross-env.cmd' : 'cross-env';
|
|
19
|
+
const crossEnvPs1 = 'cross-env.ps1';
|
|
20
|
+
const sourceCmdPath = path.join(localBinDir, crossEnvCmd);
|
|
21
|
+
const sourcePs1Path = path.join(localBinDir, crossEnvPs1);
|
|
22
|
+
|
|
23
|
+
if (fs.existsSync(sourceCmdPath)) {
|
|
24
|
+
const targetCmdPath = path.join(parentBinDir, crossEnvCmd);
|
|
25
|
+
|
|
26
|
+
// Copy the file
|
|
27
|
+
fs.copyFileSync(sourceCmdPath, targetCmdPath);
|
|
28
|
+
console.log('✓ cross-env binary installed');
|
|
29
|
+
|
|
30
|
+
// Also copy PowerShell script on Windows
|
|
31
|
+
if (process.platform === 'win32' && fs.existsSync(sourcePs1Path)) {
|
|
32
|
+
const targetPs1Path = path.join(parentBinDir, crossEnvPs1);
|
|
33
|
+
fs.copyFileSync(sourcePs1Path, targetPs1Path);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
} catch (error) {
|
|
37
|
+
// Don't fail installation if this doesn't work
|
|
38
|
+
console.log('Note: Could not setup cross-env automatically:', error.message);
|
|
39
|
+
}
|