@ohos-ports/vibium 26.5.31-beta.0 → 26.5.31-beta.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/index.js CHANGED
@@ -68,12 +68,9 @@ module.exports = __toCommonJS(index_exports);
68
68
  var import_os = __toESM(require("os"));
69
69
  function getPlatform() {
70
70
  const platform = import_os.default.platform();
71
- if (platform === "linux" || platform === "darwin" || platform === "win32") {
71
+ if (platform === "linux" || platform === "darwin" || platform === "win32" || platform === "openharmony") {
72
72
  return platform;
73
73
  }
74
- if (platform === "openharmony") {
75
- return "linux";
76
- }
77
74
  throw new Error(`Unsupported platform: ${platform}`);
78
75
  }
79
76
  function getArch() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohos-ports/vibium",
3
- "version": "26.5.31-beta.0",
3
+ "version": "26.5.31-beta.2",
4
4
  "description": "Browser automation for AI agents and humans",
5
5
  "keywords": [
6
6
  "browser",
@@ -44,7 +44,6 @@
44
44
  "vibium": "bin/cli.js"
45
45
  },
46
46
  "scripts": {
47
- "prepack": "node scripts/prepack.mjs",
48
47
  "postinstall": "node postinstall.js"
49
48
  },
50
49
  "files": [
@@ -56,11 +55,11 @@
56
55
  "dist/bidi-bridge.js"
57
56
  ],
58
57
  "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"
58
+ "@ohos-ports/vibium-darwin-arm64": "26.5.31",
59
+ "@ohos-ports/vibium-darwin-x64": "26.5.31",
60
+ "@ohos-ports/vibium-openharmony-arm64": "^26.5.31-beta.0",
61
+ "@ohos-ports/vibium-linux-x64": "26.5.31",
62
+ "@ohos-ports/vibium-win32-x64": "26.5.31"
64
63
  },
65
64
  "dependencies": {
66
65
  "ws": "^8.18.3"
package/postinstall.js CHANGED
@@ -1,19 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  // Run vibium install to download Chrome for Testing
3
3
 
4
+ const os = require('os');
5
+
4
6
  if (process.env.VIBIUM_SKIP_BROWSER_DOWNLOAD === '1') {
5
7
  console.log('Skipping browser download (VIBIUM_SKIP_BROWSER_DOWNLOAD=1)');
6
8
  process.exit(0);
7
9
  }
8
10
 
11
+ // HarmonyOS uses native browser (e.g. com.haitai.htbrowser) via hdc + CDP,
12
+ // no need to download Chrome for Testing.
13
+ if (os.platform() === 'openharmony') {
14
+ console.log('Skipping Chrome download on HarmonyOS (use native browser via hdc + CDP)');
15
+ process.exit(0);
16
+ }
17
+
9
18
  const { execFileSync } = require('child_process');
10
19
  const path = require('path');
11
- const os = require('os');
12
20
 
13
21
  function getVibiumBinPath() {
14
- const platform = os.platform() === 'openharmony' ? 'linux' : os.platform();
22
+ const platform = os.platform();
15
23
  const arch = os.arch() === 'x64' ? 'x64' : 'arm64';
16
- const packageName = `@vibium/${platform}-${arch}`;
24
+ const packageName = `@ohos-ports/vibium-${platform}-${arch}`;
17
25
  const binaryName = platform === 'win32' ? 'vibium.exe' : 'vibium';
18
26
 
19
27
  try {