appium-mac2-driver 3.2.2 → 3.2.4

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/build/lib/commands/app-management.d.ts +18 -21
  3. package/build/lib/commands/app-management.d.ts.map +1 -1
  4. package/build/lib/commands/app-management.js +14 -25
  5. package/build/lib/commands/app-management.js.map +1 -1
  6. package/build/lib/commands/applescript.d.ts +8 -9
  7. package/build/lib/commands/applescript.d.ts.map +1 -1
  8. package/build/lib/commands/applescript.js +14 -13
  9. package/build/lib/commands/applescript.js.map +1 -1
  10. package/build/lib/commands/execute.d.ts +5 -8
  11. package/build/lib/commands/execute.d.ts.map +1 -1
  12. package/build/lib/commands/execute.js +5 -13
  13. package/build/lib/commands/execute.js.map +1 -1
  14. package/build/lib/commands/find.d.ts +6 -8
  15. package/build/lib/commands/find.d.ts.map +1 -1
  16. package/build/lib/commands/find.js +8 -13
  17. package/build/lib/commands/find.js.map +1 -1
  18. package/build/lib/commands/gestures.d.ts +105 -118
  19. package/build/lib/commands/gestures.d.ts.map +1 -1
  20. package/build/lib/commands/gestures.js +141 -154
  21. package/build/lib/commands/gestures.js.map +1 -1
  22. package/build/lib/commands/navigation.d.ts +4 -6
  23. package/build/lib/commands/navigation.d.ts.map +1 -1
  24. package/build/lib/commands/navigation.js +2 -8
  25. package/build/lib/commands/navigation.js.map +1 -1
  26. package/build/lib/commands/record-screen.d.ts +57 -98
  27. package/build/lib/commands/record-screen.d.ts.map +1 -1
  28. package/build/lib/commands/record-screen.js +81 -84
  29. package/build/lib/commands/record-screen.js.map +1 -1
  30. package/build/lib/commands/screenshots.d.ts +5 -5
  31. package/build/lib/commands/screenshots.d.ts.map +1 -1
  32. package/build/lib/commands/screenshots.js +3 -8
  33. package/build/lib/commands/screenshots.js.map +1 -1
  34. package/build/lib/commands/source.d.ts +4 -5
  35. package/build/lib/commands/source.d.ts.map +1 -1
  36. package/build/lib/commands/source.js +3 -8
  37. package/build/lib/commands/source.js.map +1 -1
  38. package/build/lib/doctor/optional-checks.d.ts +12 -10
  39. package/build/lib/doctor/optional-checks.d.ts.map +1 -1
  40. package/build/lib/doctor/optional-checks.js +9 -9
  41. package/build/lib/doctor/optional-checks.js.map +1 -1
  42. package/build/lib/doctor/required-checks.d.ts +12 -10
  43. package/build/lib/doctor/required-checks.d.ts.map +1 -1
  44. package/build/lib/doctor/required-checks.js +9 -9
  45. package/build/lib/doctor/required-checks.js.map +1 -1
  46. package/build/lib/doctor/utils.d.ts +3 -3
  47. package/build/lib/doctor/utils.d.ts.map +1 -1
  48. package/build/lib/doctor/utils.js +2 -2
  49. package/build/lib/doctor/utils.js.map +1 -1
  50. package/build/lib/logger.d.ts +1 -1
  51. package/build/lib/logger.d.ts.map +1 -1
  52. package/build/lib/logger.js.map +1 -1
  53. package/build/lib/utils.d.ts +11 -11
  54. package/build/lib/utils.d.ts.map +1 -1
  55. package/build/lib/utils.js +6 -7
  56. package/build/lib/utils.js.map +1 -1
  57. package/lib/commands/app-management.ts +88 -0
  58. package/lib/commands/{applescript.js → applescript.ts} +28 -24
  59. package/lib/commands/execute.ts +32 -0
  60. package/lib/commands/find.ts +34 -0
  61. package/lib/commands/{gestures.js → gestures.ts} +333 -238
  62. package/lib/commands/navigation.ts +19 -0
  63. package/lib/commands/{record-screen.js → record-screen.ts} +165 -138
  64. package/lib/commands/screenshots.ts +18 -0
  65. package/lib/commands/{source.js → source.ts} +10 -11
  66. package/lib/doctor/optional-checks.ts +67 -0
  67. package/lib/doctor/required-checks.ts +75 -0
  68. package/lib/doctor/{utils.js → utils.ts} +4 -3
  69. package/lib/{logger.js → logger.ts} +1 -0
  70. package/lib/{utils.js → utils.ts} +8 -10
  71. package/npm-shrinkwrap.json +13 -13
  72. package/package.json +1 -1
  73. package/lib/commands/app-management.js +0 -83
  74. package/lib/commands/execute.js +0 -33
  75. package/lib/commands/find.js +0 -31
  76. package/lib/commands/navigation.js +0 -18
  77. package/lib/commands/screenshots.js +0 -18
  78. package/lib/doctor/optional-checks.js +0 -64
  79. package/lib/doctor/required-checks.js +0 -72
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../lib/commands/navigation.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,yEANW,MAAM,aACN,MAAM,GAGJ,OAAO,CAAC,OAAO,CAAC,CAI5B;yBAGY,OAAO,WAAW,EAAE,UAAU"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../lib/commands/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CAElB"}
@@ -5,18 +5,12 @@ exports.macosDeepLink = macosDeepLink;
5
5
  * Opens the given URL with the default or the given application.
