appium-xcuitest-driver 10.14.13 → 10.15.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 +6 -0
- package/build/lib/commands/file-movement.d.ts.map +1 -1
- package/build/lib/commands/file-movement.js +73 -45
- package/build/lib/commands/file-movement.js.map +1 -1
- package/build/lib/device/afc-client.d.ts +135 -0
- package/build/lib/device/afc-client.d.ts.map +1 -0
- package/build/lib/device/afc-client.js +422 -0
- package/build/lib/device/afc-client.js.map +1 -0
- package/build/lib/device/real-device-management.d.ts +10 -12
- package/build/lib/device/real-device-management.d.ts.map +1 -1
- package/build/lib/device/real-device-management.js +47 -160
- package/build/lib/device/real-device-management.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/commands/file-movement.ts +100 -56
- package/lib/device/afc-client.ts +503 -0
- package/lib/device/real-device-management.ts +70 -164
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,422 @@
|
|
|
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
|
+
exports.AfcClient = void 0;
|
|
7
|
+
const stream_1 = require("stream");
|
|
8
|
+
const promises_1 = require("stream/promises");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
11
|
+
const bluebird_1 = __importDefault(require("bluebird"));
|
|
12
|
+
const support_1 = require("appium/support");
|
|
13
|
+
const appium_ios_device_1 = require("appium-ios-device");
|
|
14
|
+
const remotexpc_utils_1 = require("./remotexpc-utils");
|
|
15
|
+
const logger_1 = require("../logger");
|
|
16
|
+
const real_device_management_1 = require("./real-device-management");
|
|
17
|
+
/**
|
|
18
|
+
* Unified AFC Client
|
|
19
|
+
*
|
|
20
|
+
* Provides a unified interface for file operations on iOS devices,
|
|
21
|
+
* automatically handling the differences between iOS < 18 (appium-ios-device)
|
|
22
|
+
* and iOS 18 and above (appium-ios-remotexpc).
|
|
23
|
+
*/
|
|
24
|
+
class AfcClient {
|
|
25
|
+
service;
|
|
26
|
+
remoteXPCConnection;
|
|
27
|
+
constructor(service, remoteXPCConnection) {
|
|
28
|
+
this.service = service;
|
|
29
|
+
this.remoteXPCConnection = remoteXPCConnection;
|
|
30
|
+
}
|
|
31
|
+
//#region Public Methods
|
|
32
|
+
/**
|
|
33
|
+
* Create an AFC client for device
|
|
34
|
+
*
|
|
35
|
+
* @param udid - Device UDID
|
|
36
|
+
* @param useRemoteXPC - Whether to use remotexpc (use isIos18OrNewer(opts) to determine)
|
|
37
|
+
* @returns AFC client instance
|
|
38
|
+
*/
|
|
39
|
+
static async createForDevice(udid, useRemoteXPC) {
|
|
40
|
+
if (useRemoteXPC) {
|
|
41
|
+
const client = await AfcClient.withRemoteXpcConnection(async () => {
|
|
42
|
+
const Services = await (0, remotexpc_utils_1.getRemoteXPCServices)();
|
|
43
|
+
const connectionResult = await Services.createRemoteXPCConnection(udid);
|
|
44
|
+
const afcService = await Services.startAfcService(udid);
|
|
45
|
+
return {
|
|
46
|
+
service: afcService,
|
|
47
|
+
connection: connectionResult.remoteXPC,
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
if (client) {
|
|
51
|
+
return client;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const afcService = await appium_ios_device_1.services.startAfcService(udid);
|
|
55
|
+
return new AfcClient(afcService);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create an AFC client for app container access
|
|
59
|
+
*
|
|
60
|
+
* @param udid - Device UDID
|
|
61
|
+
* @param bundleId - App bundle identifier
|
|
62
|
+
* @param useRemoteXPC - Whether to use remotexpc (use isIos18OrNewer(opts) to determine)
|
|
63
|
+
* @param options - Optional configuration for container access
|
|
64
|
+
* @returns AFC client instance
|
|
65
|
+
*/
|
|
66
|
+
static async createForApp(udid, bundleId, useRemoteXPC, options) {
|
|
67
|
+
const { containerType = null, skipDocumentsCheck = false } = options ?? {};
|
|
68
|
+
const isDocuments = !skipDocumentsCheck && containerType?.toLowerCase() === 'documents';
|
|
69
|
+
if (useRemoteXPC) {
|
|
70
|
+
const client = await AfcClient.withRemoteXpcConnection(async () => {
|
|
71
|
+
const Services = await (0, remotexpc_utils_1.getRemoteXPCServices)();
|
|
72
|
+
const connectionResult = await Services.createRemoteXPCConnection(udid);
|
|
73
|
+
const { houseArrestService, remoteXPC: houseArrestRemoteXPC } = await Services.startHouseArrestService(udid);
|
|
74
|
+
const afcService = isDocuments
|
|
75
|
+
? await houseArrestService.vendDocuments(bundleId)
|
|
76
|
+
: await houseArrestService.vendContainer(bundleId);
|
|
77
|
+
// Use the remoteXPC from house arrest service if available, otherwise use the one from connection
|
|
78
|
+
const connection = houseArrestRemoteXPC ?? connectionResult.remoteXPC;
|
|
79
|
+
return {
|
|
80
|
+
service: afcService,
|
|
81
|
+
connection,
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
if (client) {
|
|
85
|
+
return client;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const houseArrestService = await appium_ios_device_1.services.startHouseArrestService(udid);
|
|
89
|
+
const afcService = isDocuments
|
|
90
|
+
? await houseArrestService.vendDocuments(bundleId)
|
|
91
|
+
: await houseArrestService.vendContainer(bundleId);
|
|
92
|
+
return new AfcClient(afcService);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Check if a path is a directory
|
|
96
|
+
*/
|
|
97
|
+
async isDirectory(path) {
|
|
98
|
+
if (this.isRemoteXPC) {
|
|
99
|
+
return await this.remoteXPCAfcService.isdir(path);
|
|
100
|
+
}
|
|
101
|
+
const fileInfo = await this.iosDeviceAfcService.getFileInfo(path);
|
|
102
|
+
return fileInfo.isDirectory();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* List directory contents
|
|
106
|
+
*/
|
|
107
|
+
async listDirectory(path) {
|
|
108
|
+
if (this.isRemoteXPC) {
|
|
109
|
+
return await this.remoteXPCAfcService.listdir(path);
|
|
110
|
+
}
|
|
111
|
+
return await this.iosDeviceAfcService.listDirectory(path);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Create a directory
|
|
115
|
+
*/
|
|
116
|
+
async createDirectory(path) {
|
|
117
|
+
if (this.isRemoteXPC) {
|
|
118
|
+
await this.remoteXPCAfcService.mkdir(path);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
await this.iosDeviceAfcService.createDirectory(path);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Delete a directory or file
|
|
126
|
+
*/
|
|
127
|
+
async deleteDirectory(path) {
|
|
128
|
+
if (this.isRemoteXPC) {
|
|
129
|
+
await this.remoteXPCAfcService.rm(path, true);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
await this.iosDeviceAfcService.deleteDirectory(path);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Get file contents as a buffer
|
|
137
|
+
*/
|
|
138
|
+
async getFileContents(path) {
|
|
139
|
+
if (this.isRemoteXPC) {
|
|
140
|
+
return await this.remoteXPCAfcService.getFileContents(path);
|
|
141
|
+
}
|
|
142
|
+
// For ios-device, use stream-based approach
|
|
143
|
+
const stream = await this.iosDeviceAfcService.createReadStream(path, {
|
|
144
|
+
autoDestroy: true,
|
|
145
|
+
});
|
|
146
|
+
const buffers = [];
|
|
147
|
+
return new Promise((resolve, reject) => {
|
|
148
|
+
stream.on('data', (data) => buffers.push(data));
|
|
149
|
+
stream.on('end', () => resolve(Buffer.concat(buffers)));
|
|
150
|
+
stream.on('error', reject);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Set file contents from a buffer
|
|
155
|
+
*/
|
|
156
|
+
async setFileContents(path, data) {
|
|
157
|
+
if (this.isRemoteXPC) {
|
|
158
|
+
await this.remoteXPCAfcService.setFileContents(path, data);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
// For ios-device, convert buffer to stream and use writeFromStream
|
|
162
|
+
const bufferStream = stream_1.Readable.from([data]);
|
|
163
|
+
return await this.writeFromStream(path, bufferStream);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Write file contents from a readable stream
|
|
167
|
+
*/
|
|
168
|
+
async writeFromStream(path, stream) {
|
|
169
|
+
if (this.isRemoteXPC) {
|
|
170
|
+
await this.remoteXPCAfcService.writeFromStream(path, stream);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const writeStream = await this.iosDeviceAfcService.createWriteStream(path, {
|
|
174
|
+
autoDestroy: true,
|
|
175
|
+
});
|
|
176
|
+
writeStream.on('finish', () => {
|
|
177
|
+
if (typeof writeStream.destroy === 'function') {
|
|
178
|
+
writeStream.destroy();
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
return new Promise((resolve, reject) => {
|
|
182
|
+
writeStream.on('close', resolve);
|
|
183
|
+
const onError = (e) => {
|
|
184
|
+
stream.unpipe(writeStream);
|
|
185
|
+
reject(e);
|
|
186
|
+
};
|
|
187
|
+
writeStream.on('error', onError);
|
|
188
|
+
stream.on('error', onError);
|
|
189
|
+
stream.pipe(writeStream);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Pull files/folders from device to local filesystem.
|
|
194
|
+
* Uses the appropriate mechanism (walkDir for ios-device, pull for remotexpc).
|
|
195
|
+
*
|
|
196
|
+
* @param remotePath - Remote path on the device (file or directory)
|
|
197
|
+
* @param localPath - Local destination path
|
|
198
|
+
* @param options - Pull options (recursive, overwrite, onEntry)
|
|
199
|
+
*/
|
|
200
|
+
async pull(remotePath, localPath, options = {}) {
|
|
201
|
+
if (this.isRemoteXPC) {
|
|
202
|
+
// RemoteXPC expects 'callback' property, so map onEntry -> callback
|
|
203
|
+
const remoteXpcOptions = {
|
|
204
|
+
...options,
|
|
205
|
+
callback: options.onEntry,
|
|
206
|
+
};
|
|
207
|
+
delete remoteXpcOptions.onEntry;
|
|
208
|
+
await this.remoteXPCAfcService.pull(remotePath, localPath, remoteXpcOptions);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
await this.pullWithWalkDir(remotePath, localPath, options);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Close the AFC service connection and remoteXPC connection if present
|
|
216
|
+
*/
|
|
217
|
+
async close() {
|
|
218
|
+
this.service.close();
|
|
219
|
+
if (this.remoteXPCConnection) {
|
|
220
|
+
try {
|
|
221
|
+
await this.remoteXPCConnection.close();
|
|
222
|
+
}
|
|
223
|
+
catch { }
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region Private Methods
|
|
228
|
+
/**
|
|
229
|
+
* Check if this client is using RemoteXPC
|
|
230
|
+
*/
|
|
231
|
+
get isRemoteXPC() {
|
|
232
|
+
return !!this.remoteXPCConnection;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Helper to safely execute remoteXPC operations with connection cleanup
|
|
236
|
+
* @param operation - Async operation that returns an AfcClient
|
|
237
|
+
* @returns AfcClient on success, null on failure
|
|
238
|
+
*/
|
|
239
|
+
static async withRemoteXpcConnection(operation) {
|
|
240
|
+
let remoteXPCConnection;
|
|
241
|
+
let succeeded = false;
|
|
242
|
+
try {
|
|
243
|
+
const { service, connection } = await operation();
|
|
244
|
+
remoteXPCConnection = connection;
|
|
245
|
+
const client = new AfcClient(service, remoteXPCConnection);
|
|
246
|
+
succeeded = true;
|
|
247
|
+
return client;
|
|
248
|
+
}
|
|
249
|
+
catch (err) {
|
|
250
|
+
logger_1.log.error(`Failed to create AFC client via RemoteXPC: ${err.message}, falling back to appium-ios-device`);
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
253
|
+
finally {
|
|
254
|
+
// Only close connection if we failed (if succeeded, the client owns it)
|
|
255
|
+
if (remoteXPCConnection && !succeeded) {
|
|
256
|
+
try {
|
|
257
|
+
await remoteXPCConnection.close();
|
|
258
|
+
}
|
|
259
|
+
catch {
|
|
260
|
+
// Ignore cleanup errors
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Get service as RemoteXPC AFC service
|
|
267
|
+
*/
|
|
268
|
+
get remoteXPCAfcService() {
|
|
269
|
+
return this.service;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Get service as iOS Device AFC service
|
|
273
|
+
*/
|
|
274
|
+
get iosDeviceAfcService() {
|
|
275
|
+
return this.service;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Create a read stream for a file (internal use only).
|
|
279
|
+
*/
|
|
280
|
+
async createReadStream(remotePath, options) {
|
|
281
|
+
if (this.isRemoteXPC) {
|
|
282
|
+
// Use readToStream which returns a streaming Readable
|
|
283
|
+
return await this.remoteXPCAfcService.readToStream(remotePath);
|
|
284
|
+
}
|
|
285
|
+
return await this.iosDeviceAfcService.createReadStream(remotePath, options);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Internal implementation of pull for ios-device using walkDir.
|
|
289
|
+
* Walks the remote directory tree and pulls files to local filesystem.
|
|
290
|
+
*/
|
|
291
|
+
async pullWithWalkDir(remotePath, localPath, options) {
|
|
292
|
+
const { recursive = false, overwrite = true, onEntry } = options;
|
|
293
|
+
const isDir = await this.isDirectory(remotePath);
|
|
294
|
+
if (!isDir) {
|
|
295
|
+
// Single file pull
|
|
296
|
+
const localFilePath = (await this.isLocalDirectory(localPath))
|
|
297
|
+
? path_1.default.join(localPath, path_1.default.posix.basename(remotePath))
|
|
298
|
+
: localPath;
|
|
299
|
+
await this.checkOverwrite(localFilePath, overwrite);
|
|
300
|
+
await this.pullSingleFile(remotePath, localFilePath);
|
|
301
|
+
if (onEntry) {
|
|
302
|
+
await onEntry(remotePath, localFilePath, false);
|
|
303
|
+
}
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
// Directory pull requires recursive option
|
|
307
|
+
if (!recursive) {
|
|
308
|
+
throw new Error(`Cannot pull directory '${remotePath}' without recursive option. Set recursive: true to pull directories.`);
|
|
309
|
+
}
|
|
310
|
+
// Determine local root directory
|
|
311
|
+
const localDstIsDirectory = await this.isLocalDirectory(localPath);
|
|
312
|
+
const localRootDir = localDstIsDirectory
|
|
313
|
+
? path_1.default.join(localPath, path_1.default.posix.basename(remotePath))
|
|
314
|
+
: localPath;
|
|
315
|
+
// Create the root directory
|
|
316
|
+
await (0, support_1.mkdirp)(localRootDir);
|
|
317
|
+
if (onEntry) {
|
|
318
|
+
await onEntry(remotePath, localRootDir, true);
|
|
319
|
+
}
|
|
320
|
+
const pullPromises = [];
|
|
321
|
+
// Walk the remote directory and pull files in parallel
|
|
322
|
+
await this.iosDeviceAfcService.walkDir(remotePath, true, async (entryPath, isDirectory) => {
|
|
323
|
+
// Calculate relative path from remote root
|
|
324
|
+
const relativePath = entryPath.startsWith(remotePath + '/')
|
|
325
|
+
? entryPath.slice(remotePath.length + 1)
|
|
326
|
+
: entryPath.slice(remotePath.length);
|
|
327
|
+
const localEntryPath = path_1.default.join(localRootDir, relativePath);
|
|
328
|
+
if (isDirectory) {
|
|
329
|
+
await (0, support_1.mkdirp)(localEntryPath);
|
|
330
|
+
if (onEntry) {
|
|
331
|
+
await onEntry(entryPath, localEntryPath, true);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
await this.checkOverwrite(localEntryPath, overwrite);
|
|
336
|
+
// Ensure parent directory exists
|
|
337
|
+
const parentDir = path_1.default.dirname(localEntryPath);
|
|
338
|
+
await (0, support_1.mkdirp)(parentDir);
|
|
339
|
+
// Start async file pull (non-blocking)
|
|
340
|
+
const readStream = await this.iosDeviceAfcService.createReadStream(entryPath, {
|
|
341
|
+
autoDestroy: true,
|
|
342
|
+
});
|
|
343
|
+
const writeStream = support_1.fs.createWriteStream(localEntryPath, { autoClose: true });
|
|
344
|
+
pullPromises.push(new bluebird_1.default((resolve) => {
|
|
345
|
+
writeStream.on('close', async () => {
|
|
346
|
+
// Invoke onEntry callback after successful pull
|
|
347
|
+
if (onEntry) {
|
|
348
|
+
try {
|
|
349
|
+
await onEntry(entryPath, localEntryPath, false);
|
|
350
|
+
}
|
|
351
|
+
catch (err) {
|
|
352
|
+
logger_1.log.warn(`onEntry callback failed for '${entryPath}': ${err.message}`);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
resolve();
|
|
356
|
+
});
|
|
357
|
+
const onStreamingError = (e) => {
|
|
358
|
+
readStream.unpipe(writeStream);
|
|
359
|
+
logger_1.log.warn(`Cannot pull '${entryPath}' to '${localEntryPath}'. ` +
|
|
360
|
+
`The file will be skipped. Original error: ${e.message}`);
|
|
361
|
+
resolve();
|
|
362
|
+
};
|
|
363
|
+
writeStream.on('error', onStreamingError);
|
|
364
|
+
readStream.on('error', onStreamingError);
|
|
365
|
+
}).timeout(real_device_management_1.IO_TIMEOUT_MS));
|
|
366
|
+
readStream.pipe(writeStream);
|
|
367
|
+
if (pullPromises.length >= real_device_management_1.MAX_IO_CHUNK_SIZE) {
|
|
368
|
+
await bluebird_1.default.any(pullPromises);
|
|
369
|
+
for (let i = pullPromises.length - 1; i >= 0; i--) {
|
|
370
|
+
if (pullPromises[i].isFulfilled()) {
|
|
371
|
+
pullPromises.splice(i, 1);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
// Wait for remaining files to be pulled
|
|
378
|
+
if (!lodash_1.default.isEmpty(pullPromises)) {
|
|
379
|
+
await bluebird_1.default.all(pullPromises);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Check if local file exists and should not be overwritten.
|
|
384
|
+
* Throws an error if the file exists and overwrite is false.
|
|
385
|
+
*
|
|
386
|
+
* @param localPath - Local file path to check
|
|
387
|
+
* @param overwrite - Whether to allow overwriting existing files
|
|
388
|
+
*/
|
|
389
|
+
async checkOverwrite(localPath, overwrite) {
|
|
390
|
+
if (!overwrite && await support_1.fs.exists(localPath)) {
|
|
391
|
+
throw new Error(`Local file already exists: ${localPath}`);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Pull a single file from device to local filesystem using streams.
|
|
396
|
+
* This method only works for ios-device.
|
|
397
|
+
*
|
|
398
|
+
* @param remotePath - Remote file path
|
|
399
|
+
* @param localPath - Local destination path
|
|
400
|
+
*/
|
|
401
|
+
async pullSingleFile(remotePath, localPath) {
|
|
402
|
+
const readStream = await this.iosDeviceAfcService.createReadStream(remotePath, {
|
|
403
|
+
autoDestroy: true,
|
|
404
|
+
});
|
|
405
|
+
const writeStream = support_1.fs.createWriteStream(localPath, { autoClose: true });
|
|
406
|
+
await (0, promises_1.pipeline)(readStream, writeStream);
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Check if a local path exists and is a directory.
|
|
410
|
+
*/
|
|
411
|
+
async isLocalDirectory(localPath) {
|
|
412
|
+
try {
|
|
413
|
+
const stats = await support_1.fs.stat(localPath);
|
|
414
|
+
return stats.isDirectory();
|
|
415
|
+
}
|
|
416
|
+
catch {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
exports.AfcClient = AfcClient;
|
|
422
|
+
//# sourceMappingURL=afc-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"afc-client.js","sourceRoot":"","sources":["../../../lib/device/afc-client.ts"],"names":[],"mappings":";;;;;;AACA,mCAAkD;AAClD,8CAAyC;AACzC,gDAAwB;AACxB,oDAAuB;AACvB,wDAAyB;AACzB,4CAA0C;AAC1C,yDAA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AW,GAAG,YAAE,CAAC,iBAAiB,CAAC,SAAS,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;QAEvE,MAAM,IAAA,mBAAQ,EAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QAC9C,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,YAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACvC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;QAC7B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CAGF;AA5cD,8BA4cC"}
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
import { Devicectl } from 'node-devicectl';
|
|
2
2
|
import type { AppiumLogger } from '@appium/types';
|
|
3
3
|
import type { XCUITestDriver } from '../driver';
|
|
4
|
+
import { AfcClient } from './afc-client';
|
|
4
5
|
export declare const IO_TIMEOUT_MS: number;
|
|
6
|
+
export declare const MAX_IO_CHUNK_SIZE = 8;
|
|
5
7
|
/**
|
|
6
8
|
* Retrieve a file from a real device
|
|
7
9
|
*
|
|
8
|
-
* @param
|
|
9
|
-
* 'appium-ios-device' module
|
|
10
|
+
* @param client AFC client instance
|
|
10
11
|
* @param remotePath Relative path to the file on the device
|
|
11
12
|
* @returns The file content as a buffer
|
|
12
13
|
*/
|
|
13
|
-
export declare function pullFile(
|
|
14
|
+
export declare function pullFile(client: AfcClient, remotePath: string): Promise<Buffer>;
|
|
14
15
|
/**
|
|
15
16
|
* Retrieve a folder from a real device
|
|
16
17
|
*
|
|
17
|
-
* @param
|
|
18
|
-
* 'appium-ios-device' module
|
|
18
|
+
* @param client AFC client instance
|
|
19
19
|
* @param remoteRootPath Relative path to the folder on the device
|
|
20
20
|
* @returns The folder content as a zipped base64-encoded buffer
|
|
21
21
|
*/
|
|
22
|
-
export declare function pullFolder(
|
|
22
|
+
export declare function pullFolder(client: AfcClient, remoteRootPath: string): Promise<Buffer>;
|
|
23
23
|
/**
|
|
24
24
|
* Pushes a file to a real device
|
|
25
25
|
*
|
|
26
|
-
* @param
|
|
27
|
-
* 'appium-ios-device' module
|
|
26
|
+
* @param client AFC client instance
|
|
28
27
|
* @param localPathOrPayload Either full path to the source file
|
|
29
28
|
* or a buffer payload to be written into the remote destination
|
|
30
29
|
* @param remotePath Relative path to the file on the device. The remote
|
|
31
30
|
* folder structure is created automatically if necessary.
|
|
32
31
|
* @param opts Push file options
|
|
33
32
|
*/
|
|
34
|
-
export declare function pushFile(
|
|
33
|
+
export declare function pushFile(client: AfcClient, localPathOrPayload: string | Buffer, remotePath: string, opts?: PushFileOptions): Promise<void>;
|
|
35
34
|
/**
|
|
36
35
|
* Pushes a folder to a real device
|
|
37
36
|
*
|
|
38
|
-
* @param
|
|
39
|
-
* 'appium-ios-device' module
|
|
37
|
+
* @param client AFC client instance
|
|
40
38
|
* @param srcRootPath The full path to the source folder
|
|
41
39
|
* @param dstRootPath The relative path to the destination folder. The folder
|
|
42
40
|
* will be deleted if already exists.
|
|
43
41
|
* @param opts Push folder options
|
|
44
42
|
*/
|
|
45
|
-
export declare function pushFolder(
|
|
43
|
+
export declare function pushFolder(client: AfcClient, srcRootPath: string, dstRootPath: string, opts?: PushFolderOptions): Promise<void>;
|
|
46
44
|
/**
|
|
47
45
|
* Get list of connected devices
|
|
48
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"real-device-management.d.ts","sourceRoot":"","sources":["../../../lib/device/real-device-management.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"real-device-management.d.ts","sourceRoot":"","sources":["../../../lib/device/real-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