@letitbexai_root/lexxit-automation-framework 1.0.0 → 1.0.2
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/dist/config.js +3 -5
- package/package.json +4 -12
- package/scripts/postinstall.js +14 -5
package/dist/config.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.COMPARE = exports.AUTO_TRIAGE = exports.TRIAGE = exports.DEFAULT_SCREENSHOT_MODE = void 0;
|
|
4
4
|
exports.DEFAULT_SCREENSHOT_MODE = 'on_failure';
|
|
5
|
-
exports.TRIAGE = '
|
|
6
|
-
exports.AUTO_TRIAGE = '
|
|
7
|
-
exports.COMPARE = '
|
|
8
|
-
// export const TRIAGE: string = 'https://ai-service.dev.lexxit.ai/api/v1/triage';
|
|
9
|
-
// export const COMPARE: string = 'https://ai-service.dev.lexxit.ai/api/compare';
|
|
5
|
+
exports.TRIAGE = 'https://ai-service.dev.lexxit.ai/api/v1/triage';
|
|
6
|
+
exports.AUTO_TRIAGE = 'https://ai-service.dev.lexxit.ai/api/v1/defects/auto-triage';
|
|
7
|
+
exports.COMPARE = 'https://ai-service.dev.lexxit.ai/api/compare';
|
package/package.json
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letitbexai_root/lexxit-automation-framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Playwright test execution framework with Express API for test execution and reporting.",
|
|
5
|
-
|
|
6
5
|
"publishConfig": {
|
|
7
6
|
"access": "public"
|
|
8
7
|
},
|
|
9
|
-
|
|
10
8
|
"main": "dist/api/server.js",
|
|
11
|
-
|
|
12
9
|
"bin": {
|
|
13
|
-
"lexxit-automation-framework": "
|
|
10
|
+
"lexxit-automation-framework": "bin/lexxit-automation-framework.js"
|
|
14
11
|
},
|
|
15
|
-
|
|
16
12
|
"files": [
|
|
17
13
|
"dist",
|
|
18
14
|
"bin",
|
|
19
|
-
"scripts",
|
|
15
|
+
"scripts",
|
|
20
16
|
"public"
|
|
21
17
|
],
|
|
22
|
-
|
|
23
18
|
"scripts": {
|
|
24
19
|
"build": "tsc",
|
|
25
20
|
"start": "node dist/api/server.js",
|
|
@@ -29,14 +24,12 @@
|
|
|
29
24
|
"postinstall": "node scripts/postinstall.js",
|
|
30
25
|
"prepublishOnly": "npm run build"
|
|
31
26
|
},
|
|
32
|
-
|
|
33
27
|
"dependencies": {
|
|
34
28
|
"@playwright/test": "^1.44.0",
|
|
35
29
|
"cors": "^2.8.6",
|
|
36
30
|
"express": "^4.19.2",
|
|
37
31
|
"playwright": "^1.44.0"
|
|
38
32
|
},
|
|
39
|
-
|
|
40
33
|
"devDependencies": {
|
|
41
34
|
"@types/cors": "^2.8.19",
|
|
42
35
|
"@types/express": "^4.17.21",
|
|
@@ -45,8 +38,7 @@
|
|
|
45
38
|
"ts-node": "^10.9.2",
|
|
46
39
|
"typescript": "^5.4.5"
|
|
47
40
|
},
|
|
48
|
-
|
|
49
41
|
"engines": {
|
|
50
42
|
"node": ">=20.19.0"
|
|
51
43
|
}
|
|
52
|
-
}
|
|
44
|
+
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -46,11 +46,20 @@ if (alreadyInstalled) {
|
|
|
46
46
|
|
|
47
47
|
log('Installing Chromium for test execution (one-time, ~150 MB)...');
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
// playwright's "exports" map does not expose cli.js, so `require.resolve(
|
|
50
|
+
// 'playwright/cli.js')` throws ERR_PACKAGE_PATH_NOT_EXPORTED. package.json is
|
|
51
|
+
// exported, so locate the package through it and follow its "bin" entry.
|
|
52
|
+
let result = { status: 1 };
|
|
53
|
+
try {
|
|
54
|
+
const path = require('path');
|
|
55
|
+
const pkgJsonPath = require.resolve('playwright/package.json');
|
|
56
|
+
const bin = require(pkgJsonPath).bin;
|
|
57
|
+
const cliRel = typeof bin === 'string' ? bin : (bin && bin.playwright) || 'cli.js';
|
|
58
|
+
const cliPath = path.join(path.dirname(pkgJsonPath), cliRel);
|
|
59
|
+
result = spawnSync(process.execPath, [cliPath, 'install', 'chromium'], { stdio: 'inherit' });
|
|
60
|
+
} catch (err) {
|
|
61
|
+
console.warn(`[lexxit] Could not locate the playwright CLI: ${err.message}`);
|
|
62
|
+
}
|
|
54
63
|
|
|
55
64
|
if (result.status === 0) {
|
|
56
65
|
log('Chromium installed.');
|