6
6
  * Xcode must be at version 14.3+.
7
7
  *
8
- * @this {Mac2Driver}
9
- * @param {string} url The URL to be opened.
10
- * @param {string} [bundleId] The bundle identifier of an application to open
8
+ * @param url - The URL to be opened.
9
+ * @param bundleId - The bundle identifier of an application to open
11
10
  * the given url with. If not provided then the default application
12
11
  * for the given url scheme is going to be used.
13
- * @returns {Promise<unknown>}
14
12
  */
15
13
  async function macosDeepLink(url, bundleId) {
16
14
  return await this.wda.proxy.command('/url', 'POST', { url, bundleId });
17
15
  }
18
- ;
19
- /**
20
- * @typedef {import('../driver').Mac2Driver} Mac2Driver
21
- */
22
16
  //# sourceMappingURL=navigation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../lib/commands/navigation.js"],"names":[],"mappings":";;AAWA,sCAEC;AAbD;;;;;;;;;;GAUG;AACI,KAAK,UAAU,aAAa,CAAE,GAAG,EAAE,QAAQ;IAChD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAC,GAAG,EAAE,QAAQ,EAAC,CAAC,CAAC;AACvE,CAAC;AAAA,CAAC;AAEF;;GAEG"}
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../lib/commands/navigation.ts"],"names":[],"mappings":";;AAWA,sCAMC;AAfD;;;;;;;;GAQG;AACI,KAAK,UAAU,aAAa,CAEjC,GAAW,EACX,QAAiB;IAEjB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AACzE,CAAC"}
@@ -1,3 +1,39 @@
1
+ import type { Mac2Driver } from '../driver';
2
+ import type { AppiumLogger, StringRecord } from '@appium/types';
3
+ type Preset = 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium' | 'slow' | 'slower' | 'veryslow';
4
+ interface ScreenRecorderOptions {
5
+ fps?: number;
6
+ deviceId: string | number;
7
+ preset?: Preset;
8
+ captureCursor?: boolean;
9
+ captureClicks?: boolean;
10
+ videoFilter?: string;
11
+ timeLimit?: number;
12
+ }
13
+ export declare class ScreenRecorder {
14
+ private readonly _log;
15
+ private readonly _videoPath;
16
+ private _process;
17
+ private readonly _fps;
18
+ private readonly _deviceId;
19
+ private readonly _captureCursor?;
20
+ private readonly _captureClicks?;
21
+ private readonly _preset;
22
+ private readonly _videoFilter?;
23
+ private readonly _timeLimit;
24
+ /**
25
+ *
26
+ * @param videoPath - Path to the video file
27
+ * @param log - Logger instance
28
+ * @param opts - Screen recorder options
29
+ */
30
+ constructor(videoPath: string, log: AppiumLogger, opts: ScreenRecorderOptions);
31
+ getVideoPath(): Promise<string>;
32
+ isRunning(): boolean;
33
+ start(): Promise<void>;
34
+ stop(force?: boolean): Promise<string>;
35
+ private _enforceTermination;
36
+ }
1
37
  /**
2
38
  * Record the display in background while the automated test is running.
3
39
  * This method requires FFMPEG (https://www.ffmpeg.org/download.html) to be installed
@@ -5,133 +41,56 @@
5
41
  * in System Preferences->Security & Privacy->Screen Recording.
6
42
  * The resulting video uses H264 codec and is ready to be played by media players built-in into web browsers.
7
43
  *
8
- * @this {Mac2Driver}
9
- * @param {string|number} deviceId Screen device index to use for the recording.
44
+ * @param deviceId - Screen device index to use for the recording.
10
45
  * The list of available devices could be retrieved using
11
46
  * `ffmpeg -f avfoundation -list_devices true -i` command.
12
- * @param {string|number} [timeLimit] The maximum recording time, in seconds. The default
47
+ * @param timeLimit - The maximum recording time, in seconds. The default
13
48
  * value is 600 seconds (10 minutes).
14
- * @param {string} [videoFilter] The video filter spec to apply for ffmpeg.
49
+ * @param videoFilter - The video filter spec to apply for ffmpeg.
15
50
  * See https://trac.ffmpeg.org/wiki/FilteringGuide for more details on the possible values.
16
51
  * Example: Set it to `scale=ifnot(gte(iw\,1024)\,iw\,1024):-2` in order to limit the video width
17
52
  * to 1024px. The height will be adjusted automatically to match the actual ratio.
18
- * @param {string|number} [fps] The count of frames per second in the resulting video.
53
+ * @param fps - The count of frames per second in the resulting video.
19
54
  * The greater fps it has the bigger file size is. 15 by default.
20
- * @param {'ultrafast'|'superfast'|'veryfast'|'faster'|'fast'|'medium'|'slow'|'slower'|'veryslow'} [preset]
21
- * One of the supported encoding presets. A preset is a collection of options that will provide a
55
+ * @param preset - One of the supported encoding presets. A preset is a collection of options that will provide a
22
56
  * certain encoding speed to compression ratio.
23
57
  * A slower preset will provide better compression (compression is quality per filesize).
24
58
  * This means that, for example, if you target a certain file size or constant bit rate, you will
25
59
  * achieve better quality with a slower preset. Read https://trac.ffmpeg.org/wiki/Encode/H.264 for more details.
26
60
  * `veryfast` by default
27
- * @param {boolean} [captureCursor] Whether to capture the mouse cursor while recording the screen.
61
+ * @param captureCursor - Whether to capture the mouse cursor while recording the screen.
28
62
  * False by default
29
- * @param {boolean} [captureClicks] Whether to capture mouse clicks while recording the screen.
63
+ * @param captureClicks - Whether to capture mouse clicks while recording the screen.
30
64
  * False by default.
31
- * @param {boolean} [forceRestart=true] Whether to ignore the call if a screen recording is currently running
32
- * (`false`) or to start a new recording immediately and terminate the existing one
33
- * if running (`true`). The default value is `true`.
65
+ * @param forceRestart - Whether to ignore the call if a screen recording is currently running
66
+ * (`false`) or to start a new recording immediately and terminate the existing one
67
+ * if running (`true`). The default value is `true`.
34
68
  * @throws {Error} If screen recording has failed to start or is not supported on the device under test.
35
69
  */
