nativescript 9.0.0-alpha.13 → 9.0.0-alpha.14
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/config/test-deps-versions-generated.json +2 -2
- package/docs/build-jekyll-md.sh +1 -1
- package/docs/man_pages/config/config-get.md +36 -0
- package/docs/man_pages/config/config-set.md +40 -0
- package/docs/man_pages/config/config.md +39 -0
- package/docs/man_pages/project/hooks/hooks.md +35 -0
- package/docs/man_pages/start.md +1 -0
- package/lib/.d.ts +4 -0
- package/lib/android-tools-info.js +12 -0
- package/lib/base-package-manager.js +7 -0
- package/lib/bootstrap.js +7 -1
- package/lib/bun-package-manager.js +14 -1
- package/lib/color.js +4 -0
- package/lib/commands/add-platform.js +1 -0
- package/lib/commands/apple-login.js +1 -0
- package/lib/commands/appstore-list.js +1 -0
- package/lib/commands/appstore-upload.js +3 -0
- package/lib/commands/build.js +3 -2
- package/lib/commands/clean.js +22 -1
- package/lib/commands/command-base.js +1 -0
- package/lib/commands/config.js +5 -0
- package/lib/commands/create-project.js +6 -0
- package/lib/commands/debug.js +6 -1
- package/lib/commands/deploy.js +3 -2
- package/lib/commands/embedding/embed.js +7 -0
- package/lib/commands/extensibility/install-extension.js +1 -0
- package/lib/commands/extensibility/list-extensions.js +1 -0
- package/lib/commands/extensibility/uninstall-extension.js +1 -0
- package/lib/commands/fonts.js +1 -0
- package/lib/commands/generate-assets.js +1 -0
- package/lib/commands/generate-help.js +1 -0
- package/lib/commands/generate.js +48 -1
- package/lib/commands/hooks/common.js +80 -0
- package/lib/commands/hooks/hooks-lock.js +101 -0
- package/lib/commands/hooks/hooks.js +72 -0
- package/lib/commands/info.js +1 -0
- package/lib/commands/install.js +1 -0
- package/lib/commands/list-platforms.js +1 -0
- package/lib/commands/migrate.js +1 -0
- package/lib/commands/native-add.js +5 -0
- package/lib/commands/platform-clean.js +1 -0
- package/lib/commands/plugin/add-plugin.js +1 -0
- package/lib/commands/plugin/build-plugin.js +1 -0
- package/lib/commands/plugin/create-plugin.js +5 -0
- package/lib/commands/plugin/list-plugins.js +1 -0
- package/lib/commands/plugin/remove-plugin.js +2 -0
- package/lib/commands/plugin/update-plugin.js +1 -0
- package/lib/commands/post-install.js +6 -0
- package/lib/commands/prepare.js +4 -3
- package/lib/commands/preview.js +2 -0
- package/lib/commands/remove-platform.js +1 -0
- package/lib/commands/resources/resources-update.js +2 -0
- package/lib/commands/run.js +1 -0
- package/lib/commands/setup.js +1 -0
- package/lib/commands/start.js +1 -0
- package/lib/commands/test-init.js +4 -0
- package/lib/commands/test.js +9 -2
- package/lib/commands/typings.js +2 -1
- package/lib/commands/update-platform.js +5 -0
- package/lib/commands/update.js +2 -0
- package/lib/commands/widget.js +20 -1
- package/lib/common/bootstrap.js +1 -0
- package/lib/common/child-process.js +3 -0
- package/lib/common/codeGeneration/code-entity.js +1 -0
- package/lib/common/codeGeneration/code-printer.js +1 -0
- package/lib/common/command-params.js +1 -0
- package/lib/common/commands/analytics.js +3 -0
- package/lib/common/commands/autocompletion.js +3 -0
- package/lib/common/commands/device/device-log-stream.js +1 -0
- package/lib/common/commands/device/get-file.js +2 -0
- package/lib/common/commands/device/list-applications.js +1 -0
- package/lib/common/commands/device/list-devices.js +3 -0
- package/lib/common/commands/device/list-files.js +2 -0
- package/lib/common/commands/device/put-file.js +2 -0
- package/lib/common/commands/device/run-application.js +1 -0
- package/lib/common/commands/device/stop-application.js +1 -0
- package/lib/common/commands/device/uninstall-application.js +1 -0
- package/lib/common/commands/doctor.js +3 -2
- package/lib/common/commands/generate-messages.js +1 -0
- package/lib/common/commands/help.js +1 -0
- package/lib/common/commands/package-manager-get.js +1 -0
- package/lib/common/commands/package-manager-set.js +1 -0
- package/lib/common/commands/post-install.js +1 -0
- package/lib/common/commands/preuninstall.js +11 -2
- package/lib/common/commands/proxy/proxy-base.js +4 -0
- package/lib/common/commands/proxy/proxy-clear.js +1 -0
- package/lib/common/commands/proxy/proxy-get.js +1 -0
- package/lib/common/commands/proxy/proxy-set.js +1 -0
- package/lib/common/common-lib.js +1 -0
- package/lib/common/constants.js +11 -0
- package/lib/common/decorators.js +48 -0
- package/lib/common/definitions/extensibility.d.ts +2 -2
- package/lib/common/definitions/mobile.d.ts +72 -72
- package/lib/common/dispatchers.js +10 -1
- package/lib/common/errors.js +13 -3
- package/lib/common/file-system.js +13 -2
- package/lib/common/header.js +3 -0
- package/lib/common/helpers.js +89 -3
- package/lib/common/host-info.js +4 -0
- package/lib/common/http-client.js +20 -0
- package/lib/common/logger/appenders/cli-appender.js +4 -0
- package/lib/common/logger/appenders/emit-appender.js +4 -0
- package/lib/common/logger/layouts/cli-layout.js +1 -0
- package/lib/common/logger/logger.js +5 -0
- package/lib/common/messages/messages.js +6 -0
- package/lib/common/mobile/android/android-application-manager.js +20 -1
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
- package/lib/common/mobile/android/android-debug-bridge.js +6 -0
- package/lib/common/mobile/android/android-device-file-system.js +4 -0
- package/lib/common/mobile/android/android-device-hash-service.js +3 -0
- package/lib/common/mobile/android/android-device.js +8 -0
- package/lib/common/mobile/android/android-emulator-services.js +2 -1
- package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
- package/lib/common/mobile/android/android-log-filter.js +4 -0
- package/lib/common/mobile/android/android-virtual-device-service.js +26 -0
- package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
- package/lib/common/mobile/android/genymotion/genymotion-service.js +6 -1
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
- package/lib/common/mobile/android/logcat-helper.js +13 -0
- package/lib/common/mobile/application-manager-base.js +6 -0
- package/lib/common/mobile/device-emitter.js +4 -0
- package/lib/common/mobile/device-log-emitter.js +1 -0
- package/lib/common/mobile/device-log-provider-base.js +1 -0
- package/lib/common/mobile/device-log-provider.js +23 -0
- package/lib/common/mobile/device-platforms-constants.js +1 -0
- package/lib/common/mobile/emulator-helper.js +3 -0
- package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
- package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
- package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
- package/lib/common/mobile/ios/device/ios-device.js +4 -0
- package/lib/common/mobile/ios/ios-device-base.js +1 -0
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
- package/lib/common/mobile/ios/ios-log-filter.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
- package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
- package/lib/common/mobile/log-filter.js +2 -0
- package/lib/common/mobile/logging-levels.js +1 -0
- package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
- package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
- package/lib/common/mobile/mobile-core/devices-service.js +69 -0
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-helper.js +1 -0
- package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
- package/lib/common/opener.js +1 -0
- package/lib/common/os-info.js +1 -0
- package/lib/common/plist-parser.js +1 -0
- package/lib/common/project-helper.js +1 -0
- package/lib/common/prompter.js +9 -1
- package/lib/common/queue.js +1 -0
- package/lib/common/resource-loader.js +1 -0
- package/lib/common/services/auto-completion-service.js +13 -1
- package/lib/common/services/cancellation.js +2 -1
- package/lib/common/services/commands-service.js +17 -6
- package/lib/common/services/help-service.js +11 -3
- package/lib/common/services/hooks-service.js +13 -0
- package/lib/common/services/ios-notification-service.js +1 -0
- package/lib/common/services/json-file-settings-service.js +6 -0
- package/lib/common/services/lock-service.js +6 -0
- package/lib/common/services/message-contract-generator.js +1 -0
- package/lib/common/services/messages-service.js +1 -0
- package/lib/common/services/micro-templating-service.js +6 -0
- package/lib/common/services/net-service.js +3 -0
- package/lib/common/services/project-files-manager.js +5 -0
- package/lib/common/services/project-files-provider-base.js +1 -0
- package/lib/common/services/proxy-service.js +1 -0
- package/lib/common/services/qr.js +1 -0
- package/lib/common/services/settings-service.js +1 -0
- package/lib/common/services/xcode-select-service.js +1 -0
- package/lib/common/utils.js +1 -0
- package/lib/common/validators/project-name-validator.js +1 -0
- package/lib/common/validators/validation-result.js +1 -0
- package/lib/common/verify-node-version.js +8 -1
- package/lib/common/yok.js +32 -11
- package/lib/config.js +22 -1
- package/lib/constants-provider.js +1 -0
- package/lib/constants.js +53 -0
- package/lib/controllers/build-controller.js +4 -3
- package/lib/controllers/debug-controller.js +8 -3
- package/lib/controllers/deploy-controller.js +1 -0
- package/lib/controllers/migrate-controller.js +90 -4
- package/lib/controllers/platform-controller.js +9 -1
- package/lib/controllers/prepare-controller.js +17 -4
- package/lib/controllers/run-controller.js +17 -1
- package/lib/controllers/update-controller-base.js +1 -0
- package/lib/controllers/update-controller.js +11 -0
- package/lib/data/build-data.js +1 -0
- package/lib/data/controller-data-base.js +1 -0
- package/lib/data/debug-data.js +1 -0
- package/lib/data/platform-data.js +1 -0
- package/lib/data/prepare-data.js +1 -0
- package/lib/data/run-data.js +1 -0
- package/lib/definitions/hooks.d.ts +1 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
- package/lib/detached-processes/cleanup-process.js +18 -14
- package/lib/detached-processes/file-log-service.js +2 -1
- package/lib/device-path-provider.js +1 -0
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
- package/lib/device-sockets/ios/notification.js +3 -0
- package/lib/device-sockets/ios/socket-request-executor.js +3 -0
- package/lib/helpers/android-bundle-validator-helper.js +2 -1
- package/lib/helpers/deploy-command-helper.js +1 -0
- package/lib/helpers/key-command-helper.js +4 -2
- package/lib/helpers/livesync-command-helper.js +4 -1
- package/lib/helpers/network-connectivity-validator.js +1 -0
- package/lib/helpers/options-track-helper.js +3 -2
- package/lib/helpers/package-path-helper.js +1 -0
- package/lib/helpers/platform-command-helper.js +7 -2
- package/lib/helpers/version-validator-helper.js +1 -0
- package/lib/key-commands/bootstrap.js +3 -2
- package/lib/key-commands/index.js +5 -4
- package/lib/nativescript-cli-lib-bootstrap.js +4 -0
- package/lib/nativescript-cli-lib.js +1 -0
- package/lib/nativescript-cli.js +11 -1
- package/lib/node/pbxproj-dom-xcode.js +1 -0
- package/lib/node/xcode.js +1 -0
- package/lib/node-package-manager.js +11 -1
- package/lib/options.js +144 -119
- package/lib/package-installation-manager.js +8 -1
- package/lib/package-manager.js +2 -0
- package/lib/platform-command-param.js +1 -0
- package/lib/pnpm-package-manager.js +4 -1
- package/lib/project-data.js +12 -0
- package/lib/providers/project-files-provider.js +1 -0
- package/lib/resolvers/livesync-service-resolver.js +1 -0
- package/lib/services/analytics/analytics-broker-process.js +10 -6
- package/lib/services/analytics/analytics-broker.js +2 -1
- package/lib/services/analytics/analytics-service.js +29 -25
- package/lib/services/analytics/google-analytics-provider.js +13 -12
- package/lib/services/analytics-settings-service.js +5 -0
- package/lib/services/android/android-bundle-tool-service.js +1 -0
- package/lib/services/android/gradle-build-args-service.js +3 -0
- package/lib/services/android/gradle-build-service.js +1 -0
- package/lib/services/android/gradle-command-service.js +1 -0
- package/lib/services/android-device-debug-service.js +6 -0
- package/lib/services/android-plugin-build-service.js +31 -2
- package/lib/services/android-project-service.js +71 -4
- package/lib/services/android-resources-migration-service.js +7 -0
- package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
- package/lib/services/apple-portal/srp/srp-wrapper.js +4 -1
- package/lib/services/assets-generation/assets-generation-service.js +10 -5
- package/lib/services/build-artifacts-service.js +2 -1
- package/lib/services/build-data-service.js +1 -0
- package/lib/services/build-info-file-service.js +1 -0
- package/lib/services/bundler/bundler-compiler-service.js +88 -17
- package/lib/services/bundler/bundler.js +1 -0
- package/lib/services/cleanup-service.js +13 -9
- package/lib/services/cocoapods-platform-manager.js +9 -0
- package/lib/services/cocoapods-service.js +21 -1
- package/lib/services/debug-data-service.js +1 -0
- package/lib/services/debug-service-base.js +7 -0
- package/lib/services/device/device-install-app-service.js +2 -1
- package/lib/services/doctor-service.js +21 -6
- package/lib/services/extensibility-service.js +9 -1
- package/lib/services/files-hash-service.js +1 -0
- package/lib/services/hmr-status-service.js +2 -0
- package/lib/services/info-service.js +1 -0
- package/lib/services/initialize-service.js +5 -1
- package/lib/services/ios/export-options-plist-service.js +4 -0
- package/lib/services/ios/ios-signing-service.js +4 -0
- package/lib/services/ios/spm-service.js +11 -0
- package/lib/services/ios/xcodebuild-args-service.js +9 -0
- package/lib/services/ios/xcodebuild-command-service.js +1 -0
- package/lib/services/ios/xcodebuild-service.js +2 -1
- package/lib/services/ios-debugger-port-service.js +1 -0
- package/lib/services/ios-device-debug-service.js +1 -0
- package/lib/services/ios-entitlements-service.js +1 -0
- package/lib/services/ios-extensions-service.js +1 -0
- package/lib/services/ios-log-filter.js +20 -0
- package/lib/services/ios-native-target-service.js +6 -4
- package/lib/services/ios-project-service.js +91 -1
- package/lib/services/ios-provision-service.js +3 -0
- package/lib/services/ios-watch-app-service.js +1 -0
- package/lib/services/ip-service.js +2 -0
- package/lib/services/itmstransporter-service.js +1 -0
- package/lib/services/karma-execution.js +2 -0
- package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
- package/lib/services/livesync/android-device-livesync-service.js +2 -0
- package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
- package/lib/services/livesync/android-livesync-service.js +1 -0
- package/lib/services/livesync/android-livesync-tool.js +4 -0
- package/lib/services/livesync/device-livesync-service-base.js +2 -0
- package/lib/services/livesync/ios-device-livesync-service.js +7 -0
- package/lib/services/livesync/ios-livesync-service.js +2 -0
- package/lib/services/livesync/livesync-socket.js +1 -0
- package/lib/services/livesync/platform-livesync-service-base.js +5 -0
- package/lib/services/livesync-process-data-service.js +1 -0
- package/lib/services/log-parser-service.js +1 -0
- package/lib/services/log-source-map-service.js +15 -0
- package/lib/services/marking-mode-service.js +8 -5
- package/lib/services/metadata-filtering-service.js +1 -0
- package/lib/services/npm-config-service.js +4 -0
- package/lib/services/pacote-service.js +7 -0
- package/lib/services/performance-service.js +3 -1
- package/lib/services/platform/add-platform-service.js +49 -2
- package/lib/services/platform/platform-validation-service.js +1 -0
- package/lib/services/platform/prepare-native-platform-service.js +5 -2
- package/lib/services/platform-environment-requirements.js +8 -3
- package/lib/services/platform-project-service-base.js +1 -0
- package/lib/services/platforms-data-service.js +1 -0
- package/lib/services/plugins-service.js +21 -2
- package/lib/services/prepare-data-service.js +1 -0
- package/lib/services/project-backup-service.js +4 -0
- package/lib/services/project-changes-service.js +14 -3
- package/lib/services/project-cleanup-service.js +2 -0
- package/lib/services/project-config-service.js +21 -2
- package/lib/services/project-data-service.js +36 -7
- package/lib/services/project-name-service.js +1 -0
- package/lib/services/project-service.js +10 -0
- package/lib/services/project-templates-service.js +3 -2
- package/lib/services/qr-code-terminal-service.js +1 -0
- package/lib/services/require-service.js +1 -0
- package/lib/services/start-service.js +1 -0
- package/lib/services/temp-service.js +3 -0
- package/lib/services/terminal-spinner-service.js +2 -0
- package/lib/services/test-execution-service.js +9 -2
- package/lib/services/test-initialization-service.js +4 -0
- package/lib/services/timeline-profiler-service.js +1 -0
- package/lib/services/user-settings-service.js +1 -0
- package/lib/services/versions-service.js +6 -4
- package/lib/services/watch-ignore-list-service.js +1 -0
- package/lib/services/xcconfig-service.js +2 -0
- package/lib/services/xcproj-service.js +1 -0
- package/lib/shared-event-bus.js +6 -0
- package/lib/sys-info.js +2 -1
- package/lib/tools/config-manipulation/config-transformer.js +12 -0
- package/lib/tools/node-modules/node-modules-builder.js +1 -0
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
- package/lib/yarn-package-manager.js +1 -0
- package/lib/yarn2-package-manager.js +3 -0
- package/package.json +11 -10
- package/vendor/aab-tool/README.txt +1 -1
- package/vendor/aab-tool/bundletool.jar +0 -0
- package/vendor/gradle-plugin/build.gradle +1 -1
package/lib/common/decorators.js
CHANGED
|
@@ -9,6 +9,32 @@ exports.performanceLog = performanceLog;
|
|
|
9
9
|
exports.deprecated = deprecated;
|
|
10
10
|
const constants_1 = require("../constants");
|
|
11
11
|
const yok_1 = require("./yok");
|
|
12
|
+
/**
|
|
13
|
+
* Caches the result of the first execution of the method and returns it whenever it is called instead of executing it again.
|
|
14
|
+
* Works with methods and getters.
|
|
15
|
+
* @example
|
|
16
|
+
* ```
|
|
17
|
+
* class CacheDecoratorsTest {
|
|
18
|
+
*
|
|
19
|
+
* @cache()
|
|
20
|
+
* public method(num: number): number {
|
|
21
|
+
* return num;
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* @cache()
|
|
25
|
+
* public get property(): any {
|
|
26
|
+
* // execute some heavy operation.
|
|
27
|
+
* return result;
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* const instance = new CacheDecoratorsTest();
|
|
32
|
+
* const result = instance.method(1); // returns 1;
|
|
33
|
+
*
|
|
34
|
+
* // all consecutive calls to instance.method will return 1.
|
|
35
|
+
* const result2 = instance.method(2); // returns 1;
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
12
38
|
function cache() {
|
|
13
39
|
return (target, propertyKey, descriptor) => {
|
|
14
40
|
let result;
|
|
@@ -28,6 +54,7 @@ function cache() {
|
|
|
28
54
|
let memoizeIDCounter = 0;
|
|
29
55
|
function memoize(options) {
|
|
30
56
|
return (target, propertyKey, descriptor) => {
|
|
57
|
+
// todo: remove once surely working as intended.
|
|
31
58
|
const DEBUG = false;
|
|
32
59
|
const memoizeID = memoizeIDCounter++;
|
|
33
60
|
const valueOrGet = descriptor.value ? "value" : "get";
|
|
@@ -48,6 +75,7 @@ function memoize(options) {
|
|
|
48
75
|
cacheMapName,
|
|
49
76
|
hashKey,
|
|
50
77
|
});
|
|
78
|
+
// initialize cache map if not exists
|
|
51
79
|
if (!this.hasOwnProperty(cacheMapName)) {
|
|
52
80
|
DEBUG && console.log("NO CACHE MAP YET, CREATING ONE NOW");
|
|
53
81
|
Object.defineProperty(this, cacheMapName, {
|
|
@@ -62,12 +90,16 @@ function memoize(options) {
|
|
|
62
90
|
console.log({
|
|
63
91
|
cacheMap,
|
|
64
92
|
});
|
|
93
|
+
// check if has memoized value based on hashFn
|
|
65
94
|
if (cacheMap.has(hashKey)) {
|
|
66
95
|
DEBUG && console.log("CACHE HIT");
|
|
96
|
+
// if yes, return cached value
|
|
67
97
|
return cacheMap.get(hashKey);
|
|
68
98
|
}
|
|
69
99
|
DEBUG && console.log("CACHE MISS");
|
|
100
|
+
// if not call original and get result
|
|
70
101
|
const result = originalMethod.apply(this, args);
|
|
102
|
+
// call shouldCache (if passed) with the result or default to true
|
|
71
103
|
let shouldCache = true;
|
|
72
104
|
if (options.shouldCache) {
|
|
73
105
|
shouldCache = options.shouldCache.call(this, result);
|
|
@@ -77,12 +109,21 @@ function memoize(options) {
|
|
|
77
109
|
DEBUG && console.log("CACHING NOW");
|
|
78
110
|
cacheMap.set(hashKey, result);
|
|
79
111
|
}
|
|
112
|
+
// if shouldCache: save result
|
|
80
113
|
DEBUG && console.log("RETURNING", result);
|
|
81
114
|
return result;
|
|
82
115
|
};
|
|
83
116
|
return descriptor;
|
|
84
117
|
};
|
|
85
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Calls specific method of the instance before executing the decorated method.
|
|
121
|
+
* This is usable when some of your methods depend on initialize async method, that cannot be invoked in constructor of the class.
|
|
122
|
+
* IMPORTANT: The decorated method must be async.
|
|
123
|
+
* @param {string} methodName The name of the method that will be invoked before calling the decorated method.
|
|
124
|
+
* @param {any[]} methodArgs Args that will be passed to the method that will be invoked before calling the decorated one.
|
|
125
|
+
* @return {any} Result of the decorated method.
|
|
126
|
+
*/
|
|
86
127
|
function invokeBefore(methodName, methodArgs) {
|
|
87
128
|
return (target, propertyKey, descriptor) => {
|
|
88
129
|
const originalValue = descriptor.value;
|
|
@@ -114,6 +155,7 @@ function performanceLog(localInjector) {
|
|
|
114
155
|
const className = target.constructor.name;
|
|
115
156
|
const trackName = `${className}${constants_1.AnalyticsEventLabelDelimiter}${propertyKey}`;
|
|
116
157
|
const performanceService = localInjector.resolve("performanceService");
|
|
158
|
+
//needed for the returned function to have the same name as the original - used in hooks decorator
|
|
117
159
|
const functionWrapper = {
|
|
118
160
|
[originalMethod.name]: function (...args) {
|
|
119
161
|
const start = performanceService.now();
|
|
@@ -139,12 +181,14 @@ function performanceLog(localInjector) {
|
|
|
139
181
|
},
|
|
140
182
|
};
|
|
141
183
|
descriptor.value = functionWrapper[originalMethod.name];
|
|
184
|
+
// used to get parameter names in hooks decorator
|
|
142
185
|
descriptor.value.toString = () => {
|
|
143
186
|
return originalMethod.toString();
|
|
144
187
|
};
|
|
145
188
|
return descriptor;
|
|
146
189
|
};
|
|
147
190
|
}
|
|
191
|
+
// inspired by https://github.com/NativeScript/NativeScript/blob/55dfe25938569edbec89255008e5ad9804901305/tns-core-modules/globals/globals.ts#L121-L137
|
|
148
192
|
function deprecated(additionalInfo, localInjector) {
|
|
149
193
|
const isDeprecatedMessage = " is deprecated.";
|
|
150
194
|
return (target, key, descriptor) => {
|
|
@@ -153,6 +197,7 @@ function deprecated(additionalInfo, localInjector) {
|
|
|
153
197
|
const $logger = localInjector.resolve("logger");
|
|
154
198
|
if (descriptor) {
|
|
155
199
|
if (descriptor.value) {
|
|
200
|
+
// method
|
|
156
201
|
const originalMethod = descriptor.value;
|
|
157
202
|
descriptor.value = function (...args) {
|
|
158
203
|
$logger.warn(`${key.toString()}${isDeprecatedMessage} ${additionalInfo}`);
|
|
@@ -161,6 +206,7 @@ function deprecated(additionalInfo, localInjector) {
|
|
|
161
206
|
return descriptor;
|
|
162
207
|
}
|
|
163
208
|
else {
|
|
209
|
+
// property
|
|
164
210
|
if (descriptor.set) {
|
|
165
211
|
const originalSetter = descriptor.set;
|
|
166
212
|
descriptor.set = function (...args) {
|
|
@@ -179,6 +225,7 @@ function deprecated(additionalInfo, localInjector) {
|
|
|
179
225
|
}
|
|
180
226
|
}
|
|
181
227
|
else {
|
|
228
|
+
// class
|
|
182
229
|
$logger.warn(`${(target &&
|
|
183
230
|
(target.name ||
|
|
184
231
|
(target.constructor && target.constructor.name))) ||
|
|
@@ -187,3 +234,4 @@ function deprecated(additionalInfo, localInjector) {
|
|
|
187
234
|
}
|
|
188
235
|
};
|
|
189
236
|
}
|
|
237
|
+
//# sourceMappingURL=decorators.js.map
|
|
@@ -124,7 +124,7 @@ interface IExtensibilityService {
|
|
|
124
124
|
* Gives the name of the extension that contains a required command.
|
|
125
125
|
* The method finds all extensions from npm and checks the command property defined in the nativescript key of the package.json.
|
|
126
126
|
* Based on specified input array, the method tries to find a suitable command that is defined in the extension.
|
|
127
|
-
* @example In case the input is `
|
|
127
|
+
* @example In case the input is `ns execute this command now`, the array will be ["execute", "this", "command", "now"].
|
|
128
128
|
* There may be an extension that defines execute|this as a command. The method will check each extension for the following commands:
|
|
129
129
|
* execute|this|command|now, execute|this|command, execute|this, execute
|
|
130
130
|
* In case it finds any of this commands, the method will return the extension name and the command name.
|
|
@@ -132,7 +132,7 @@ interface IExtensibilityService {
|
|
|
132
132
|
* @returns {IExtensionCommandInfo} Information about the extension and the registered command.
|
|
133
133
|
*/
|
|
134
134
|
getExtensionNameWhereCommandIsRegistered(
|
|
135
|
-
inputOpts: IGetExtensionCommandInfoParams
|
|
135
|
+
inputOpts: IGetExtensionCommandInfoParams,
|
|
136
136
|
): Promise<IExtensionCommandInfo>;
|
|
137
137
|
|
|
138
138
|
/**
|
|
@@ -131,7 +131,7 @@ declare global {
|
|
|
131
131
|
appId: string,
|
|
132
132
|
projectName: string,
|
|
133
133
|
projectDir: string,
|
|
134
|
-
ensureAppStarted?: boolean
|
|
134
|
+
ensureAppStarted?: boolean,
|
|
135
135
|
): Promise<any>;
|
|
136
136
|
destroyDebugSocket(appId: string): Promise<void>;
|
|
137
137
|
openDeviceLogStream(options?: IiOSLogStreamOptions): Promise<void>;
|
|
@@ -146,7 +146,7 @@ declare global {
|
|
|
146
146
|
|
|
147
147
|
interface IAndroidDeviceFileSystem extends IDeviceFileSystem {
|
|
148
148
|
getDeviceHashService(
|
|
149
|
-
appIdentifier: string
|
|
149
|
+
appIdentifier: string,
|
|
150
150
|
): Mobile.IAndroidDeviceHashService;
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -240,7 +240,7 @@ declare global {
|
|
|
240
240
|
*/
|
|
241
241
|
setProjectNameForDevice(
|
|
242
242
|
deviceIdentifier: string,
|
|
243
|
-
projectName: string
|
|
243
|
+
projectName: string,
|
|
244
244
|
): void;
|
|
245
245
|
|
|
246
246
|
/**
|
|
@@ -250,7 +250,7 @@ declare global {
|
|
|
250
250
|
*/
|
|
251
251
|
setProjectDirForDevice(
|
|
252
252
|
deviceIdentifier: string,
|
|
253
|
-
projectDir: string
|
|
253
|
+
projectDir: string,
|
|
254
254
|
): void;
|
|
255
255
|
}
|
|
256
256
|
|
|
@@ -293,7 +293,7 @@ declare global {
|
|
|
293
293
|
*/
|
|
294
294
|
startLogProcess(
|
|
295
295
|
deviceId: string,
|
|
296
|
-
options?: Mobile.IiOSLogStreamOptions
|
|
296
|
+
options?: Mobile.IiOSLogStreamOptions,
|
|
297
297
|
): Promise<void>;
|
|
298
298
|
}
|
|
299
299
|
|
|
@@ -317,7 +317,7 @@ declare global {
|
|
|
317
317
|
filterData(
|
|
318
318
|
platform: string,
|
|
319
319
|
data: string,
|
|
320
|
-
deviceLogOptions: Mobile.IDeviceLogOptions
|
|
320
|
+
deviceLogOptions: Mobile.IDeviceLogOptions,
|
|
321
321
|
): string;
|
|
322
322
|
}
|
|
323
323
|
|
|
@@ -334,7 +334,7 @@ declare global {
|
|
|
334
334
|
replaceWithOriginalFileLocations(
|
|
335
335
|
platform: string,
|
|
336
336
|
messageData: string,
|
|
337
|
-
loggingOptions: Mobile.IDeviceLogOptions
|
|
337
|
+
loggingOptions: Mobile.IDeviceLogOptions,
|
|
338
338
|
): string;
|
|
339
339
|
}
|
|
340
340
|
|
|
@@ -351,7 +351,7 @@ declare global {
|
|
|
351
351
|
*/
|
|
352
352
|
filterData(
|
|
353
353
|
data: string,
|
|
354
|
-
deviceLogOptions: Mobile.IDeviceLogOptions
|
|
354
|
+
deviceLogOptions: Mobile.IDeviceLogOptions,
|
|
355
355
|
): string;
|
|
356
356
|
}
|
|
357
357
|
|
|
@@ -380,13 +380,13 @@ declare global {
|
|
|
380
380
|
installApplication(
|
|
381
381
|
packageFilePath: string,
|
|
382
382
|
appIdentifier?: string,
|
|
383
|
-
buildData?: IBuildData
|
|
383
|
+
buildData?: IBuildData,
|
|
384
384
|
): Promise<void>;
|
|
385
385
|
uninstallApplication(appIdentifier: string): Promise<void>;
|
|
386
386
|
reinstallApplication(
|
|
387
387
|
appIdentifier: string,
|
|
388
388
|
packageFilePath: string,
|
|
389
|
-
buildData?: IBuildData
|
|
389
|
+
buildData?: IBuildData,
|
|
390
390
|
): Promise<void>;
|
|
391
391
|
startApplication(appData: IStartApplicationData): Promise<void>;
|
|
392
392
|
stopApplication(appData: IApplicationData): Promise<void>;
|
|
@@ -395,7 +395,7 @@ declare global {
|
|
|
395
395
|
tryStartApplication(appData: IApplicationData): Promise<void>;
|
|
396
396
|
getDebuggableApps(): Promise<Mobile.IDeviceApplicationInformation[]>;
|
|
397
397
|
getDebuggableAppViews(
|
|
398
|
-
appIdentifiers: string[]
|
|
398
|
+
appIdentifiers: string[],
|
|
399
399
|
): Promise<IDictionary<Mobile.IDebugWebViewInfo[]>>;
|
|
400
400
|
/**
|
|
401
401
|
* Sets the files transferred on device.
|
|
@@ -432,34 +432,34 @@ declare global {
|
|
|
432
432
|
getFile(
|
|
433
433
|
deviceFilePath: string,
|
|
434
434
|
appIdentifier: string,
|
|
435
|
-
outputFilePath?: string
|
|
435
|
+
outputFilePath?: string,
|
|
436
436
|
): Promise<void>;
|
|
437
437
|
getFileContent(
|
|
438
438
|
deviceFilePath: string,
|
|
439
|
-
appIdentifier: string
|
|
439
|
+
appIdentifier: string,
|
|
440
440
|
): Promise<string>;
|
|
441
441
|
putFile(
|
|
442
442
|
localFilePath: string,
|
|
443
443
|
deviceFilePath: string,
|
|
444
|
-
appIdentifier: string
|
|
444
|
+
appIdentifier: string,
|
|
445
445
|
): Promise<void>;
|
|
446
446
|
deleteFile(deviceFilePath: string, appIdentifier: string): Promise<void>;
|
|
447
447
|
transferFiles(
|
|
448
448
|
deviceAppData: Mobile.IDeviceAppData,
|
|
449
|
-
localToDevicePaths: Mobile.ILocalToDevicePathData[]
|
|
449
|
+
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
450
450
|
): Promise<Mobile.ILocalToDevicePathData[]>;
|
|
451
451
|
transferDirectory(
|
|
452
452
|
deviceAppData: Mobile.IDeviceAppData,
|
|
453
453
|
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
454
|
-
projectFilesPath: string
|
|
454
|
+
projectFilesPath: string,
|
|
455
455
|
): Promise<Mobile.ILocalToDevicePathData[]>;
|
|
456
456
|
transferFile?(
|
|
457
457
|
localFilePath: string,
|
|
458
|
-
deviceFilePath: string
|
|
458
|
+
deviceFilePath: string,
|
|
459
459
|
): Promise<void>;
|
|
460
460
|
createFileOnDevice?(
|
|
461
461
|
deviceFilePath: string,
|
|
462
|
-
fileContent: string
|
|
462
|
+
fileContent: string,
|
|
463
463
|
): Promise<void>;
|
|
464
464
|
/**
|
|
465
465
|
* Updates the hash file on device with the current hashes of files.
|
|
@@ -468,7 +468,7 @@ declare global {
|
|
|
468
468
|
*/
|
|
469
469
|
updateHashesOnDevice(
|
|
470
470
|
hashes: IStringDictionary,
|
|
471
|
-
appIdentifier: string
|
|
471
|
+
appIdentifier: string,
|
|
472
472
|
): Promise<void>;
|
|
473
473
|
}
|
|
474
474
|
|
|
@@ -483,11 +483,11 @@ declare global {
|
|
|
483
483
|
interface IAndroidDebugBridge {
|
|
484
484
|
executeCommand(
|
|
485
485
|
args: string[],
|
|
486
|
-
options?: IAndroidDebugBridgeCommandOptions
|
|
486
|
+
options?: IAndroidDebugBridgeCommandOptions,
|
|
487
487
|
): Promise<any>;
|
|
488
488
|
executeShellCommand(
|
|
489
489
|
args: string[],
|
|
490
|
-
options?: IAndroidDebugBridgeCommandOptions
|
|
490
|
+
options?: IAndroidDebugBridgeCommandOptions,
|
|
491
491
|
): Promise<any>;
|
|
492
492
|
pushFile(localFilePath: string, deviceFilePath: string): Promise<void>;
|
|
493
493
|
removeFile(deviceFilePath: string): Promise<void>;
|
|
@@ -514,7 +514,7 @@ declare global {
|
|
|
514
514
|
interface IDeviceAndroidDebugBridge extends IAndroidDebugBridge {
|
|
515
515
|
sendBroadcastToDevice(
|
|
516
516
|
action: string,
|
|
517
|
-
extras?: IStringDictionary
|
|
517
|
+
extras?: IStringDictionary,
|
|
518
518
|
): Promise<number>;
|
|
519
519
|
}
|
|
520
520
|
|
|
@@ -557,7 +557,7 @@ declare global {
|
|
|
557
557
|
skipEmulatorStart?: boolean;
|
|
558
558
|
/**
|
|
559
559
|
* Currently available only for iOS. Specifies the sdk version of the iOS simulator.
|
|
560
|
-
* In case when `
|
|
560
|
+
* In case when `ns run ios --device "iPhone 6"` command is executed, the user can specify the sdk of the simulator because it is possible to have more than one device with the same name but with different sdk versions.
|
|
561
561
|
*/
|
|
562
562
|
sdk?: string;
|
|
563
563
|
|
|
@@ -587,7 +587,7 @@ declare global {
|
|
|
587
587
|
execute<T>(
|
|
588
588
|
action: (device: Mobile.IDevice) => Promise<T>,
|
|
589
589
|
canExecute?: (dev: Mobile.IDevice) => boolean,
|
|
590
|
-
options?: { allowNoDevices?: boolean }
|
|
590
|
+
options?: { allowNoDevices?: boolean },
|
|
591
591
|
): Promise<IDeviceActionResult<T>[]>;
|
|
592
592
|
|
|
593
593
|
/**
|
|
@@ -622,7 +622,7 @@ declare global {
|
|
|
622
622
|
deviceIdentifiers: string[],
|
|
623
623
|
appIdentifier: string,
|
|
624
624
|
framework: string,
|
|
625
|
-
projectDir: string
|
|
625
|
+
projectDir: string,
|
|
626
626
|
): Promise<IAppInstalledInfo>[];
|
|
627
627
|
setLogLevel(logLevel: string, deviceIdentifier?: string): void;
|
|
628
628
|
deployOnDevices(
|
|
@@ -630,20 +630,20 @@ declare global {
|
|
|
630
630
|
packageFile: string,
|
|
631
631
|
packageName: string,
|
|
632
632
|
framework: string,
|
|
633
|
-
projectDir: string
|
|
633
|
+
projectDir: string,
|
|
634
634
|
): Promise<void>[];
|
|
635
635
|
getDeviceByIdentifier(identifier: string): Mobile.IDevice;
|
|
636
636
|
mapAbstractToTcpPort(
|
|
637
637
|
deviceIdentifier: string,
|
|
638
638
|
appIdentifier: string,
|
|
639
|
-
framework: string
|
|
639
|
+
framework: string,
|
|
640
640
|
): Promise<string>;
|
|
641
641
|
getDebuggableApps(
|
|
642
|
-
deviceIdentifiers: string[]
|
|
642
|
+
deviceIdentifiers: string[],
|
|
643
643
|
): Promise<Mobile.IDeviceApplicationInformation[]>[];
|
|
644
644
|
getDebuggableViews(
|
|
645
645
|
deviceIdentifier: string,
|
|
646
|
-
appIdentifier: string
|
|
646
|
+
appIdentifier: string,
|
|
647
647
|
): Promise<Mobile.IDebugWebViewInfo[]>;
|
|
648
648
|
|
|
649
649
|
/**
|
|
@@ -659,7 +659,7 @@ declare global {
|
|
|
659
659
|
* @returns {Promise<Mobile.IListEmulatorsOutput>} Dictionary with the following format: { ios: { devices: Mobile.IDeviceInfo[], errors: string[] }, android: { devices: Mobile.IDeviceInfo[], errors: string[]}}.
|
|
660
660
|
*/
|
|
661
661
|
getEmulatorImages(
|
|
662
|
-
options?: Mobile.IListEmulatorsOptions
|
|
662
|
+
options?: Mobile.IListEmulatorsOptions,
|
|
663
663
|
): Promise<Mobile.IListEmulatorsOutput>;
|
|
664
664
|
|
|
665
665
|
/**
|
|
@@ -674,11 +674,11 @@ declare global {
|
|
|
674
674
|
* prompts the user for a manual choice or returns the first one for non interactive terminals.
|
|
675
675
|
*/
|
|
676
676
|
pickSingleDevice(
|
|
677
|
-
options: IPickSingleDeviceOptions
|
|
677
|
+
options: IPickSingleDeviceOptions,
|
|
678
678
|
): Promise<Mobile.IDevice>;
|
|
679
679
|
|
|
680
680
|
getPlatformsFromDeviceDescriptors(
|
|
681
|
-
deviceDescriptors: ILiveSyncDeviceDescriptor[]
|
|
681
|
+
deviceDescriptors: ILiveSyncDeviceDescriptor[],
|
|
682
682
|
): string[];
|
|
683
683
|
}
|
|
684
684
|
|
|
@@ -734,7 +734,7 @@ declare global {
|
|
|
734
734
|
mapAbstractToTcpPort(
|
|
735
735
|
deviceIdentifier: string,
|
|
736
736
|
appIdentifier: string,
|
|
737
|
-
framework: string
|
|
737
|
+
framework: string,
|
|
738
738
|
): Promise<string>;
|
|
739
739
|
|
|
740
740
|
/**
|
|
@@ -743,7 +743,7 @@ declare global {
|
|
|
743
743
|
* @return {Mobile.IDeviceApplicationInformation[]} Returns array of applications information for the applications which are available for debugging.
|
|
744
744
|
*/
|
|
745
745
|
getDebuggableApps(
|
|
746
|
-
deviceIdentifier: string
|
|
746
|
+
deviceIdentifier: string,
|
|
747
747
|
): Promise<Mobile.IDeviceApplicationInformation[]>;
|
|
748
748
|
|
|
749
749
|
/**
|
|
@@ -756,7 +756,7 @@ declare global {
|
|
|
756
756
|
getMappedAbstractToTcpPorts(
|
|
757
757
|
deviceIdentifier: string,
|
|
758
758
|
appIdentifiers: string[],
|
|
759
|
-
framework: string
|
|
759
|
+
framework: string,
|
|
760
760
|
): Promise<IDictionary<number>>;
|
|
761
761
|
|
|
762
762
|
/**
|
|
@@ -767,7 +767,7 @@ declare global {
|
|
|
767
767
|
*/
|
|
768
768
|
getAppProcessId(
|
|
769
769
|
deviceIdentifier: string,
|
|
770
|
-
appIdentifier: string
|
|
770
|
+
appIdentifier: string,
|
|
771
771
|
): Promise<string>;
|
|
772
772
|
|
|
773
773
|
/**
|
|
@@ -778,7 +778,7 @@ declare global {
|
|
|
778
778
|
* @returns {number} The TCP port that is used for the forwarding.
|
|
779
779
|
*/
|
|
780
780
|
forwardFreeTcpToAbstractPort(
|
|
781
|
-
portForwardInputData: IPortForwardData
|
|
781
|
+
portForwardInputData: IPortForwardData,
|
|
782
782
|
): Promise<number>;
|
|
783
783
|
}
|
|
784
784
|
|
|
@@ -840,7 +840,7 @@ declare global {
|
|
|
840
840
|
fileName: string,
|
|
841
841
|
localProjectRootPath: string,
|
|
842
842
|
onDeviceFileName: string,
|
|
843
|
-
deviceProjectRootPath: string
|
|
843
|
+
deviceProjectRootPath: string,
|
|
844
844
|
): Mobile.ILocalToDevicePathData;
|
|
845
845
|
}
|
|
846
846
|
|
|
@@ -895,7 +895,7 @@ declare global {
|
|
|
895
895
|
* @returns {Promise<IStartEmulatorOutput>} Starts the emulator and returns the errors if some error occurs.
|
|
896
896
|
*/
|
|
897
897
|
startEmulator(
|
|
898
|
-
options: Mobile.IStartEmulatorOptions
|
|
898
|
+
options: Mobile.IStartEmulatorOptions,
|
|
899
899
|
): Promise<IStartEmulatorOutput>;
|
|
900
900
|
|
|
901
901
|
/**
|
|
@@ -916,7 +916,7 @@ declare global {
|
|
|
916
916
|
* Returns array of all available android emulators - genymotion and native avd emulators and array of errors.
|
|
917
917
|
*/
|
|
918
918
|
getEmulatorImages(
|
|
919
|
-
adbDevicesOutput: string[]
|
|
919
|
+
adbDevicesOutput: string[],
|
|
920
920
|
): Promise<Mobile.IEmulatorImagesOutput>;
|
|
921
921
|
/**
|
|
922
922
|
* Gets all identifiers of all running android emulators.
|
|
@@ -967,7 +967,7 @@ declare global {
|
|
|
967
967
|
* @returns {Promise<IVirtualBoxEnumerateGuestPropertiesOutput>} - Returns a dictionary in the following format: { properties: string; error?: string; }
|
|
968
968
|
*/
|
|
969
969
|
enumerateGuestProperties(
|
|
970
|
-
id: string
|
|
970
|
+
id: string,
|
|
971
971
|
): Promise<IVirtualBoxEnumerateGuestPropertiesOutput>;
|
|
972
972
|
}
|
|
973
973
|
|
|
@@ -1012,7 +1012,7 @@ declare global {
|
|
|
1012
1012
|
*/
|
|
1013
1013
|
parseIniFile(
|
|
1014
1014
|
iniFilePath: string,
|
|
1015
|
-
avdInfo?: Mobile.IAvdInfo
|
|
1015
|
+
avdInfo?: Mobile.IAvdInfo,
|
|
1016
1016
|
): Mobile.IAvdInfo;
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
@@ -1056,7 +1056,7 @@ declare global {
|
|
|
1056
1056
|
launchApplication(
|
|
1057
1057
|
applicationPath: string,
|
|
1058
1058
|
appIdentifier: string,
|
|
1059
|
-
options: IiOSSimLaunchApplicationOptions
|
|
1059
|
+
options: IiOSSimLaunchApplicationOptions,
|
|
1060
1060
|
): Promise<any>;
|
|
1061
1061
|
printDeviceTypes(): Promise<any>;
|
|
1062
1062
|
sendNotification(notification: string, deviceId: string): Promise<void>;
|
|
@@ -1104,7 +1104,7 @@ declare global {
|
|
|
1104
1104
|
interface IiOSSimulatorService extends IEmulatorPlatformService {
|
|
1105
1105
|
postDarwinNotification(
|
|
1106
1106
|
notification: string,
|
|
1107
|
-
deviceId: string
|
|
1107
|
+
deviceId: string,
|
|
1108
1108
|
): Promise<void>;
|
|
1109
1109
|
|
|
1110
1110
|
/**
|
|
@@ -1206,34 +1206,34 @@ declare global {
|
|
|
1206
1206
|
getDeviceFileContent(
|
|
1207
1207
|
device: Mobile.IDevice,
|
|
1208
1208
|
deviceFilePath: string,
|
|
1209
|
-
projectData: IProjectData
|
|
1209
|
+
projectData: IProjectData,
|
|
1210
1210
|
): Promise<string>;
|
|
1211
1211
|
}
|
|
1212
1212
|
|
|
1213
1213
|
interface IEmulatorHelper {
|
|
1214
1214
|
mapAndroidApiLevelToVersion: IStringDictionary;
|
|
1215
1215
|
getEmulatorsFromAvailableEmulatorsOutput(
|
|
1216
|
-
availableEmulatorsOutput: Mobile.IListEmulatorsOutput
|
|
1216
|
+
availableEmulatorsOutput: Mobile.IListEmulatorsOutput,
|
|
1217
1217
|
): Mobile.IDeviceInfo[];
|
|
1218
1218
|
getErrorsFromAvailableEmulatorsOutput(
|
|
1219
|
-
availableEmulatorsOutput: Mobile.IListEmulatorsOutput
|
|
1219
|
+
availableEmulatorsOutput: Mobile.IListEmulatorsOutput,
|
|
1220
1220
|
): string[];
|
|
1221
1221
|
getEmulatorByImageIdentifier(
|
|
1222
1222
|
imageIdentifier: string,
|
|
1223
|
-
emulators: Mobile.IDeviceInfo[]
|
|
1223
|
+
emulators: Mobile.IDeviceInfo[],
|
|
1224
1224
|
): Mobile.IDeviceInfo;
|
|
1225
1225
|
getEmulatorByIdOrName(
|
|
1226
1226
|
emulatorIdOrName: string,
|
|
1227
|
-
emulators: Mobile.IDeviceInfo[]
|
|
1227
|
+
emulators: Mobile.IDeviceInfo[],
|
|
1228
1228
|
): Mobile.IDeviceInfo;
|
|
1229
1229
|
getEmulatorByStartEmulatorOptions(
|
|
1230
1230
|
options: Mobile.IStartEmulatorOptions,
|
|
1231
|
-
emulators: Mobile.IDeviceInfo[]
|
|
1231
|
+
emulators: Mobile.IDeviceInfo[],
|
|
1232
1232
|
): Mobile.IDeviceInfo;
|
|
1233
1233
|
isEmulatorRunning(emulator: Mobile.IDeviceInfo): boolean;
|
|
1234
1234
|
setRunningAndroidEmulatorProperties(
|
|
1235
1235
|
emulatorId: string,
|
|
1236
|
-
emulator: Mobile.IDeviceInfo
|
|
1236
|
+
emulator: Mobile.IDeviceInfo,
|
|
1237
1237
|
): void;
|
|
1238
1238
|
}
|
|
1239
1239
|
|
|
@@ -1286,13 +1286,13 @@ declare global {
|
|
|
1286
1286
|
* Computes the shasums of localToDevicePaths and updates hash file on device
|
|
1287
1287
|
*/
|
|
1288
1288
|
updateHashes(
|
|
1289
|
-
localToDevicePaths: Mobile.ILocalToDevicePathData[]
|
|
1289
|
+
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
1290
1290
|
): Promise<void>;
|
|
1291
1291
|
/**
|
|
1292
1292
|
* Computes the shasums of localToDevicePaths and removes them from hash file on device
|
|
1293
1293
|
*/
|
|
1294
1294
|
removeHashes(
|
|
1295
|
-
localToDevicePaths: Mobile.ILocalToDevicePathData[]
|
|
1295
|
+
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
1296
1296
|
): Promise<boolean>;
|
|
1297
1297
|
|
|
1298
1298
|
/**
|
|
@@ -1309,7 +1309,7 @@ declare global {
|
|
|
1309
1309
|
*/
|
|
1310
1310
|
generateHashesFromLocalToDevicePaths(
|
|
1311
1311
|
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
1312
|
-
initialShasums?: IStringDictionary
|
|
1312
|
+
initialShasums?: IStringDictionary,
|
|
1313
1313
|
): Promise<IStringDictionary>;
|
|
1314
1314
|
|
|
1315
1315
|
/**
|
|
@@ -1318,7 +1318,7 @@ declare global {
|
|
|
1318
1318
|
* @returns {string[]} DevicePaths of all elements from the input localToDevicePaths.
|
|
1319
1319
|
*/
|
|
1320
1320
|
getDevicePaths(
|
|
1321
|
-
localToDevicePaths: Mobile.ILocalToDevicePathData[]
|
|
1321
|
+
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
1322
1322
|
): string[];
|
|
1323
1323
|
|
|
1324
1324
|
/**
|
|
@@ -1329,7 +1329,7 @@ declare global {
|
|
|
1329
1329
|
*/
|
|
1330
1330
|
getChangedShasums(
|
|
1331
1331
|
oldShasums: IStringDictionary,
|
|
1332
|
-
currentShasums: IStringDictionary
|
|
1332
|
+
currentShasums: IStringDictionary,
|
|
1333
1333
|
): IStringDictionary;
|
|
1334
1334
|
}
|
|
1335
1335
|
|
|
@@ -1371,7 +1371,7 @@ declare global {
|
|
|
1371
1371
|
*/
|
|
1372
1372
|
handleErrors(
|
|
1373
1373
|
errors: IAndroidDebugBridgeError[],
|
|
1374
|
-
treatErrorsAsWarnings?: boolean
|
|
1374
|
+
treatErrorsAsWarnings?: boolean,
|
|
1375
1375
|
): void;
|
|
1376
1376
|
}
|
|
1377
1377
|
|
|
@@ -1401,77 +1401,77 @@ declare global {
|
|
|
1401
1401
|
install(
|
|
1402
1402
|
ipaPath: string,
|
|
1403
1403
|
deviceIdentifiers: string[],
|
|
1404
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1404
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1405
1405
|
): Promise<IOSDeviceResponse>;
|
|
1406
1406
|
|
|
1407
1407
|
uninstall(
|
|
1408
1408
|
appIdentifier: string,
|
|
1409
1409
|
deviceIdentifiers: string[],
|
|
1410
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1410
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1411
1411
|
): Promise<IOSDeviceResponse>;
|
|
1412
1412
|
|
|
1413
1413
|
startLookingForDevices(
|
|
1414
1414
|
deviceFoundCallback: DeviceInfoCallback,
|
|
1415
1415
|
deviceUpdatedCallback: DeviceInfoCallback,
|
|
1416
1416
|
deviceLostCallback: DeviceInfoCallback,
|
|
1417
|
-
options?: Mobile.IDeviceLookingOptions
|
|
1417
|
+
options?: Mobile.IDeviceLookingOptions,
|
|
1418
1418
|
): Promise<void>;
|
|
1419
1419
|
|
|
1420
1420
|
startDeviceLog(deviceIdentifier: string): void;
|
|
1421
1421
|
|
|
1422
1422
|
apps(
|
|
1423
1423
|
deviceIdentifiers: string[],
|
|
1424
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1424
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1425
1425
|
): Promise<IOSDeviceAppInfo>;
|
|
1426
1426
|
|
|
1427
1427
|
listDirectory(
|
|
1428
1428
|
listArray: IOSDeviceLib.IReadOperationData[],
|
|
1429
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1429
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1430
1430
|
): Promise<IOSDeviceMultipleResponse>;
|
|
1431
1431
|
|
|
1432
1432
|
readFiles(
|
|
1433
1433
|
deviceFilePaths: IOSDeviceLib.IReadOperationData[],
|
|
1434
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1434
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1435
1435
|
): Promise<IOSDeviceResponse>;
|
|
1436
1436
|
|
|
1437
1437
|
downloadFiles(
|
|
1438
1438
|
deviceFilePaths: IOSDeviceLib.IFileOperationData[],
|
|
1439
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1439
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1440
1440
|
): Promise<IOSDeviceResponse>;
|
|
1441
1441
|
|
|
1442
1442
|
uploadFiles(
|
|
1443
1443
|
files: IOSDeviceLib.IUploadFilesData[],
|
|
1444
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1444
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1445
1445
|
): Promise<IOSDeviceResponse>;
|
|
1446
1446
|
|
|
1447
1447
|
deleteFiles(
|
|
1448
1448
|
deleteArray: IOSDeviceLib.IDeleteFileData[],
|
|
1449
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1449
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1450
1450
|
): Promise<IOSDeviceResponse>;
|
|
1451
1451
|
|
|
1452
1452
|
start(
|
|
1453
1453
|
startArray: IOSDeviceLib.IIOSApplicationData[],
|
|
1454
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1454
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1455
1455
|
): Promise<IOSDeviceResponse>;
|
|
1456
1456
|
|
|
1457
1457
|
stop(
|
|
1458
1458
|
stopArray: IOSDeviceLib.IIOSApplicationData[],
|
|
1459
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1459
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1460
1460
|
): Promise<IOSDeviceResponse>;
|
|
1461
1461
|
|
|
1462
1462
|
postNotification(
|
|
1463
1463
|
postNotificationArray: IOSDeviceLib.IPostNotificationData[],
|
|
1464
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1464
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1465
1465
|
): Promise<IOSDeviceResponse>;
|
|
1466
1466
|
|
|
1467
1467
|
awaitNotificationResponse(
|
|
1468
1468
|
awaitNotificationResponseArray: IOSDeviceLib.IAwaitNotificatioNResponseData[],
|
|
1469
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1469
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1470
1470
|
): Promise<IOSDeviceResponse>;
|
|
1471
1471
|
|
|
1472
1472
|
connectToPort(
|
|
1473
1473
|
connectToPortArray: IOSDeviceLib.IConnectToPortData[],
|
|
1474
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1474
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1475
1475
|
): Promise<IDictionary<IOSDeviceLib.IConnectToPortResponse[]>>;
|
|
1476
1476
|
|
|
1477
1477
|
setShouldDispose(shouldDispose: boolean): void;
|
|
@@ -1480,7 +1480,7 @@ declare global {
|
|
|
1480
1480
|
type DeviceOperationErrorHandler = (err: IOSDeviceLib.IDeviceError) => void;
|
|
1481
1481
|
|
|
1482
1482
|
type DeviceInfoCallback = (
|
|
1483
|
-
deviceInfo: IOSDeviceLib.IDeviceActionInfo
|
|
1483
|
+
deviceInfo: IOSDeviceLib.IDeviceActionInfo,
|
|
1484
1484
|
) => void;
|
|
1485
1485
|
|
|
1486
1486
|
type IOSDeviceResponse = IDictionary<IOSDeviceLib.IDeviceResponse[]>;
|