io.appium.settings 7.1.10 → 8.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 +16 -0
- package/apks/settings_apk-debug.apk +0 -0
- package/build/lib/client.d.ts +11 -11
- package/build/lib/client.d.ts.map +1 -1
- package/build/lib/client.js +47 -51
- package/build/lib/client.js.map +1 -1
- package/build/lib/commands/animation.d.ts +1 -1
- package/build/lib/commands/animation.d.ts.map +1 -1
- package/build/lib/commands/animation.js +1 -4
- package/build/lib/commands/animation.js.map +1 -1
- package/build/lib/commands/bluetooth.d.ts +1 -1
- package/build/lib/commands/bluetooth.d.ts.map +1 -1
- package/build/lib/commands/bluetooth.js +6 -10
- package/build/lib/commands/bluetooth.js.map +1 -1
- package/build/lib/commands/clipboard.d.ts +1 -1
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/clipboard.js +6 -9
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/geolocation.d.ts +2 -2
- package/build/lib/commands/geolocation.d.ts.map +1 -1
- package/build/lib/commands/geolocation.js +14 -19
- package/build/lib/commands/geolocation.js.map +1 -1
- package/build/lib/commands/locale.d.ts +2 -2
- package/build/lib/commands/locale.d.ts.map +1 -1
- package/build/lib/commands/locale.js +8 -12
- package/build/lib/commands/locale.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +2 -2
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +19 -28
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/media.d.ts +1 -1
- package/build/lib/commands/media.d.ts.map +1 -1
- package/build/lib/commands/media.js +5 -8
- package/build/lib/commands/media.js.map +1 -1
- package/build/lib/commands/network.d.ts +1 -1
- package/build/lib/commands/network.d.ts.map +1 -1
- package/build/lib/commands/network.js +5 -9
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/notifications.d.ts +1 -1
- package/build/lib/commands/notifications.d.ts.map +1 -1
- package/build/lib/commands/notifications.js +7 -11
- package/build/lib/commands/notifications.js.map +1 -1
- package/build/lib/commands/sms.d.ts +2 -2
- package/build/lib/commands/sms.d.ts.map +1 -1
- package/build/lib/commands/sms.js +5 -8
- package/build/lib/commands/sms.js.map +1 -1
- package/build/lib/commands/types.js +1 -2
- package/build/lib/commands/typing.d.ts +1 -1
- package/build/lib/commands/typing.d.ts.map +1 -1
- package/build/lib/commands/typing.js +9 -13
- package/build/lib/commands/typing.js.map +1 -1
- package/build/lib/commands/utf7.js +4 -10
- package/build/lib/commands/utf7.js.map +1 -1
- package/build/lib/constants.js +33 -36
- package/build/lib/constants.js.map +1 -1
- package/build/lib/index.d.ts +2 -2
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +4 -22
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.d.ts +1 -1
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +3 -9
- package/build/lib/logger.js.map +1 -1
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +11 -16
- package/build/lib/utils.js.map +1 -1
- package/lib/client.ts +13 -13
- package/lib/commands/animation.ts +1 -1
- package/lib/commands/bluetooth.ts +2 -2
- package/lib/commands/clipboard.ts +3 -3
- package/lib/commands/geolocation.ts +4 -4
- package/lib/commands/locale.ts +4 -4
- package/lib/commands/media-projection.ts +3 -3
- package/lib/commands/media.ts +3 -3
- package/lib/commands/network.ts +2 -2
- package/lib/commands/notifications.ts +6 -3
- package/lib/commands/sms.ts +4 -4
- package/lib/commands/typing.ts +4 -4
- package/lib/index.ts +3 -3
- package/lib/logger.ts +1 -1
- package/lib/utils.ts +2 -1
- package/package.json +12 -4
package/build/lib/constants.js
CHANGED
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
exports.RECORDING_ACTIVITY_NAME = `${exports.SETTINGS_HELPER_ID}/io.appium.settings.Settings`;
|
|
35
|
-
exports.RECORDING_ACTION_START = `${exports.SETTINGS_HELPER_ID}.recording.ACTION_START`;
|
|
36
|
-
exports.RECORDING_ACTION_STOP = `${exports.SETTINGS_HELPER_ID}.recording.ACTION_STOP`;
|
|
1
|
+
export const SETTINGS_HELPER_ID = 'io.appium.settings';
|
|
2
|
+
export const SETTINGS_HELPER_MAIN_ACTIVITY = '.Settings';
|
|
3
|
+
const RECEIVERS_PKG = `${SETTINGS_HELPER_ID}/.receivers`;
|
|
4
|
+
export const CLIPBOARD_RECEIVER = `${RECEIVERS_PKG}.ClipboardReceiver`;
|
|
5
|
+
export const CLIPBOARD_RETRIEVAL_ACTION = `${SETTINGS_HELPER_ID}.clipboard.get`;
|
|
6
|
+
export const APPIUM_IME = `${SETTINGS_HELPER_ID}/.AppiumIME`;
|
|
7
|
+
export const UNICODE_IME = `${SETTINGS_HELPER_ID}/.UnicodeIME`;
|
|
8
|
+
export const EMPTY_IME = `${SETTINGS_HELPER_ID}/.EmptyIME`;
|
|
9
|
+
export const WIFI_CONNECTION_SETTING_RECEIVER = `${RECEIVERS_PKG}.WiFiConnectionSettingReceiver`;
|
|
10
|
+
export const WIFI_CONNECTION_SETTING_ACTION = `${SETTINGS_HELPER_ID}.wifi`;
|
|
11
|
+
export const BLUETOOTH_SETTING_RECEIVER = `${RECEIVERS_PKG}.BluetoothConnectionSettingReceiver`;
|
|
12
|
+
export const BLUETOOTH_SETTING_ACTION = `${SETTINGS_HELPER_ID}.bluetooth`;
|
|
13
|
+
export const BLUETOOTH_UNPAIR_RECEIVER = `${RECEIVERS_PKG}.UnpairBluetoothDevicesReceiver`;
|
|
14
|
+
export const BLUETOOTH_UNPAIR_ACTION = `${SETTINGS_HELPER_ID}.unpair_bluetooth`;
|
|
15
|
+
export const ANIMATION_SETTING_RECEIVER = `${RECEIVERS_PKG}.AnimationSettingReceiver`;
|
|
16
|
+
export const ANIMATION_SETTING_ACTION = `${SETTINGS_HELPER_ID}.animation`;
|
|
17
|
+
export const LOCALE_SETTING_RECEIVER = `${RECEIVERS_PKG}.LocaleSettingReceiver`;
|
|
18
|
+
export const LOCALE_SETTING_ACTION = `${SETTINGS_HELPER_ID}.locale`;
|
|
19
|
+
export const LOCALES_LIST_SETTING_RECEIVER = `${RECEIVERS_PKG}.LocalesReader`;
|
|
20
|
+
export const LOCALES_LIST_SETTING_ACTION = `${SETTINGS_HELPER_ID}.list_locales`;
|
|
21
|
+
export const LOCATION_SERVICE = `${SETTINGS_HELPER_ID}/.LocationService`;
|
|
22
|
+
export const LOCATION_RECEIVER = `${RECEIVERS_PKG}.LocationInfoReceiver`;
|
|
23
|
+
export const LOCATION_RETRIEVAL_ACTION = `${SETTINGS_HELPER_ID}.location`;
|
|
24
|
+
export const SMS_LIST_RECEIVER = `${RECEIVERS_PKG}.SmsReader`;
|
|
25
|
+
export const SMS_LIST_RETRIEVAL_ACTION = `${SETTINGS_HELPER_ID}.sms.read`;
|
|
26
|
+
export const MEDIA_SCAN_RECEIVER = `${RECEIVERS_PKG}.MediaScannerReceiver`;
|
|
27
|
+
export const MEDIA_SCAN_ACTION = `${SETTINGS_HELPER_ID}.scan_media`;
|
|
28
|
+
export const SETTING_NOTIFICATIONS_LISTENER_SERVICE = `${SETTINGS_HELPER_ID}/.NLService`;
|
|
29
|
+
export const NOTIFICATIONS_RETRIEVAL_ACTION = `${SETTINGS_HELPER_ID}.notifications`;
|
|
30
|
+
export const RECORDING_SERVICE_NAME = `${SETTINGS_HELPER_ID}/.recorder.RecorderService`;
|
|
31
|
+
export const RECORDING_ACTIVITY_NAME = `${SETTINGS_HELPER_ID}/io.appium.settings.Settings`;
|
|
32
|
+
export const RECORDING_ACTION_START = `${SETTINGS_HELPER_ID}.recording.ACTION_START`;
|
|
33
|
+
export const RECORDING_ACTION_STOP = `${SETTINGS_HELPER_ID}.recording.ACTION_STOP`;
|
|
37
34
|
//# 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,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AACvD,MAAM,CAAC,MAAM,6BAA6B,GAAG,WAAW,CAAC;AAEzD,MAAM,aAAa,GAAG,GAAG,kBAAkB,aAAa,CAAC;AAEzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,aAAa,oBAAoB,CAAC;AACvE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,kBAAkB,gBAAgB,CAAC;AAEhF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,kBAAkB,aAAa,CAAC;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,kBAAkB,cAAc,CAAC;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,kBAAkB,YAAY,CAAC;AAE3D,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,aAAa,gCAAgC,CAAC;AACjG,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,kBAAkB,OAAO,CAAC;AAC3E,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,aAAa,qCAAqC,CAAC;AAChG,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,kBAAkB,YAAY,CAAC;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,aAAa,iCAAiC,CAAC;AAC3F,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,kBAAkB,mBAAmB,CAAC;AAEhF,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,aAAa,2BAA2B,CAAC;AACtF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,kBAAkB,YAAY,CAAC;AAE1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,aAAa,wBAAwB,CAAC;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,kBAAkB,SAAS,CAAC;AAEpE,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,aAAa,gBAAgB,CAAC;AAC9E,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,kBAAkB,eAAe,CAAC;AAEhF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,kBAAkB,mBAAmB,CAAC;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,aAAa,uBAAuB,CAAC;AACzE,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,kBAAkB,WAAW,CAAC;AAE1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,aAAa,YAAY,CAAC;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,kBAAkB,WAAW,CAAC;AAE1E,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,aAAa,uBAAuB,CAAC;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,kBAAkB,aAAa,CAAC;AAEpE,MAAM,CAAC,MAAM,sCAAsC,GAAG,GAAG,kBAAkB,aAAa,CAAC;AACzF,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,kBAAkB,gBAAgB,CAAC;AAEpF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,kBAAkB,4BAA4B,CAAC;AACxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,kBAAkB,8BAA8B,CAAC;AAC3F,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,kBAAkB,yBAAyB,CAAC;AACrF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,kBAAkB,wBAAwB,CAAC"}
|
package/build/lib/index.d.ts
CHANGED
package/build/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAuB,CAAC;AACzC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,QAAuB,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC"}
|
package/build/lib/index.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __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.SettingsApp = exports.path = void 0;
|
|
18
|
-
const utils_1 = require("./utils");
|
|
19
|
-
exports.path = (0, utils_1.getSettingsApkPath)();
|
|
20
|
-
__exportStar(require("./constants"), exports);
|
|
21
|
-
var client_1 = require("./client");
|
|
22
|
-
Object.defineProperty(exports, "SettingsApp", { enumerable: true, get: function () { return client_1.SettingsApp; } });
|
|
1
|
+
import { getSettingsApkPath } from './utils.js';
|
|
2
|
+
export const path = getSettingsApkPath();
|
|
3
|
+
export * from './constants.js';
|
|
4
|
+
export { SettingsApp } from './client.js';
|
|
23
5
|
//# 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,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAE9C,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,EAAE,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC"}
|
package/build/lib/logger.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC,eAAO,MAAM,GAAG,+CAAe,CAAC"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.log = exports.LOG_PREFIX = void 0;
|
|
7
|
-
const logger_1 = __importDefault(require("@appium/logger"));
|
|
8
|
-
exports.LOG_PREFIX = 'SettingsApp';
|
|
9
|
-
exports.log = logger_1.default;
|
|
1
|
+
import { log as appiumLogger } from '@appium/logger';
|
|
2
|
+
export const LOG_PREFIX = 'SettingsApp';
|
|
3
|
+
export const log = appiumLogger;
|
|
10
4
|
//# 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,GAAG,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC;AAExC,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC"}
|
package/build/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
package/build/lib/utils.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getSettingsApkPath = getSettingsApkPath;
|
|
7
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
9
4
|
const MODULE_NAME = 'io.appium.settings';
|
|
10
5
|
/**
|
|
11
6
|
* Get the full path to the Settings APK
|
|
12
7
|
*
|
|
13
8
|
* @returns Full path to the APK file
|
|
14
9
|
*/
|
|
15
|
-
function getSettingsApkPath() {
|
|
16
|
-
return
|
|
10
|
+
export function getSettingsApkPath() {
|
|
11
|
+
return path.resolve(getModuleRootSync(), 'apks', 'settings_apk-debug.apk');
|
|
17
12
|
}
|
|
18
13
|
/**
|
|
19
14
|
* Tries to synchronously detect the absolute path to the folder
|
|
@@ -22,19 +17,19 @@ function getSettingsApkPath() {
|
|
|
22
17
|
* @returns Full path to the module root
|
|
23
18
|
*/
|
|
24
19
|
function getModuleRootSync() {
|
|
25
|
-
let currentDir =
|
|
20
|
+
let currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
26
21
|
let isAtFsRoot = false;
|
|
27
22
|
while (!isAtFsRoot) {
|
|
28
|
-
const manifestPath =
|
|
23
|
+
const manifestPath = path.join(currentDir, 'package.json');
|
|
29
24
|
try {
|
|
30
|
-
if (
|
|
31
|
-
JSON.parse(
|
|
25
|
+
if (fs.existsSync(manifestPath) &&
|
|
26
|
+
JSON.parse(fs.readFileSync(manifestPath, 'utf8')).name === MODULE_NAME) {
|
|
32
27
|
return currentDir;
|
|
33
28
|
}
|
|
34
29
|
}
|
|
35
30
|
catch { }
|
|
36
|
-
currentDir =
|
|
37
|
-
isAtFsRoot = currentDir.length <=
|
|
31
|
+
currentDir = path.dirname(currentDir);
|
|
32
|
+
isAtFsRoot = currentDir.length <= path.dirname(currentDir).length;
|
|
38
33
|
}
|
|
39
34
|
throw new Error(`Cannot find the root of the ${MODULE_NAME} Node.js module`);
|
|
40
35
|
}
|
package/build/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAEzC;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,wBAAwB,CAAC,CAAC;AAC7E,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB;IACxB,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9D,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,OAAO,CAAC,UAAU,EAAE,CAAC;QACnB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3D,IAAI,CAAC;YACH,IACE,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;gBAC3B,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,EACtE,CAAC;gBACD,OAAO,UAAU,CAAC;YACpB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACV,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,UAAU,GAAG,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC;IACpE,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,+BAA+B,WAAW,iBAAiB,CAAC,CAAC;AAC/E,CAAC"}
|
package/lib/client.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {log, LOG_PREFIX} from './logger';
|
|
1
|
+
import {log, LOG_PREFIX} from './logger.js';
|
|
2
2
|
import {waitForCondition} from 'asyncbox';
|
|
3
|
-
import {SETTINGS_HELPER_ID, SETTINGS_HELPER_MAIN_ACTIVITY} from './constants';
|
|
4
|
-
import {setAnimationState} from './commands/animation';
|
|
5
|
-
import {setBluetoothState, unpairAllBluetoothDevices} from './commands/bluetooth';
|
|
6
|
-
import {getClipboard} from './commands/clipboard';
|
|
7
|
-
import {setGeoLocation, getGeoLocation, refreshGeoLocationCache} from './commands/geolocation';
|
|
8
|
-
import {setDeviceLocale, listSupportedLocales} from './commands/locale';
|
|
9
|
-
import {scanMedia} from './commands/media';
|
|
10
|
-
import {setDataState, setWifiState} from './commands/network';
|
|
11
|
-
import {getNotifications, adjustNotificationsPermissions} from './commands/notifications';
|
|
12
|
-
import {getSmsList} from './commands/sms';
|
|
13
|
-
import {performEditorAction, typeUnicode} from './commands/typing';
|
|
3
|
+
import {SETTINGS_HELPER_ID, SETTINGS_HELPER_MAIN_ACTIVITY} from './constants.js';
|
|
4
|
+
import {setAnimationState} from './commands/animation.js';
|
|
5
|
+
import {setBluetoothState, unpairAllBluetoothDevices} from './commands/bluetooth.js';
|
|
6
|
+
import {getClipboard} from './commands/clipboard.js';
|
|
7
|
+
import {setGeoLocation, getGeoLocation, refreshGeoLocationCache} from './commands/geolocation.js';
|
|
8
|
+
import {setDeviceLocale, listSupportedLocales} from './commands/locale.js';
|
|
9
|
+
import {scanMedia} from './commands/media.js';
|
|
10
|
+
import {setDataState, setWifiState} from './commands/network.js';
|
|
11
|
+
import {getNotifications, adjustNotificationsPermissions} from './commands/notifications.js';
|
|
12
|
+
import {getSmsList} from './commands/sms.js';
|
|
13
|
+
import {performEditorAction, typeUnicode} from './commands/typing.js';
|
|
14
14
|
import {
|
|
15
15
|
makeMediaProjectionRecorder,
|
|
16
16
|
adjustMediaProjectionServicePermissions,
|
|
17
|
-
} from './commands/media-projection';
|
|
17
|
+
} from './commands/media-projection.js';
|
|
18
18
|
import type {ADB} from 'appium-adb';
|
|
19
19
|
import type {Logger} from '@appium/logger';
|
|
20
20
|
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
BLUETOOTH_SETTING_RECEIVER,
|
|
4
4
|
BLUETOOTH_UNPAIR_ACTION,
|
|
5
5
|
BLUETOOTH_UNPAIR_RECEIVER,
|
|
6
|
-
} from '../constants';
|
|
7
|
-
import type {SettingsApp} from '../client';
|
|
6
|
+
} from '../constants.js';
|
|
7
|
+
import type {SettingsApp} from '../client.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Change the state of bluetooth on the device under test.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {LOG_PREFIX} from '../logger';
|
|
2
|
-
import {CLIPBOARD_RECEIVER, CLIPBOARD_RETRIEVAL_ACTION, APPIUM_IME} from '../constants';
|
|
3
|
-
import type {SettingsApp} from '../client';
|
|
1
|
+
import {LOG_PREFIX} from '../logger.js';
|
|
2
|
+
import {CLIPBOARD_RECEIVER, CLIPBOARD_RETRIEVAL_ACTION, APPIUM_IME} from '../constants.js';
|
|
3
|
+
import type {SettingsApp} from '../client.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Retrieves the text content of the device's clipboard.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {LOCATION_SERVICE, LOCATION_RECEIVER, LOCATION_RETRIEVAL_ACTION} from '../constants';
|
|
1
|
+
import {LOCATION_SERVICE, LOCATION_RECEIVER, LOCATION_RETRIEVAL_ACTION} from '../constants.js';
|
|
2
2
|
import {SubProcess} from 'teen_process';
|
|
3
|
-
import {LOG_PREFIX} from '../logger';
|
|
4
|
-
import type {SettingsApp} from '../client';
|
|
5
|
-
import type {Location} from './types';
|
|
3
|
+
import {LOG_PREFIX} from '../logger.js';
|
|
4
|
+
import type {SettingsApp} from '../client.js';
|
|
5
|
+
import type {Location} from './types.js';
|
|
6
6
|
|
|
7
7
|
const DEFAULT_SATELLITES_COUNT = 12;
|
|
8
8
|
const DEFAULT_ALTITUDE = 0.0;
|
package/lib/commands/locale.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {LOG_PREFIX} from '../logger';
|
|
1
|
+
import {LOG_PREFIX} from '../logger.js';
|
|
2
2
|
import {
|
|
3
3
|
LOCALE_SETTING_ACTION,
|
|
4
4
|
LOCALE_SETTING_RECEIVER,
|
|
5
5
|
LOCALES_LIST_SETTING_ACTION,
|
|
6
6
|
LOCALES_LIST_SETTING_RECEIVER,
|
|
7
|
-
} from '../constants';
|
|
8
|
-
import type {SettingsApp} from '../client';
|
|
9
|
-
import type {SupportedLocale} from './types';
|
|
7
|
+
} from '../constants.js';
|
|
8
|
+
import type {SettingsApp} from '../client.js';
|
|
9
|
+
import type {SupportedLocale} from './types.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Set the locale name of the device under test.
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
RECORDING_ACTION_STOP,
|
|
8
8
|
RECORDING_ACTIVITY_NAME,
|
|
9
9
|
RECORDING_SERVICE_NAME,
|
|
10
|
-
} from '../constants';
|
|
10
|
+
} from '../constants.js';
|
|
11
11
|
import type {ADB} from 'appium-adb';
|
|
12
|
-
import type {SettingsApp} from '../client';
|
|
13
|
-
import type {StartMediaProjectionRecordingOpts} from './types';
|
|
12
|
+
import type {SettingsApp} from '../client.js';
|
|
13
|
+
import type {StartMediaProjectionRecordingOpts} from './types.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Creates a new instance of the MediaProjection-based recorder.
|
package/lib/commands/media.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {LOG_PREFIX} from '../logger';
|
|
2
|
-
import {MEDIA_SCAN_ACTION, MEDIA_SCAN_RECEIVER} from '../constants';
|
|
3
|
-
import type {SettingsApp} from '../client';
|
|
1
|
+
import {LOG_PREFIX} from '../logger.js';
|
|
2
|
+
import {MEDIA_SCAN_ACTION, MEDIA_SCAN_RECEIVER} from '../constants.js';
|
|
3
|
+
import type {SettingsApp} from '../client.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Performs recursive media scan at the given destination.
|
package/lib/commands/network.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {WIFI_CONNECTION_SETTING_ACTION, WIFI_CONNECTION_SETTING_RECEIVER} from '../constants';
|
|
2
|
-
import type {SettingsApp} from '../client';
|
|
1
|
+
import {WIFI_CONNECTION_SETTING_ACTION, WIFI_CONNECTION_SETTING_RECEIVER} from '../constants.js';
|
|
2
|
+
import type {SettingsApp} from '../client.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Change the state of WiFi on the device under test.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {LOG_PREFIX} from '../logger';
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import {LOG_PREFIX} from '../logger.js';
|
|
2
|
+
import {
|
|
3
|
+
NOTIFICATIONS_RETRIEVAL_ACTION,
|
|
4
|
+
SETTING_NOTIFICATIONS_LISTENER_SERVICE,
|
|
5
|
+
} from '../constants.js';
|
|
6
|
+
import type {SettingsApp} from '../client.js';
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
* Retrieves Android notifications via Appium Settings helper.
|
package/lib/commands/sms.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {LOG_PREFIX} from '../logger';
|
|
2
|
-
import {SMS_LIST_RECEIVER, SMS_LIST_RETRIEVAL_ACTION} from '../constants';
|
|
3
|
-
import type {SettingsApp} from '../client';
|
|
4
|
-
import type {SmsListOptions, SmsListResult} from './types';
|
|
1
|
+
import {LOG_PREFIX} from '../logger.js';
|
|
2
|
+
import {SMS_LIST_RECEIVER, SMS_LIST_RETRIEVAL_ACTION} from '../constants.js';
|
|
3
|
+
import type {SettingsApp} from '../client.js';
|
|
4
|
+
import type {SmsListOptions, SmsListResult} from './types.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Retrieves the list of the most recent SMS
|
package/lib/commands/typing.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {APPIUM_IME, UNICODE_IME} from '../constants';
|
|
2
|
-
import {imap} from './utf7';
|
|
3
|
-
import {LOG_PREFIX} from '../logger';
|
|
4
|
-
import type {SettingsApp} from '../client';
|
|
1
|
+
import {APPIUM_IME, UNICODE_IME} from '../constants.js';
|
|
2
|
+
import {imap} from './utf7.js';
|
|
3
|
+
import {LOG_PREFIX} from '../logger.js';
|
|
4
|
+
import type {SettingsApp} from '../client.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Performs the given editor action on the focused input field.
|
package/lib/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {getSettingsApkPath} from './utils';
|
|
1
|
+
import {getSettingsApkPath} from './utils.js';
|
|
2
2
|
|
|
3
3
|
export const path = getSettingsApkPath();
|
|
4
|
-
export * from './constants';
|
|
5
|
-
export {SettingsApp} from './client';
|
|
4
|
+
export * from './constants.js';
|
|
5
|
+
export {SettingsApp} from './client.js';
|
package/lib/logger.ts
CHANGED
package/lib/utils.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
+
import {fileURLToPath} from 'node:url';
|
|
3
4
|
|
|
4
5
|
const MODULE_NAME = 'io.appium.settings';
|
|
5
6
|
|
|
@@ -19,7 +20,7 @@ export function getSettingsApkPath(): string {
|
|
|
19
20
|
* @returns Full path to the module root
|
|
20
21
|
*/
|
|
21
22
|
function getModuleRootSync(): string {
|
|
22
|
-
let currentDir =
|
|
23
|
+
let currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
23
24
|
let isAtFsRoot = false;
|
|
24
25
|
while (!isAtFsRoot) {
|
|
25
26
|
const manifestPath = path.join(currentDir, 'package.json');
|
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "io.appium.settings",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "App for dealing with Android settings",
|
|
5
5
|
"main": "./build/lib/index.js",
|
|
6
6
|
"types": "./build/lib/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./build/lib/index.d.ts",
|
|
11
|
+
"import": "./build/lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
7
15
|
"scripts": {
|
|
8
|
-
"bump-gradle-version": "node scripts/gradle-version-update.
|
|
16
|
+
"bump-gradle-version": "node scripts/gradle-version-update.mjs --package-version=${npm_package_version} && git add app/build.gradle",
|
|
9
17
|
"lint": "./gradlew lint",
|
|
10
18
|
"js:lint": "eslint .",
|
|
11
19
|
"js:lint:fix": "npm run js:lint -- --fix",
|
|
@@ -15,8 +23,8 @@
|
|
|
15
23
|
"prepare": "npm run build",
|
|
16
24
|
"version": "npm run bump-gradle-version && npm run build",
|
|
17
25
|
"clean": "npm run build -- --clean",
|
|
18
|
-
"js:test": "node --test --test-timeout=60000 \"./build/test/unit/**/*.spec.js\"",
|
|
19
|
-
"e2e-test": "node --test --test-force-exit --test-concurrency=1 --test-timeout=300000 \"./build/test/e2e/**/*.spec.js\"",
|
|
26
|
+
"js:test": "node --enable-source-maps --test --test-timeout=60000 \"./build/test/unit/**/*.spec.js\"",
|
|
27
|
+
"e2e-test": "node --enable-source-maps --test --test-force-exit --test-concurrency=1 --test-timeout=300000 \"./build/test/e2e/**/*.spec.js\"",
|
|
20
28
|
"format": "prettier -w ./lib ./test",
|
|
21
29
|
"format:check": "prettier --check ./lib ./test"
|
|
22
30
|
},
|