nativescript 8.7.2 → 8.8.0-alpha.1
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/lib/android-tools-info.js +0 -12
- package/lib/base-package-manager.js +0 -7
- package/lib/bootstrap.js +1 -5
- package/lib/bun-package-manager.js +1 -17
- package/lib/color.js +0 -3
- package/lib/commands/add-platform.js +0 -1
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.js +0 -4
- package/lib/commands/build.js +2 -3
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.js +0 -3
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.js +1 -6
- package/lib/commands/deploy.js +2 -3
- package/lib/commands/extensibility/install-extension.js +0 -1
- package/lib/commands/extensibility/list-extensions.js +0 -1
- package/lib/commands/extensibility/uninstall-extension.js +0 -1
- package/lib/commands/fonts.js +0 -1
- package/lib/commands/generate-assets.js +0 -1
- package/lib/commands/generate-help.js +0 -1
- package/lib/commands/generate.js +2 -12
- package/lib/commands/info.js +0 -1
- package/lib/commands/install.js +0 -1
- package/lib/commands/list-platforms.js +0 -1
- package/lib/commands/migrate.js +0 -1
- package/lib/commands/platform-clean.js +0 -1
- package/lib/commands/plugin/add-plugin.js +0 -1
- package/lib/commands/plugin/build-plugin.js +0 -1
- package/lib/commands/plugin/create-plugin.js +0 -5
- package/lib/commands/plugin/list-plugins.js +0 -1
- package/lib/commands/plugin/remove-plugin.js +0 -2
- package/lib/commands/plugin/update-plugin.js +0 -1
- package/lib/commands/post-install.js +0 -6
- package/lib/commands/prepare.js +2 -3
- package/lib/commands/preview.js +0 -2
- package/lib/commands/remove-platform.js +0 -1
- package/lib/commands/resources/resources-update.js +0 -2
- package/lib/commands/run.js +0 -1
- package/lib/commands/setup.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/commands/test-init.js +0 -4
- package/lib/commands/test.js +2 -9
- package/lib/commands/typings.js +1 -2
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.js +0 -2
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.js +0 -3
- package/lib/common/codeGeneration/code-entity.js +0 -1
- package/lib/common/codeGeneration/code-printer.js +0 -1
- package/lib/common/command-params.js +0 -1
- package/lib/common/commands/analytics.js +0 -3
- package/lib/common/commands/autocompletion.js +0 -3
- package/lib/common/commands/device/device-log-stream.js +0 -1
- package/lib/common/commands/device/get-file.js +0 -2
- package/lib/common/commands/device/list-applications.js +0 -1
- package/lib/common/commands/device/list-devices.js +0 -3
- package/lib/common/commands/device/list-files.js +0 -2
- package/lib/common/commands/device/put-file.js +0 -2
- package/lib/common/commands/device/run-application.js +0 -1
- package/lib/common/commands/device/stop-application.js +0 -1
- package/lib/common/commands/device/uninstall-application.js +0 -1
- package/lib/common/commands/doctor.js +2 -3
- package/lib/common/commands/generate-messages.js +0 -1
- package/lib/common/commands/help.js +0 -1
- package/lib/common/commands/package-manager-get.js +0 -1
- package/lib/common/commands/package-manager-set.js +0 -1
- package/lib/common/commands/post-install.js +0 -1
- package/lib/common/commands/preuninstall.js +2 -11
- package/lib/common/commands/proxy/proxy-base.js +0 -4
- package/lib/common/commands/proxy/proxy-clear.js +0 -1
- package/lib/common/commands/proxy/proxy-get.js +0 -1
- package/lib/common/commands/proxy/proxy-set.js +0 -1
- package/lib/common/common-lib.js +0 -1
- package/lib/common/constants.js +0 -11
- package/lib/common/decorators.js +0 -48
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/errors.js +3 -13
- package/lib/common/file-system.js +2 -13
- package/lib/common/header.js +0 -3
- package/lib/common/helpers.js +3 -89
- package/lib/common/host-info.js +0 -4
- package/lib/common/http-client.js +0 -20
- package/lib/common/logger/appenders/cli-appender.js +0 -4
- package/lib/common/logger/appenders/emit-appender.js +0 -4
- package/lib/common/logger/layouts/cli-layout.js +0 -1
- package/lib/common/logger/logger.js +0 -5
- package/lib/common/messages/messages.js +0 -6
- package/lib/common/mobile/android/android-application-manager.js +1 -20
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
- package/lib/common/mobile/android/android-debug-bridge.js +0 -6
- package/lib/common/mobile/android/android-device-file-system.js +0 -4
- package/lib/common/mobile/android/android-device-hash-service.js +0 -3
- package/lib/common/mobile/android/android-device.js +0 -8
- package/lib/common/mobile/android/android-emulator-services.js +1 -2
- package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
- package/lib/common/mobile/android/android-log-filter.js +0 -4
- package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
- package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
- package/lib/common/mobile/android/genymotion/genymotion-service.js +0 -5
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +1 -20
- package/lib/common/mobile/application-manager-base.js +0 -6
- package/lib/common/mobile/device-emitter.js +0 -4
- package/lib/common/mobile/device-log-emitter.js +0 -1
- package/lib/common/mobile/device-log-provider-base.js +0 -1
- package/lib/common/mobile/device-log-provider.js +0 -23
- package/lib/common/mobile/device-platforms-constants.js +0 -1
- package/lib/common/mobile/emulator-helper.js +0 -3
- package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
- package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
- package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
- package/lib/common/mobile/ios/device/ios-device.js +0 -4
- package/lib/common/mobile/ios/ios-device-base.js +0 -1
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
- package/lib/common/mobile/ios/ios-log-filter.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
- package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
- package/lib/common/mobile/log-filter.js +0 -2
- package/lib/common/mobile/logging-levels.js +0 -1
- package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
- package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
- package/lib/common/mobile/mobile-core/devices-service.js +0 -69
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-helper.js +0 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
- package/lib/common/opener.js +0 -1
- package/lib/common/os-info.js +0 -1
- package/lib/common/plist-parser.js +0 -1
- package/lib/common/project-helper.js +0 -1
- package/lib/common/prompter.js +1 -9
- package/lib/common/queue.js +0 -1
- package/lib/common/resource-loader.js +0 -1
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +1 -2
- package/lib/common/services/commands-service.js +6 -17
- package/lib/common/services/help-service.js +3 -11
- package/lib/common/services/hooks-service.js +0 -13
- package/lib/common/services/ios-notification-service.js +0 -1
- package/lib/common/services/json-file-settings-service.js +0 -6
- package/lib/common/services/lock-service.js +0 -6
- package/lib/common/services/message-contract-generator.js +0 -1
- package/lib/common/services/messages-service.js +0 -1
- package/lib/common/services/micro-templating-service.js +0 -6
- package/lib/common/services/net-service.js +0 -3
- package/lib/common/services/project-files-manager.js +0 -5
- package/lib/common/services/project-files-provider-base.js +0 -1
- package/lib/common/services/proxy-service.js +0 -1
- package/lib/common/services/qr.js +0 -1
- package/lib/common/services/settings-service.js +0 -1
- package/lib/common/services/xcode-select-service.js +0 -1
- package/lib/common/utils.js +0 -1
- package/lib/common/validators/project-name-validator.js +0 -1
- package/lib/common/validators/validation-result.js +0 -1
- package/lib/common/verify-node-version.js +1 -8
- package/lib/common/yok.js +11 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +0 -53
- package/lib/controllers/build-controller.js +3 -4
- package/lib/controllers/debug-controller.js +3 -8
- package/lib/controllers/deploy-controller.js +0 -1
- package/lib/controllers/migrate-controller.js +3 -91
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +4 -14
- package/lib/controllers/run-controller.js +1 -17
- package/lib/controllers/update-controller-base.js +0 -1
- package/lib/controllers/update-controller.js +0 -11
- package/lib/data/build-data.js +0 -1
- package/lib/data/controller-data-base.js +0 -1
- package/lib/data/debug-data.js +0 -1
- package/lib/data/platform-data.js +0 -1
- package/lib/data/prepare-data.js +0 -1
- package/lib/data/run-data.js +0 -1
- package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
- package/lib/detached-processes/cleanup-process.js +14 -18
- package/lib/detached-processes/file-log-service.js +1 -2
- package/lib/device-path-provider.js +0 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
- package/lib/device-sockets/ios/notification.js +0 -3
- package/lib/device-sockets/ios/socket-request-executor.js +0 -3
- package/lib/helpers/android-bundle-validator-helper.js +1 -2
- package/lib/helpers/deploy-command-helper.js +0 -1
- package/lib/helpers/key-command-helper.js +2 -4
- package/lib/helpers/livesync-command-helper.js +1 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +2 -3
- package/lib/helpers/package-path-helper.js +0 -1
- package/lib/helpers/platform-command-helper.js +2 -7
- package/lib/helpers/version-validator-helper.js +0 -1
- package/lib/key-commands/bootstrap.js +2 -3
- package/lib/key-commands/index.js +4 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +1 -10
- package/lib/node/pbxproj-dom-xcode.js +0 -1
- package/lib/node/xcode.js +0 -1
- package/lib/node-package-manager.js +1 -11
- package/lib/options.js +116 -141
- package/lib/package-installation-manager.js +1 -8
- package/lib/package-manager.js +0 -2
- package/lib/platform-command-param.js +0 -1
- package/lib/pnpm-package-manager.js +1 -4
- package/lib/project-data.js +0 -12
- package/lib/providers/project-files-provider.js +0 -1
- package/lib/resolvers/livesync-service-resolver.js +0 -1
- package/lib/services/analytics/analytics-broker-process.js +6 -10
- package/lib/services/analytics/analytics-broker.js +1 -2
- package/lib/services/analytics/analytics-service.js +25 -29
- package/lib/services/analytics/google-analytics-provider.js +12 -13
- package/lib/services/analytics-settings-service.js +0 -5
- package/lib/services/android/android-bundle-tool-service.js +0 -1
- package/lib/services/android/gradle-build-args-service.js +2 -9
- package/lib/services/android/gradle-build-service.js +0 -1
- package/lib/services/android/gradle-command-service.js +0 -1
- package/lib/services/android-device-debug-service.js +0 -6
- package/lib/services/android-plugin-build-service.js +12 -43
- package/lib/services/android-project-service.js +4 -71
- package/lib/services/android-resources-migration-service.js +0 -7
- package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
- package/lib/services/assets-generation/assets-generation-service.js +5 -16
- package/lib/services/build-artifacts-service.js +1 -2
- package/lib/services/build-data-service.js +0 -1
- package/lib/services/build-info-file-service.js +0 -1
- package/lib/services/cleanup-service.js +9 -13
- package/lib/services/cocoapods-platform-manager.js +0 -9
- package/lib/services/cocoapods-service.js +1 -21
- package/lib/services/debug-data-service.js +0 -1
- package/lib/services/debug-service-base.js +0 -7
- package/lib/services/device/device-install-app-service.js +1 -2
- package/lib/services/doctor-service.js +6 -21
- package/lib/services/extensibility-service.js +0 -8
- package/lib/services/files-hash-service.js +0 -1
- package/lib/services/hmr-status-service.js +0 -2
- package/lib/services/info-service.js +0 -1
- package/lib/services/initialize-service.js +1 -5
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.js +0 -4
- package/lib/services/ios/spm-service.js +0 -9
- package/lib/services/ios/xcodebuild-args-service.js +0 -9
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +0 -1
- package/lib/services/ios-debugger-port-service.js +0 -1
- package/lib/services/ios-device-debug-service.js +0 -1
- package/lib/services/ios-entitlements-service.js +0 -1
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.js +4 -6
- package/lib/services/ios-project-service.js +1 -23
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +0 -1
- package/lib/services/ip-service.js +0 -2
- package/lib/services/itmstransporter-service.js +0 -1
- package/lib/services/karma-execution.js +0 -2
- package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
- package/lib/services/livesync/android-device-livesync-service.js +0 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
- package/lib/services/livesync/android-livesync-service.js +0 -1
- package/lib/services/livesync/android-livesync-tool.js +0 -4
- package/lib/services/livesync/device-livesync-service-base.js +0 -2
- package/lib/services/livesync/ios-device-livesync-service.js +0 -7
- package/lib/services/livesync/ios-livesync-service.js +0 -2
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.js +0 -5
- package/lib/services/livesync-process-data-service.js +0 -1
- package/lib/services/log-parser-service.js +0 -1
- package/lib/services/log-source-map-service.js +0 -15
- package/lib/services/marking-mode-service.js +5 -8
- package/lib/services/metadata-filtering-service.js +0 -1
- package/lib/services/npm-config-service.js +0 -4
- package/lib/services/pacote-service.js +0 -7
- package/lib/services/performance-service.js +1 -3
- package/lib/services/platform/add-platform-service.js +2 -47
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.js +2 -5
- package/lib/services/platform-environment-requirements.js +3 -8
- package/lib/services/platform-project-service-base.js +0 -1
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.js +2 -18
- package/lib/services/prepare-data-service.js +0 -1
- package/lib/services/project-backup-service.js +0 -4
- package/lib/services/project-changes-service.js +3 -12
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +1 -18
- package/lib/services/project-data-service.js +7 -36
- package/lib/services/project-name-service.js +0 -1
- package/lib/services/project-service.js +0 -10
- package/lib/services/project-templates-service.js +2 -3
- package/lib/services/qr-code-terminal-service.js +0 -1
- package/lib/services/require-service.js +0 -1
- package/lib/services/start-service.js +0 -1
- package/lib/services/temp-service.js +0 -1
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.js +2 -9
- package/lib/services/test-initialization-service.js +0 -4
- package/lib/services/timeline-profiler-service.js +0 -1
- package/lib/services/user-settings-service.js +0 -1
- package/lib/services/versions-service.js +4 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/webpack/webpack-compiler-service.js +1 -42
- package/lib/services/xcconfig-service.js +0 -2
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +1 -2
- package/lib/tools/config-manipulation/config-transformer.js +0 -12
- package/lib/tools/node-modules/node-modules-builder.js +0 -1
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
- package/lib/yarn-package-manager.js +0 -1
- package/lib/yarn2-package-manager.js +0 -3
- package/package.json +1 -1
- package/vendor/aab-tool/README.txt +1 -1
- package/vendor/aab-tool/bundletool.jar +0 -0
- package/vendor/gradle-plugin/build.gradle +21 -15
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +0 -15
- package/node_modules/rimraf/CHANGELOG.md +0 -65
- package/node_modules/stringify-package/CHANGELOG.md +0 -16
|
@@ -15,14 +15,10 @@ function cliAppender(layout) {
|
|
|
15
15
|
return appender;
|
|
16
16
|
}
|
|
17
17
|
function configure(config, layouts) {
|
|
18
|
-
// the default layout for the appender
|
|
19
18
|
let layout = layouts.messagePassThroughLayout;
|
|
20
|
-
// check if there is another layout specified
|
|
21
19
|
if (config.layout) {
|
|
22
20
|
layout = layouts.layout(config.layout.type, config.layout);
|
|
23
21
|
}
|
|
24
|
-
// create a new appender instance
|
|
25
22
|
return cliAppender(layout);
|
|
26
23
|
}
|
|
27
24
|
exports.configure = configure;
|
|
28
|
-
//# sourceMappingURL=cli-appender.js.map
|
|
@@ -21,14 +21,10 @@ function configure(config, layouts) {
|
|
|
21
21
|
if (!config.emitter.emit || typeof config.emitter.emit !== "function") {
|
|
22
22
|
throw new Error("The passed emitter must be instance of EventEmitter");
|
|
23
23
|
}
|
|
24
|
-
// the default layout for the appender
|
|
25
24
|
let layout = layouts.messagePassThroughLayout;
|
|
26
|
-
// check if there is another layout specified
|
|
27
25
|
if (config.layout) {
|
|
28
26
|
layout = layouts.layout(config.layout.type, config.layout);
|
|
29
27
|
}
|
|
30
|
-
// create a new appender instance
|
|
31
28
|
return emitAppender(layout, config.emitter);
|
|
32
29
|
}
|
|
33
30
|
exports.configure = configure;
|
|
34
|
-
//# sourceMappingURL=emit-appender.js.map
|
|
@@ -98,11 +98,9 @@ class Logger {
|
|
|
98
98
|
if (typeof item === "string") {
|
|
99
99
|
return item;
|
|
100
100
|
}
|
|
101
|
-
// do not try to read streams, because they may not be rewindable
|
|
102
101
|
if (item instanceof stream.Readable) {
|
|
103
102
|
return "[ReadableStream]";
|
|
104
103
|
}
|
|
105
|
-
// There's no point in printing buffers
|
|
106
104
|
if (item instanceof Buffer) {
|
|
107
105
|
return "[Buffer]";
|
|
108
106
|
}
|
|
@@ -155,14 +153,12 @@ class Logger {
|
|
|
155
153
|
getLogOptionsForMessage(data) {
|
|
156
154
|
const loggerOptionKeys = _.keys(constants_1.LoggerConfigData);
|
|
157
155
|
const dataToCheck = data.filter((el) => {
|
|
158
|
-
// objects created with Object.create(null) do not have `hasOwnProperty` function
|
|
159
156
|
if (!!el &&
|
|
160
157
|
typeof el === "object" &&
|
|
161
158
|
el.hasOwnProperty &&
|
|
162
159
|
typeof el.hasOwnProperty === "function") {
|
|
163
160
|
for (const key of loggerOptionKeys) {
|
|
164
161
|
if (el.hasOwnProperty(key)) {
|
|
165
|
-
// include only the elements which have one of the keys we've specified as logger options
|
|
166
162
|
return true;
|
|
167
163
|
}
|
|
168
164
|
}
|
|
@@ -201,4 +197,3 @@ __decorate([
|
|
|
201
197
|
], Logger.prototype, "initialize", null);
|
|
202
198
|
exports.Logger = Logger;
|
|
203
199
|
yok_1.injector.register("logger", Logger);
|
|
204
|
-
//# sourceMappingURL=logger.js.map
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// automatically generated code; do not edit manually!
|
|
4
|
-
//
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.Messages = void 0;
|
|
7
4
|
const yok_1 = require("../yok");
|
|
8
|
-
/* tslint:disable:all */
|
|
9
5
|
class Messages {
|
|
10
6
|
constructor() {
|
|
11
7
|
this.Devices = {
|
|
@@ -17,5 +13,3 @@ class Messages {
|
|
|
17
13
|
}
|
|
18
14
|
exports.Messages = Messages;
|
|
19
15
|
yok_1.injector.register("messages", Messages);
|
|
20
|
-
/* tslint:enable */
|
|
21
|
-
//# sourceMappingURL=messages.js.map
|
|
@@ -38,7 +38,7 @@ class AndroidApplicationManager extends application_manager_base_1.ApplicationMa
|
|
|
38
38
|
this.$deviceLogProvider = $deviceLogProvider;
|
|
39
39
|
this.$errors = $errors;
|
|
40
40
|
this.PID_CHECK_INTERVAL = 100;
|
|
41
|
-
this.PID_CHECK_TIMEOUT = 10000;
|
|
41
|
+
this.PID_CHECK_TIMEOUT = 10000;
|
|
42
42
|
}
|
|
43
43
|
getInstalledApplications() {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -80,7 +80,6 @@ class AndroidApplicationManager extends application_manager_base_1.ApplicationMa
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
uninstallApplication(appIdentifier) {
|
|
83
|
-
// Need to set the treatErrorsAsWarnings to true because when using tns run command if the application is not installed on the device it will throw error
|
|
84
83
|
return this.adb.executeShellCommand(["pm", "uninstall", `${appIdentifier}`], { treatErrorsAsWarnings: true });
|
|
85
84
|
}
|
|
86
85
|
startApplication(appData) {
|
|
@@ -90,24 +89,9 @@ class AndroidApplicationManager extends application_manager_base_1.ApplicationMa
|
|
|
90
89
|
`cat /dev/null > ${constants_1.LiveSyncPaths.ANDROID_TMP_DIR_NAME}/${appData.appId}-debugbreak`,
|
|
91
90
|
]);
|
|
92
91
|
}
|
|
93
|
-
// If the app is debuggable, the Runtime will update the file when its ready for debugging
|
|
94
|
-
// and we will be able to take decisions and synchronize the debug experience based on the content
|
|
95
92
|
yield this.adb.executeShellCommand([
|
|
96
93
|
`cat /dev/null > ${constants_1.LiveSyncPaths.ANDROID_TMP_DIR_NAME}/${appData.appId}-debugger-started`,
|
|
97
94
|
]);
|
|
98
|
-
/*
|
|
99
|
-
Example "pm dump <app_identifier> | grep -A 1 MAIN" output"
|
|
100
|
-
android.intent.action.MAIN:
|
|
101
|
-
3b2df03 org.nativescript.cliapp/com.tns.NativeScriptActivity filter 50dd82e
|
|
102
|
-
Action: "android.intent.action.MAIN"
|
|
103
|
-
Category: "android.intent.category.LAUNCHER"
|
|
104
|
-
--
|
|
105
|
-
intent={act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.nativescript.cliapp/com.tns.NativeScriptActivity}
|
|
106
|
-
realActivity=org.nativescript.cliapp/com.tns.NativeScriptActivity
|
|
107
|
-
--
|
|
108
|
-
Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.nativescript.cliapp/com.tns.NativeScriptActivity }
|
|
109
|
-
frontOfTask=true task=TaskRecord{fe592ac #449 A=org.nativescript.cliapp U=0 StackId=1 sz=1}
|
|
110
|
-
*/
|
|
111
95
|
const appIdentifier = appData.appId;
|
|
112
96
|
const pmDumpOutput = yield this.adb.executeShellCommand([
|
|
113
97
|
"pm",
|
|
@@ -159,8 +143,6 @@ class AndroidApplicationManager extends application_manager_base_1.ApplicationMa
|
|
|
159
143
|
pid: processIdentifier,
|
|
160
144
|
appId: appIdentifier,
|
|
161
145
|
onAppRestarted: () => {
|
|
162
|
-
// If the app restarts, we update the PID and
|
|
163
|
-
// restart log helper.
|
|
164
146
|
this.onAppLaunch(appData);
|
|
165
147
|
},
|
|
166
148
|
});
|
|
@@ -244,4 +226,3 @@ __decorate([
|
|
|
244
226
|
(0, decorators_1.cache)()
|
|
245
227
|
], AndroidApplicationManager.prototype, "getFullyQualifiedActivityRegex", null);
|
|
246
228
|
exports.AndroidApplicationManager = AndroidApplicationManager;
|
|
247
|
-
//# sourceMappingURL=android-application-manager.js.map
|
|
@@ -330,4 +330,3 @@ AndroidDebugBridgeResultHandler.ANDROID_DEBUG_BRIDGE_ERRORS = [
|
|
|
330
330
|
];
|
|
331
331
|
exports.AndroidDebugBridgeResultHandler = AndroidDebugBridgeResultHandler;
|
|
332
332
|
yok_1.injector.register("androidDebugBridgeResultHandler", AndroidDebugBridgeResultHandler);
|
|
333
|
-
//# sourceMappingURL=android-debug-bridge-result-handler.js.map
|
|
@@ -50,15 +50,11 @@ class AndroidDebugBridge {
|
|
|
50
50
|
return this.$childProcess.spawn(command.command, command.args);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
// If adb -s <invalid device id> install <smth> is executed the childProcess won't get any response
|
|
54
|
-
// because the adb will be waiting for valid device and will not send close or exit event.
|
|
55
|
-
// For example `adb -s <invalid device id> install <smth>` throws error 'error: device \'030939f508e6c773\' not found\r\n' exitCode 4294967295
|
|
56
53
|
const result = yield this.$childProcess.spawnFromEvent(command.command, command.args, event, childProcessOptions, { throwError: false });
|
|
57
54
|
const errors = this.$androidDebugBridgeResultHandler.checkForErrors(result);
|
|
58
55
|
if (errors && errors.length > 0) {
|
|
59
56
|
this.$androidDebugBridgeResultHandler.handleErrors(errors, treatErrorsAsWarnings);
|
|
60
57
|
}
|
|
61
|
-
// Some adb commands returns array of strings instead of object with stdout and stderr. (adb start-server)
|
|
62
58
|
return result.stdout === undefined || result.stdout === null
|
|
63
59
|
? result
|
|
64
60
|
: result.stdout;
|
|
@@ -147,7 +143,6 @@ class AndroidDebugBridge {
|
|
|
147
143
|
pushFile(localFilePath, deviceFilePath) {
|
|
148
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
145
|
const fileDirectory = (0, helpers_1.fromWindowsRelativePathToUnix)(path.dirname(deviceFilePath));
|
|
150
|
-
// starting from API level 28, the push command is returning an error if the directory does not exist
|
|
151
146
|
yield this.executeShellCommand(["mkdir", "-p", fileDirectory]);
|
|
152
147
|
yield this.executeCommand(["push", localFilePath, deviceFilePath]);
|
|
153
148
|
yield this.executeShellCommand(["chmod", "0777", fileDirectory]);
|
|
@@ -170,4 +165,3 @@ __decorate([
|
|
|
170
165
|
], AndroidDebugBridge.prototype, "getDevices", null);
|
|
171
166
|
exports.AndroidDebugBridge = AndroidDebugBridge;
|
|
172
167
|
yok_1.injector.register("adb", AndroidDebugBridge);
|
|
173
|
-
//# sourceMappingURL=android-debug-bridge.js.map
|
|
@@ -94,8 +94,6 @@ class AndroidDeviceFileSystem {
|
|
|
94
94
|
}
|
|
95
95
|
transferDirectory(deviceAppData, localToDevicePaths, projectFilesPath) {
|
|
96
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
// starting from Android 9, adb push is throwing an exception when there are subfolders
|
|
98
|
-
// the check could be removed when we start supporting only runtime versions with sockets
|
|
99
97
|
const minAndroidWithoutAdbPushDir = "9.0.0";
|
|
100
98
|
const isAdbPushDirSupported = semver.lt(semver.coerce(deviceAppData.device.deviceInfo.version), minAndroidWithoutAdbPushDir);
|
|
101
99
|
const deviceProjectDir = yield deviceAppData.getDeviceProjectRootPath();
|
|
@@ -150,7 +148,6 @@ class AndroidDeviceFileSystem {
|
|
|
150
148
|
const hostTmpDir = yield this.$tempService.mkdirSync("application-");
|
|
151
149
|
const commandsFileHostPath = path.join(hostTmpDir, "temp.commands.file");
|
|
152
150
|
this.$fs.writeFile(commandsFileHostPath, fileContent);
|
|
153
|
-
// copy it to the device
|
|
154
151
|
yield this.transferFile(commandsFileHostPath, deviceFilePath);
|
|
155
152
|
yield this.adb.executeShellCommand(["chmod", "0777", deviceFilePath]);
|
|
156
153
|
});
|
|
@@ -177,4 +174,3 @@ class AndroidDeviceFileSystem {
|
|
|
177
174
|
}
|
|
178
175
|
}
|
|
179
176
|
exports.AndroidDeviceFileSystem = AndroidDeviceFileSystem;
|
|
180
|
-
//# sourceMappingURL=android-device-file-system.js.map
|
|
@@ -69,8 +69,6 @@ class AndroidDeviceHashService {
|
|
|
69
69
|
const action = (localToDevicePathData) => __awaiter(this, void 0, void 0, function* () {
|
|
70
70
|
const localPath = localToDevicePathData.getLocalPath();
|
|
71
71
|
if (this.$fs.getFsStats(localPath).isFile()) {
|
|
72
|
-
// TODO: Use relative to project path for key
|
|
73
|
-
// This will speed up livesync on the same device for the same project on different PCs.
|
|
74
72
|
initialShasums[localPath] = yield this.$fs.getFileShasum(localPath);
|
|
75
73
|
}
|
|
76
74
|
});
|
|
@@ -133,4 +131,3 @@ __decorate([
|
|
|
133
131
|
(0, decorators_1.cache)()
|
|
134
132
|
], AndroidDeviceHashService.prototype, "getTempDir", null);
|
|
135
133
|
exports.AndroidDeviceHashService = AndroidDeviceHashService;
|
|
136
|
-
//# sourceMappingURL=android-device-hash-service.js.map
|
|
@@ -42,8 +42,6 @@ class AndroidDevice {
|
|
|
42
42
|
this.fileSystem = this.$injector.resolve(fileSystemPath.AndroidDeviceFileSystem, { adb: this.adb });
|
|
43
43
|
let details = yield this.getDeviceDetails(["getprop"]);
|
|
44
44
|
if (!details || !details.name) {
|
|
45
|
-
// In older CLI versions we are calling cat /system/build.prop to get details.
|
|
46
|
-
// Keep this logic for compatibility and possibly for devices for which getprop is not working
|
|
47
45
|
details = yield this.getDeviceDetails(["cat", "/system/build.prop"]);
|
|
48
46
|
}
|
|
49
47
|
this.$logger.trace(details);
|
|
@@ -104,9 +102,6 @@ class AndroidDevice {
|
|
|
104
102
|
try {
|
|
105
103
|
const details = yield this.adb.executeShellCommand(shellCommandArgs);
|
|
106
104
|
details.split(/\r?\n|\r/).forEach((value) => {
|
|
107
|
-
// sample line is "ro.build.version.release=4.4" in /system/build.prop
|
|
108
|
-
// sample line from getprop is: [ro.build.version.release]: [6.0]
|
|
109
|
-
// NOTE: some props do not have value: [ro.build.version.base_os]: []
|
|
110
105
|
const match = /(?:\[?ro\.build\.version|ro\.product|ro\.build)\.(.+?)]?(?:\:|=)(?:\s*?\[)?(.*?)]?$/.exec(value);
|
|
111
106
|
if (match) {
|
|
112
107
|
parsedDetails[match[1]] = match[2];
|
|
@@ -121,7 +116,6 @@ class AndroidDevice {
|
|
|
121
116
|
});
|
|
122
117
|
}
|
|
123
118
|
getIsTablet(details) {
|
|
124
|
-
//version 3.x.x (also known as Honeycomb) is a tablet only version
|
|
125
119
|
return (details &&
|
|
126
120
|
(_.startsWith(details.release, "3.") ||
|
|
127
121
|
_.includes((details.characteristics || "").toLowerCase(), "tablet")));
|
|
@@ -136,7 +130,6 @@ class AndroidDevice {
|
|
|
136
130
|
});
|
|
137
131
|
}
|
|
138
132
|
}
|
|
139
|
-
// http://stackoverflow.com/questions/31178195/what-does-adb-device-status-mean
|
|
140
133
|
AndroidDevice.ADB_DEVICE_STATUS_INFO = {
|
|
141
134
|
device: {
|
|
142
135
|
errorHelp: null,
|
|
@@ -163,4 +156,3 @@ __decorate([
|
|
|
163
156
|
(0, decorators_1.cache)()
|
|
164
157
|
], AndroidDevice.prototype, "init", null);
|
|
165
158
|
exports.AndroidDevice = AndroidDevice;
|
|
166
|
-
//# sourceMappingURL=android-device.js.map
|
|
@@ -121,7 +121,7 @@ class AndroidEmulatorServices {
|
|
|
121
121
|
endTimeEpoch,
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
yield (0, helpers_1.sleep)(10000);
|
|
124
|
+
yield (0, helpers_1.sleep)(10000);
|
|
125
125
|
hasTimeLeft = (0, helpers_1.getCurrentEpochTime)() < endTimeEpoch;
|
|
126
126
|
}
|
|
127
127
|
if (!hasTimeLeft && !isInfiniteWait) {
|
|
@@ -203,4 +203,3 @@ class AndroidEmulatorServices {
|
|
|
203
203
|
}
|
|
204
204
|
exports.AndroidEmulatorServices = AndroidEmulatorServices;
|
|
205
205
|
yok_1.injector.register("androidEmulatorServices", AndroidEmulatorServices);
|
|
206
|
-
//# sourceMappingURL=android-emulator-services.js.map
|
|
@@ -12,8 +12,6 @@ class AndroidIniFileParser {
|
|
|
12
12
|
if (!this.$fs.exists(iniFilePath)) {
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
-
// avd files can have different encoding, defined on the first line.
|
|
16
|
-
// find which one it is (if any) and use it to correctly read the file contents
|
|
17
15
|
const encoding = this.getAvdEncoding(iniFilePath);
|
|
18
16
|
const contents = this.$fs.readText(iniFilePath, encoding).split("\n");
|
|
19
17
|
return _.reduce(contents, (result, line) => {
|
|
@@ -44,8 +42,6 @@ class AndroidIniFileParser {
|
|
|
44
42
|
}, Object.create(null));
|
|
45
43
|
}
|
|
46
44
|
getAvdEncoding(avdName) {
|
|
47
|
-
// avd files can have different encoding, defined on the first line.
|
|
48
|
-
// find which one it is (if any) and use it to correctly read the file contents
|
|
49
45
|
let encoding = "utf8";
|
|
50
46
|
let contents = this.$fs.readText(avdName, "ascii");
|
|
51
47
|
if (contents.length > 0) {
|
|
@@ -59,22 +55,18 @@ class AndroidIniFileParser {
|
|
|
59
55
|
}
|
|
60
56
|
return encoding;
|
|
61
57
|
}
|
|
62
|
-
// Android L is not written as a number in the .ini files, and we need to convert it
|
|
63
58
|
readTargetNum(target) {
|
|
64
59
|
const platform = target.replace("android-", "");
|
|
65
60
|
let platformNumber = +platform;
|
|
66
61
|
if (isNaN(platformNumber)) {
|
|
67
|
-
// this may be a google image
|
|
68
62
|
const googlePlatform = target.split(":")[2];
|
|
69
63
|
if (googlePlatform) {
|
|
70
64
|
platformNumber = +googlePlatform;
|
|
71
65
|
}
|
|
72
66
|
else if (platform === "L") {
|
|
73
|
-
// Android SDK 20 preview
|
|
74
67
|
platformNumber = 20;
|
|
75
68
|
}
|
|
76
69
|
else if (platform === "MNC") {
|
|
77
|
-
// Android M preview
|
|
78
70
|
platformNumber = 22;
|
|
79
71
|
}
|
|
80
72
|
}
|
|
@@ -83,4 +75,3 @@ class AndroidIniFileParser {
|
|
|
83
75
|
}
|
|
84
76
|
exports.AndroidIniFileParser = AndroidIniFileParser;
|
|
85
77
|
yok_1.injector.register("androidIniFileParser", AndroidIniFileParser);
|
|
86
|
-
//# sourceMappingURL=android-ini-file-parser.js.map
|
|
@@ -36,11 +36,7 @@ class AndroidLogFilter {
|
|
|
36
36
|
return consoleLogMessage;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
//sample line is "I/Web Console( 4438): Received Event: deviceready at file:///storage/emulated/0/Icenium/com.telerik.TestApp/js/index.js:48"
|
|
40
39
|
AndroidLogFilter.LINE_REGEX = /.\/(.+?)\s*\(\s*\d+?\): (.*)/;
|
|
41
|
-
// sample line is "11-23 12:39:07.310 1584 1597 I art : Background sticky concurrent mark sweep GC freed 21966(1780KB) AllocSpace objects, 4(80KB) LOS objects, 77% free, 840KB/3MB, paused 4.018ms total 158.629ms"
|
|
42
|
-
// or '12-28 10:45:08.020 3329 3329 W chromium: [WARNING:data_reduction_proxy_settings.cc(328)] SPDY proxy OFF at startup'
|
|
43
40
|
AndroidLogFilter.API_LEVEL_23_LINE_REGEX = /.+?\s+?(?:[A-Z]\s+?)([A-Za-z \.]+?)\s*?\: (.*)/;
|
|
44
41
|
exports.AndroidLogFilter = AndroidLogFilter;
|
|
45
42
|
yok_1.injector.register("androidLogFilter", AndroidLogFilter);
|
|
46
|
-
//# sourceMappingURL=android-log-filter.js.map
|
|
@@ -84,9 +84,6 @@ class AndroidVirtualDeviceService {
|
|
|
84
84
|
get pathToEmulatorExecutable() {
|
|
85
85
|
const emulatorExecutableName = "emulator";
|
|
86
86
|
if (this.androidHome) {
|
|
87
|
-
// Check https://developer.android.com/studio/releases/sdk-tools.html (25.3.0)
|
|
88
|
-
// Since this version of SDK tools, the emulator is a separate package.
|
|
89
|
-
// However the emulator executable still exists in the "tools" dir.
|
|
90
87
|
const pathToEmulatorFromAndroidStudio = path.join(this.androidHome, emulatorExecutableName, emulatorExecutableName);
|
|
91
88
|
const realFilePath = this.$hostInfo.isWindows
|
|
92
89
|
? `${pathToEmulatorFromAndroidStudio}.exe`
|
|
@@ -126,17 +123,6 @@ class AndroidVirtualDeviceService {
|
|
|
126
123
|
client.on("data", (data) => {
|
|
127
124
|
output += data.toString();
|
|
128
125
|
const imageIdentifier = this.getImageIdentifierFromClientOutput(output);
|
|
129
|
-
// old output should look like:
|
|
130
|
-
// Android Console: type 'help' for a list of commands
|
|
131
|
-
// OK
|
|
132
|
-
// <Name of image>
|
|
133
|
-
// OK
|
|
134
|
-
// new output should look like:
|
|
135
|
-
// Android Console: type 'help' for a list of commands
|
|
136
|
-
// OK
|
|
137
|
-
// a\u001b[K\u001b[Dav\u001b[K\u001b[D\u001b[Davd\u001b...
|
|
138
|
-
// <Name of image>
|
|
139
|
-
// OK
|
|
140
126
|
if (imageIdentifier && !isResolved) {
|
|
141
127
|
this.mapEmulatorIdToImageIdentifier[emulatorId] = imageIdentifier;
|
|
142
128
|
this.clearNetConnection(client, timer);
|
|
@@ -188,8 +174,6 @@ class AndroidVirtualDeviceService {
|
|
|
188
174
|
if (this.pathToAvdManagerExecutable &&
|
|
189
175
|
this.$fs.exists(this.pathToAvdManagerExecutable)) {
|
|
190
176
|
if (process.env.JAVA_HOME) {
|
|
191
|
-
// In case JAVA_HOME is set, but it points to incorrect directory (i.e. there's no java in $JAVA_HOME/bin/java), avdmanager will fail
|
|
192
|
-
// no matter if you have correct java in PATH.
|
|
193
177
|
canExecute = !!(yield this.$sysInfo.getJavaVersionFromJavaHome());
|
|
194
178
|
}
|
|
195
179
|
else {
|
|
@@ -264,13 +248,6 @@ class AndroidVirtualDeviceService {
|
|
|
264
248
|
const avdOutput = output.split(constants_1.AndroidVirtualDevice.AVAILABLE_AVDS_MESSAGE);
|
|
265
249
|
const availableDevices = avdOutput && avdOutput[1] && avdOutput[1].trim();
|
|
266
250
|
if (availableDevices) {
|
|
267
|
-
// In some cases `avdmanager list avds` command prints:
|
|
268
|
-
// `The following Android Virtual Devices could not be loaded:
|
|
269
|
-
// Name: Pixel_2_XL_API_28
|
|
270
|
-
// Path: /Users/<username>/.android/avd/Pixel_2_XL_API_28.avd
|
|
271
|
-
// Error: Google pixel_2_xl no longer exists as a device`
|
|
272
|
-
// These devices sometimes are valid so try to parse them.
|
|
273
|
-
// Also these devices are printed at the end of the output and are separated with 2 new lines from the valid devices output.
|
|
274
251
|
const parts = availableDevices.split(/(?:\r?\n){2}/);
|
|
275
252
|
const items = [parts[0], parts[1]].filter((item) => !!item);
|
|
276
253
|
for (const item of items) {
|
|
@@ -287,7 +264,6 @@ class AndroidVirtualDeviceService {
|
|
|
287
264
|
}
|
|
288
265
|
getAvdManagerDeviceInfo(output) {
|
|
289
266
|
const avdManagerDeviceInfo = Object.create(null);
|
|
290
|
-
// Split by `\n`, not EOL as the avdmanager and android executables print results with `\n` only even on Windows
|
|
291
267
|
_.reduce(output.split("\n"), (result, row) => {
|
|
292
268
|
const [key, value] = row.split(": ").map((part) => part.trim());
|
|
293
269
|
switch (key) {
|
|
@@ -334,7 +310,6 @@ class AndroidVirtualDeviceService {
|
|
|
334
310
|
};
|
|
335
311
|
}
|
|
336
312
|
getImageIdentifierFromClientOutput(output) {
|
|
337
|
-
// The lines should be trimmed after the split because the output has \r\n and when using split(EOL) on mac each line ends with \r.
|
|
338
313
|
const lines = _.map(output.split(os_1.EOL), (line) => line.trim());
|
|
339
314
|
const firstIndexOfOk = _.indexOf(lines, "OK");
|
|
340
315
|
if (firstIndexOfOk < 0) {
|
|
@@ -383,4 +358,3 @@ __decorate([
|
|
|
383
358
|
], AndroidVirtualDeviceService.prototype, "getConfigurationError", null);
|
|
384
359
|
exports.AndroidVirtualDeviceService = AndroidVirtualDeviceService;
|
|
385
360
|
yok_1.injector.register("androidVirtualDeviceService", AndroidVirtualDeviceService);
|
|
386
|
-
//# sourceMappingURL=android-virtual-device-service.js.map
|
|
@@ -54,7 +54,6 @@ class AndroidGenymotionService {
|
|
|
54
54
|
.map((row) => __awaiter(this, void 0, void 0, function* () {
|
|
55
55
|
const match = row.match(/^(.+?)\s+device$/);
|
|
56
56
|
if (match && match[1]) {
|
|
57
|
-
// possible genymotion emulator
|
|
58
57
|
const emulatorId = match[1];
|
|
59
58
|
const result = (yield this.isGenymotionEmulator(emulatorId))
|
|
60
59
|
? emulatorId
|
|
@@ -114,7 +113,6 @@ class AndroidGenymotionService {
|
|
|
114
113
|
return runningEmulator;
|
|
115
114
|
});
|
|
116
115
|
}
|
|
117
|
-
// https://wiki.appcelerator.org/display/guides2/Installing+Genymotion
|
|
118
116
|
get playerSearchPaths() {
|
|
119
117
|
return {
|
|
120
118
|
darwin: [
|
|
@@ -165,7 +163,6 @@ class AndroidGenymotionService {
|
|
|
165
163
|
};
|
|
166
164
|
}
|
|
167
165
|
getSdkVersion(output) {
|
|
168
|
-
// Example -> Name: android_version, value: 6.0.0, timestamp: 1530090506102029000, flags:
|
|
169
166
|
const androidApiLevelRow = output
|
|
170
167
|
.split("\n")
|
|
171
168
|
.filter((row) => !!row)
|
|
@@ -194,7 +191,6 @@ In case you have installed Genymotion in a different location, please add the pa
|
|
|
194
191
|
getConfigurationError() {
|
|
195
192
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
193
|
const result = yield this.$childProcess.trySpawnFromCloseEvent(this.pathToEmulatorExecutable, [], {}, { throwError: false });
|
|
197
|
-
// When player is spawned, it always prints message on stderr.
|
|
198
194
|
if (result &&
|
|
199
195
|
result.stderr &&
|
|
200
196
|
result.stderr.indexOf(constants_1.AndroidVirtualDevice.GENYMOTION_DEFAULT_STDERR_STRING) === -1) {
|
|
@@ -213,4 +209,3 @@ __decorate([
|
|
|
213
209
|
], AndroidGenymotionService.prototype, "getConfigurationError", null);
|
|
214
210
|
exports.AndroidGenymotionService = AndroidGenymotionService;
|
|
215
211
|
yok_1.injector.register("androidGenymotionService", AndroidGenymotionService);
|
|
216
|
-
//# sourceMappingURL=genymotion-service.js.map
|
|
@@ -44,7 +44,6 @@ class VirtualBoxService {
|
|
|
44
44
|
.split(os_1.EOL)
|
|
45
45
|
.filter((row) => !!row)
|
|
46
46
|
.map((row) => {
|
|
47
|
-
// Example row: "Google Nexus 4 - 5.0.0 - API 21 - 768x1280" {9d9beef2-cc60-4a54-bcc0-cc1dbf89811f}
|
|
48
47
|
const [rawName, rawId] = row.split('" ');
|
|
49
48
|
const id = rawId.substr(1, rawId.length - 2);
|
|
50
49
|
const name = rawName.substr(1, rawName.length - 1);
|
|
@@ -85,15 +84,6 @@ class VirtualBoxService {
|
|
|
85
84
|
if (this.$hostInfo.isWindows) {
|
|
86
85
|
let searchPath = null;
|
|
87
86
|
try {
|
|
88
|
-
/* This can be used as interface!!!!
|
|
89
|
-
arch:null
|
|
90
|
-
hive:"HKLM"
|
|
91
|
-
host:""
|
|
92
|
-
key:"\Software\Oracle\VirtualBox"
|
|
93
|
-
name:"InstallDir"
|
|
94
|
-
type:"REG_SZ"
|
|
95
|
-
value:"C:\Program Files\Oracle\VirtualBox\"
|
|
96
|
-
*/
|
|
97
87
|
const result = yield (0, helpers_1.getWinRegPropertyValue)("\\Software\\Oracle\\VirtualBox", "InstallDir");
|
|
98
88
|
searchPath = result && result.value ? result.value : null;
|
|
99
89
|
}
|
|
@@ -129,4 +119,3 @@ __decorate([
|
|
|
129
119
|
], VirtualBoxService.prototype, "getvBoxManagePath", null);
|
|
130
120
|
exports.VirtualBoxService = VirtualBoxService;
|
|
131
121
|
yok_1.injector.register("virtualBoxService", VirtualBoxService);
|
|
132
|
-
//# sourceMappingURL=virtualbox-service.js.map
|
|
@@ -50,7 +50,6 @@ class LogcatHelper {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
catch (err) {
|
|
53
|
-
// Ignore the error, the process is dead.
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
55
|
lineStream.on("data", (lineBuffer) => {
|
|
@@ -71,15 +70,8 @@ class LogcatHelper {
|
|
|
71
70
|
return;
|
|
72
71
|
const lines = (lineBuffer.toString() || "").split("\n");
|
|
73
72
|
for (let line of lines) {
|
|
74
|
-
|
|
75
|
-
// ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^
|
|
76
|
-
// action appId pid
|
|
77
|
-
if (
|
|
78
|
-
// action
|
|
79
|
-
line.includes("START") &&
|
|
80
|
-
// appId
|
|
73
|
+
if (line.includes("START") &&
|
|
81
74
|
line.includes(options.appId) &&
|
|
82
|
-
// pid - only if it's not the current pid...
|
|
83
75
|
!line.includes(options.pid)) {
|
|
84
76
|
this.forceStop(deviceIdentifier);
|
|
85
77
|
(_b = options.onAppRestarted) === null || _b === void 0 ? void 0 : _b.call(options);
|
|
@@ -106,9 +98,6 @@ class LogcatHelper {
|
|
|
106
98
|
});
|
|
107
99
|
});
|
|
108
100
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Stops the logcat process for the specified device if keepSingleProcess is not passed on start
|
|
111
|
-
*/
|
|
112
101
|
stop(deviceIdentifier) {
|
|
113
102
|
if (this.mapDevicesLoggingData[deviceIdentifier] &&
|
|
114
103
|
!this.mapDevicesLoggingData[deviceIdentifier].keepSingleProcess) {
|
|
@@ -125,9 +114,6 @@ class LogcatHelper {
|
|
|
125
114
|
(_e = loggingData.lineStream) === null || _e === void 0 ? void 0 : _e.removeAllListeners();
|
|
126
115
|
delete this.mapDevicesLoggingData[deviceIdentifier];
|
|
127
116
|
}
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated - we likely don't need this anymore, and can simplify the code...
|
|
130
|
-
*/
|
|
131
117
|
isLogcatPidSupported(deviceIdentifier) {
|
|
132
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
119
|
const device = yield this.$devicesService.getDevice(deviceIdentifier);
|
|
@@ -140,7 +126,6 @@ class LogcatHelper {
|
|
|
140
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
127
|
const isLogcatPidSupported = yield this.isLogcatPidSupported(deviceIdentifier);
|
|
142
128
|
const adb = this.$injector.resolve(device_android_debug_bridge_1.DeviceAndroidDebugBridge, { identifier: deviceIdentifier });
|
|
143
|
-
// -T 1 - shows only new logs after starting adb logcat
|
|
144
129
|
const logcatCommand = ["logcat", "-T", "1"];
|
|
145
130
|
const acceptedTags = [
|
|
146
131
|
"chromium",
|
|
@@ -153,7 +138,6 @@ class LogcatHelper {
|
|
|
153
138
|
if (pid && isLogcatPidSupported) {
|
|
154
139
|
logcatCommand.push(`--pid=${pid}`);
|
|
155
140
|
acceptedTags.forEach((tag) => {
|
|
156
|
-
// -s <tag> - shows only logs with the specified tag
|
|
157
141
|
logcatCommand.push("-s", tag);
|
|
158
142
|
});
|
|
159
143
|
}
|
|
@@ -166,8 +150,6 @@ class LogcatHelper {
|
|
|
166
150
|
getAppStartTrackingLogcatStream(deviceIdentifier, appId) {
|
|
167
151
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
152
|
const adb = this.$injector.resolve(device_android_debug_bridge_1.DeviceAndroidDebugBridge, { identifier: deviceIdentifier });
|
|
169
|
-
// -b system - shows the system buffer/logs only
|
|
170
|
-
// -T 1 - shows only new logs after starting adb logcat
|
|
171
153
|
const logcatCommand = [`logcat`, `-b`, `system`, `-T`, `1`];
|
|
172
154
|
if (appId) {
|
|
173
155
|
logcatCommand.push(`--regex=START.*${appId}`);
|
|
@@ -181,4 +163,3 @@ class LogcatHelper {
|
|
|
181
163
|
}
|
|
182
164
|
exports.LogcatHelper = LogcatHelper;
|
|
183
165
|
yok_1.injector.register("logcatHelper", LogcatHelper);
|
|
184
|
-
//# sourceMappingURL=logcat-helper.js.map
|
|
@@ -54,9 +54,6 @@ class ApplicationManagerBase extends events_1.EventEmitter {
|
|
|
54
54
|
if (!this.checkForApplicationUpdatesPromise) {
|
|
55
55
|
this.checkForApplicationUpdatesPromise = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
56
56
|
let isFulfilled = false;
|
|
57
|
-
// As this method is called on 500ms, but it's execution may last much longer
|
|
58
|
-
// use locking, so the next executions will not get into the body, while the first one is still working.
|
|
59
|
-
// In case we do not break the next executions, we'll report each app as newly installed several times.
|
|
60
57
|
try {
|
|
61
58
|
const currentlyInstalledAppIdentifiers = yield this.getInstalledApplications();
|
|
62
59
|
const previouslyInstalledAppIdentifiers = this.lastInstalledAppIdentifiers || [];
|
|
@@ -105,7 +102,6 @@ class ApplicationManagerBase extends events_1.EventEmitter {
|
|
|
105
102
|
_.each(notAvailableAppsForDebugging, (appInfo) => {
|
|
106
103
|
this.emit("debuggableAppLost", appInfo);
|
|
107
104
|
if (_.has(this.lastAvailableDebuggableAppViews, appInfo.appIdentifier)) {
|
|
108
|
-
// Prevent emitting debuggableViewLost when application cannot be debugged anymore.
|
|
109
105
|
delete this.lastAvailableDebuggableAppViews[appInfo.appIdentifier];
|
|
110
106
|
}
|
|
111
107
|
});
|
|
@@ -124,7 +120,6 @@ class ApplicationManagerBase extends events_1.EventEmitter {
|
|
|
124
120
|
_.each(newAvailableViews, (debugWebViewInfo) => {
|
|
125
121
|
this.emit("debuggableViewFound", appIdentifier, debugWebViewInfo);
|
|
126
122
|
});
|
|
127
|
-
// Determine which of the views had changed since last check and raise debuggableViewChanged event for them:
|
|
128
123
|
const keptViews = _.differenceBy(currentlyAvailableViews, newAvailableViews, "id");
|
|
129
124
|
_.each(keptViews, (view) => {
|
|
130
125
|
const previousTimeViewInfo = _.find(previouslyAvailableViews, (previousView) => previousView.id === view.id);
|
|
@@ -139,4 +134,3 @@ class ApplicationManagerBase extends events_1.EventEmitter {
|
|
|
139
134
|
}
|
|
140
135
|
}
|
|
141
136
|
exports.ApplicationManagerBase = ApplicationManagerBase;
|
|
142
|
-
//# sourceMappingURL=application-manager-base.js.map
|
|
@@ -15,10 +15,7 @@ class DeviceEmitter extends events_1.EventEmitter {
|
|
|
15
15
|
this.$devicesService.on(constants_1.DeviceDiscoveryEventNames.DEVICE_FOUND, (device) => {
|
|
16
16
|
this.emit(constants_1.DeviceDiscoveryEventNames.DEVICE_FOUND, device.deviceInfo);
|
|
17
17
|
this.attachApplicationChangedHandlers(device);
|
|
18
|
-
// await: Do not await as this will require to mark the lambda with async keyword, but there's no way to await the lambda itself.
|
|
19
|
-
/* tslint:disable:no-floating-promises */
|
|
20
18
|
device.openDeviceLogStream();
|
|
21
|
-
/* tslint:enable:no-floating-promises */
|
|
22
19
|
});
|
|
23
20
|
this.$devicesService.on(constants_1.DeviceDiscoveryEventNames.DEVICE_LOST, (device) => {
|
|
24
21
|
this.emit(constants_1.DeviceDiscoveryEventNames.DEVICE_LOST, device.deviceInfo);
|
|
@@ -62,4 +59,3 @@ class DeviceEmitter extends events_1.EventEmitter {
|
|
|
62
59
|
}
|
|
63
60
|
exports.DeviceEmitter = DeviceEmitter;
|
|
64
61
|
yok_1.injector.register("deviceEmitter", DeviceEmitter);
|
|
65
|
-
//# sourceMappingURL=device-emitter.js.map
|