@ohos-ports/vibium 26.5.31-beta.0
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 +201 -0
- package/NOTICE +7 -0
- package/README.md +72 -0
- package/bin/cli.js +41 -0
- package/dist/bidi-bridge.js +639 -0
- package/dist/index.d.mts +1397 -0
- package/dist/index.d.ts +1397 -0
- package/dist/index.js +3395 -0
- package/dist/index.mjs +3334 -0
- package/dist/sync.d.mts +613 -0
- package/dist/sync.d.ts +613 -0
- package/dist/sync.js +1112 -0
- package/dist/sync.mjs +1069 -0
- package/dist/worker.js +3639 -0
- package/package.json +68 -0
- package/postinstall.js +35 -0
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ohos-ports/vibium",
|
|
3
|
+
"version": "26.5.31-beta.0",
|
|
4
|
+
"description": "Browser automation for AI agents and humans",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"browser",
|
|
7
|
+
"automation",
|
|
8
|
+
"testing",
|
|
9
|
+
"webdriver",
|
|
10
|
+
"bidi",
|
|
11
|
+
"mcp",
|
|
12
|
+
"ai",
|
|
13
|
+
"claude"
|
|
14
|
+
],
|
|
15
|
+
"author": "Jason Huggins <hugs@vibium.com>",
|
|
16
|
+
"license": "Apache-2.0",
|
|
17
|
+
"homepage": "https://vibium.com",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/VibiumDev/vibium.git"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/VibiumDev/vibium/issues"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"module": "./dist/index.mjs",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"require": "./dist/index.js",
|
|
35
|
+
"import": "./dist/index.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./sync": {
|
|
38
|
+
"types": "./dist/sync.d.ts",
|
|
39
|
+
"require": "./dist/sync.js",
|
|
40
|
+
"import": "./dist/sync.mjs"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"bin": {
|
|
44
|
+
"vibium": "bin/cli.js"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"prepack": "node scripts/prepack.mjs",
|
|
48
|
+
"postinstall": "node postinstall.js"
|
|
49
|
+
},
|
|
50
|
+
"files": [
|
|
51
|
+
"dist",
|
|
52
|
+
"bin",
|
|
53
|
+
"postinstall.js",
|
|
54
|
+
"LICENSE",
|
|
55
|
+
"NOTICE",
|
|
56
|
+
"dist/bidi-bridge.js"
|
|
57
|
+
],
|
|
58
|
+
"optionalDependencies": {
|
|
59
|
+
"@vibium/darwin-arm64": "26.5.31",
|
|
60
|
+
"@vibium/darwin-x64": "26.5.31",
|
|
61
|
+
"@vibium/linux-arm64": "^26.5.31",
|
|
62
|
+
"@vibium/linux-x64": "26.5.31",
|
|
63
|
+
"@vibium/win32-x64": "26.5.31"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"ws": "^8.18.3"
|
|
67
|
+
}
|
|
68
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Run vibium install to download Chrome for Testing
|
|
3
|
+
|
|
4
|
+
if (process.env.VIBIUM_SKIP_BROWSER_DOWNLOAD === '1') {
|
|
5
|
+
console.log('Skipping browser download (VIBIUM_SKIP_BROWSER_DOWNLOAD=1)');
|
|
6
|
+
process.exit(0);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { execFileSync } = require('child_process');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const os = require('os');
|
|
12
|
+
|
|
13
|
+
function getVibiumBinPath() {
|
|
14
|
+
const platform = os.platform() === 'openharmony' ? 'linux' : os.platform();
|
|
15
|
+
const arch = os.arch() === 'x64' ? 'x64' : 'arm64';
|
|
16
|
+
const packageName = `@vibium/${platform}-${arch}`;
|
|
17
|
+
const binaryName = platform === 'win32' ? 'vibium.exe' : 'vibium';
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const packagePath = require.resolve(`${packageName}/package.json`);
|
|
21
|
+
return path.join(path.dirname(packagePath), 'bin', binaryName);
|
|
22
|
+
} catch {
|
|
23
|
+
// Binary not available for this platform - skip silently
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const vibiumPath = getVibiumBinPath();
|
|
30
|
+
console.log('Installing Chrome for Testing...');
|
|
31
|
+
execFileSync(vibiumPath, ['install'], { stdio: 'inherit' });
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.warn('Warning: Failed to install browser:', error.message);
|
|
34
|
+
// Don't fail the install - user can run manually later
|
|
35
|
+
}
|