36
- export function startRecordingScreen(this: import("../driver").Mac2Driver, deviceId: string | number, timeLimit?: string | number, videoFilter?: string, fps?: string | number, preset?: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow", captureCursor?: boolean, captureClicks?: boolean, forceRestart?: boolean): Promise<void>;
37
- export class startRecordingScreen {
38
- /**
39
- * Record the display in background while the automated test is running.
40
- * This method requires FFMPEG (https://www.ffmpeg.org/download.html) to be installed
41
- * and present in PATH. Also, the Appium process must be allowed to access screen recording
42
- * in System Preferences->Security & Privacy->Screen Recording.
43
- * The resulting video uses H264 codec and is ready to be played by media players built-in into web browsers.
44
- *
45
- * @this {Mac2Driver}
46
- * @param {string|number} deviceId Screen device index to use for the recording.
47
- * The list of available devices could be retrieved using
48
- * `ffmpeg -f avfoundation -list_devices true -i` command.
49
- * @param {string|number} [timeLimit] The maximum recording time, in seconds. The default
50
- * value is 600 seconds (10 minutes).
51
- * @param {string} [videoFilter] The video filter spec to apply for ffmpeg.
52
- * See https://trac.ffmpeg.org/wiki/FilteringGuide for more details on the possible values.
53
- * Example: Set it to `scale=ifnot(gte(iw\,1024)\,iw\,1024):-2` in order to limit the video width
54
- * to 1024px. The height will be adjusted automatically to match the actual ratio.
55
- * @param {string|number} [fps] The count of frames per second in the resulting video.
56
- * The greater fps it has the bigger file size is. 15 by default.
57
- * @param {'ultrafast'|'superfast'|'veryfast'|'faster'|'fast'|'medium'|'slow'|'slower'|'veryslow'} [preset]
58
- * One of the supported encoding presets. A preset is a collection of options that will provide a
59
- * certain encoding speed to compression ratio.
60
- * A slower preset will provide better compression (compression is quality per filesize).
61
- * This means that, for example, if you target a certain file size or constant bit rate, you will
62
- * achieve better quality with a slower preset. Read https://trac.ffmpeg.org/wiki/Encode/H.264 for more details.
63
- * `veryfast` by default
64
- * @param {boolean} [captureCursor] Whether to capture the mouse cursor while recording the screen.
65
- * False by default
66
- * @param {boolean} [captureClicks] Whether to capture mouse clicks while recording the screen.
67
- * False by default.
68
- * @param {boolean} [forceRestart=true] Whether to ignore the call if a screen recording is currently running
69
- * (`false`) or to start a new recording immediately and terminate the existing one
70
- * if running (`true`). The default value is `true`.
71
- * @throws {Error} If screen recording has failed to start or is not supported on the device under test.
72
- */
73
- constructor(this: import("../driver").Mac2Driver, deviceId: string | number, timeLimit?: string | number, videoFilter?: string, fps?: string | number, preset?: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow", captureCursor?: boolean, captureClicks?: boolean, forceRestart?: boolean);
74
- _screenRecorder: ScreenRecorder;
75
- }
70
+ export declare function startRecordingScreen(this: Mac2Driver, deviceId: string | number, timeLimit?: string | number, videoFilter?: string, fps?: string | number, preset?: Preset, captureCursor?: boolean, captureClicks?: boolean, forceRestart?: boolean): Promise<void>;
76
71
  /**
77
72
  * Stop recording the screen.
78
73
  * If no screen recording has been started before then the method returns an empty string.
79
74
  *
80
- * @param {string} [remotePath] The path to the remote location, where the resulting video should be uploaded.
75
+ * @param remotePath - The path to the remote location, where the resulting video should be uploaded.
81
76
  * The following protocols are supported: http/https, ftp.
82
77
  * Null or empty string value (the default setting) means the content of resulting
83
78
  * file should be encoded as Base64 and passed as the endpoint response value.
84
79
  * An exception will be thrown if the generated media file is too big to
85
80
  * fit into the available process memory.
86
- * @param {string} [user] The name of the user for the remote authentication.
87
- * @param {string} [pass] The password for the remote authentication.
88
- * @param {string} [method] The http multipart upload method name. The 'PUT' one is used by default.
89
- * @param {import('@appium/types').StringRecord|[string, any][]} [headers]
90
- * Additional headers mapping for multipart http(s) uploads
91
- * @param {string} [fileFieldName] The name of the form field, where the file content BLOB should
81
+ * @param user - The name of the user for the remote authentication.
82
+ * @param pass - The password for the remote authentication.
83
+ * @param method - The http multipart upload method name. The 'PUT' one is used by default.
84
+ * @param headers - Additional headers mapping for multipart http(s) uploads
85
+ * @param fileFieldName - The name of the form field, where the file content BLOB should
92
86
  * be stored for http(s) uploads
93
- * @param {import('@appium/types').StringRecord|[string, string][]} [formFields]
94
- * Additional form fields for multipart http(s) uploads
95
- * @returns {Promise<string>} Base64-encoded content of the recorded media file if 'remotePath'
87
+ * @param formFields - Additional form fields for multipart http(s) uploads
88
+ * @returns Base64-encoded content of the recorded media file if 'remotePath'
96
89
  * parameter is falsy or an empty string.
97
- * @this {Mac2Driver}
98
90
  * @throws {Error} If there was an error while getting the name of a media file
99
91
  * or the file content cannot be uploaded to the remote location
100
92
  * or screen recording is not supported on the device under test.
101
93
  */
102
- export function stopRecordingScreen(this: import("../driver").Mac2Driver, remotePath?: string, user?: string, pass?: string, method?: string, headers?: import("@appium/types").StringRecord | [string, any][], fileFieldName?: string, formFields?: import("@appium/types").StringRecord | [string, string][]): Promise<string>;
103
- export class ScreenRecorder {
104
- /**
105
- *
106
- * @param {string} videoPath
107
- * @param {import('@appium/types').AppiumLogger} log
108
- * @param {ScreenRecorderOptions} opts
109
- */
110
- constructor(videoPath: string, log: import("@appium/types").AppiumLogger, opts: ScreenRecorderOptions);
111
- _log: import("@appium/types").AppiumLogger;
112
- _videoPath: string;
113
- _process: any;
114
- _fps: number;
115
- _deviceId: string | number;
116
- _captureCursor: boolean | undefined;
117
- _captureClicks: boolean | undefined;
118
- _preset: string;
119
- _videoFilter: string | undefined;
120
- _timeLimit: number;
121
- getVideoPath(): Promise<string>;
122
- isRunning(): boolean;
123
- _enforceTermination(): Promise<string>;
124
- start(): Promise<void>;
125
- stop(force?: boolean): Promise<any>;
126
- }
127
- export type Mac2Driver = import("../driver").Mac2Driver;
128
- export type ScreenRecorderOptions = {
129
- fps?: number | undefined;
130
- deviceId: string | number;
131
- preset?: string | undefined;
132
- captureCursor?: boolean | undefined;
133
- captureClicks?: boolean | undefined;
134
- videoFilter?: string | undefined;
135
- timeLimit?: number | undefined;
136
- };
94
+ export declare function stopRecordingScreen(this: Mac2Driver, remotePath?: string | null, user?: string, pass?: string, method?: string, headers?: StringRecord | [string, any][], fileFieldName?: string, formFields?: StringRecord | [string, string][]): Promise<string>;
95
+ export {};
137
96
  //# sourceMappingURL=record-screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"record-screen.d.ts","sourceRoot":"","sources":["../../../lib/commands/record-screen.js"],"names":[],"mappings":"AAgLA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qFA3BW,MAAM,GAAC,MAAM,cAGb,MAAM,GAAC,MAAM,gBAEb,MAAM,QAIN,MAAM,GAAC,MAAM,WAEb,WAAW,GAAC,WAAW,GAAC,UAAU,GAAC,QAAQ,GAAC,MAAM,GAAC,QAAQ,GAAC,MAAM,GAAC,QAAQ,GAAC,UAAU,kBAOtF,OAAO,kBAEP,OAAO,iBAEP,OAAO,iBAkDjB;;IAhFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,4DA3BW,MAAM,GAAC,MAAM,cAGb,MAAM,GAAC,MAAM,gBAEb,MAAM,QAIN,MAAM,GAAC,MAAM,WAEb,WAAW,GAAC,WAAW,GAAC,UAAU,GAAC,QAAQ,GAAC,MAAM,GAAC,QAAQ,GAAC,MAAM,GAAC,QAAQ,GAAC,UAAU,kBAOtF,OAAO,kBAEP,OAAO,iBAEP,OAAO,EAkDjB;IArBC,gCAA2B;;AAuB7B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,uFAtBW,MAAM,SAMN,MAAM,SACN,MAAM,WACN,MAAM,YACN,OAAO,eAAe,EAAE,YAA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CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,YAAY,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EACxC,aAAa,CAAC,EAAE,MAAM,EACtB,UAAU,CAAC,EAAE,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAC7C,OAAO,CAAC,MAAM,CAAC,CAqBjB"}
@@ -21,37 +21,45 @@ const FFMPEG_BINARY = 'ffmpeg';
21
21
  const DEFAULT_FPS = 15;
22
22
  const DEFAULT_PRESET = 'veryfast';
23
23
  /**
24
- * @param {import('@appium/types').AppiumLogger} log
24
+ * @param log - Logger instance
25
25
  */
26
26
  async function requireFfmpegPath(log) {
27
27
  try {
28
28
  return await support_1.fs.which(FFMPEG_BINARY);
29
29
  }
30
30
  catch {
31
- throw log.errorWithException(`${FFMPEG_BINARY} has not been found in PATH. ` +
32
- `Please make sure it is installed`);
31
+ throw log.errorWithException(`${FFMPEG_BINARY} has not been found in PATH. ` + `Please make sure it is installed`);
33
32
  }
34
33
  }
35
34
  class ScreenRecorder {
35
+ _log;
36
+ _videoPath;
37
+ _process;
38
+ _fps;
39
+ _deviceId;
40
+ _captureCursor;
41
+ _captureClicks;
42
+ _preset;
43
+ _videoFilter;
44
+ _timeLimit;
36
45
  /**
37
46
  *
38
- * @param {string} videoPath
39
- * @param {import('@appium/types').AppiumLogger} log
40
- * @param {ScreenRecorderOptions} opts
47
+ * @param videoPath - Path to the video file
48
+ * @param log - Logger instance
49
+ * @param opts - Screen recorder options
41
50
  */
42
51
  constructor(videoPath, log, opts) {
43
52
  this._log = log;
44
53
  this._videoPath = videoPath;
45
54
  this._process = null;
46
- this._fps = (opts.fps && opts.fps > 0) ? opts.fps : DEFAULT_FPS;
55
+ this._fps = opts.fps && opts.fps > 0 ? opts.fps : DEFAULT_FPS;
47
56
  this._deviceId = opts.deviceId;
48
57
  this._captureCursor = opts.captureCursor;
49
58
  this._captureClicks = opts.captureClicks;
50
59
  this._preset = opts.preset || DEFAULT_PRESET;
51
60
  this._videoFilter = opts.videoFilter;
52
- this._timeLimit = (opts.timeLimit && opts.timeLimit > 0)
53
- ? opts.timeLimit
54
- : DEFAULT_TIME_LIMIT;
61
+ this._timeLimit =
62
+ opts.timeLimit && opts.timeLimit > 0 ? opts.timeLimit : DEFAULT_TIME_LIMIT;
55
63
  }
56
64
  async getVideoPath() {
57
65
  return (await support_1.fs.exists(this._videoPath)) ? this._videoPath : '';
@@ -59,48 +67,40 @@ class ScreenRecorder {
59
67
  isRunning() {
60
68
  return !!(this._process?.isRunning);
61
69
  }
62
- async _enforceTermination() {
63
- if (this._process && this.isRunning()) {
64
- this._log.debug('Force-stopping the currently running video recording');
65
- try {
66
- await this._process.stop('SIGKILL');
67
- }
68
- catch { }
69
- }
70
- this._process = null;
71
- const videoPath = await this.getVideoPath();
72
- if (videoPath) {
73
- await support_1.fs.rimraf(videoPath);
74
- }
75
- return '';
76
- }
77
70
  async start() {
78
71
  const ffmpeg = await requireFfmpegPath(this._log);
79
- /** @type {string[]} */
80
72
  const args = [
81
- '-loglevel', 'error',
82
- '-t', `${this._timeLimit}`,
83
- '-f', 'avfoundation',
73
+ '-loglevel',
74
+ 'error',
75
+ '-t',
76
+ `${this._timeLimit}`,
77
+ '-f',
78
+ 'avfoundation',
84
79
  ...(this._captureCursor ? ['-capture_cursor', '1'] : []),
85
80
  ...(this._captureClicks ? ['-capture_mouse_clicks', '1'] : []),
86
- '-framerate', `${this._fps}`,
87
- '-i', `${this._deviceId}`,
88
- '-vcodec', 'libx264',
89
- '-preset', this._preset,
90
- '-tune', 'zerolatency',
91
- '-pix_fmt', 'yuv420p',
92
- '-movflags', '+faststart',
93
- '-fflags', 'nobuffer',
94
- '-f', DEFAULT_EXT,
95
- '-r', `${this._fps}`,
81
+ '-framerate',
82
+ `${this._fps}`,
83
+ '-i',
84
+ `${this._deviceId}`,
85
+ '-vcodec',
86
+ 'libx264',
87
+ '-preset',
88
+ this._preset,
89
+ '-tune',
90
+ 'zerolatency',
91
+ '-pix_fmt',
92
+ 'yuv420p',
93
+ '-movflags',
94
+ '+faststart',
95
+ '-fflags',
96
+ 'nobuffer',
97
+ '-f',
98
+ DEFAULT_EXT,
99
+ '-r',
100
+ `${this._fps}`,
96
101
  ...(this._videoFilter ? ['-filter:v', this._videoFilter] : []),
97
102
  ];
98
- /** @type {string[]} */
99
- const fullCmd = [
100
- ffmpeg,
101
- ...args,
102
- this._videoPath,
103
- ];
103
+ const fullCmd = [ffmpeg, ...args, this._videoPath];
104
104
  this._process = new teen_process_1.SubProcess(fullCmd[0], fullCmd.slice(1));
105
105
  this._log.debug(`Starting ${FFMPEG_BINARY}: ${support_1.util.quote(fullCmd)}`);
106
106
  this._process.on('output', (stdout, stderr) => {
@@ -166,6 +166,23 @@ class ScreenRecorder {
166
166
  this._process?.proc?.stdin?.end();
167
167
  });
168
168
  }
169
+ async _enforceTermination() {
170
+ if (this._process && this.isRunning()) {
171
+ this._log.debug('Force-stopping the currently running video recording');
172
+ try {
173
+ await this._process.stop('SIGKILL');
174
+ }
175
+ catch {
176
+ // Ignore errors during force stop
177
+ }
178
+ }
179
+ this._process = null;
180
+ const videoPath = await this.getVideoPath();
181
+ if (videoPath) {
182
+ await support_1.fs.rimraf(videoPath);
183
+ }
184
+ return '';
185
+ }
169
186
  }
170
187
  exports.ScreenRecorder = ScreenRecorder;
171
188
  /**
@@ -175,32 +192,30 @@ exports.ScreenRecorder = ScreenRecorder;
175
192
  * in System Preferences->Security & Privacy->Screen Recording.
176
193
  * The resulting video uses H264 codec and is ready to be played by media players built-in into web browsers.
177
194
  *
178
- * @this {Mac2Driver}
179
- * @param {string|number} deviceId Screen device index to use for the recording.
195
+ * @param deviceId - Screen device index to use for the recording.
180
196
  * The list of available devices could be retrieved using
181
197
  * `ffmpeg -f avfoundation -list_devices true -i` command.
182
- * @param {string|number} [timeLimit] The maximum recording time, in seconds. The default
198
+ * @param timeLimit - The maximum recording time, in seconds. The default
183
199
  * value is 600 seconds (10 minutes).
184
- * @param {string} [videoFilter] The video filter spec to apply for ffmpeg.
200
+ * @param videoFilter - The video filter spec to apply for ffmpeg.
185
201
  * See https://trac.ffmpeg.org/wiki/FilteringGuide for more details on the possible values.
186
202
  * Example: Set it to `scale=ifnot(gte(iw\,1024)\,iw\,1024):-2` in order to limit the video width
187
203
  * to 1024px. The height will be adjusted automatically to match the actual ratio.
188
- * @param {string|number} [fps] The count of frames per second in the resulting video.
204
+ * @param fps - The count of frames per second in the resulting video.
189
205
  * The greater fps it has the bigger file size is. 15 by default.
190
- * @param {'ultrafast'|'superfast'|'veryfast'|'faster'|'fast'|'medium'|'slow'|'slower'|'veryslow'} [preset]
191
- * One of the supported encoding presets. A preset is a collection of options that will provide a
206
+ * @param preset - One of the supported encoding presets. A preset is a collection of options that will provide a
192
207
  * certain encoding speed to compression ratio.
193
208
  * A slower preset will provide better compression (compression is quality per filesize).
194
209
  * This means that, for example, if you target a certain file size or constant bit rate, you will
195
210
  * achieve better quality with a slower preset. Read https://trac.ffmpeg.org/wiki/Encode/H.264 for more details.
196
211
  * `veryfast` by default
197
- * @param {boolean} [captureCursor] Whether to capture the mouse cursor while recording the screen.
212
+ * @param captureCursor - Whether to capture the mouse cursor while recording the screen.
198
213
  * False by default
199
- * @param {boolean} [captureClicks] Whether to capture mouse clicks while recording the screen.
214
+ * @param captureClicks - Whether to capture mouse clicks while recording the screen.
200
215
  * False by default.
201
- * @param {boolean} [forceRestart=true] Whether to ignore the call if a screen recording is currently running
202
- * (`false`) or to start a new recording immediately and terminate the existing one
203
- * if running (`true`). The default value is `true`.
216
+ * @param forceRestart - Whether to ignore the call if a screen recording is currently running
217
+ * (`false`) or to start a new recording immediately and terminate the existing one
218
+ * if running (`true`). The default value is `true`.
204
219
  * @throws {Error} If screen recording has failed to start or is not supported on the device under test.
205
220
  */
206
221
  async function startRecordingScreen(deviceId, timeLimit, videoFilter, fps, preset, captureCursor, captureClicks, forceRestart = true) {
@@ -239,29 +254,25 @@ async function startRecordingScreen(deviceId, timeLimit, videoFilter, fps, prese
239
254
  throw e;
240
255
  }
241
256
  }
242
- ;
243
257
  /**
244
258
  * Stop recording the screen.
245
259
  * If no screen recording has been started before then the method returns an empty string.
246
260
  *
247
- * @param {string} [remotePath] The path to the remote location, where the resulting video should be uploaded.
261
+ * @param remotePath - The path to the remote location, where the resulting video should be uploaded.
248
262
  * The following protocols are supported: http/https, ftp.
249
263
  * Null or empty string value (the default setting) means the content of resulting
250
264
  * file should be encoded as Base64 and passed as the endpoint response value.
251
265
  * An exception will be thrown if the generated media file is too big to
252
266
  * fit into the available process memory.
253
- * @param {string} [user] The name of the user for the remote authentication.
254
- * @param {string} [pass] The password for the remote authentication.
255
- * @param {string} [method] The http multipart upload method name. The 'PUT' one is used by default.
256
- * @param {import('@appium/types').StringRecord|[string, any][]} [headers]
257
- * Additional headers mapping for multipart http(s) uploads
258
- * @param {string} [fileFieldName] The name of the form field, where the file content BLOB should
267
+ * @param user - The name of the user for the remote authentication.
268
+ * @param pass - The password for the remote authentication.
269
+ * @param method - The http multipart upload method name. The 'PUT' one is used by default.
270
+ * @param headers - Additional headers mapping for multipart http(s) uploads
271
+ * @param fileFieldName - The name of the form field, where the file content BLOB should
259
272
  * be stored for http(s) uploads
260
- * @param {import('@appium/types').StringRecord|[string, string][]} [formFields]
261
- * Additional form fields for multipart http(s) uploads
262
- * @returns {Promise<string>} Base64-encoded content of the recorded media file if 'remotePath'
273
+ * @param formFields - Additional form fields for multipart http(s) uploads
274
+ * @returns Base64-encoded content of the recorded media file if 'remotePath'
263
275
  * parameter is falsy or an empty string.
264
- * @this {Mac2Driver}
265
276
  * @throws {Error} If there was an error while getting the name of a media file
266
277
  * or the file content cannot be uploaded to the remote location
267
278
  * or screen recording is not supported on the device under test.
@@ -283,22 +294,8 @@ async function stopRecordingScreen(remotePath, user, pass, method, headers, file
283
294
  method,
284
295
  headers,
285
296
  fileFieldName,
286
- formFields
297
+ formFields,
287
298
  };
288
299
  return await helpers_1.uploadRecordedMedia.bind(this)(videoPath, remotePath, options);
289
300
  }
290
- ;
291
- /**
292
- * @typedef {import('../driver').Mac2Driver} Mac2Driver
293
- */
294
- /**
295
- * @typedef {Object} ScreenRecorderOptions
296
- * @property {number} [fps]
297
- * @property {string|number} deviceId
298
- * @property {string} [preset]
299
- * @property {boolean} [captureCursor]
300
- * @property {boolean} [captureClicks]
301
- * @property {string} [videoFilter]
302
- * @property {number} [timeLimit]
303
- */
304
301
  //# sourceMappingURL=record-screen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"record-screen.js","sourceRoot":"","sources":["../../../lib/commands/record-screen.js"],"names":[],"mappings":";;;;;;AAmNA,oDA6CC;AA4BD,kDA6BC;AAzTD,oDAAuB;AACvB,uCAA4C;AAC5C,4CAAmD;AACnD,+CAA0C;AAC1C,wDAAyB;AACzB,uCAAgD;AAGhD,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,MAAM,kBAAkB,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AACjD,MAAM,wBAAwB,GAAG,EAAE,GAAG,IAAI,CAAC;AAC3C,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,cAAc,GAAG,UAAU,CAAC;AAElC;;GAEG;AACH,KAAK,UAAU,iBAAiB,CAAE,GAAG;IACnC,IAAI,CAAC;QACH,OAAO,MAAM,YAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,GAAG,CAAC,kBAAkB,CAC1B,GAAG,aAAa,+BAA+B;YAC/C,kCAAkC,CACnC,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAa,cAAc;IACzB;;;;;OAKG;IACH,YAAa,SAAS,EAAE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A0B,EAC1B,IAAa,EACb,IAAa,EACb,MAAe,EACf,OAAwC,EACxC,aAAsB,EACtB,UAA8C;IAE9C,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;QAC1B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACtE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IACpD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACpE,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,OAAO,GAAiB;QAC5B,IAAI;QACJ,IAAI;QACJ,MAAM;QACN,OAAO;QACP,aAAa;QACb,UAAU;KACX,CAAC;IACF,OAAO,MAAM,6BAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC"}
@@ -1,12 +1,12 @@
1
+ import type { Mac2Driver } from '../driver';
2
+ import type { ScreenshotsInfo } from '../types';
1
3
  /**
2
4
  * Retrieves screenshots of each display available to macOS
3
5
  *
4
- * @this {Mac2Driver}
5
- * @param {number} [displayId] macOS display identifier to take a screenshot for.
6
+ * @param displayId - macOS display identifier to take a screenshot for.
6
7
  * If not provided then screenshots of all displays are going to be returned.
7
8
  * If no matches were found then an error is thrown.
8
- * @returns {Promise<import('../types').ScreenshotsInfo>}
9
+ * @returns Screenshots information for the requested display(s)
9
10
  */
10
- export function macosScreenshots(this: import("../driver").Mac2Driver, displayId?: number): Promise<import("../types").ScreenshotsInfo>;
11
- export type Mac2Driver = import("../driver").Mac2Driver;
11
+ export declare function macosScreenshots(this: Mac2Driver, displayId?: number): Promise<ScreenshotsInfo>;
12
12
  //# sourceMappingURL=screenshots.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screenshots.d.ts","sourceRoot":"","sources":["../../../lib/commands/screenshots.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,mFALW,MAAM,GAGJ,OAAO,CAAC,OAAO,UAAU,EAAE,eAAe,CAAC,CAMvD;yBAGY,OAAO,WAAW,EAAE,UAAU"}
1
+ {"version":3,"file":"screenshots.d.ts","sourceRoot":"","sources":["../../../lib/commands/screenshots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,UAAU,EAChB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CAE1B"}
@@ -4,17 +4,12 @@ exports.macosScreenshots = macosScreenshots;
4
4
  /**
5
5
  * Retrieves screenshots of each display available to macOS
6
6
  *
7
- * @this {Mac2Driver}
8
- * @param {number} [displayId] macOS display identifier to take a screenshot for.
7
+ * @param displayId - macOS display identifier to take a screenshot for.
9
8
  * If not provided then screenshots of all displays are going to be returned.
10
9
  * If no matches were found then an error is thrown.
11
- * @returns {Promise<import('../types').ScreenshotsInfo>}
10
+ * @returns Screenshots information for the requested display(s)
12
11
  */
13
12
  async function macosScreenshots(displayId) {
14
- return /** @type {import('../types').ScreenshotsInfo} */ (await this.wda.proxy.command('/wda/screenshots', 'POST', { displayId }));
13
+ return (await this.wda.proxy.command('/wda/screenshots', 'POST', { displayId }));
15
14
  }
16
- ;
17
- /**
18
- * @typedef {import('../driver').Mac2Driver} Mac2Driver
19
- */
20
15
  //# sourceMappingURL=screenshots.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"screenshots.js","sourceRoot":"","sources":["../../../lib/commands/screenshots.js"],"names":[],"mappings":";;AASA,4CAIC;AAbD;;;;;;;;GAQG;AACI,KAAK,UAAU,gBAAgB,CAAE,SAAS;IAC/C,OAAO,iDAAiD,CAAC,CACvD,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAC,SAAS,EAAC,CAAC,CACtE,CAAC;AACJ,CAAC;AAAA,CAAC;AAEF;;GAEG"}
1
+ {"version":3,"file":"screenshots.js","sourceRoot":"","sources":["../../../lib/commands/screenshots.ts"],"names":[],"mappings":";;AAWA,4CAKC;AAbD;;;;;;;GAOG;AACI,KAAK,UAAU,gBAAgB,CAEpC,SAAkB;IAElB,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAoB,CAAC;AACtG,CAAC"}
@@ -1,15 +1,14 @@
1
+ import type { Mac2Driver } from '../driver';
1
2
  /**
2
3
  * Retrieves the string representation of the current application
3
4
  *
4
- * @this {Mac2Driver}
5
- * @param {string} [format='xml'] The format of the application source to retrieve.
5
+ * @param format - The format of the application source to retrieve.
6
6
  * Only two formats are supported:
7
7
  * - xml: Returns the source formatted as XML document (the default setting)
8
8
  * - description: Returns the source formatted as debugDescription output.
9
9
  * See https://developer.apple.com/documentation/xctest/xcuielement/1500909-debugdescription?language=objc
10
10
  * for more details.
11
- * @returns {Promise<string>} the page source in the requested format
11
+ * @returns the page source in the requested format
12
12
  */
13
- export function macosSource(this: import("../driver").Mac2Driver, format?: string): Promise<string>;
14
- export type Mac2Driver = import("../driver").Mac2Driver;
13
+ export declare function macosSource(this: Mac2Driver, format?: string): Promise<string>;
15
14
  //# sourceMappingURL=source.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../lib/commands/source.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,2EARW,MAAM,GAMJ,OAAO,CAAC,MAAM,CAAC,CAM3B;yBAGY,OAAO,WAAW,EAAE,UAAU"}
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../lib/commands/source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,UAAU,EAChB,MAAM,GAAE,MAAc,GACrB,OAAO,CAAC,MAAM,CAAC,CAEjB"}