@alternative-path/testlens-playwright-reporter 0.4.6 → 0.4.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/README.md +163 -163
- package/index.js +28 -28
- package/index.ts +1587 -1587
- package/package.json +1 -1
- package/postinstall.js +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alternative-path/testlens-playwright-reporter",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "Universal Playwright reporter for TestLens - works with both TypeScript and JavaScript projects",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
package/postinstall.js
CHANGED
|
@@ -12,6 +12,24 @@ const logger = pino({
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
try {
|
|
15
|
+
|
|
16
|
+
// Ensure our cross-env.js wrapper is executable (fixes "Permission denied" on Unix when npx runs it via shebang)
|
|
17
|
+
const crossEnvJs = path.join(__dirname, 'cross-env.js');
|
|
18
|
+
if (process.platform !== 'win32' && fs.existsSync(crossEnvJs) && typeof fs.chmodSync === 'function') {
|
|
19
|
+
try {
|
|
20
|
+
const stat = fs.statSync(crossEnvJs);
|
|
21
|
+
const executeBits = 0o111; // owner, group, other execute
|
|
22
|
+
const newMode = stat.mode | executeBits;
|
|
23
|
+
if (stat.mode !== newMode) {
|
|
24
|
+
fs.chmodSync(crossEnvJs, newMode);
|
|
25
|
+
logger.info('✓ cross-env.js set executable');
|
|
26
|
+
}
|
|
27
|
+
} catch (chmodErr) {
|
|
28
|
+
// Don't fail postinstall; parent .bin setup below may still work
|
|
29
|
+
logger.info('Note: Could not set cross-env.js executable:', chmodErr.message);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
15
33
|
// Get the parent project's node_modules/.bin directory
|
|
16
34
|
// When installed, we are in: project/node_modules/testlens-playwright-reporter/
|
|
17
35
|
// We need to go to: project/node_modules/.bin/
|