@wdio/appium-service 8.40.0 → 8.40.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAIlE,OAAO,KAAK,EAAyB,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAY5E,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,QAAQ,CAAC,eAAe;IAO/D,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO,CAAC;IARpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAuB;IAC7C,OAAO,CAAC,QAAQ,CAAC,CAA+C;gBAGpD,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,YAAY,CAAC,kBAAkB,EAC9C,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,YAAA;YAS1B,WAAW;IAqBzB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAkDlB,SAAS;IAiCf,UAAU;IAMV,OAAO,CAAC,YAAY;YAoEN,kBAAkB;mBAeX,iBAAiB;CAezC"}
1
+ {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAIlE,OAAO,KAAK,EAAyB,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAY5E,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,QAAQ,CAAC,eAAe;IAO/D,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO,CAAC;IARpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAuB;IAC7C,OAAO,CAAC,QAAQ,CAAC,CAA+C;gBAGpD,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,YAAY,CAAC,kBAAkB,EAC9C,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,YAAA;YAS1B,WAAW;IAqBzB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAkDlB,SAAS;IAiCf,UAAU;IAgBV,OAAO,CAAC,YAAY;YAoEN,kBAAkB;mBAeX,iBAAiB;CAezC"}
package/build/launcher.js CHANGED
@@ -2,6 +2,7 @@ import fs from 'node:fs';
2
2
  import fsp from 'node:fs/promises';
3
3
  import url from 'node:url';
4
4
  import path from 'node:path';
5
+ import treeKill from 'tree-kill';
5
6
  import { spawn } from 'node:child_process';
6
7
  import logger from '@wdio/logger';
7
8
  import getPort from 'get-port';
@@ -119,9 +120,18 @@ export default class AppiumLauncher {
119
120
  }
120
121
  }
121
122
  onComplete() {
122
- if (this._process) {
123
- log.info(`Appium (pid: ${this._process.pid}) killed`);
124
- this._process.kill();
123
+ // Kill appium and all process' spawned from it
124
+ if (this._process && this._process.pid) {
125
+ // Ensure all child processes are also killed
126
+ log.info('Killing entire Appium tree');
127
+ treeKill(this._process.pid, 'SIGTERM', (err) => {
128
+ if (err) {
129
+ log.warn('Failed to kill process:', err);
130
+ }
131
+ else {
132
+ log.info('Process and its children successfully terminated');
133
+ }
134
+ });
125
135
  }
126
136
  }
127
137
  _startAppium(command, args, timeout = APPIUM_START_TIMEOUT) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/appium-service",
3
- "version": "8.40.0",
3
+ "version": "8.40.3",
4
4
  "description": "A WebdriverIO service to start & stop Appium Server",
5
5
  "author": "Morten Bjerg Gregersen <morten@mogee.dk>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-appium-service",
@@ -33,17 +33,18 @@
33
33
  },
34
34
  "typeScriptVersion": "3.8.3",
35
35
  "dependencies": {
36
- "@wdio/config": "8.40.0",
36
+ "@wdio/config": "8.40.3",
37
37
  "@wdio/logger": "8.38.0",
38
- "@wdio/types": "8.39.0",
39
- "@wdio/utils": "8.40.0",
38
+ "@wdio/types": "8.40.3",
39
+ "@wdio/utils": "8.40.3",
40
40
  "get-port": "^7.0.0",
41
41
  "import-meta-resolve": "^4.0.0",
42
42
  "param-case": "^4.0.0",
43
- "webdriverio": "8.40.0"
43
+ "tree-kill": "^1.2.2",
44
+ "webdriverio": "8.40.3"
44
45
  },
45
46
  "publishConfig": {
46
47
  "access": "public"
47
48
  },
48
- "gitHead": "9c3681f32fd96f81c9f1e07790edd76e6b40609a"
49
+ "gitHead": "c25074cf89bf620cfe18909cd7dbdad8de8e722d"
49
50
  }