dsh-apk-vm 0.12.1 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.2
4
+
5
+ ### Fixed
6
+
7
+ - **Panel version chip reported `v0.11.1`.** `client.js` kept a hand-maintained `CLIENT_VERSION`
8
+ constant that was never bumped after 0.11.1, so the header pill showed the wrong version on
9
+ 0.12.0/0.12.1 even though the host reported the correct `pluginVersion`. The chip now prefers
10
+ the host-reported version, the constant is set to `0.12.2`, and `scripts/check-version.mjs`
11
+ (run by `npm run check`) fails the build when `CLIENT_VERSION` and `package.json` disagree.
12
+
3
13
  ## 0.12.1
4
14
 
5
15
  ### Added
package/README.md CHANGED
@@ -45,7 +45,7 @@ same-origin, loopback-only debug HTTP API and an `apk_vm` Agent tool.
45
45
  > 当前 **Windows x64 与 Linux x86_64(headless)为端到端已验证平台**;macOS 仅做探测/CI
46
46
  > 覆盖,详见 `docs/LINUX-E2E.md`。
47
47
 
48
- **Status:** `0.12.1` · Apache-2.0 · no npm runtime dependencies · no build step.
48
+ **Status:** `0.12.2` · Apache-2.0 · no npm runtime dependencies · no build step.
49
49
 
50
50
  This is an open-source DSH plugin published on npm as **`dsh-apk-vm`**. Repository:
