appium-webdriveragent 15.1.5 → 16.0.0
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 +17 -0
- package/WebDriverAgentLib/Info.plist +2 -2
- package/WebDriverAgentLib/Utilities/FBConfiguration.h +2 -2
- package/WebDriverAgentLib/Utilities/FBConfiguration.m +3 -3
- package/build/lib/check-dependencies.d.ts +1 -1
- package/build/lib/check-dependencies.d.ts.map +1 -1
- package/build/lib/check-dependencies.js +12 -18
- package/build/lib/check-dependencies.js.map +1 -1
- package/build/lib/constants.js +13 -19
- package/build/lib/constants.js.map +1 -1
- package/build/lib/index.d.ts +6 -6
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +6 -32
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.js +2 -5
- package/build/lib/logger.js.map +1 -1
- package/build/lib/no-session-proxy.js +2 -6
- package/build/lib/no-session-proxy.js.map +1 -1
- package/build/lib/types.js +1 -2
- package/build/lib/utils/index.d.ts +6 -6
- package/build/lib/utils/index.d.ts.map +1 -1
- package/build/lib/utils/index.js +8 -22
- package/build/lib/utils/index.js.map +1 -1
- package/build/lib/utils/module.d.ts.map +1 -1
- package/build/lib/utils/module.js +9 -20
- package/build/lib/utils/module.js.map +1 -1
- package/build/lib/utils/platform.js +3 -6
- package/build/lib/utils/platform.js.map +1 -1
- package/build/lib/utils/processes.js +16 -21
- package/build/lib/utils/processes.js.map +1 -1
- package/build/lib/utils/security.js +7 -10
- package/build/lib/utils/security.js.map +1 -1
- package/build/lib/utils/xctestrun.d.ts +1 -1
- package/build/lib/utils/xctestrun.d.ts.map +1 -1
- package/build/lib/utils/xctestrun.js +24 -33
- package/build/lib/utils/xctestrun.js.map +1 -1
- package/build/lib/wda-strategies.d.ts +3 -3
- package/build/lib/wda-strategies.d.ts.map +1 -1
- package/build/lib/wda-strategies.js +14 -22
- package/build/lib/wda-strategies.js.map +1 -1
- package/build/lib/webdriveragent.d.ts +3 -8
- package/build/lib/webdriveragent.d.ts.map +1 -1
- package/build/lib/webdriveragent.js +44 -61
- package/build/lib/webdriveragent.js.map +1 -1
- package/build/lib/xcodebuild.d.ts +2 -2
- package/build/lib/xcodebuild.d.ts.map +1 -1
- package/build/lib/xcodebuild.js +26 -33
- package/build/lib/xcodebuild.js.map +1 -1
- package/lib/check-dependencies.ts +3 -3
- package/lib/index.ts +6 -6
- package/lib/utils/index.ts +7 -7
- package/lib/utils/module.ts +4 -7
- package/lib/utils/platform.ts +1 -1
- package/lib/utils/processes.ts +1 -1
- package/lib/utils/security.ts +1 -1
- package/lib/utils/xctestrun.ts +3 -3
- package/lib/wda-strategies.ts +4 -4
- package/lib/webdriveragent.ts +7 -18
- package/lib/xcodebuild.ts +10 -5
- package/package.json +12 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [16.0.0](https://github.com/appium/WebDriverAgent/compare/v15.1.6...v16.0.0) (2026-07-23)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
* Consumers using require('appium-webdriveragent') must switch to import/dynamic import() — the package no longer ships a CommonJS entry point.
|
|
6
|
+
* WebDriverAgent#retrieveDerivedDataPath() has been removed; use #retrieveBuildSettings() instead.
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* Migrate the package to ESM ([#1176](https://github.com/appium/WebDriverAgent/issues/1176)) ([fa54e5e](https://github.com/appium/WebDriverAgent/commit/fa54e5e65bdf40d8a653029142e44bcbbf143389))
|
|
11
|
+
|
|
12
|
+
## [15.1.6](https://github.com/appium/WebDriverAgent/compare/v15.1.5...v15.1.6) (2026-07-12)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* use double instead of CGFloat for mjpegScalingFactor public API ([#1168](https://github.com/appium/WebDriverAgent/issues/1168)) ([33dbaa4](https://github.com/appium/WebDriverAgent/commit/33dbaa4f56337bccc44ce7b0e796366d04df3630))
|
|
17
|
+
|
|
1
18
|
## [15.1.5](https://github.com/appium/WebDriverAgent/compare/v15.1.4...v15.1.5) (2026-07-12)
|
|
2
19
|
|
|
3
20
|
### Bug Fixes
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<key>CFBundlePackageType</key>
|
|
16
16
|
<string>FMWK</string>
|
|
17
17
|
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>
|
|
18
|
+
<string>16.0.0</string>
|
|
19
19
|
<key>CFBundleSignature</key>
|
|
20
20
|
<string>????</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>
|
|
22
|
+
<string>16.0.0</string>
|
|
23
23
|
<key>NSPrincipalClass</key>
|
|
24
24
|
<string/>
|
|
25
25
|
</dict>
|
|
@@ -144,8 +144,8 @@ extern NSString *const FBSnapshotMaxDepthKey;
|
|
|
144
144
|
! Setting this to a value less than 100, especially together with orientation fixing enabled
|
|
145
145
|
! may lead to WDA process termination because of an excessive CPU usage.
|
|
146
146
|
*/
|
|
147
|
-
+ (
|
|
148
|
-
+ (void)setMjpegScalingFactor:(
|
|
147
|
+
+ (double)mjpegScalingFactor;
|
|
148
|
+
+ (void)setMjpegScalingFactor:(double)scalingFactor;
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
YES if verbose logging is enabled. NO otherwise.
|
|
@@ -37,7 +37,7 @@ static NSString *const axSettingsClassName = @"AXSettings";
|
|
|
37
37
|
static BOOL FBShouldUseSingletonTestManager = YES;
|
|
38
38
|
static BOOL FBShouldRespectSystemAlerts = NO;
|
|
39
39
|
|
|
40
|
-
static
|
|
40
|
+
static double FBMjpegScalingFactor = 100.0;
|
|
41
41
|
static BOOL FBMjpegShouldFixOrientation = NO;
|
|
42
42
|
static NSUInteger FBMjpegServerScreenshotQuality = 25;
|
|
43
43
|
static NSUInteger FBMjpegServerFramerate = 10;
|
|
@@ -178,12 +178,12 @@ static BOOL FBShouldEnforceCustomSnapshots = NO;
|
|
|
178
178
|
return DefaultHttpRequestBodySizeLimit;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
+ (
|
|
181
|
+
+ (double)mjpegScalingFactor
|
|
182
182
|
{
|
|
183
183
|
return FBMjpegScalingFactor;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
+ (void)setMjpegScalingFactor:(
|
|
186
|
+
+ (void)setMjpegScalingFactor:(double)scalingFactor {
|
|
187
187
|
FBMjpegScalingFactor = scalingFactor;
|
|
188
188
|
}
|
|
189
189
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-dependencies.d.ts","sourceRoot":"","sources":["../../lib/check-dependencies.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"check-dependencies.d.ts","sourceRoot":"","sources":["../../lib/check-dependencies.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,wBAAsB,YAAY,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB1E"}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.bundleWDASim = bundleWDASim;
|
|
7
|
-
const support_1 = require("@appium/support");
|
|
8
|
-
const teen_process_1 = require("teen_process");
|
|
9
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
-
const constants_1 = require("./constants");
|
|
11
|
-
const utils_1 = require("./utils");
|
|
1
|
+
import { fs } from '@appium/support';
|
|
2
|
+
import { exec } from 'teen_process';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { WDA_SCHEME, SDK_SIMULATOR, WDA_RUNNER_APP } from './constants.js';
|
|
5
|
+
import { BOOTSTRAP_PATH } from './utils/index.js';
|
|
12
6
|
/**
|
|
13
7
|
* Ensure simulator WDA is built and return the resulting app bundle path.
|
|
14
8
|
*/
|
|
15
|
-
async function bundleWDASim(xcodebuild) {
|
|
9
|
+
export async function bundleWDASim(xcodebuild) {
|
|
16
10
|
const derivedDataPath = await xcodebuild.retrieveDerivedDataPath();
|
|
17
11
|
if (!derivedDataPath) {
|
|
18
12
|
throw new Error('Cannot retrieve the path to the Xcode derived data folder');
|
|
19
13
|
}
|
|
20
|
-
const wdaBundlePath =
|
|
21
|
-
if (await
|
|
14
|
+
const wdaBundlePath = path.join(derivedDataPath, 'Build', 'Products', 'Debug-iphonesimulator', WDA_RUNNER_APP);
|
|
15
|
+
if (await fs.exists(wdaBundlePath)) {
|
|
22
16
|
return wdaBundlePath;
|
|
23
17
|
}
|
|
24
18
|
await buildWDASim();
|
|
@@ -27,15 +21,15 @@ async function bundleWDASim(xcodebuild) {
|
|
|
27
21
|
async function buildWDASim() {
|
|
28
22
|
const args = [
|
|
29
23
|
'-project',
|
|
30
|
-
|
|
24
|
+
path.join(BOOTSTRAP_PATH, 'WebDriverAgent.xcodeproj'),
|
|
31
25
|
'-scheme',
|
|
32
|
-
|
|
26
|
+
WDA_SCHEME,
|
|
33
27
|
'-sdk',
|
|
34
|
-
|
|
28
|
+
SDK_SIMULATOR,
|
|
35
29
|
'CODE_SIGN_IDENTITY=""',
|
|
36
30
|
'CODE_SIGNING_REQUIRED="NO"',
|
|
37
31
|
'GCC_TREAT_WARNINGS_AS_ERRORS=0',
|
|
38
32
|
];
|
|
39
|
-
await
|
|
33
|
+
await exec('xcodebuild', args);
|
|
40
34
|
}
|
|
41
35
|
//# sourceMappingURL=check-dependencies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-dependencies.js","sourceRoot":"","sources":["../../lib/check-dependencies.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-dependencies.js","sourceRoot":"","sources":["../../lib/check-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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
|
-
|
|
14
|
-
exports.WDA_BASE_URL = 'http://127.0.0.1';
|
|
15
|
-
exports.PLATFORM_NAME_TVOS = 'tvOS';
|
|
16
|
-
exports.PLATFORM_NAME_IOS = 'iOS';
|
|
17
|
-
exports.SDK_SIMULATOR = 'iphonesimulator';
|
|
18
|
-
exports.SDK_DEVICE = 'iphoneos';
|
|
19
|
-
exports.WDA_UPGRADE_TIMESTAMP_PATH = node_path_1.default.join('.appium', 'webdriveragent', 'upgrade.time');
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
export const DEFAULT_TEST_BUNDLE_SUFFIX = '.xctrunner';
|
|
3
|
+
export const WDA_RUNNER_BUNDLE_ID = 'com.facebook.WebDriverAgentRunner';
|
|
4
|
+
export const WDA_RUNNER_BUNDLE_ID_FOR_XCTEST = `${WDA_RUNNER_BUNDLE_ID}${DEFAULT_TEST_BUNDLE_SUFFIX}`;
|
|
5
|
+
export const WDA_RUNNER_APP = 'WebDriverAgentRunner-Runner.app';
|
|
6
|
+
export const WDA_SCHEME = 'WebDriverAgentRunner';
|
|
7
|
+
export const PROJECT_FILE = 'project.pbxproj';
|
|
8
|
+
export const WDA_BASE_URL = 'http://127.0.0.1';
|
|
9
|
+
export const PLATFORM_NAME_TVOS = 'tvOS';
|
|
10
|
+
export const PLATFORM_NAME_IOS = 'iOS';
|
|
11
|
+
export const SDK_SIMULATOR = 'iphonesimulator';
|
|
12
|
+
export const SDK_DEVICE = 'iphoneos';
|
|
13
|
+
export const WDA_UPGRADE_TIMESTAMP_PATH = path.join('.appium', 'webdriveragent', 'upgrade.time');
|
|
20
14
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../lib/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../lib/constants.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,0BAA0B,GAAG,YAAY,CAAC;AACvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,mCAAmC,CAAC;AACxE,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,oBAAoB,GAAG,0BAA0B,EAAE,CAAC;AACtG,MAAM,CAAC,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAC9C,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEvC,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAC/C,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;AAErC,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC"}
|
package/build/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { bundleWDASim } from './check-dependencies';
|
|
2
|
-
export { NoSessionProxy } from './no-session-proxy';
|
|
3
|
-
export { WebDriverAgent } from './webdriveragent';
|
|
4
|
-
export { WDA_BASE_URL, WDA_RUNNER_APP, WDA_RUNNER_BUNDLE_ID, PROJECT_FILE } from './constants';
|
|
5
|
-
export { resetTestProcesses, BOOTSTRAP_PATH } from './utils';
|
|
6
|
-
export * from './types';
|
|
1
|
+
export { bundleWDASim } from './check-dependencies.js';
|
|
2
|
+
export { NoSessionProxy } from './no-session-proxy.js';
|
|
3
|
+
export { WebDriverAgent } from './webdriveragent.js';
|
|
4
|
+
export { WDA_BASE_URL, WDA_RUNNER_APP, WDA_RUNNER_BUNDLE_ID, PROJECT_FILE } from './constants.js';
|
|
5
|
+
export { resetTestProcesses, BOOTSTRAP_PATH } from './utils/index.js';
|
|
6
|
+
export * from './types.js';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/build/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEpE,cAAc,YAAY,CAAC"}
|
package/build/lib/index.js
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.BOOTSTRAP_PATH = exports.resetTestProcesses = exports.PROJECT_FILE = exports.WDA_RUNNER_BUNDLE_ID = exports.WDA_RUNNER_APP = exports.WDA_BASE_URL = exports.WebDriverAgent = exports.NoSessionProxy = exports.bundleWDASim = void 0;
|
|
18
|
-
var check_dependencies_1 = require("./check-dependencies");
|
|
19
|
-
Object.defineProperty(exports, "bundleWDASim", { enumerable: true, get: function () { return check_dependencies_1.bundleWDASim; } });
|
|
20
|
-
var no_session_proxy_1 = require("./no-session-proxy");
|
|
21
|
-
Object.defineProperty(exports, "NoSessionProxy", { enumerable: true, get: function () { return no_session_proxy_1.NoSessionProxy; } });
|
|
22
|
-
var webdriveragent_1 = require("./webdriveragent");
|
|
23
|
-
Object.defineProperty(exports, "WebDriverAgent", { enumerable: true, get: function () { return webdriveragent_1.WebDriverAgent; } });
|
|
24
|
-
var constants_1 = require("./constants");
|
|
25
|
-
Object.defineProperty(exports, "WDA_BASE_URL", { enumerable: true, get: function () { return constants_1.WDA_BASE_URL; } });
|
|
26
|
-
Object.defineProperty(exports, "WDA_RUNNER_APP", { enumerable: true, get: function () { return constants_1.WDA_RUNNER_APP; } });
|
|
27
|
-
Object.defineProperty(exports, "WDA_RUNNER_BUNDLE_ID", { enumerable: true, get: function () { return constants_1.WDA_RUNNER_BUNDLE_ID; } });
|
|
28
|
-
Object.defineProperty(exports, "PROJECT_FILE", { enumerable: true, get: function () { return constants_1.PROJECT_FILE; } });
|
|
29
|
-
var utils_1 = require("./utils");
|
|
30
|
-
Object.defineProperty(exports, "resetTestProcesses", { enumerable: true, get: function () { return utils_1.resetTestProcesses; } });
|
|
31
|
-
Object.defineProperty(exports, "BOOTSTRAP_PATH", { enumerable: true, get: function () { return utils_1.BOOTSTRAP_PATH; } });
|
|
32
|
-
__exportStar(require("./types"), exports);
|
|
1
|
+
export { bundleWDASim } from './check-dependencies.js';
|
|
2
|
+
export { NoSessionProxy } from './no-session-proxy.js';
|
|
3
|
+
export { WebDriverAgent } from './webdriveragent.js';
|
|
4
|
+
export { WDA_BASE_URL, WDA_RUNNER_APP, WDA_RUNNER_BUNDLE_ID, PROJECT_FILE } from './constants.js';
|
|
5
|
+
export { resetTestProcesses, BOOTSTRAP_PATH } from './utils/index.js';
|
|
6
|
+
export * from './types.js';
|
|
33
7
|
//# sourceMappingURL=index.js.map
|
package/build/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEpE,cAAc,YAAY,CAAC"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.log = void 0;
|
|
4
|
-
const support_1 = require("@appium/support");
|
|
5
|
-
exports.log = support_1.logger.getLogger('WebDriverAgent');
|
|
1
|
+
import { logger } from '@appium/support';
|
|
2
|
+
export const log = logger.getLogger('WebDriverAgent');
|
|
6
3
|
//# sourceMappingURL=logger.js.map
|
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAEvC,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.NoSessionProxy = void 0;
|
|
4
|
-
const base_driver_1 = require("@appium/base-driver");
|
|
5
|
-
class NoSessionProxy extends base_driver_1.JWProxy {
|
|
1
|
+
import { JWProxy } from '@appium/base-driver';
|
|
2
|
+
export class NoSessionProxy extends JWProxy {
|
|
6
3
|
constructor(opts = {}) {
|
|
7
4
|
super(opts);
|
|
8
5
|
}
|
|
@@ -17,5 +14,4 @@ class NoSessionProxy extends base_driver_1.JWProxy {
|
|
|
17
14
|
throw new Error(`Did not know what to do with url '${url}'`);
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
|
-
exports.NoSessionProxy = NoSessionProxy;
|
|
21
17
|
//# sourceMappingURL=no-session-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-session-proxy.js","sourceRoot":"","sources":["../../lib/no-session-proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"no-session-proxy.js","sourceRoot":"","sources":["../../lib/no-session-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAG5C,MAAM,OAAO,cAAe,SAAQ,OAAO;IACzC,YAAY,OAAqB,EAAE;QACjC,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEQ,cAAc,CAAC,GAAW;QACjC,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;YACf,GAAG,GAAG,GAAG,CAAC;QACZ,CAAC;QACD,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC7E,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,OAAO,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,8BAA8B;QAC3E,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,qCAAqC,GAAG,GAAG,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
package/build/lib/types.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { BOOTSTRAP_PATH } from './module';
|
|
2
|
-
export { isTvOS } from './platform';
|
|
3
|
-
export { getPIDsListeningOnPort, killAppUsingPattern, resetTestProcesses } from './processes';
|
|
4
|
-
export { setRealDeviceSecurity } from './security';
|
|
5
|
-
export { getAdditionalRunContent, getXctestrunFileName, getXctestrunFilePath, setXctestrunFile, } from './xctestrun';
|
|
6
|
-
export type { XctestrunFileArgs } from './xctestrun';
|
|
1
|
+
export { BOOTSTRAP_PATH } from './module.js';
|
|
2
|
+
export { isTvOS } from './platform.js';
|
|
3
|
+
export { getPIDsListeningOnPort, killAppUsingPattern, resetTestProcesses } from './processes.js';
|
|
4
|
+
export { setRealDeviceSecurity } from './security.js';
|
|
5
|
+
export { getAdditionalRunContent, getXctestrunFileName, getXctestrunFilePath, setXctestrunFile, } from './xctestrun.js';
|
|
6
|
+
export type { XctestrunFileArgs } from './xctestrun.js';
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves WDA upgrade timestamp. The manifest only gets modified on package upgrade.
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/utils/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/utils/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,sBAAsB,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAErE"}
|
package/build/lib/utils/index.js
CHANGED
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "BOOTSTRAP_PATH", { enumerable: true, get: function () { return module_2.BOOTSTRAP_PATH; } });
|
|
8
|
-
var platform_1 = require("./platform");
|
|
9
|
-
Object.defineProperty(exports, "isTvOS", { enumerable: true, get: function () { return platform_1.isTvOS; } });
|
|
10
|
-
var processes_1 = require("./processes");
|
|
11
|
-
Object.defineProperty(exports, "getPIDsListeningOnPort", { enumerable: true, get: function () { return processes_1.getPIDsListeningOnPort; } });
|
|
12
|
-
Object.defineProperty(exports, "killAppUsingPattern", { enumerable: true, get: function () { return processes_1.killAppUsingPattern; } });
|
|
13
|
-
Object.defineProperty(exports, "resetTestProcesses", { enumerable: true, get: function () { return processes_1.resetTestProcesses; } });
|
|
14
|
-
var security_1 = require("./security");
|
|
15
|
-
Object.defineProperty(exports, "setRealDeviceSecurity", { enumerable: true, get: function () { return security_1.setRealDeviceSecurity; } });
|
|
16
|
-
var xctestrun_1 = require("./xctestrun");
|
|
17
|
-
Object.defineProperty(exports, "getAdditionalRunContent", { enumerable: true, get: function () { return xctestrun_1.getAdditionalRunContent; } });
|
|
18
|
-
Object.defineProperty(exports, "getXctestrunFileName", { enumerable: true, get: function () { return xctestrun_1.getXctestrunFileName; } });
|
|
19
|
-
Object.defineProperty(exports, "getXctestrunFilePath", { enumerable: true, get: function () { return xctestrun_1.getXctestrunFilePath; } });
|
|
20
|
-
Object.defineProperty(exports, "setXctestrunFile", { enumerable: true, get: function () { return xctestrun_1.setXctestrunFile; } });
|
|
1
|
+
import { getWDAUpgradeTimestamp as getWDAUpgradeTimestampImpl } from './module.js';
|
|
2
|
+
export { BOOTSTRAP_PATH } from './module.js';
|
|
3
|
+
export { isTvOS } from './platform.js';
|
|
4
|
+
export { getPIDsListeningOnPort, killAppUsingPattern, resetTestProcesses } from './processes.js';
|
|
5
|
+
export { setRealDeviceSecurity } from './security.js';
|
|
6
|
+
export { getAdditionalRunContent, getXctestrunFileName, getXctestrunFilePath, setXctestrunFile, } from './xctestrun.js';
|
|
21
7
|
/**
|
|
22
8
|
* Retrieves WDA upgrade timestamp. The manifest only gets modified on package upgrade.
|
|
23
9
|
*/
|
|
24
|
-
async function getWDAUpgradeTimestamp() {
|
|
25
|
-
return await (
|
|
10
|
+
export async function getWDAUpgradeTimestamp() {
|
|
11
|
+
return await getWDAUpgradeTimestampImpl();
|
|
26
12
|
}
|
|
27
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,IAAI,0BAA0B,EAAC,MAAM,aAAa,CAAC;AAEjF,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,sBAAsB,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAGxB;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,OAAO,MAAM,0BAA0B,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../lib/utils/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../lib/utils/module.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc,QAAa,CAAC;AAEzC;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOrE"}
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BOOTSTRAP_PATH = void 0;
|
|
7
|
-
exports.getWDAUpgradeTimestamp = getWDAUpgradeTimestamp;
|
|
8
|
-
const support_1 = require("@appium/support");
|
|
9
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
-
const node_url_1 = require("node:url");
|
|
11
|
-
// Get current filename - works in both CommonJS and ESM
|
|
12
|
-
const currentFilename = typeof __filename !== 'undefined'
|
|
13
|
-
? __filename
|
|
14
|
-
: (0, node_url_1.fileURLToPath)(new Function('return import.meta.url')());
|
|
15
|
-
const moduleRoot = support_1.node.getModuleRootSync('appium-webdriveragent', currentFilename);
|
|
1
|
+
import { fs, node as supportNode } from '@appium/support';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
const moduleRoot = supportNode.getModuleRootSync('appium-webdriveragent', fileURLToPath(import.meta.url));
|
|
16
5
|
if (!moduleRoot) {
|
|
17
6
|
throw new Error('Cannot find the root folder of the appium-webdriveragent Node.js module');
|
|
18
7
|
}
|
|
19
|
-
|
|
8
|
+
export const BOOTSTRAP_PATH = moduleRoot;
|
|
20
9
|
/**
|
|
21
10
|
* Retrieves WDA upgrade timestamp. The manifest only gets modified on package upgrade.
|
|
22
11
|
*/
|
|
23
|
-
async function getWDAUpgradeTimestamp() {
|
|
24
|
-
const packageManifest =
|
|
25
|
-
if (!(await
|
|
12
|
+
export async function getWDAUpgradeTimestamp() {
|
|
13
|
+
const packageManifest = path.resolve(BOOTSTRAP_PATH, 'package.json');
|
|
14
|
+
if (!(await fs.exists(packageManifest))) {
|
|
26
15
|
return null;
|
|
27
16
|
}
|
|
28
|
-
const { mtime } = await
|
|
17
|
+
const { mtime } = await fs.stat(packageManifest);
|
|
29
18
|
return mtime.getTime();
|
|
30
19
|
}
|
|
31
20
|
//# sourceMappingURL=module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../lib/utils/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../lib/utils/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAE,IAAI,IAAI,WAAW,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAC9C,uBAAuB,EACvB,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC/B,CAAC;AAEF,IAAI,CAAC,UAAU,EAAE,CAAC;IAChB,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;AAC7F,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACrE,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC/C,OAAO,KAAK,CAAC,OAAO,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTvOS = isTvOS;
|
|
4
|
-
const constants_1 = require("../constants");
|
|
1
|
+
import { PLATFORM_NAME_TVOS } from '../constants.js';
|
|
5
2
|
/**
|
|
6
3
|
* Return true if the platformName is tvOS
|
|
7
4
|
* @param platformName The name of the platform
|
|
8
5
|
* @returns Return true if the platformName is tvOS
|
|
9
6
|
*/
|
|
10
|
-
function isTvOS(platformName) {
|
|
11
|
-
return platformName?.toLowerCase() ===
|
|
7
|
+
export function isTvOS(platformName) {
|
|
8
|
+
return platformName?.toLowerCase() === PLATFORM_NAME_TVOS.toLowerCase();
|
|
12
9
|
}
|
|
13
10
|
//# sourceMappingURL=platform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../lib/utils/platform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../lib/utils/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,YAAoB;IACzC,OAAO,YAAY,EAAE,WAAW,EAAE,KAAK,kBAAkB,CAAC,WAAW,EAAE,CAAC;AAC1E,CAAC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.resetTestProcesses = resetTestProcesses;
|
|
5
|
-
exports.getPIDsListeningOnPort = getPIDsListeningOnPort;
|
|
6
|
-
const asyncbox_1 = require("asyncbox");
|
|
7
|
-
const teen_process_1 = require("teen_process");
|
|
8
|
-
const logger_1 = require("../logger");
|
|
1
|
+
import { waitForCondition } from 'asyncbox';
|
|
2
|
+
import { exec } from 'teen_process';
|
|
3
|
+
import { log } from '../logger.js';
|
|
9
4
|
/**
|
|
10
5
|
* Find and terminate all processes matching the given pgrep pattern.
|
|
11
6
|
*/
|
|
12
|
-
async function killAppUsingPattern(pgrepPattern) {
|
|
7
|
+
export async function killAppUsingPattern(pgrepPattern) {
|
|
13
8
|
const signals = [2, 15, 9];
|
|
14
9
|
for (const signal of signals) {
|
|
15
10
|
const matchedPids = await getPIDsUsingPattern(pgrepPattern);
|
|
@@ -18,20 +13,20 @@ async function killAppUsingPattern(pgrepPattern) {
|
|
|
18
13
|
}
|
|
19
14
|
const args = [`-${signal}`, ...matchedPids];
|
|
20
15
|
try {
|
|
21
|
-
await
|
|
16
|
+
await exec('kill', args);
|
|
22
17
|
}
|
|
23
18
|
catch (err) {
|
|
24
|
-
|
|
19
|
+
log.debug(`kill ${args.join(' ')} -> ${err.message}`);
|
|
25
20
|
}
|
|
26
21
|
if (signal === signals[signals.length - 1]) {
|
|
27
22
|
// there is no need to wait after SIGKILL
|
|
28
23
|
return;
|
|
29
24
|
}
|
|
30
25
|
try {
|
|
31
|
-
await
|
|
26
|
+
await waitForCondition(async () => {
|
|
32
27
|
const pidCheckPromises = matchedPids.map(async (pid) => {
|
|
33
28
|
try {
|
|
34
|
-
await
|
|
29
|
+
await exec('kill', ['-0', pid]);
|
|
35
30
|
// the process is still alive
|
|
36
31
|
return false;
|
|
37
32
|
}
|
|
@@ -55,14 +50,14 @@ async function killAppUsingPattern(pgrepPattern) {
|
|
|
55
50
|
/**
|
|
56
51
|
* Kills running XCTest processes for the particular device.
|
|
57
52
|
*/
|
|
58
|
-
async function resetTestProcesses(udid, isSimulator) {
|
|
53
|
+
export async function resetTestProcesses(udid, isSimulator) {
|
|
59
54
|
const processPatterns = [`xcodebuild.*${udid}`];
|
|
60
55
|
if (isSimulator) {
|
|
61
56
|
processPatterns.push(`${udid}.*XCTRunner`);
|
|
62
57
|
// Some XCTest launches might not include xcodebuild in their command line
|
|
63
58
|
processPatterns.push(`xctest.*${udid}`);
|
|
64
59
|
}
|
|
65
|
-
|
|
60
|
+
log.debug(`Killing running processes '${processPatterns.join(', ')}' for the device ${udid}...`);
|
|
66
61
|
await Promise.all(processPatterns.map(killAppUsingPattern));
|
|
67
62
|
}
|
|
68
63
|
/**
|
|
@@ -78,17 +73,17 @@ async function resetTestProcesses(udid, isSimulator) {
|
|
|
78
73
|
* from the resulting array.
|
|
79
74
|
* @returns - the list of matched process ids.
|
|
80
75
|
*/
|
|
81
|
-
async function getPIDsListeningOnPort(port, filteringFunc = null) {
|
|
76
|
+
export async function getPIDsListeningOnPort(port, filteringFunc = null) {
|
|
82
77
|
const result = [];
|
|
83
78
|
try {
|
|
84
79
|
// This only works since Mac OS X El Capitan
|
|
85
|
-
const { stdout } = await
|
|
80
|
+
const { stdout } = await exec('lsof', ['-ti', `tcp:${port}`]);
|
|
86
81
|
result.push(...stdout.trim().split(/\n+/));
|
|
87
82
|
}
|
|
88
83
|
catch (e) {
|
|
89
84
|
if (e.code !== 1) {
|
|
90
85
|
// code 1 means no processes. Other errors need reporting
|
|
91
|
-
|
|
86
|
+
log.debug(`Error getting processes listening on port '${port}': ${e.stderr || e.message}`);
|
|
92
87
|
}
|
|
93
88
|
return result;
|
|
94
89
|
}
|
|
@@ -98,7 +93,7 @@ async function getPIDsListeningOnPort(port, filteringFunc = null) {
|
|
|
98
93
|
const filtered = await Promise.all(result.map(async (pid) => {
|
|
99
94
|
let stdout;
|
|
100
95
|
try {
|
|
101
|
-
({ stdout } = await
|
|
96
|
+
({ stdout } = await exec('ps', ['-p', pid, '-o', 'command']));
|
|
102
97
|
}
|
|
103
98
|
catch (e) {
|
|
104
99
|
if (e.code === 1) {
|
|
@@ -117,7 +112,7 @@ async function getPIDsUsingPattern(pattern) {
|
|
|
117
112
|
pattern,
|
|
118
113
|
];
|
|
119
114
|
try {
|
|
120
|
-
const { stdout } = await
|
|
115
|
+
const { stdout } = await exec('pgrep', args);
|
|
121
116
|
return stdout
|
|
122
117
|
.split(/\s+/)
|
|
123
118
|
.map((x) => parseInt(x, 10))
|
|
@@ -125,7 +120,7 @@ async function getPIDsUsingPattern(pattern) {
|
|
|
125
120
|
.map((x) => `${x}`);
|
|
126
121
|
}
|
|
127
122
|
catch (err) {
|
|
128
|
-
|
|
123
|
+
log.debug(`'pgrep ${args.join(' ')}' didn't detect any matching processes. Return code: ${err.code}`);
|
|
129
124
|
return [];
|
|
130
125
|
}
|
|
131
126
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processes.js","sourceRoot":"","sources":["../../../lib/utils/processes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"processes.js","sourceRoot":"","sources":["../../../lib/utils/processes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAC,GAAG,EAAC,MAAM,cAAc,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,YAAoB;IAC5D,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,MAAM,mBAAmB,CAAC,YAAY,CAAC,CAAC;QAC5D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,OAAO;QACT,CAAC;QACD,MAAM,IAAI,GAAG,CAAC,IAAI,MAAM,EAAE,EAAE,GAAG,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,MAAM,EAAE,I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