@applitools/driver 1.12.4 → 1.13.1

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,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.13.1](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.13.0...js/driver@1.13.1) (2023-07-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * replaced NML prefixed appium env vars with APPLITOOLS prefixed ([8905b90](https://github.com/applitools/eyes.sdk.javascript1/commit/8905b90e7c4ec6e310f6e52c03bbcc7acf1ff2ab))
9
+
10
+ ## [1.13.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.12.4...js/driver@1.13.0) (2023-07-05)
11
+
12
+
13
+ ### Features
14
+
15
+ * added auto applitools lib detection ([#1707](https://github.com/applitools/eyes.sdk.javascript1/issues/1707)) ([7d439b5](https://github.com/applitools/eyes.sdk.javascript1/commit/7d439b52af55f3b0596c9d35d6ba85c717448023))
16
+
3
17
  ## [1.12.4](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.12.3...js/driver@1.12.4) (2023-06-28)
4
18
 
5
19
 
@@ -1,8 +1,32 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.extractCapabilitiesViewport = exports.extractCapabilitiesEnvironment = void 0;
27
+ const utils = __importStar(require("@applitools/utils"));
4
28
  function extractCapabilitiesEnvironment(capabilities) {
5
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
29
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
6
30
  if (capabilities.capabilities)
7
31
  capabilities = capabilities.capabilities;
8
32
  const environment = {
@@ -17,7 +41,7 @@ function extractCapabilitiesEnvironment(capabilities) {
17
41
  isW3C: isW3C(capabilities),
18
42
  isMobile: isMobile(capabilities),
19
43
  isChrome: isChrome(capabilities),
20
- isECClient: Boolean(capabilities['applitools:isECClient']),
44
+ isECClient: !!capabilities['applitools:isECClient'],
21
45
  };
22
46
  if (environment === null || environment === void 0 ? void 0 : environment.isMobile) {
23
47
  environment.deviceName =
@@ -27,6 +51,14 @@ function extractCapabilitiesEnvironment(capabilities) {
27
51
  environment.isAndroid = isAndroid(capabilities);
28
52
  if (!environment.browserName) {
29
53
  environment.isNative = true;
54
+ if (environment.isAndroid) {
55
+ environment.isApplitoolsLib = !!((_t = capabilities.optionalIntentArguments) === null || _t === void 0 ? void 0 : _t.includes('APPLITOOLS_API_KEY'));
56
+ }
57
+ else if (environment.isIOS) {
58
+ environment.isApplitoolsLib = utils.types.isString(capabilities.processArguments)
59
+ ? capabilities.processArguments.includes('APPLITOOLS_API_KEY')
60
+ : !!((_v = (_u = capabilities.processArguments) === null || _u === void 0 ? void 0 : _u.env) === null || _v === void 0 ? void 0 : _v.APPLITOOLS_API_KEY);
61
+ }
30
62
  }
31
63
  else if (environment.isIOS &&
32
64
  capabilities.CFBundleIdentifier &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/driver",
3
- "version": "1.12.4",
3
+ "version": "1.13.1",
4
4
  "description": "Applitools universal framework wrapper",
5
5
  "keywords": [
6
6
  "applitools",
package/types/types.d.ts CHANGED
@@ -32,6 +32,7 @@ export type Environment = {
32
32
  isW3C?: boolean;
33
33
  isEC?: boolean;
34
34
  isECClient?: boolean;
35
+ isApplitoolsLib?: boolean;
35
36
  isWeb?: boolean;
36
37
  isNative?: boolean;
37
38
  isMobile?: boolean;