51
51
  [github.com/yuxiaole-bili/dsh-apk-vm](https://github.com/yuxiaole-bili/dsh-apk-vm).
package/client.js CHANGED
@@ -30,7 +30,7 @@ window.__ModuleLoader__.load({
30
30
  var SWIPE_THRESHOLD_PX = 24;
31
31
  var FRAME_INTERVAL_MS = 500;
32
32
  var STATE_INTERVAL_MS = 2000;
33
- var CLIENT_VERSION = '0.11.1';
33
+ var CLIENT_VERSION = '0.12.2';
34
34
 
35
35
  /* ------------------------------------------------------------------ *
36
36
  * Optional dsh-better-sidebar integration.
@@ -2805,7 +2805,7 @@ window.__ModuleLoader__.load({
2805
2805
  pillMeta.push(T(bootKey, { s: bootSeconds }));
2806
2806
  }
2807
2807
  }
2808
- pillMeta.push('v' + CLIENT_VERSION);
2808
+ pillMeta.push('v' + (hostVersion || CLIENT_VERSION));
2809
2809
  var ownerSnapshot = snapshot && isObject(snapshot.owner) ? snapshot.owner : null;
2810
2810
  if (ownerSnapshot) {
2811
2811
  var ownerPillLabel = String(ownerSnapshot.label || ownerSnapshot.key || '').slice(0, 48);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-apk-vm",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "type": "module",
5
5
  "description": "Local AOSP Android VM for DeepSeek Harness: preview rooted APKs at up to 60 fps, automate UIAutomator flows, and give each Agent an isolated VM.",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "registry": "https://registry.npmjs.org/"
38
38
  },
39
39
  "scripts": {
40
- "check": "node --check index.js && node --check client.js && node --check lib/android.js && node --check lib/apk-bundle.js && node --check lib/flows.js && node --check lib/storage.js && node --check lib/ui-inspector.js && node --check lib/x509.js && node --check lib/scrcpy.js && node --check lib/ws.js && node --check lib/setup.js && node --check lib/instances.js && node --check lib/vm-ownership.js && node --check lib/http-owner.js && node --check lib/video-stream.js && node --check lib/aab.js && node --check lib/har.js && node --check lib/ui-tests.js && node --check lib/remote.js && node --check lib/cdp.js && node --check lib/json-safe.js && node --check lib/png-annotate.js && node --check lib/image-features.js && node --check lib/control-codebook.js && node --check lib/app-skills.js && node --check lib/jdk.js && node --check lib/autosetup.js && node --check lib/activity-log.js && node --check lib/installed-apps.js && node --check lib/remote-instance.js && node --check lib/media.js && node --check lib/emulator-inventory.js",
40
+ "check": "node --check index.js && node --check client.js && node --check lib/android.js && node --check lib/apk-bundle.js && node --check lib/flows.js && node --check lib/storage.js && node --check lib/ui-inspector.js && node --check lib/x509.js && node --check lib/scrcpy.js && node --check lib/ws.js && node --check lib/setup.js && node --check lib/instances.js && node --check lib/vm-ownership.js && node --check lib/http-owner.js && node --check lib/video-stream.js && node --check lib/aab.js && node --check lib/har.js && node --check lib/ui-tests.js && node --check lib/remote.js && node --check lib/cdp.js && node --check lib/json-safe.js && node --check lib/png-annotate.js && node --check lib/image-features.js && node --check lib/control-codebook.js && node --check lib/app-skills.js && node --check lib/jdk.js && node --check lib/autosetup.js && node --check lib/activity-log.js && node --check lib/installed-apps.js && node --check lib/remote-instance.js && node --check lib/media.js && node --check lib/emulator-inventory.js && node scripts/check-version.mjs",
41
41
  "privacy": "node scripts/privacy-scan.mjs",
42
42
  "test": "node spike/ui-smoke.cjs && node spike/ui-better-sidebar-smoke.cjs && node spike/setup-smoke.mjs && node spike/jdk-test.mjs && node spike/autosetup-test.mjs && node spike/tool-core-test.mjs && node spike/activity-log-test.mjs && node spike/installed-apps-test.mjs && node spike/android/mock-device.mjs && node spike/android/resilience-test.mjs && node spike/android/launch-plan.mjs && node spike/instances-smoke.mjs && node spike/ownership-test.mjs && node spike/cdp-test.mjs && node spike/features.mjs && node spike/aab-test.mjs && node spike/har-test.mjs && node spike/ui-tests-test.mjs && node spike/remote-test.mjs && node spike/remote-instance-test.mjs && node spike/media-test.mjs && node spike/emulator-inventory-test.mjs && node spike/skill-test.mjs"
43
43
  },
@@ -96,6 +96,7 @@
96
96
  "docs/*.png",
97
97
  "docs/*.gif",
98
98
  "scripts/privacy-scan.mjs",
99
+ "scripts/check-version.mjs",
99
100
  "scripts/make-demo-gif.mjs",
100
101
  "locale/*.json",
101
102
  "icon.svg",
@@ -0,0 +1,30 @@
1
+ // Keep the panel's build-time version constant in sync with package.json.
2
+ //
3
+ // The panel ships as plain ESM with no build step, so `CLIENT_VERSION` in
4
+ // client.js is the only client-side version marker. If it drifts, the header
5
+ // pill and the stale-client banner report the wrong version (0.12.0 and 0.12.1
6
+ // were published with CLIENT_VERSION still set to '0.11.1').
7
+ import fs from 'node:fs';
8
+ import path from 'node:path';
9
+ import { fileURLToPath } from 'node:url';
10
+
11
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
12
+ const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
13
+ const client = fs.readFileSync(path.join(root, 'client.js'), 'utf8');
14
+ const match = client.match(/var CLIENT_VERSION = '([^']+)';/);
15
+ if (!match) {
16
+ console.error('check-version: could not find CLIENT_VERSION in client.js');
17
+ process.exit(1);
18
+ }
19
+ const clientVersion = match[1];
20
+ if (clientVersion !== pkg.version) {
21
+ console.error(
22
+ 'check-version: client.js CLIENT_VERSION (' +
23
+ clientVersion +
24
+ ') does not match package.json version (' +
25
+ pkg.version +
26
+ '); update client.js',
27
+ );
28
+ process.exit(1);
29
+ }
30
+ console.log('check-version: ok (' + pkg.version + ')');