@lynx-js/devtool-connector 0.9.4 → 0.9.5

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,11 @@
1
1
  # @lynx-js/devtool-connector
2
2
 
3
+ ## 0.9.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ff373d: Allow all available Android Apps.
8
+
3
9
  ## 0.9.4
4
10
 
5
11
  ### Patch Changes
package/dist/872.js CHANGED
@@ -326,7 +326,7 @@ class StaticServer {
326
326
  }
327
327
  }
328
328
  var package_namespaceObject = {
329
- rE: "0.9.4"
329
+ rE: "0.9.5"
330
330
  };
331
331
  const CONNECTOR_VERSION = package_namespaceObject.rE;
332
332
  const server_debug = node_createDebug('devtool-mcp-server:daemon:server');
package/dist/962.js CHANGED
@@ -11359,16 +11359,6 @@ function android_ts_dispose_resources(env) {
11359
11359
  })(env);
11360
11360
  }
11361
11361
  const android_debug = node_createDebug('devtool-mcp-server:connector:android');
11362
- const KNOWNS_APPS = [
11363
- {
11364
- packageName: 'com.lynx.uiapp',
11365
- name: 'Lynx Example'
11366
- },
11367
- {
11368
- packageName: 'com.lynx.explorer',
11369
- name: 'Lynx Explorer'
11370
- }
11371
- ];
11372
11362
  class AndroidTransport {
11373
11363
  client;
11374
11364
  constructor(spec = {
@@ -11459,9 +11449,12 @@ class AndroidTransport {
11459
11449
  'packages',
11460
11450
  '-3'
11461
11451
  ]);
11462
- const packages = new Set(output.split('\n').map((line)=>line.replace('package:', '').trim()).filter((i)=>'' !== i));
11452
+ const packages = output.split('\n').map((line)=>line.replace('package:', '').trim()).filter((i)=>'' !== i);
11463
11453
  android_debug("listAvailableApps all packages: %o", packages);
11464
- return KNOWNS_APPS.filter((app)=>packages.has(app.packageName));
11454
+ return packages.map((packageName)=>({
11455
+ packageName,
11456
+ name: packageName
11457
+ }));
11465
11458
  } catch (e) {
11466
11459
  env.error = e;
11467
11460
  env.hasError = true;
@@ -11477,9 +11470,15 @@ class AndroidTransport {
11477
11470
  hasError: false
11478
11471
  };
11479
11472
  try {
11480
- const apps = await this.listAvailableApps(deviceId);
11481
11473
  const adb = _ts_add_disposable_resource(env, await this.#createAdb(deviceId), true);
11482
- if (!apps.some((app)=>app.packageName === packageName)) throw new Error(`package ${packageName} not found`);
11474
+ const pmOutput = await adb.subprocess.noneProtocol.spawnWaitText([
11475
+ 'pm',
11476
+ 'list',
11477
+ 'packages',
11478
+ packageName
11479
+ ]);
11480
+ const installed = pmOutput.split('\n').some((line)=>line.trim() === `package:${packageName}`);
11481
+ if (!installed) throw new Error(`package ${packageName} not found`);
11483
11482
  if (withDataCleared) {
11484
11483
  const output = await adb.subprocess.noneProtocol.spawnWaitText([
11485
11484
  'pm',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/devtool-connector",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "repository": {
5
5
  "url": "https://github.com/lynx-community/skills"
6
6
  },
@@ -43,7 +43,7 @@
43
43
  "ws": "^8.21.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@rslib/core": "0.19.2",
46
+ "@rslib/core": "0.23.0",
47
47
  "@types/node": "^24.13.2",
48
48
  "@types/ws": "^8.18.1",
49
49
  "@yume-chan/adb": "^2.6.0",