nativescript 9.0.0-alpha.6 → 9.0.0-alpha.8
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 -14
- package/lib/color.js +0 -4
- 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 -3
- 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 -4
- 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/embedding/embed.js +0 -7
- 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 +1 -48
- 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/native-add.js +0 -5
- 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 +3 -4
- 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/commands/widget.js +1 -20
- 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 +1 -6
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +0 -13
- 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 +4 -90
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +4 -17
- 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 +119 -144
- 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 +0 -3
- 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 +2 -31
- 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/apple-portal/srp/srp-wrapper.js +1 -4
- package/lib/services/assets-generation/assets-generation-service.js +5 -10
- 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/bundler/bundler-compiler-service.js +35 -75
- package/lib/services/bundler/bundler.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 -11
- 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 +1 -2
- 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 -91
- 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 +3 -5
- 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 -49
- 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 -20
- 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 -14
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +2 -21
- 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 -3
- 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/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 +16 -16
package/lib/common/host-info.js
CHANGED
|
@@ -65,9 +65,6 @@ class HostInfo {
|
|
|
65
65
|
catch (err) {
|
|
66
66
|
this.$logger.trace(`Unable to get macOS version from ${systemProfileCommand}. Error is: ${err}`);
|
|
67
67
|
}
|
|
68
|
-
// https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history
|
|
69
|
-
// Each macOS version is labeled 10.<version>, where it looks like <versions> is taken from the major version returned by os.release() (16.x.x for example) and subtracting 4 from it.
|
|
70
|
-
// So the version becomes "10.12" in this case.
|
|
71
68
|
const osRelease = this.$osInfo.release();
|
|
72
69
|
const majorVersion = osRelease && _.first(osRelease.split("."));
|
|
73
70
|
macOSVersion = majorVersion && `10.${+majorVersion - 4}`;
|
|
@@ -121,4 +118,3 @@ __decorate([
|
|
|
121
118
|
(0, decorators_1.cache)()
|
|
122
119
|
], HostInfo.prototype, "getMacOSVersion", null);
|
|
123
120
|
yok_1.injector.register("hostInfo", HostInfo);
|
|
124
|
-
//# sourceMappingURL=host-info.js.map
|
|
@@ -26,9 +26,6 @@ class HttpClient {
|
|
|
26
26
|
catch (err) {
|
|
27
27
|
if (err.message === HttpClient.STUCK_REQUEST_ERROR_MESSAGE ||
|
|
28
28
|
err.message === HttpClient.STUCK_RESPONSE_ERROR_MESSAGE) {
|
|
29
|
-
// Retry the request immediately because there are at least 10 seconds between the two requests.
|
|
30
|
-
// We have to retry only once the sporadically stuck requests/responses.
|
|
31
|
-
// We can add exponential backoff retry here if we decide that we need to workaround bigger network issues on the client side.
|
|
32
29
|
this.$logger.warn("%s Retrying request to %s...", err.message, options.url || options);
|
|
33
30
|
const retryResult = await this.httpRequestCore(options, proxySettings);
|
|
34
31
|
return {
|
|
@@ -54,7 +51,6 @@ class HttpClient {
|
|
|
54
51
|
await this.useProxySettings(proxySettings, cliProxySettings, options, headers, requestProto);
|
|
55
52
|
if (!headers["User-Agent"]) {
|
|
56
53
|
if (!this.defaultUserAgent) {
|
|
57
|
-
//TODO: the user agent client name is also passed explicitly during login and should be kept in sync
|
|
58
54
|
this.defaultUserAgent = `${this.$staticConfig.USER_AGENT_NAME}/${this.$staticConfig.version} (Node.js ${process.versions.node}; ${process.platform}; ${process.arch})`;
|
|
59
55
|
this.$logger.trace("User-Agent: %s", this.defaultUserAgent);
|
|
60
56
|
}
|
|
@@ -83,19 +79,14 @@ class HttpClient {
|
|
|
83
79
|
}).catch((err) => {
|
|
84
80
|
this.$logger.trace("An error occurred while sending the request:", err);
|
|
85
81
|
if (err.response) {
|
|
86
|
-
// The request was made and the server responded with a status code
|
|
87
|
-
// that falls out of the range of 2xx
|
|
88
82
|
const errorMessage = this.getErrorMessage(err.response.status, null);
|
|
89
83
|
err.proxyAuthenticationRequired =
|
|
90
84
|
err.response.status === constants_1.HttpStatusCodes.PROXY_AUTHENTICATION_REQUIRED;
|
|
91
85
|
err.message = errorMessage || err.message;
|
|
92
86
|
}
|
|
93
87
|
else if (err.request) {
|
|
94
|
-
// The request was made but no response was received
|
|
95
|
-
// `err.request` is an instance of XMLHttpRequest in the browser and an instance of
|
|
96
88
|
}
|
|
97
89
|
else {
|
|
98
|
-
// Something happened in setting up the request that triggered an Error
|
|
99
90
|
}
|
|
100
91
|
throw err;
|
|
101
92
|
});
|
|
@@ -141,17 +132,8 @@ class HttpClient {
|
|
|
141
132
|
return body;
|
|
142
133
|
}
|
|
143
134
|
}
|
|
144
|
-
/**
|
|
145
|
-
* This method respects the proxySettings (or proxyCache) by modifying headers and options passed to http(s) module.
|
|
146
|
-
* @param {IProxySettings} proxySettings The settings passed for this specific call.
|
|
147
|
-
* @param {IProxySettings} cliProxySettings The globally set proxy for this CLI.
|
|
148
|
-
* @param {any}options The object that will be passed to http(s) module.
|
|
149
|
-
* @param {any} headers Headers of the current request.
|
|
150
|
-
* @param {string} requestProto The protocol used for the current request - http or https.
|
|
151
|
-
*/
|
|
152
135
|
async useProxySettings(proxySettings, cliProxySettings, options, headers, requestProto) {
|
|
153
136
|
const isLocalRequest = options.host === "localhost" || options.host === "127.0.0.1";
|
|
154
|
-
// don't use the proxy for requests to localhost
|
|
155
137
|
if (!isLocalRequest && (proxySettings || cliProxySettings)) {
|
|
156
138
|
const proto = (proxySettings && proxySettings.protocol) ||
|
|
157
139
|
cliProxySettings.protocol ||
|
|
@@ -162,7 +144,6 @@ class HttpClient {
|
|
|
162
144
|
if (cliProxySettings.username && cliProxySettings.password) {
|
|
163
145
|
credentialsPart = `${cliProxySettings.username}:${cliProxySettings.password}@`;
|
|
164
146
|
}
|
|
165
|
-
// Note that proto ends with :
|
|
166
147
|
options.proxy = `${proto}//${credentialsPart}${host}:${port}`;
|
|
167
148
|
options.rejectUnauthorized = proxySettings
|
|
168
149
|
? proxySettings.rejectUnauthorized
|
|
@@ -175,4 +156,3 @@ exports.HttpClient = HttpClient;
|
|
|
175
156
|
HttpClient.STUCK_REQUEST_ERROR_MESSAGE = "The request can't receive any response.";
|
|
176
157
|
HttpClient.STUCK_RESPONSE_ERROR_MESSAGE = "Can't receive all parts of the response.";
|
|
177
158
|
yok_1.injector.register("httpClient", HttpClient);
|
|
178
|
-
//# sourceMappingURL=http-client.js.map
|
|
@@ -15,13 +15,9 @@ 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
|
-
//# sourceMappingURL=cli-appender.js.map
|
|
@@ -21,13 +21,9 @@ 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
|
-
//# 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
|
(0, decorators_1.cache)()
|
|
202
198
|
], Logger.prototype, "initialize", null);
|
|
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
|
|
@@ -29,7 +29,7 @@ class AndroidApplicationManager extends application_manager_base_1.ApplicationMa
|
|
|
29
29
|
this.$deviceLogProvider = $deviceLogProvider;
|
|
30
30
|
this.$errors = $errors;
|
|
31
31
|
this.PID_CHECK_INTERVAL = 100;
|
|
32
|
-
this.PID_CHECK_TIMEOUT = 10000;
|
|
32
|
+
this.PID_CHECK_TIMEOUT = 10000;
|
|
33
33
|
}
|
|
34
34
|
async getInstalledApplications() {
|
|
35
35
|
const result = (await this.adb.executeShellCommand(["pm", "list", "packages"])) || "";
|
|
@@ -67,7 +67,6 @@ class AndroidApplicationManager extends application_manager_base_1.ApplicationMa
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
uninstallApplication(appIdentifier) {
|
|
70
|
-
// 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
|
|
71
70
|
return this.adb.executeShellCommand(["pm", "uninstall", `${appIdentifier}`], { treatErrorsAsWarnings: true });
|
|
72
71
|
}
|
|
73
72
|
async startApplication(appData) {
|
|
@@ -76,24 +75,9 @@ class AndroidApplicationManager extends application_manager_base_1.ApplicationMa
|
|
|
76
75
|
`cat /dev/null > ${constants_1.LiveSyncPaths.ANDROID_TMP_DIR_NAME}/${appData.appId}-debugbreak`,
|
|
77
76
|
]);
|
|
78
77
|
}
|
|
79
|
-
// If the app is debuggable, the Runtime will update the file when its ready for debugging
|
|
80
|
-
// and we will be able to take decisions and synchronize the debug experience based on the content
|
|
81
78
|
await this.adb.executeShellCommand([
|
|
82
79
|
`cat /dev/null > ${constants_1.LiveSyncPaths.ANDROID_TMP_DIR_NAME}/${appData.appId}-debugger-started`,
|
|
83
80
|
]);
|
|
84
|
-
/*
|
|
85
|
-
Example "pm dump <app_identifier> | grep -A 1 MAIN" output"
|
|
86
|
-
android.intent.action.MAIN:
|
|
87
|
-
3b2df03 org.nativescript.cliapp/com.tns.NativeScriptActivity filter 50dd82e
|
|
88
|
-
Action: "android.intent.action.MAIN"
|
|
89
|
-
Category: "android.intent.category.LAUNCHER"
|
|
90
|
-
--
|
|
91
|
-
intent={act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.nativescript.cliapp/com.tns.NativeScriptActivity}
|
|
92
|
-
realActivity=org.nativescript.cliapp/com.tns.NativeScriptActivity
|
|
93
|
-
--
|
|
94
|
-
Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.nativescript.cliapp/com.tns.NativeScriptActivity }
|
|
95
|
-
frontOfTask=true task=TaskRecord{fe592ac #449 A=org.nativescript.cliapp U=0 StackId=1 sz=1}
|
|
96
|
-
*/
|
|
97
81
|
const appIdentifier = appData.appId;
|
|
98
82
|
const pmDumpOutput = await this.adb.executeShellCommand([
|
|
99
83
|
"pm",
|
|
@@ -143,8 +127,6 @@ class AndroidApplicationManager extends application_manager_base_1.ApplicationMa
|
|
|
143
127
|
pid: processIdentifier,
|
|
144
128
|
appId: appIdentifier,
|
|
145
129
|
onAppRestarted: () => {
|
|
146
|
-
// If the app restarts, we update the PID and
|
|
147
|
-
// restart log helper.
|
|
148
130
|
this.onAppLaunch(appData);
|
|
149
131
|
},
|
|
150
132
|
});
|
|
@@ -223,4 +205,3 @@ __decorate([
|
|
|
223
205
|
__decorate([
|
|
224
206
|
(0, decorators_1.cache)()
|
|
225
207
|
], AndroidApplicationManager.prototype, "getFullyQualifiedActivityRegex", null);
|
|
226
|
-
//# sourceMappingURL=android-application-manager.js.map
|
|
@@ -38,15 +38,11 @@ class AndroidDebugBridge {
|
|
|
38
38
|
return this.$childProcess.spawn(command.command, command.args);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
// If adb -s <invalid device id> install <smth> is executed the childProcess won't get any response
|
|
42
|
-
// because the adb will be waiting for valid device and will not send close or exit event.
|
|
43
|
-
// For example `adb -s <invalid device id> install <smth>` throws error 'error: device \'030939f508e6c773\' not found\r\n' exitCode 4294967295
|
|
44
41
|
const result = await this.$childProcess.spawnFromEvent(command.command, command.args, event, childProcessOptions, { throwError: false });
|
|
45
42
|
const errors = this.$androidDebugBridgeResultHandler.checkForErrors(result);
|
|
46
43
|
if (errors && errors.length > 0) {
|
|
47
44
|
this.$androidDebugBridgeResultHandler.handleErrors(errors, treatErrorsAsWarnings);
|
|
48
45
|
}
|
|
49
|
-
// Some adb commands returns array of strings instead of object with stdout and stderr. (adb start-server)
|
|
50
46
|
return result.stdout === undefined || result.stdout === null
|
|
51
47
|
? result
|
|
52
48
|
: result.stdout;
|
|
@@ -125,7 +121,6 @@ class AndroidDebugBridge {
|
|
|
125
121
|
}
|
|
126
122
|
async pushFile(localFilePath, deviceFilePath) {
|
|
127
123
|
const fileDirectory = (0, helpers_1.fromWindowsRelativePathToUnix)(path.dirname(deviceFilePath));
|
|
128
|
-
// starting from API level 28, the push command is returning an error if the directory does not exist
|
|
129
124
|
await this.executeShellCommand(["mkdir", "-p", fileDirectory]);
|
|
130
125
|
await this.executeCommand(["push", localFilePath, deviceFilePath]);
|
|
131
126
|
await this.executeShellCommand(["chmod", "0777", fileDirectory]);
|
|
@@ -145,4 +140,3 @@ __decorate([
|
|
|
145
140
|
(0, decorators_1.invokeInit)()
|
|
146
141
|
], AndroidDebugBridge.prototype, "getDevices", null);
|
|
147
142
|
yok_1.injector.register("adb", AndroidDebugBridge);
|
|
148
|
-
//# sourceMappingURL=android-debug-bridge.js.map
|
|
@@ -74,8 +74,6 @@ class AndroidDeviceFileSystem {
|
|
|
74
74
|
return transferredFiles;
|
|
75
75
|
}
|
|
76
76
|
async transferDirectory(deviceAppData, localToDevicePaths, projectFilesPath) {
|
|
77
|
-
// starting from Android 9, adb push is throwing an exception when there are subfolders
|
|
78
|
-
// the check could be removed when we start supporting only runtime versions with sockets
|
|
79
77
|
const minAndroidWithoutAdbPushDir = "9.0.0";
|
|
80
78
|
const isAdbPushDirSupported = semver.lt(semver.coerce(deviceAppData.device.deviceInfo.version), minAndroidWithoutAdbPushDir);
|
|
81
79
|
const deviceProjectDir = await deviceAppData.getDeviceProjectRootPath();
|
|
@@ -122,7 +120,6 @@ class AndroidDeviceFileSystem {
|
|
|
122
120
|
const hostTmpDir = await this.$tempService.mkdirSync("application-");
|
|
123
121
|
const commandsFileHostPath = path.join(hostTmpDir, "temp.commands.file");
|
|
124
122
|
this.$fs.writeFile(commandsFileHostPath, fileContent);
|
|
125
|
-
// copy it to the device
|
|
126
123
|
await this.transferFile(commandsFileHostPath, deviceFilePath);
|
|
127
124
|
await this.adb.executeShellCommand(["chmod", "0777", deviceFilePath]);
|
|
128
125
|
}
|
|
@@ -144,4 +141,3 @@ class AndroidDeviceFileSystem {
|
|
|
144
141
|
}
|
|
145
142
|
}
|
|
146
143
|
exports.AndroidDeviceFileSystem = AndroidDeviceFileSystem;
|
|
147
|
-
//# sourceMappingURL=android-device-file-system.js.map
|
|
@@ -51,8 +51,6 @@ class AndroidDeviceHashService {
|
|
|
51
51
|
const action = async (localToDevicePathData) => {
|
|
52
52
|
const localPath = localToDevicePathData.getLocalPath();
|
|
53
53
|
if (this.$fs.getFsStats(localPath).isFile()) {
|
|
54
|
-
// TODO: Use relative to project path for key
|
|
55
|
-
// This will speed up livesync on the same device for the same project on different PCs.
|
|
56
54
|
initialShasums[localPath] = await this.$fs.getFileShasum(localPath);
|
|
57
55
|
}
|
|
58
56
|
};
|
|
@@ -108,4 +106,3 @@ __decorate([
|
|
|
108
106
|
__decorate([
|
|
109
107
|
(0, decorators_1.cache)()
|
|
110
108
|
], AndroidDeviceHashService.prototype, "getTempDir", null);
|
|
111
|
-
//# sourceMappingURL=android-device-hash-service.js.map
|
|
@@ -32,8 +32,6 @@ class AndroidDevice {
|
|
|
32
32
|
this.fileSystem = this.$injector.resolve(fileSystemPath.AndroidDeviceFileSystem, { adb: this.adb });
|
|
33
33
|
let details = await this.getDeviceDetails(["getprop"]);
|
|
34
34
|
if (!details || !details.name) {
|
|
35
|
-
// In older CLI versions we are calling cat /system/build.prop to get details.
|
|
36
|
-
// Keep this logic for compatibility and possibly for devices for which getprop is not working
|
|
37
35
|
details = await this.getDeviceDetails(["cat", "/system/build.prop"]);
|
|
38
36
|
}
|
|
39
37
|
this.$logger.trace(details);
|
|
@@ -90,9 +88,6 @@ class AndroidDevice {
|
|
|
90
88
|
try {
|
|
91
89
|
const details = await this.adb.executeShellCommand(shellCommandArgs);
|
|
92
90
|
details.split(/\r?\n|\r/).forEach((value) => {
|
|
93
|
-
// sample line is "ro.build.version.release=4.4" in /system/build.prop
|
|
94
|
-
// sample line from getprop is: [ro.build.version.release]: [6.0]
|
|
95
|
-
// NOTE: some props do not have value: [ro.build.version.base_os]: []
|
|
96
91
|
const match = /(?:\[?ro\.build\.version|ro\.product|ro\.build)\.(.+?)]?(?:\:|=)(?:\s*?\[)?(.*?)]?$/.exec(value);
|
|
97
92
|
if (match) {
|
|
98
93
|
parsedDetails[match[1]] = match[2];
|
|
@@ -106,7 +101,6 @@ class AndroidDevice {
|
|
|
106
101
|
return parsedDetails;
|
|
107
102
|
}
|
|
108
103
|
getIsTablet(details) {
|
|
109
|
-
//version 3.x.x (also known as Honeycomb) is a tablet only version
|
|
110
104
|
return (details &&
|
|
111
105
|
(_.startsWith(details.release, "3.") ||
|
|
112
106
|
_.includes((details.characteristics || "").toLowerCase(), "tablet")));
|
|
@@ -120,7 +114,6 @@ class AndroidDevice {
|
|
|
120
114
|
}
|
|
121
115
|
}
|
|
122
116
|
exports.AndroidDevice = AndroidDevice;
|
|
123
|
-
// http://stackoverflow.com/questions/31178195/what-does-adb-device-status-mean
|
|
124
117
|
AndroidDevice.ADB_DEVICE_STATUS_INFO = {
|
|
125
118
|
device: {
|
|
126
119
|
errorHelp: null,
|
|
@@ -146,4 +139,3 @@ AndroidDevice.ADB_DEVICE_STATUS_INFO = {
|
|
|
146
139
|
__decorate([
|
|
147
140
|
(0, decorators_1.cache)()
|
|
148
141
|
], AndroidDevice.prototype, "init", null);
|
|
149
|
-
//# sourceMappingURL=android-device.js.map
|
|
@@ -103,7 +103,7 @@ class AndroidEmulatorServices {
|
|
|
103
103
|
endTimeEpoch,
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
await (0, helpers_1.sleep)(10000);
|
|
106
|
+
await (0, helpers_1.sleep)(10000);
|
|
107
107
|
hasTimeLeft = (0, helpers_1.getCurrentEpochTime)() < endTimeEpoch;
|
|
108
108
|
}
|
|
109
109
|
if (!hasTimeLeft && !isInfiniteWait) {
|
|
@@ -180,4 +180,3 @@ class AndroidEmulatorServices {
|
|
|
180
180
|
}
|
|
181
181
|
exports.AndroidEmulatorServices = AndroidEmulatorServices;
|
|
182
182
|
yok_1.injector.register("androidEmulatorServices", AndroidEmulatorServices);
|
|
183
|
-
//# 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) => {
|
|
@@ -46,8 +44,6 @@ class AndroidIniFileParser {
|
|
|
46
44
|
}, Object.create(null));
|
|
47
45
|
}
|
|
48
46
|
getAvdEncoding(avdName) {
|
|
49
|
-
// avd files can have different encoding, defined on the first line.
|
|
50
|
-
// find which one it is (if any) and use it to correctly read the file contents
|
|
51
47
|
let encoding = "utf8";
|
|
52
48
|
let contents = this.$fs.readText(avdName, "ascii");
|
|
53
49
|
if (contents.length > 0) {
|
|
@@ -61,22 +57,18 @@ class AndroidIniFileParser {
|
|
|
61
57
|
}
|
|
62
58
|
return encoding;
|
|
63
59
|
}
|
|
64
|
-
// Android L is not written as a number in the .ini files, and we need to convert it
|
|
65
60
|
readTargetNum(target) {
|
|
66
61
|
const platform = target.replace("android-", "");
|
|
67
62
|
let platformNumber = +platform;
|
|
68
63
|
if (isNaN(platformNumber)) {
|
|
69
|
-
// this may be a google image
|
|
70
64
|
const googlePlatform = target.split(":")[2];
|
|
71
65
|
if (googlePlatform) {
|
|
72
66
|
platformNumber = +googlePlatform;
|
|
73
67
|
}
|
|
74
68
|
else if (platform === "L") {
|
|
75
|
-
// Android SDK 20 preview
|
|
76
69
|
platformNumber = 20;
|
|
77
70
|
}
|
|
78
71
|
else if (platform === "MNC") {
|
|
79
|
-
// Android M preview
|
|
80
72
|
platformNumber = 22;
|
|
81
73
|
}
|
|
82
74
|
}
|
|
@@ -85,4 +77,3 @@ class AndroidIniFileParser {
|
|
|
85
77
|
}
|
|
86
78
|
exports.AndroidIniFileParser = AndroidIniFileParser;
|
|
87
79
|
yok_1.injector.register("androidIniFileParser", AndroidIniFileParser);
|
|
88
|
-
//# sourceMappingURL=android-ini-file-parser.js.map
|
|
@@ -37,10 +37,6 @@ class AndroidLogFilter {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
exports.AndroidLogFilter = AndroidLogFilter;
|
|
40
|
-
//sample line is "I/Web Console( 4438): Received Event: deviceready at file:///storage/emulated/0/Icenium/com.telerik.TestApp/js/index.js:48"
|
|
41
40
|
AndroidLogFilter.LINE_REGEX = /.\/(.+?)\s*\(\s*\d+?\): (.*)/;
|
|
42
|
-
// 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"
|
|
43
|
-
// or '12-28 10:45:08.020 3329 3329 W chromium: [WARNING:data_reduction_proxy_settings.cc(328)] SPDY proxy OFF at startup'
|
|
44
41
|
AndroidLogFilter.API_LEVEL_23_LINE_REGEX = /.+?\s+?(?:[A-Z]\s+?)([A-Za-z \.]+?)\s*?\: (.*)/;
|
|
45
42
|
yok_1.injector.register("androidLogFilter", AndroidLogFilter);
|
|
46
|
-
//# sourceMappingURL=android-log-filter.js.map
|
|
@@ -69,9 +69,6 @@ class AndroidVirtualDeviceService {
|
|
|
69
69
|
get pathToEmulatorExecutable() {
|
|
70
70
|
const emulatorExecutableName = "emulator";
|
|
71
71
|
if (this.androidHome) {
|
|
72
|
-
// Check https://developer.android.com/studio/releases/sdk-tools.html (25.3.0)
|
|
73
|
-
// Since this version of SDK tools, the emulator is a separate package.
|
|
74
|
-
// However the emulator executable still exists in the "tools" dir.
|
|
75
72
|
const pathToEmulatorFromAndroidStudio = path.join(this.androidHome, emulatorExecutableName, emulatorExecutableName);
|
|
76
73
|
const realFilePath = this.$hostInfo.isWindows
|
|
77
74
|
? `${pathToEmulatorFromAndroidStudio}.exe`
|
|
@@ -111,17 +108,6 @@ class AndroidVirtualDeviceService {
|
|
|
111
108
|
client.on("data", (data) => {
|
|
112
109
|
output += data.toString();
|
|
113
110
|
const imageIdentifier = this.getImageIdentifierFromClientOutput(output);
|
|
114
|
-
// old output should look like:
|
|
115
|
-
// Android Console: type 'help' for a list of commands
|
|
116
|
-
// OK
|
|
117
|
-
// <Name of image>
|
|
118
|
-
// OK
|
|
119
|
-
// new output should look like:
|
|
120
|
-
// Android Console: type 'help' for a list of commands
|
|
121
|
-
// OK
|
|
122
|
-
// a\u001b[K\u001b[Dav\u001b[K\u001b[D\u001b[Davd\u001b...
|
|
123
|
-
// <Name of image>
|
|
124
|
-
// OK
|
|
125
111
|
if (imageIdentifier && !isResolved) {
|
|
126
112
|
this.mapEmulatorIdToImageIdentifier[emulatorId] = imageIdentifier;
|
|
127
113
|
this.clearNetConnection(client, timer);
|
|
@@ -173,8 +159,6 @@ class AndroidVirtualDeviceService {
|
|
|
173
159
|
if (this.pathToAvdManagerExecutable &&
|
|
174
160
|
this.$fs.exists(this.pathToAvdManagerExecutable)) {
|
|
175
161
|
if (process.env.JAVA_HOME) {
|
|
176
|
-
// 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
|
|
177
|
-
// no matter if you have correct java in PATH.
|
|
178
162
|
canExecute = !!(await this.$sysInfo.getJavaVersionFromJavaHome());
|
|
179
163
|
}
|
|
180
164
|
else {
|
|
@@ -246,13 +230,6 @@ class AndroidVirtualDeviceService {
|
|
|
246
230
|
const avdOutput = output.split(constants_1.AndroidVirtualDevice.AVAILABLE_AVDS_MESSAGE);
|
|
247
231
|
const availableDevices = avdOutput && avdOutput[1] && avdOutput[1].trim();
|
|
248
232
|
if (availableDevices) {
|
|
249
|
-
// In some cases `avdmanager list avds` command prints:
|
|
250
|
-
// `The following Android Virtual Devices could not be loaded:
|
|
251
|
-
// Name: Pixel_2_XL_API_28
|
|
252
|
-
// Path: /Users/<username>/.android/avd/Pixel_2_XL_API_28.avd
|
|
253
|
-
// Error: Google pixel_2_xl no longer exists as a device`
|
|
254
|
-
// These devices sometimes are valid so try to parse them.
|
|
255
|
-
// Also these devices are printed at the end of the output and are separated with 2 new lines from the valid devices output.
|
|
256
233
|
const parts = availableDevices.split(/(?:\r?\n){2}/);
|
|
257
234
|
const items = [parts[0], parts[1]].filter((item) => !!item);
|
|
258
235
|
for (const item of items) {
|
|
@@ -269,7 +246,6 @@ class AndroidVirtualDeviceService {
|
|
|
269
246
|
}
|
|
270
247
|
getAvdManagerDeviceInfo(output) {
|
|
271
248
|
const avdManagerDeviceInfo = Object.create(null);
|
|
272
|
-
// Split by `\n`, not EOL as the avdmanager and android executables print results with `\n` only even on Windows
|
|
273
249
|
_.reduce(output.split("\n"), (result, row) => {
|
|
274
250
|
const [key, value] = row.split(": ").map((part) => part.trim());
|
|
275
251
|
switch (key) {
|
|
@@ -316,7 +292,6 @@ class AndroidVirtualDeviceService {
|
|
|
316
292
|
};
|
|
317
293
|
}
|
|
318
294
|
getImageIdentifierFromClientOutput(output) {
|
|
319
|
-
// 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.
|
|
320
295
|
const lines = _.map(output.split(os_1.EOL), (line) => line.trim());
|
|
321
296
|
const firstIndexOfOk = _.indexOf(lines, "OK");
|
|
322
297
|
if (firstIndexOfOk < 0) {
|
|
@@ -365,4 +340,3 @@ __decorate([
|
|
|
365
340
|
(0, decorators_1.cache)()
|
|
366
341
|
], AndroidVirtualDeviceService.prototype, "getConfigurationError", null);
|
|
367
342
|
yok_1.injector.register("androidVirtualDeviceService", AndroidVirtualDeviceService);
|
|
368
|
-
//# sourceMappingURL=android-virtual-device-service.js.map
|
|
@@ -42,7 +42,6 @@ class AndroidGenymotionService {
|
|
|
42
42
|
.map(async (row) => {
|
|
43
43
|
const match = row.match(/^(.+?)\s+device$/);
|
|
44
44
|
if (match && match[1]) {
|
|
45
|
-
// possible genymotion emulator
|
|
46
45
|
const emulatorId = match[1];
|
|
47
46
|
const result = (await this.isGenymotionEmulator(emulatorId))
|
|
48
47
|
? emulatorId
|
|
@@ -93,7 +92,6 @@ class AndroidGenymotionService {
|
|
|
93
92
|
this.$emulatorHelper.setRunningAndroidEmulatorProperties(runningEmulatorId, runningEmulator);
|
|
94
93
|
return runningEmulator;
|
|
95
94
|
}
|
|
96
|
-
// https://wiki.appcelerator.org/display/guides2/Installing+Genymotion
|
|
97
95
|
get playerSearchPaths() {
|
|
98
96
|
return {
|
|
99
97
|
darwin: [
|
|
@@ -135,14 +133,13 @@ class AndroidGenymotionService {
|
|
|
135
133
|
vendor: constants_1.AndroidVirtualDevice.GENYMOTION_VENDOR_NAME,
|
|
136
134
|
status: constants_1.NOT_RUNNING_EMULATOR_STATUS,
|
|
137
135
|
errorHelp: [configurationError, error].filter((item) => !!item).join(os_1.EOL) || null,
|
|
138
|
-
isTablet: false,
|
|
136
|
+
isTablet: false,
|
|
139
137
|
type: constants_1.DeviceTypes.Emulator,
|
|
140
138
|
connectionTypes: [constants_2.DeviceConnectionType.Local],
|
|
141
139
|
platform: this.$devicePlatformsConstants.Android,
|
|
142
140
|
};
|
|
143
141
|
}
|
|
144
142
|
getSdkVersion(output) {
|
|
145
|
-
// Example -> Name: android_version, value: 6.0.0, timestamp: 1530090506102029000, flags:
|
|
146
143
|
const androidApiLevelRow = output
|
|
147
144
|
.split("\n")
|
|
148
145
|
.filter((row) => !!row)
|
|
@@ -168,7 +165,6 @@ In case you have installed Genymotion in a different location, please add the pa
|
|
|
168
165
|
}
|
|
169
166
|
async getConfigurationError() {
|
|
170
167
|
const result = await this.$childProcess.trySpawnFromCloseEvent(this.pathToEmulatorExecutable, [], {}, { throwError: false });
|
|
171
|
-
// When player is spawned, it always prints message on stderr.
|
|
172
168
|
if (result &&
|
|
173
169
|
result.stderr &&
|
|
174
170
|
result.stderr.indexOf(constants_1.AndroidVirtualDevice.GENYMOTION_DEFAULT_STDERR_STRING) === -1) {
|
|
@@ -186,4 +182,3 @@ __decorate([
|
|
|
186
182
|
(0, decorators_1.cache)()
|
|
187
183
|
], AndroidGenymotionService.prototype, "getConfigurationError", null);
|
|
188
184
|
yok_1.injector.register("androidGenymotionService", AndroidGenymotionService);
|
|
189
|
-
//# sourceMappingURL=genymotion-service.js.map
|
|
@@ -34,7 +34,6 @@ class VirtualBoxService {
|
|
|
34
34
|
.split(os_1.EOL)
|
|
35
35
|
.filter((row) => !!row)
|
|
36
36
|
.map((row) => {
|
|
37
|
-
// Example row: "Google Nexus 4 - 5.0.0 - API 21 - 768x1280" {9d9beef2-cc60-4a54-bcc0-cc1dbf89811f}
|
|
38
37
|
const [rawName, rawId] = row.split('" ');
|
|
39
38
|
const id = rawId.substr(1, rawId.length - 2);
|
|
40
39
|
const name = rawName.substr(1, rawName.length - 1);
|
|
@@ -71,15 +70,6 @@ class VirtualBoxService {
|
|
|
71
70
|
if (this.$hostInfo.isWindows) {
|
|
72
71
|
let searchPath = null;
|
|
73
72
|
try {
|
|
74
|
-
/* This can be used as interface!!!!
|
|
75
|
-
arch:null
|
|
76
|
-
hive:"HKLM"
|
|
77
|
-
host:""
|
|
78
|
-
key:"\Software\Oracle\VirtualBox"
|
|
79
|
-
name:"InstallDir"
|
|
80
|
-
type:"REG_SZ"
|
|
81
|
-
value:"C:\Program Files\Oracle\VirtualBox\"
|
|
82
|
-
*/
|
|
83
73
|
const result = await (0, helpers_1.getWinRegPropertyValue)("\\Software\\Oracle\\VirtualBox", "InstallDir");
|
|
84
74
|
searchPath = result && result.value ? result.value : null;
|
|
85
75
|
}
|
|
@@ -112,4 +102,3 @@ __decorate([
|
|
|
112
102
|
(0, decorators_1.cache)()
|
|
113
103
|
], VirtualBoxService.prototype, "getvBoxManagePath", null);
|
|
114
104
|
yok_1.injector.register("virtualBoxService", VirtualBoxService);
|
|
115
|
-
//# sourceMappingURL=virtualbox-service.js.map
|
|
@@ -40,7 +40,6 @@ class LogcatHelper {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
catch (err) {
|
|
43
|
-
// Ignore the error, the process is dead.
|
|
44
43
|
}
|
|
45
44
|
});
|
|
46
45
|
lineStream.on("data", (lineBuffer) => {
|
|
@@ -61,7 +60,6 @@ class LogcatHelper {
|
|
|
61
60
|
return;
|
|
62
61
|
const lines = (lineBuffer.toString() || "").split("\n");
|
|
63
62
|
for (let line of lines) {
|
|
64
|
-
// 2024-06-26 16:43:22.286 630-659 ActivityManager system_server I Start proc 8854:org.nativescript.uitestsapp/u0a190 for next-top-activity {org.nativescript.uitestsapp/com.tns.NativeScriptActivity}
|
|
65
63
|
const startProc = /Start proc (?<pid>[0-9]+):(?<appId>.+?)\//.exec(line);
|
|
66
64
|
if (startProc &&
|
|
67
65
|
((_b = startProc.groups) === null || _b === void 0 ? void 0 : _b.appId) === options.appId &&
|
|
@@ -88,9 +86,6 @@ class LogcatHelper {
|
|
|
88
86
|
lineStream.removeAllListeners();
|
|
89
87
|
});
|
|
90
88
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Stops the logcat process for the specified device if keepSingleProcess is not passed on start
|
|
93
|
-
*/
|
|
94
89
|
stop(deviceIdentifier) {
|
|
95
90
|
if (this.mapDevicesLoggingData[deviceIdentifier] &&
|
|
96
91
|
!this.mapDevicesLoggingData[deviceIdentifier].keepSingleProcess) {
|
|
@@ -107,9 +102,6 @@ class LogcatHelper {
|
|
|
107
102
|
(_e = loggingData.lineStream) === null || _e === void 0 ? void 0 : _e.removeAllListeners();
|
|
108
103
|
delete this.mapDevicesLoggingData[deviceIdentifier];
|
|
109
104
|
}
|
|
110
|
-
/**
|
|
111
|
-
* @deprecated - we likely don't need this anymore, and can simplify the code...
|
|
112
|
-
*/
|
|
113
105
|
async isLogcatPidSupported(deviceIdentifier) {
|
|
114
106
|
const device = await this.$devicesService.getDevice(deviceIdentifier);
|
|
115
107
|
const minAndroidWithLogcatPidSupport = "7.0.0";
|
|
@@ -119,7 +111,6 @@ class LogcatHelper {
|
|
|
119
111
|
async getLogcatStream(deviceIdentifier, pid) {
|
|
120
112
|
const isLogcatPidSupported = await this.isLogcatPidSupported(deviceIdentifier);
|
|
121
113
|
const adb = this.$injector.resolve(device_android_debug_bridge_1.DeviceAndroidDebugBridge, { identifier: deviceIdentifier });
|
|
122
|
-
// -T 1 - shows only new logs after starting adb logcat
|
|
123
114
|
const logcatCommand = ["logcat", "-T", "1"];
|
|
124
115
|
const acceptedTags = [
|
|
125
116
|
"chromium",
|
|
@@ -132,7 +123,6 @@ class LogcatHelper {
|
|
|
132
123
|
if (pid && isLogcatPidSupported) {
|
|
133
124
|
logcatCommand.push(`--pid=${pid}`);
|
|
134
125
|
acceptedTags.forEach((tag) => {
|
|
135
|
-
// -s <tag> - shows only logs with the specified tag
|
|
136
126
|
logcatCommand.push("-s", tag);
|
|
137
127
|
});
|
|
138
128
|
}
|
|
@@ -143,8 +133,6 @@ class LogcatHelper {
|
|
|
143
133
|
}
|
|
144
134
|
async getAppStartTrackingLogcatStream(deviceIdentifier, appId) {
|
|
145
135
|
const adb = this.$injector.resolve(device_android_debug_bridge_1.DeviceAndroidDebugBridge, { identifier: deviceIdentifier });
|
|
146
|
-
// -b system - shows the system buffer/logs only
|
|
147
|
-
// -T 1 - shows only new logs after starting adb logcat
|
|
148
136
|
const logcatCommand = [
|
|
149
137
|
`logcat`,
|
|
150
138
|
`-b`,
|
|
@@ -165,4 +153,3 @@ class LogcatHelper {
|
|
|
165
153
|
}
|
|
166
154
|
exports.LogcatHelper = LogcatHelper;
|
|
167
155
|
yok_1.injector.register("logcatHelper", LogcatHelper);
|
|
168
|
-
//# sourceMappingURL=logcat-helper.js.map
|