nativescript 9.0.0-alpha.7 → 9.0.0-alpha.9

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.
Files changed (326) hide show
  1. package/lib/android-tools-info.js +0 -12
  2. package/lib/base-package-manager.js +0 -7
  3. package/lib/bootstrap.js +1 -5
  4. package/lib/bun-package-manager.js +1 -14
  5. package/lib/color.js +0 -4
  6. package/lib/commands/add-platform.js +0 -1
  7. package/lib/commands/apple-login.js +0 -1
  8. package/lib/commands/appstore-list.js +0 -1
  9. package/lib/commands/appstore-upload.js +0 -3
  10. package/lib/commands/build.js +2 -3
  11. package/lib/commands/clean.js +1 -23
  12. package/lib/commands/command-base.js +0 -1
  13. package/lib/commands/config.js +0 -4
  14. package/lib/commands/create-project.js +0 -6
  15. package/lib/commands/debug.js +1 -6
  16. package/lib/commands/deploy.js +2 -3
  17. package/lib/commands/embedding/embed.js +0 -7
  18. package/lib/commands/extensibility/install-extension.js +0 -1
  19. package/lib/commands/extensibility/list-extensions.js +0 -1
  20. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  21. package/lib/commands/fonts.js +0 -1
  22. package/lib/commands/generate-assets.js +0 -1
  23. package/lib/commands/generate-help.js +0 -1
  24. package/lib/commands/generate.js +1 -48
  25. package/lib/commands/info.js +0 -1
  26. package/lib/commands/install.js +0 -1
  27. package/lib/commands/list-platforms.js +0 -1
  28. package/lib/commands/migrate.js +0 -1
  29. package/lib/commands/native-add.js +0 -5
  30. package/lib/commands/platform-clean.js +0 -1
  31. package/lib/commands/plugin/add-plugin.js +0 -1
  32. package/lib/commands/plugin/build-plugin.js +0 -1
  33. package/lib/commands/plugin/create-plugin.js +0 -5
  34. package/lib/commands/plugin/list-plugins.js +0 -1
  35. package/lib/commands/plugin/remove-plugin.js +0 -2
  36. package/lib/commands/plugin/update-plugin.js +0 -1
  37. package/lib/commands/post-install.js +0 -6
  38. package/lib/commands/prepare.js +3 -4
  39. package/lib/commands/preview.js +0 -2
  40. package/lib/commands/remove-platform.js +0 -1
  41. package/lib/commands/resources/resources-update.js +0 -2
  42. package/lib/commands/run.js +0 -1
  43. package/lib/commands/setup.js +0 -1
  44. package/lib/commands/start.js +0 -1
  45. package/lib/commands/test-init.js +0 -4
  46. package/lib/commands/test.js +2 -9
  47. package/lib/commands/typings.js +1 -2
  48. package/lib/commands/update-platform.js +0 -5
  49. package/lib/commands/update.js +0 -2
  50. package/lib/commands/widget.js +1 -20
  51. package/lib/common/bootstrap.js +0 -1
  52. package/lib/common/child-process.js +0 -3
  53. package/lib/common/codeGeneration/code-entity.js +0 -1
  54. package/lib/common/codeGeneration/code-printer.js +0 -1
  55. package/lib/common/command-params.js +0 -1
  56. package/lib/common/commands/analytics.js +0 -3
  57. package/lib/common/commands/autocompletion.js +0 -3
  58. package/lib/common/commands/device/device-log-stream.js +0 -1
  59. package/lib/common/commands/device/get-file.js +0 -2
  60. package/lib/common/commands/device/list-applications.js +0 -1
  61. package/lib/common/commands/device/list-devices.js +0 -3
  62. package/lib/common/commands/device/list-files.js +0 -2
  63. package/lib/common/commands/device/put-file.js +0 -2
  64. package/lib/common/commands/device/run-application.js +0 -1
  65. package/lib/common/commands/device/stop-application.js +0 -1
  66. package/lib/common/commands/device/uninstall-application.js +0 -1
  67. package/lib/common/commands/doctor.js +2 -3
  68. package/lib/common/commands/generate-messages.js +0 -1
  69. package/lib/common/commands/help.js +0 -1
  70. package/lib/common/commands/package-manager-get.js +0 -1
  71. package/lib/common/commands/package-manager-set.js +0 -1
  72. package/lib/common/commands/post-install.js +0 -1
  73. package/lib/common/commands/preuninstall.js +2 -11
  74. package/lib/common/commands/proxy/proxy-base.js +0 -4
  75. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  76. package/lib/common/commands/proxy/proxy-get.js +0 -1
  77. package/lib/common/commands/proxy/proxy-set.js +0 -1
  78. package/lib/common/common-lib.js +0 -1
  79. package/lib/common/constants.js +0 -11
  80. package/lib/common/decorators.js +0 -48
  81. package/lib/common/dispatchers.js +1 -10
  82. package/lib/common/errors.js +3 -13
  83. package/lib/common/file-system.js +2 -13
  84. package/lib/common/header.js +0 -3
  85. package/lib/common/helpers.js +3 -89
  86. package/lib/common/host-info.js +0 -4
  87. package/lib/common/http-client.js +0 -20
  88. package/lib/common/logger/appenders/cli-appender.js +0 -4
  89. package/lib/common/logger/appenders/emit-appender.js +0 -4
  90. package/lib/common/logger/layouts/cli-layout.js +0 -1
  91. package/lib/common/logger/logger.js +0 -5
  92. package/lib/common/messages/messages.js +0 -6
  93. package/lib/common/mobile/android/android-application-manager.js +1 -20
  94. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  95. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  96. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  97. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  98. package/lib/common/mobile/android/android-device.js +0 -8
  99. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  100. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  101. package/lib/common/mobile/android/android-log-filter.js +0 -4
  102. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  103. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  104. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  105. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  106. package/lib/common/mobile/android/logcat-helper.js +0 -13
  107. package/lib/common/mobile/application-manager-base.js +0 -6
  108. package/lib/common/mobile/device-emitter.js +0 -4
  109. package/lib/common/mobile/device-log-emitter.js +0 -1
  110. package/lib/common/mobile/device-log-provider-base.js +0 -1
  111. package/lib/common/mobile/device-log-provider.js +0 -23
  112. package/lib/common/mobile/device-platforms-constants.js +0 -1
  113. package/lib/common/mobile/emulator-helper.js +0 -3
  114. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  115. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  116. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  117. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  118. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  119. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  120. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  121. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  122. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  123. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  124. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  125. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  126. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  127. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  128. package/lib/common/mobile/log-filter.js +0 -2
  129. package/lib/common/mobile/logging-levels.js +0 -1
  130. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  131. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  132. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  133. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  134. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  135. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  136. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  137. package/lib/common/mobile/mobile-helper.js +0 -1
  138. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  139. package/lib/common/opener.js +0 -1
  140. package/lib/common/os-info.js +0 -1
  141. package/lib/common/plist-parser.js +0 -1
  142. package/lib/common/project-helper.js +0 -1
  143. package/lib/common/prompter.js +1 -9
  144. package/lib/common/queue.js +0 -1
  145. package/lib/common/resource-loader.js +0 -1
  146. package/lib/common/services/auto-completion-service.js +1 -13
  147. package/lib/common/services/cancellation.js +1 -2
  148. package/lib/common/services/commands-service.js +6 -17
  149. package/lib/common/services/help-service.js +3 -11
  150. package/lib/common/services/hooks-service.js +0 -13
  151. package/lib/common/services/ios-notification-service.js +0 -1
  152. package/lib/common/services/json-file-settings-service.js +0 -6
  153. package/lib/common/services/lock-service.js +0 -6
  154. package/lib/common/services/message-contract-generator.js +0 -1
  155. package/lib/common/services/messages-service.js +0 -1
  156. package/lib/common/services/micro-templating-service.js +0 -6
  157. package/lib/common/services/net-service.js +0 -3
  158. package/lib/common/services/project-files-manager.js +0 -5
  159. package/lib/common/services/project-files-provider-base.js +0 -1
  160. package/lib/common/services/proxy-service.js +0 -1
  161. package/lib/common/services/qr.js +0 -1
  162. package/lib/common/services/settings-service.js +0 -1
  163. package/lib/common/services/xcode-select-service.js +0 -1
  164. package/lib/common/utils.js +0 -1
  165. package/lib/common/validators/project-name-validator.js +0 -1
  166. package/lib/common/validators/validation-result.js +0 -1
  167. package/lib/common/verify-node-version.js +1 -8
  168. package/lib/common/yok.js +11 -32
  169. package/lib/config.js +1 -22
  170. package/lib/constants-provider.js +0 -1
  171. package/lib/constants.js +0 -53
  172. package/lib/controllers/build-controller.js +3 -4
  173. package/lib/controllers/debug-controller.js +3 -8
  174. package/lib/controllers/deploy-controller.js +0 -1
  175. package/lib/controllers/migrate-controller.js +4 -90
  176. package/lib/controllers/platform-controller.js +1 -9
  177. package/lib/controllers/prepare-controller.js +4 -17
  178. package/lib/controllers/run-controller.js +1 -17
  179. package/lib/controllers/update-controller-base.js +0 -1
  180. package/lib/controllers/update-controller.js +0 -11
  181. package/lib/data/build-data.js +0 -1
  182. package/lib/data/controller-data-base.js +0 -1
  183. package/lib/data/debug-data.js +0 -1
  184. package/lib/data/platform-data.js +0 -1
  185. package/lib/data/prepare-data.js +0 -1
  186. package/lib/data/run-data.js +0 -1
  187. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  188. package/lib/detached-processes/cleanup-process.js +14 -18
  189. package/lib/detached-processes/file-log-service.js +1 -2
  190. package/lib/device-path-provider.js +0 -1
  191. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  192. package/lib/device-sockets/ios/notification.js +0 -3
  193. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  194. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  195. package/lib/helpers/deploy-command-helper.js +0 -1
  196. package/lib/helpers/key-command-helper.js +2 -4
  197. package/lib/helpers/livesync-command-helper.js +1 -4
  198. package/lib/helpers/network-connectivity-validator.js +0 -1
  199. package/lib/helpers/options-track-helper.js +2 -3
  200. package/lib/helpers/package-path-helper.js +0 -1
  201. package/lib/helpers/platform-command-helper.js +2 -7
  202. package/lib/helpers/version-validator-helper.js +0 -1
  203. package/lib/key-commands/bootstrap.js +2 -3
  204. package/lib/key-commands/index.js +4 -5
  205. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  206. package/lib/nativescript-cli-lib.js +0 -1
  207. package/lib/nativescript-cli.js +1 -10
  208. package/lib/node/pbxproj-dom-xcode.js +0 -1
  209. package/lib/node/xcode.js +0 -1
  210. package/lib/node-package-manager.js +1 -11
  211. package/lib/options.js +119 -144
  212. package/lib/package-installation-manager.js +1 -8
  213. package/lib/package-manager.js +0 -2
  214. package/lib/platform-command-param.js +0 -1
  215. package/lib/pnpm-package-manager.js +1 -4
  216. package/lib/project-data.js +0 -12
  217. package/lib/providers/project-files-provider.js +0 -1
  218. package/lib/resolvers/livesync-service-resolver.js +0 -1
  219. package/lib/services/analytics/analytics-broker-process.js +6 -10
  220. package/lib/services/analytics/analytics-broker.js +1 -2
  221. package/lib/services/analytics/analytics-service.js +25 -29
  222. package/lib/services/analytics/google-analytics-provider.js +12 -13
  223. package/lib/services/analytics-settings-service.js +0 -5
  224. package/lib/services/android/android-bundle-tool-service.js +0 -1
  225. package/lib/services/android/gradle-build-args-service.js +0 -3
  226. package/lib/services/android/gradle-build-service.js +0 -1
  227. package/lib/services/android/gradle-command-service.js +0 -1
  228. package/lib/services/android-device-debug-service.js +0 -6
  229. package/lib/services/android-plugin-build-service.js +2 -31
  230. package/lib/services/android-project-service.js +4 -71
  231. package/lib/services/android-resources-migration-service.js +0 -7
  232. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  233. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  234. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  235. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  236. package/lib/services/assets-generation/assets-generation-service.js +5 -10
  237. package/lib/services/build-artifacts-service.js +1 -2
  238. package/lib/services/build-data-service.js +0 -1
  239. package/lib/services/build-info-file-service.js +0 -1
  240. package/lib/services/bundler/bundler-compiler-service.js +35 -75
  241. package/lib/services/bundler/bundler.js +0 -1
  242. package/lib/services/cleanup-service.js +9 -13
  243. package/lib/services/cocoapods-platform-manager.js +0 -9
  244. package/lib/services/cocoapods-service.js +1 -21
  245. package/lib/services/debug-data-service.js +0 -1
  246. package/lib/services/debug-service-base.js +0 -7
  247. package/lib/services/device/device-install-app-service.js +1 -2
  248. package/lib/services/doctor-service.js +6 -21
  249. package/lib/services/extensibility-service.js +0 -8
  250. package/lib/services/files-hash-service.js +0 -1
  251. package/lib/services/hmr-status-service.js +0 -2
  252. package/lib/services/info-service.js +0 -1
  253. package/lib/services/initialize-service.js +1 -5
  254. package/lib/services/ios/export-options-plist-service.js +0 -4
  255. package/lib/services/ios/ios-signing-service.js +0 -4
  256. package/lib/services/ios/spm-service.js +0 -11
  257. package/lib/services/ios/xcodebuild-args-service.js +0 -9
  258. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  259. package/lib/services/ios/xcodebuild-service.js +1 -2
  260. package/lib/services/ios-debugger-port-service.js +0 -1
  261. package/lib/services/ios-device-debug-service.js +0 -1
  262. package/lib/services/ios-entitlements-service.js +0 -1
  263. package/lib/services/ios-extensions-service.js +0 -1
  264. package/lib/services/ios-log-filter.js +0 -20
  265. package/lib/services/ios-native-target-service.js +4 -6
  266. package/lib/services/ios-project-service.js +1 -91
  267. package/lib/services/ios-provision-service.js +0 -3
  268. package/lib/services/ios-watch-app-service.js +0 -1
  269. package/lib/services/ip-service.js +0 -2
  270. package/lib/services/itmstransporter-service.js +0 -1
  271. package/lib/services/karma-execution.js +0 -2
  272. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  273. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  274. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  275. package/lib/services/livesync/android-livesync-service.js +0 -1
  276. package/lib/services/livesync/android-livesync-tool.js +3 -5
  277. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  278. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  279. package/lib/services/livesync/ios-livesync-service.js +0 -2
  280. package/lib/services/livesync/livesync-socket.js +0 -1
  281. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  282. package/lib/services/livesync-process-data-service.js +0 -1
  283. package/lib/services/log-parser-service.js +0 -1
  284. package/lib/services/log-source-map-service.js +0 -15
  285. package/lib/services/marking-mode-service.js +5 -8
  286. package/lib/services/metadata-filtering-service.js +0 -1
  287. package/lib/services/npm-config-service.js +0 -4
  288. package/lib/services/pacote-service.js +0 -7
  289. package/lib/services/performance-service.js +1 -3
  290. package/lib/services/platform/add-platform-service.js +2 -49
  291. package/lib/services/platform/platform-validation-service.js +0 -1
  292. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  293. package/lib/services/platform-environment-requirements.js +3 -8
  294. package/lib/services/platform-project-service-base.js +0 -1
  295. package/lib/services/platforms-data-service.js +0 -1
  296. package/lib/services/plugins-service.js +2 -20
  297. package/lib/services/prepare-data-service.js +0 -1
  298. package/lib/services/project-backup-service.js +0 -4
  299. package/lib/services/project-changes-service.js +3 -14
  300. package/lib/services/project-cleanup-service.js +0 -2
  301. package/lib/services/project-config-service.js +2 -21
  302. package/lib/services/project-data-service.js +7 -36
  303. package/lib/services/project-name-service.js +0 -1
  304. package/lib/services/project-service.js +0 -10
  305. package/lib/services/project-templates-service.js +2 -3
  306. package/lib/services/qr-code-terminal-service.js +0 -1
  307. package/lib/services/require-service.js +0 -1
  308. package/lib/services/start-service.js +0 -1
  309. package/lib/services/temp-service.js +0 -3
  310. package/lib/services/terminal-spinner-service.js +0 -2
  311. package/lib/services/test-execution-service.js +2 -9
  312. package/lib/services/test-initialization-service.js +0 -4
  313. package/lib/services/timeline-profiler-service.js +0 -1
  314. package/lib/services/user-settings-service.js +0 -1
  315. package/lib/services/versions-service.js +4 -6
  316. package/lib/services/watch-ignore-list-service.js +0 -1
  317. package/lib/services/xcconfig-service.js +0 -2
  318. package/lib/services/xcproj-service.js +0 -1
  319. package/lib/shared-event-bus.js +0 -6
  320. package/lib/sys-info.js +1 -2
  321. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  322. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  323. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  324. package/lib/yarn-package-manager.js +0 -1
  325. package/lib/yarn2-package-manager.js +0 -3
  326. package/package.json +18 -18
@@ -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
@@ -30,4 +30,3 @@ function layout(config) {
30
30
  return msg;
31
31
  };
32
32
  }
33
- //# sourceMappingURL=cli-layout.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; // 10 secs
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
@@ -330,4 +330,3 @@ AndroidDebugBridgeResultHandler.ANDROID_DEBUG_BRIDGE_ERRORS = [
330
330
  },
331
331
  ];
332
332
  yok_1.injector.register("androidDebugBridgeResultHandler", AndroidDebugBridgeResultHandler);
333
- //# sourceMappingURL=android-debug-bridge-result-handler.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); // the emulator definitely takes its time to wake up
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
@@ -30,4 +30,3 @@ class DeviceAndroidDebugBridge extends android_debug_bridge_1.AndroidDebugBridge
30
30
  }
31
31
  }
32
32
  exports.DeviceAndroidDebugBridge = DeviceAndroidDebugBridge;
33
- //# sourceMappingURL=device-android-debug-bridge.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, //TODO: Consider how to populate this correctly when the device is not running
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