@wdio/testingbot-service 7.20.8 → 8.0.0-alpha.219

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/build/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import TestingBotLauncher from './launcher';
2
- import TestingBotService from './service';
3
- import { TestingbotOptions } from './types';
1
+ import TestingBotLauncher from './launcher.js';
2
+ import TestingBotService from './service.js';
3
+ import type { TestingbotOptions } from './types';
4
4
  export default TestingBotService;
5
5
  export declare const launcher: typeof TestingBotLauncher;
6
- export * from './types';
6
+ export * from './types.js';
7
7
  declare global {
8
8
  namespace WebdriverIO {
9
9
  interface ServiceOption extends TestingbotOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,YAAY,CAAA;AAC3C,OAAO,iBAAiB,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE3C,eAAe,iBAAiB,CAAA;AAChC,eAAO,MAAM,QAAQ,2BAAqB,CAAA;AAC1C,cAAc,SAAS,CAAA;AAEvB,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,WAAW,CAAC;QAClB,UAAU,aAAc,SAAQ,iBAAiB;SAAG;KACvD;CACJ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,eAAe,CAAA;AAC9C,OAAO,iBAAiB,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,eAAe,iBAAiB,CAAA;AAChC,eAAO,MAAM,QAAQ,2BAAqB,CAAA;AAC1C,cAAc,YAAY,CAAA;AAE1B,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,WAAW,CAAC;QAClB,UAAU,aAAc,SAAQ,iBAAiB;SAAG;KACvD;CACJ"}
package/build/index.js CHANGED
@@ -1,26 +1,6 @@
1
- "use strict";
2
1
  /* istanbul ignore file */
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
- };
17
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.launcher = void 0;
22
- const launcher_1 = __importDefault(require("./launcher"));
23
- const service_1 = __importDefault(require("./service"));
24
- exports.default = service_1.default;
25
- exports.launcher = launcher_1.default;
26
- __exportStar(require("./types"), exports);
2
+ import TestingBotLauncher from './launcher.js';
3
+ import TestingBotService from './service.js';
4
+ export default TestingBotService;
5
+ export const launcher = TestingBotLauncher;
6
+ export * from './types.js';
@@ -1,5 +1,5 @@
1
- import { Capabilities, Options, Services } from '@wdio/types';
2
- import { TestingbotOptions, TestingbotTunnel, TunnelLauncherOptions } from './types';
1
+ import type { Capabilities, Options, Services } from '@wdio/types';
2
+ import type { TestingbotOptions, TestingbotTunnel, TunnelLauncherOptions } from './types';
3
3
  export default class TestingBotLauncher implements Services.ServiceInstance {
4
4
  options: TestingbotOptions;
5
5
  tbTunnelOpts: TunnelLauncherOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE7D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpF,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,QAAQ,CAAC,eAAe;IACvE,OAAO,EAAE,iBAAiB,CAAA;IAC1B,YAAY,EAAG,qBAAqB,CAAA;IACpC,MAAM,CAAC,EAAE,gBAAgB,CAAA;gBACZ,OAAO,EAAE,iBAAiB;IAIjC,SAAS,CAAE,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC,kBAAkB;IAwC1F;;;OAGG;IACH,UAAU;CAOb"}
1
+ {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIzF,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,QAAQ,CAAC,eAAe;IACvE,OAAO,EAAE,iBAAiB,CAAA;IAC1B,YAAY,EAAG,qBAAqB,CAAA;IACpC,MAAM,CAAC,EAAE,gBAAgB,CAAA;gBACZ,OAAO,EAAE,iBAAiB;IAIjC,SAAS,CAAE,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC,kBAAkB;IA2C1F;;;OAGG;IACH,UAAU;CAOb"}
package/build/launcher.js CHANGED
@@ -1,23 +1,18 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const perf_hooks_1 = require("perf_hooks");
7
- const util_1 = require("util");
8
- const testingbot_tunnel_launcher_1 = __importDefault(require("testingbot-tunnel-launcher"));
9
- const logger_1 = __importDefault(require("@wdio/logger"));
10
- const log = (0, logger_1.default)('@wdio/testingbot-service');
11
- class TestingBotLauncher {
1
+ import { performance, PerformanceObserver } from 'node:perf_hooks';
2
+ import { promisify } from 'node:util';
3
+ import testingbotTunnel from 'testingbot-tunnel-launcher';
4
+ import logger from '@wdio/logger';
5
+ const log = logger('@wdio/testingbot-service');
6
+ export default class TestingBotLauncher {
12
7
  constructor(options) {
13
8
  this.options = options;
14
9
  }
15
10
  async onPrepare(config, capabilities) {
16
- var _a;
17
11
  if (!this.options.tbTunnel || !config.user || !config.key) {
18
12
  return;
19
13
  }
20
- const tbTunnelIdentifier = ((_a = this.options.tbTunnelOpts) === null || _a === void 0 ? void 0 : _a.tunnelIdentifier) || `TB-tunnel-${Math.random().toString().slice(2)}`;
14
+ const tbTunnelIdentifier = (this.options.tbTunnelOpts?.tunnelIdentifier ||
15
+ `TB-tunnel-${Math.random().toString().slice(2)}`);
21
16
  this.tbTunnelOpts = Object.assign({
22
17
  apiKey: config.user,
23
18
  apiSecret: config.key,
@@ -35,15 +30,15 @@ class TestingBotLauncher {
35
30
  /**
36
31
  * measure TestingBot tunnel boot time
37
32
  */
38
- const obs = new perf_hooks_1.PerformanceObserver((list) => {
33
+ const obs = new PerformanceObserver((list) => {
39
34
  const entry = list.getEntries()[0];
40
35
  log.info(`TestingBot tunnel successfully started after ${entry.duration}ms`);
41
36
  });
42
37
  obs.observe({ entryTypes: ['measure'] });
43
- perf_hooks_1.performance.mark('tbTunnelStart');
44
- this.tunnel = await (0, util_1.promisify)(testingbot_tunnel_launcher_1.default)(this.tbTunnelOpts);
45
- perf_hooks_1.performance.mark('tbTunnelEnd');
46
- perf_hooks_1.performance.measure('bootTime', 'tbTunnelStart', 'tbTunnelEnd');
38
+ performance.mark('tbTunnelStart');
39
+ this.tunnel = await promisify(testingbotTunnel)(this.tbTunnelOpts);
40
+ performance.mark('tbTunnelEnd');
41
+ performance.measure('bootTime', 'tbTunnelStart', 'tbTunnelEnd');
47
42
  }
48
43
  /**
49
44
  * Shut down the tunnel
@@ -56,4 +51,3 @@ class TestingBotLauncher {
56
51
  return new Promise(resolve => this.tunnel.close(resolve));
57
52
  }
58
53
  }
59
- exports.default = TestingBotLauncher;
@@ -1,6 +1,6 @@
1
- import { Capabilities, Options, Services, Frameworks } from '@wdio/types';
1
+ import type { Capabilities, Options, Services, Frameworks } from '@wdio/types';
2
2
  import type { Browser, MultiRemoteBrowser } from 'webdriverio';
3
- import { TestingbotOptions } from './types';
3
+ import type { TestingbotOptions } from './types';
4
4
  export default class TestingBotService implements Services.ServiceInstance {
5
5
  private _options;
6
6
  private _capabilities;
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAK3C,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,QAAQ,CAAC,eAAe;IAUlE,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO;IAXnB,OAAO,CAAC,QAAQ,CAAC,CAAgD;IACjE,OAAO,CAAC,iBAAiB,CAAC,CAAS;IACnC,OAAO,CAAC,WAAW,CAAC,CAAQ;IAC5B,OAAO,CAAC,SAAS,CAAC,CAAQ;IAC1B,OAAO,CAAC,OAAO,CAAC,CAAQ;IACxB,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,QAAQ,CAAI;gBAGR,QAAQ,EAAE,iBAAiB,EAC3B,aAAa,EAAE,YAAY,CAAC,gBAAgB,EAC5C,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,UAA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AI,EAAE,MAAM,CAAA;KAAE;IAStD;;;;;OAKG;IACH,cAAc,CAAE,KAAK,EAAE,UAAU,CAAC,KAAK;IAQvC;;;;;;;;OAQG;IACH,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,YAAY;IAOtE;;;OAGG;IACH,KAAK,CAAE,MAAM,CAAC,EAAE,MAAM;IA6BtB,QAAQ,CAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAkB9C,SAAS,CAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,UAAQ,EAAE,WAAW,CAAC,EAAE,MAAM;IAiBlG;;;;OAIG;IACH,UAAU,CAAE,SAAS,EAAE,MAAM;IAI7B,OAAO,CAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,UAAQ,EAAE,WAAW,CAAC,EAAE,MAAM;;;CAmC1E"}
package/build/service.js CHANGED
@@ -1,13 +1,8 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const got_1 = __importDefault(require("got"));
7
- const logger_1 = __importDefault(require("@wdio/logger"));
8
- const log = (0, logger_1.default)('@wdio/testingbot-service');
1
+ import got from 'got';
2
+ import logger from '@wdio/logger';
3
+ const log = logger('@wdio/testingbot-service');
9
4
  const jobDataProperties = ['name', 'tags', 'public', 'build', 'extra'];
10
- class TestingBotService {
5
+ export default class TestingBotService {
11
6
  constructor(_options, _capabilities, _config) {
12
7
  this._options = _options;
13
8
  this._capabilities = _capabilities;
@@ -118,7 +113,6 @@ class TestingBotService {
118
113
  * @return {Promise} Promise with result of updateJob method call
119
114
  */
120
115
  after(result) {
121
- var _a;
122
116
  if (!this._isServiceEnabled || !this._browser) {
123
117
  return;
124
118
  }
@@ -127,7 +121,7 @@ class TestingBotService {
127
121
  * set failures if user has bail option set in which case afterTest and
128
122
  * afterSuite aren't executed before after hook
129
123
  */
130
- if (((_a = this._config.mochaOpts) === null || _a === void 0 ? void 0 : _a.bail) && Boolean(result)) {
124
+ if (this._config.mochaOpts?.bail && Boolean(result)) {
131
125
  failures = 1;
132
126
  }
133
127
  const status = 'status: ' + (failures > 0 ? 'failing' : 'passing');
@@ -161,7 +155,7 @@ class TestingBotService {
161
155
  }
162
156
  const json = this.getBody(failures, calledOnReload, browserName);
163
157
  this._failures = 0;
164
- const response = await got_1.default.put(this.getRestUrl(sessionId), {
158
+ const response = await got.put(this.getRestUrl(sessionId), {
165
159
  json,
166
160
  responseType: 'json',
167
161
  username: this._tbUser,
@@ -206,4 +200,3 @@ class TestingBotService {
206
200
  return body;
207
201
  }
208
202
  }
209
- exports.default = TestingBotService;
package/build/types.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@wdio/testingbot-service",
3
- "version": "7.20.8",
3
+ "version": "8.0.0-alpha.219+4aab2cef1",
4
4
  "description": "A WebdriverIO service that provides a better integration into TestingBot",
5
5
  "author": "Jochen Delabie <info@testingbot.com>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-testingbot-service",
7
7
  "license": "MIT",
8
- "main": "./build",
9
8
  "engines": {
10
- "node": ">=12.0.0"
9
+ "node": "^16.13 || >=18"
11
10
  },
12
11
  "repository": {
13
12
  "type": "git",
@@ -22,20 +21,25 @@
22
21
  "bugs": {
23
22
  "url": "https://github.com/webdriverio/webdriverio/issues"
24
23
  },
24
+ "type": "module",
25
+ "exports": "./build/index.js",
26
+ "types": "./build/index.d.ts",
27
+ "typeScriptVersion": "3.8.3",
25
28
  "dependencies": {
26
- "@types/node": "^18.0.0",
27
- "@wdio/logger": "7.19.0",
28
- "@wdio/types": "7.20.7",
29
- "got": "^11.0.2",
29
+ "@wdio/logger": "8.0.0-alpha.219+4aab2cef1",
30
+ "@wdio/types": "8.0.0-alpha.219+4aab2cef1",
31
+ "got": "^12.1.0",
30
32
  "testingbot-tunnel-launcher": "^1.1.7",
31
- "webdriverio": "7.20.8"
33
+ "webdriverio": "8.0.0-alpha.219+4aab2cef1"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^18.0.0"
32
37
  },
33
38
  "peerDependencies": {
34
- "@wdio/cli": "^7.0.0"
39
+ "@wdio/cli": "next"
35
40
  },
36
41
  "publishConfig": {
37
42
  "access": "public"
38
43
  },
39
- "types": "./build/index.d.ts",
40
- "gitHead": "8ea0ee903b02157b9ee511c8750be2282b4f4519"
44
+ "gitHead": "4aab2cef1b8b195ac8cc611f28b1fd54e4ba3443"
41
45
  }