io.appium.settings 7.0.3 → 7.0.5
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/apks/settings_apk-debug.apk +0 -0
- package/build/lib/client.d.ts.map +1 -1
- package/build/lib/client.js +1 -5
- package/build/lib/client.js.map +1 -1
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/clipboard.js +1 -5
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +1 -16
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +15 -15
- package/build/lib/commands/media-projection.js.map +1 -1
- package/lib/client.js +1 -2
- package/lib/commands/clipboard.js +1 -2
- package/lib/commands/media-projection.js +16 -16
- package/package.json +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [7.0.5](https://github.com/appium/io.appium.settings/compare/v7.0.4...v7.0.5) (2025-12-11)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* **deps-dev:** bump @types/node from 24.10.3 to 25.0.0 ([#257](https://github.com/appium/io.appium.settings/issues/257)) ([aec2ef9](https://github.com/appium/io.appium.settings/commit/aec2ef97fbb43f9f9349418a6b7876be2689474b))
|
|
6
|
+
* **deps:** bump com.android.tools.build:gradle from 8.13.1 to 8.13.2 ([#258](https://github.com/appium/io.appium.settings/issues/258)) ([db73948](https://github.com/appium/io.appium.settings/commit/db739487096f990db15dd1a22e895c61586e3111))
|
|
7
|
+
|
|
8
|
+
### Code Refactoring
|
|
9
|
+
|
|
10
|
+
* use native trim instead of lodash.trim ([#253](https://github.com/appium/io.appium.settings/issues/253)) ([2d109d3](https://github.com/appium/io.appium.settings/commit/2d109d3bf462ff99726d7398d5c77df8d72e2516))
|
|
11
|
+
|
|
12
|
+
## [7.0.4](https://github.com/appium/io.appium.settings/compare/v7.0.3...v7.0.4) (2025-11-15)
|
|
13
|
+
|
|
14
|
+
### Miscellaneous Chores
|
|
15
|
+
|
|
16
|
+
* publish via trusted publisher ([#251](https://github.com/appium/io.appium.settings/issues/251)) ([62bff2b](https://github.com/appium/io.appium.settings/commit/62bff2b828b96a99d6f859ea91627210d88a4069))
|
|
17
|
+
|
|
1
18
|
## [7.0.3](https://github.com/appium/io.appium.settings/compare/v7.0.2...v7.0.3) (2025-11-13)
|
|
2
19
|
|
|
3
20
|
### Bug Fixes
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../lib/client.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../lib/client.js"],"names":[],"mappings":"AAkBA;;;GAGG;AAGH;IAOE;;OAEG;IACH,kBAFW,eAAe,EAKzB;IAZD,uCAAuC;IACvC,KADW,OAAO,YAAY,EAAE,GAAG,CAC/B;IAEJ,8CAA8C;IAC9C,KADW,OAAO,gBAAgB,EAAE,MAAM,CACtC;IAUJ;;;;;;;;OAQG;IAEH;;;;;;;OAOG;IACH;;;;;;;;;;;;;;;;QAFa,OAAO,CAAC,WAAW,CAAC,CAgDhC;IAED;;;;;OAKG;IACH,yBAFa,OAAO,CAAC,OAAO,CAAC,CAO5B;IAED;;;;;;;OAOG;IACH,qBALW,MAAM,EAAE,UACR,MAAM,sBACN,OAAO,GACL,OAAO,CAAC,MAAM,CAAC,CAmB3B;IAED;;;;;;;;;;OAUG;IACH,uBAPW,MAAM,cACN,MAAM,OAgChB;IAED,4CAAsC;IAEtC,4CAAsC;IACtC,4DAAsD;IAEtD,kCAA4B;IAE5B,sCAAgC;IAChC,sCAAgC;IAChC,wDAAkD;IAElD,kDAA4C;IAC5C,wCAAkC;IAElC,4BAAsB;IAEtB,kCAA4B;IAC5B,kCAA4B;IAE5B,0CAAoC;IACpC,sEAAgE;IAChE,8BAAwB;IAExB,gDAA0C;IAC1C,gCAA0B;IAE1B,gEAA0D;IAC1D,wFAAkF;CACnF;;SAhMa,OAAO,YAAY,EAAE,GAAG;;kCAjBJ,sBAAsB;kCACK,sBAAsB;0CAAtB,sBAAsB;6BACtD,sBAAsB;+BACqB,wBAAwB;+BAAxB,wBAAwB;wCAAxB,wBAAwB;qCAC1C,mBAAmB;gCAAnB,mBAAmB;0BAC/C,kBAAkB;6BACD,oBAAoB;6BAApB,oBAAoB;iCACE,0BAA0B;+CAA1B,0BAA0B;2BAChE,gBAAgB;oCACM,mBAAmB;4BAAnB,mBAAmB;4CAI7D,6BAA6B;wDAA7B,6BAA6B"}
|
package/build/lib/client.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.SettingsApp = void 0;
|
|
7
4
|
const logger_1 = require("./logger");
|
|
8
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
9
5
|
const asyncbox_1 = require("asyncbox");
|
|
10
6
|
const constants_js_1 = require("./constants.js");
|
|
11
7
|
const animation_1 = require("./commands/animation");
|
|
@@ -157,7 +153,7 @@ class SettingsApp {
|
|
|
157
153
|
throw new Error(`Cannot parse ${entityName} from the command output. ` +
|
|
158
154
|
'Check the server log for more details');
|
|
159
155
|
}
|
|
160
|
-
const jsonStr =
|
|
156
|
+
const jsonStr = match[1].trim();
|
|
161
157
|
try {
|
|
162
158
|
return JSON.parse(jsonStr);
|
|
163
159
|
}
|
package/build/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.js"],"names":[],"mappings":";;;AAAA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CAAC;QAChC,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;QAAC,MAAM,CAAC;YACP,YAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,gBAAgB,UAAU,mCAAmC;gBAC7D,uCAAuC,CACxC,CAAC;QACJ,CAAC;IACH,CAAC;IAED,iBAAiB,GAAG,6BAAiB,CAAC;IAEtC,iBAAiB,GAAG,6BAAiB,CAAC;IACtC,yBAAyB,GAAG,qCAAyB,CAAC;IAEtD,YAAY,GAAG,wBAAY,CAAC;IAE5B,cAAc,GAAG,4BAAc,CAAC;IAChC,cAAc,GAAG,4BAAc,CAAC;IAChC,uBAAuB,GAAG,qCAAuB,CAAC;IAElD,oBAAoB,GAAG,6BAAoB,CAAC;IAC5C,eAAe,GAAG,wBAAe,CAAC;IAElC,SAAS,GAAG,iBAAS,CAAC;IAEtB,YAAY,GAAG,sBAAY,CAAC;IAC5B,YAAY,GAAG,sBAAY,CAAC;IAE5B,gBAAgB,GAAG,gCAAgB,CAAC;IACpC,8BAA8B,GAAG,8CAA8B,CAAC;IAChE,UAAU,GAAG,gBAAU,CAAC;IAExB,mBAAmB,GAAG,4BAAmB,CAAC;IAC1C,WAAW,GAAG,oBAAW,CAAC;IAE1B,2BAA2B,GAAG,8CAA2B,CAAC;IAC1D,uCAAuC,GAAG,0DAAuC,CAAC;CACnF;AA5LD,kCA4LC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;GAaG;AACH,qEALa,OAAO,CAAC,MAAM,CAAC,CA4B3B"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getClipboard = getClipboard;
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
4
|
const logger_1 = require("../logger");
|
|
9
5
|
const constants_1 = require("../constants");
|
|
10
6
|
/**
|
|
@@ -43,6 +39,6 @@ async function getClipboard() {
|
|
|
43
39
|
if (!match) {
|
|
44
40
|
throw new Error(`Cannot parse the actual clipboard content from the command output: ${output}`);
|
|
45
41
|
}
|
|
46
|
-
return
|
|
42
|
+
return match[1].trim();
|
|
47
43
|
}
|
|
48
44
|
//# sourceMappingURL=clipboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":";;AAqBA,oCAuBC;AA5CD,sCAAuC;AACvC,4CAIsB;AAEtB;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,YAAY;IAChC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,+BAA+B,CAAC,CAAC;IAC5D,MAAM,IAAI,CAAC,cAAc,CAAC,EAAC,uBAAuB,EAAE,IAAI,EAAC,CAAC,CAAC;IAC3D,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC;QAC9D,IAAI,EAAE,8BAAkB;QACxB,IAAI,EAAE,sCAA0B;KACjC,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAChC,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;YAC3C,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,sBAAU,EAAE,iBAAiB,CAAC,CAAC;YACjE,CAAC,CAAC,CAAC,MAAM,iBAAiB,EAAE,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,iEAAiE;YAC/E,2DAA2D;YAC3D,mBAAmB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,sEAAsE,MAAM,EAAE,CAAC,CAAC;IAClG,CAAC;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -14,6 +14,7 @@ export function makeMediaProjectionRecorder(this: import("../client").SettingsAp
|
|
|
14
14
|
* @returns {Promise<boolean>} If the permissions adjustment has actually been made
|
|
15
15
|
*/
|
|
16
16
|
export function adjustMediaProjectionServicePermissions(this: import("../client").SettingsApp): Promise<boolean>;
|
|
17
|
+
export type ADB = import("appium-adb").ADB;
|
|
17
18
|
export type StartMediaProjectionRecordingOpts = {
|
|
18
19
|
/**
|
|
19
20
|
* Maximum supported resolution on-device (Detected automatically by the app
|
|
@@ -40,22 +41,6 @@ export type StartMediaProjectionRecordingOpts = {
|
|
|
40
41
|
*/
|
|
41
42
|
filename?: string | undefined;
|
|
42
43
|
};
|
|
43
|
-
export type ADB = import("appium-adb").ADB;
|
|
44
|
-
/**
|
|
45
|
-
* @typedef {Object} StartMediaProjectionRecordingOpts
|
|
46
|
-
* @property {string} [resolution] Maximum supported resolution on-device (Detected automatically by the app
|
|
47
|
-
* itself), which usually equals to Full HD 1920x1080 on most phones however
|
|
48
|
-
* you can change it to following supported resolutions as well: "1920x1080",
|
|
49
|
-
* "1280x720", "720x480", "320x240", "176x144".
|
|
50
|
-
* @property {number} [maxDurationSec=900] Maximum allowed duration is 15 minutes; you can increase it if your test
|
|
51
|
-
* takes longer than that.
|
|
52
|
-
* @property {'high' | 'normal' | 'low'} [priority='high'] Recording thread priority.
|
|
53
|
-
* If you face performance drops during testing with recording enabled, you
|
|
54
|
-
* can reduce recording priority
|
|
55
|
-
* @property {string} [filename] You can type recording video file name as you want, but recording currently
|
|
56
|
-
* supports only "mp4" format so your filename must end with ".mp4". An
|
|
57
|
-
* invalid file name will fail to start the recording.
|
|
58
|
-
*/
|
|
59
44
|
declare class MediaProjectionRecorder {
|
|
60
45
|
/**
|
|
61
46
|
* @param {ADB} adb
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-projection.d.ts","sourceRoot":"","sources":["../../../lib/commands/media-projection.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"media-projection.d.ts","sourceRoot":"","sources":["../../../lib/commands/media-projection.js"],"names":[],"mappings":"AAwIA;;;;;;GAMG;AACH,oFAFa,uBAAuB,CAInC;AAED;;;;;;GAMG;AACH,gGAFa,OAAO,CAAC,OAAO,CAAC,CAQ5B;kBAGY,OAAO,YAAY,EAAE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlJrC;IACE;;OAEG;IACH,iBAFW,GAAG,EAIb;IADC,kCAAc;IAGhB;;;OAGG;IACH,aAFa,OAAO,CAAC,OAAO,CAAC,CAU5B;IAED;;;;OAIG;IACH,aAHW,iCAAiC,GAC/B,OAAO,CAAC,OAAO,CAAC,CAqC5B;IAED;;OAEG;IACH,WAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;OAGG;IACH,cAFa,OAAO,CAAC,MAAM,OAAC,CAAC,CAa5B;IAED;;OAEG;IACH,QAFa,OAAO,CAAC,OAAO,CAAC,CA2B5B;CACF"}
|
|
@@ -14,21 +14,6 @@ const constants_1 = require("../constants");
|
|
|
14
14
|
const RECORDING_STARTUP_TIMEOUT_MS = 3 * 1000;
|
|
15
15
|
const RECORDING_STOP_TIMEOUT_MS = 3 * 1000;
|
|
16
16
|
const RECORDINGS_ROOT = `/storage/emulated/0/Android/data/${constants_1.SETTINGS_HELPER_ID}/files`;
|
|
17
|
-
/**
|
|
18
|
-
* @typedef {Object} StartMediaProjectionRecordingOpts
|
|
19
|
-
* @property {string} [resolution] Maximum supported resolution on-device (Detected automatically by the app
|
|
20
|
-
* itself), which usually equals to Full HD 1920x1080 on most phones however
|
|
21
|
-
* you can change it to following supported resolutions as well: "1920x1080",
|
|
22
|
-
* "1280x720", "720x480", "320x240", "176x144".
|
|
23
|
-
* @property {number} [maxDurationSec=900] Maximum allowed duration is 15 minutes; you can increase it if your test
|
|
24
|
-
* takes longer than that.
|
|
25
|
-
* @property {'high' | 'normal' | 'low'} [priority='high'] Recording thread priority.
|
|
26
|
-
* If you face performance drops during testing with recording enabled, you
|
|
27
|
-
* can reduce recording priority
|
|
28
|
-
* @property {string} [filename] You can type recording video file name as you want, but recording currently
|
|
29
|
-
* supports only "mp4" format so your filename must end with ".mp4". An
|
|
30
|
-
* invalid file name will fail to start the recording.
|
|
31
|
-
*/
|
|
32
17
|
class MediaProjectionRecorder {
|
|
33
18
|
/**
|
|
34
19
|
* @param {ADB} adb
|
|
@@ -161,4 +146,19 @@ async function adjustMediaProjectionServicePermissions() {
|
|
|
161
146
|
/**
|
|
162
147
|
* @typedef {import('appium-adb').ADB} ADB
|
|
163
148
|
*/
|
|
149
|
+
/**
|
|
150
|
+
* @typedef {Object} StartMediaProjectionRecordingOpts
|
|
151
|
+
* @property {string} [resolution] Maximum supported resolution on-device (Detected automatically by the app
|
|
152
|
+
* itself), which usually equals to Full HD 1920x1080 on most phones however
|
|
153
|
+
* you can change it to following supported resolutions as well: "1920x1080",
|
|
154
|
+
* "1280x720", "720x480", "320x240", "176x144".
|
|
155
|
+
* @property {number} [maxDurationSec=900] Maximum allowed duration is 15 minutes; you can increase it if your test
|
|
156
|
+
* takes longer than that.
|
|
157
|
+
* @property {'high' | 'normal' | 'low'} [priority='high'] Recording thread priority.
|
|
158
|
+
* If you face performance drops during testing with recording enabled, you
|
|
159
|
+
* can reduce recording priority
|
|
160
|
+
* @property {string} [filename] You can type recording video file name as you want, but recording currently
|
|
161
|
+
* supports only "mp4" format so your filename must end with ".mp4". An
|
|
162
|
+
* invalid file name will fail to start the recording.
|
|
163
|
+
*/
|
|
164
164
|
//# sourceMappingURL=media-projection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-projection.js","sourceRoot":"","sources":["../../../lib/commands/media-projection.js"],"names":[],"mappings":";;;;;AA+
|
|
1
|
+
{"version":3,"file":"media-projection.js","sourceRoot":"","sources":["../../../lib/commands/media-projection.js"],"names":[],"mappings":";;;;;AA+IA,kEAEC;AASD,0FAMC;AAhKD,uCAA0C;AAC1C,wDAAyB;AACzB,oDAAuB;AACvB,2DAA6B;AAC7B,0DAA6B;AAC7B,4CAMsB;AAEtB,MAAM,4BAA4B,GAAG,CAAC,GAAG,IAAI,CAAC;AAC9C,MAAM,yBAAyB,GAAG,CAAC,GAAG,IAAI,CAAC;AAC3C,MAAM,eAAe,GAAG,oCAAoC,8BAAkB,QAAQ,CAAC;AAEvF,MAAM,uBAAuB;IAC3B;;OAEG;IACH,YAAY,GAAG;QACb,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS;QACb,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;YAClC,SAAS;YACT,UAAU;YACV,UAAU;YACV,kCAAsB;SACvB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,QAAQ,CAAC,kCAAsB,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE;QACnB,IAAI,MAAM,IAAI,CAAC,SAAS,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;aAChB,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,KAAK,CACb,6EAA6E;gBAC3E,GAAG,yBAAyB,IAAI,CACnC,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED;;;;;;GAMG;AACH,SAAgB,2BAA2B;IACzC,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,uCAAuC;IAC3D,IAAI,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE,CAAC;QACvC,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,8BAAkB,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;QACtF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AAEH;;;;;;;;;;;;;;GAcG"}
|
package/lib/client.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { log, LOG_PREFIX } from './logger';
|
|
2
|
-
import _ from 'lodash';
|
|
3
2
|
import { waitForCondition } from 'asyncbox';
|
|
4
3
|
import { SETTINGS_HELPER_ID, SETTINGS_HELPER_MAIN_ACTIVITY } from './constants.js';
|
|
5
4
|
import { setAnimationState } from './commands/animation';
|
|
@@ -171,7 +170,7 @@ export class SettingsApp {
|
|
|
171
170
|
'Check the server log for more details'
|
|
172
171
|
);
|
|
173
172
|
}
|
|
174
|
-
const jsonStr =
|
|
173
|
+
const jsonStr = match[1].trim();
|
|
175
174
|
try {
|
|
176
175
|
return JSON.parse(jsonStr);
|
|
177
176
|
} catch {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
1
|
import { LOG_PREFIX } from '../logger';
|
|
3
2
|
import {
|
|
4
3
|
CLIPBOARD_RECEIVER,
|
|
@@ -42,5 +41,5 @@ export async function getClipboard () {
|
|
|
42
41
|
if (!match) {
|
|
43
42
|
throw new Error(`Cannot parse the actual clipboard content from the command output: ${output}`);
|
|
44
43
|
}
|
|
45
|
-
return
|
|
44
|
+
return match[1].trim();
|
|
46
45
|
}
|
|
@@ -15,22 +15,6 @@ const RECORDING_STARTUP_TIMEOUT_MS = 3 * 1000;
|
|
|
15
15
|
const RECORDING_STOP_TIMEOUT_MS = 3 * 1000;
|
|
16
16
|
const RECORDINGS_ROOT = `/storage/emulated/0/Android/data/${SETTINGS_HELPER_ID}/files`;
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* @typedef {Object} StartMediaProjectionRecordingOpts
|
|
20
|
-
* @property {string} [resolution] Maximum supported resolution on-device (Detected automatically by the app
|
|
21
|
-
* itself), which usually equals to Full HD 1920x1080 on most phones however
|
|
22
|
-
* you can change it to following supported resolutions as well: "1920x1080",
|
|
23
|
-
* "1280x720", "720x480", "320x240", "176x144".
|
|
24
|
-
* @property {number} [maxDurationSec=900] Maximum allowed duration is 15 minutes; you can increase it if your test
|
|
25
|
-
* takes longer than that.
|
|
26
|
-
* @property {'high' | 'normal' | 'low'} [priority='high'] Recording thread priority.
|
|
27
|
-
* If you face performance drops during testing with recording enabled, you
|
|
28
|
-
* can reduce recording priority
|
|
29
|
-
* @property {string} [filename] You can type recording video file name as you want, but recording currently
|
|
30
|
-
* supports only "mp4" format so your filename must end with ".mp4". An
|
|
31
|
-
* invalid file name will fail to start the recording.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
18
|
class MediaProjectionRecorder {
|
|
35
19
|
/**
|
|
36
20
|
* @param {ADB} adb
|
|
@@ -179,3 +163,19 @@ export async function adjustMediaProjectionServicePermissions() {
|
|
|
179
163
|
/**
|
|
180
164
|
* @typedef {import('appium-adb').ADB} ADB
|
|
181
165
|
*/
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @typedef {Object} StartMediaProjectionRecordingOpts
|
|
169
|
+
* @property {string} [resolution] Maximum supported resolution on-device (Detected automatically by the app
|
|
170
|
+
* itself), which usually equals to Full HD 1920x1080 on most phones however
|
|
171
|
+
* you can change it to following supported resolutions as well: "1920x1080",
|
|
172
|
+
* "1280x720", "720x480", "320x240", "176x144".
|
|
173
|
+
* @property {number} [maxDurationSec=900] Maximum allowed duration is 15 minutes; you can increase it if your test
|
|
174
|
+
* takes longer than that.
|
|
175
|
+
* @property {'high' | 'normal' | 'low'} [priority='high'] Recording thread priority.
|
|
176
|
+
* If you face performance drops during testing with recording enabled, you
|
|
177
|
+
* can reduce recording priority
|
|
178
|
+
* @property {string} [filename] You can type recording video file name as you want, but recording currently
|
|
179
|
+
* supports only "mp4" format so your filename must end with ".mp4". An
|
|
180
|
+
* invalid file name will fail to start the recording.
|
|
181
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "io.appium.settings",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.5",
|
|
4
4
|
"description": "App for dealing with Android settings",
|
|
5
5
|
"main": "./build/lib/index.js",
|
|
6
6
|
"types": "./build/lib/index.d.ts",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"prepare": "npm run build",
|
|
15
15
|
"version": "npm run bump-gradle-version && npm run build",
|
|
16
16
|
"clean": "npm run build -- --clean",
|
|
17
|
-
"js:test": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.
|
|
17
|
+
"js:test": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.ts\"",
|
|
18
|
+
"e2e-test": "mocha --exit --timeout 5m \"./test/e2e/**/*-specs.ts\""
|
|
18
19
|
},
|
|
19
20
|
"repository": {
|
|
20
21
|
"type": "git",
|
|
@@ -54,14 +55,17 @@
|
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@appium/eslint-config-appium-ts": "^2.0.0-rc.1",
|
|
57
|
-
"@appium/test-support": "^4.0.0-rc.1",
|
|
58
58
|
"@appium/tsconfig": "^1.0.0-rc.1",
|
|
59
59
|
"@appium/types": "^1.0.0-rc.1",
|
|
60
60
|
"@semantic-release/changelog": "^6.0.1",
|
|
61
61
|
"@semantic-release/git": "^10.0.1",
|
|
62
62
|
"@types/bluebird": "^3.5.38",
|
|
63
|
+
"@types/chai": "^5.2.3",
|
|
64
|
+
"@types/chai-as-promised": "^8.0.2",
|
|
63
65
|
"@types/lodash": "^4.14.196",
|
|
64
|
-
"@types/
|
|
66
|
+
"@types/mocha": "^10.0.10",
|
|
67
|
+
"@types/node": "^25.0.0",
|
|
68
|
+
"@types/sinon": "^21.0.0",
|
|
65
69
|
"@types/teen_process": "^2.0.2",
|
|
66
70
|
"appium-adb": "^14.0.0",
|
|
67
71
|
"chai": "^6.0.0",
|
|
@@ -69,7 +73,8 @@
|
|
|
69
73
|
"conventional-changelog-conventionalcommits": "^9.0.0",
|
|
70
74
|
"mocha": "^11.0.1",
|
|
71
75
|
"prettier": "^3.0.0",
|
|
72
|
-
"semantic-release": "^25.0.
|
|
76
|
+
"semantic-release": "^25.0.2",
|
|
77
|
+
"sinon": "^21.0.0",
|
|
73
78
|
"ts-node": "^10.9.1",
|
|
74
79
|
"typescript": "^5.1.6"
|
|
75
80
|
}
|