nativescript 9.0.3 → 9.0.4-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) 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 -22
  12. package/lib/commands/command-base.js +0 -1
  13. package/lib/commands/config.js +0 -5
  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/hooks/common.js +1 -2
  26. package/lib/commands/hooks/hooks-lock.js +0 -1
  27. package/lib/commands/hooks/hooks.js +0 -1
  28. package/lib/commands/info.js +0 -1
  29. package/lib/commands/install.js +0 -1
  30. package/lib/commands/list-platforms.js +0 -1
  31. package/lib/commands/migrate.js +0 -1
  32. package/lib/commands/native-add.js +0 -5
  33. package/lib/commands/platform-clean.js +0 -1
  34. package/lib/commands/plugin/add-plugin.js +0 -1
  35. package/lib/commands/plugin/build-plugin.js +0 -1
  36. package/lib/commands/plugin/create-plugin.js +0 -5
  37. package/lib/commands/plugin/list-plugins.js +0 -1
  38. package/lib/commands/plugin/remove-plugin.js +0 -2
  39. package/lib/commands/plugin/update-plugin.js +0 -1
  40. package/lib/commands/post-install.js +0 -6
  41. package/lib/commands/prepare.js +3 -4
  42. package/lib/commands/preview.js +0 -2
  43. package/lib/commands/remove-platform.js +0 -1
  44. package/lib/commands/resources/resources-update.js +0 -2
  45. package/lib/commands/run.js +0 -1
  46. package/lib/commands/setup.js +0 -1
  47. package/lib/commands/start.js +0 -1
  48. package/lib/commands/test-init.js +0 -4
  49. package/lib/commands/test.js +2 -9
  50. package/lib/commands/typings.js +1 -2
  51. package/lib/commands/update-platform.js +0 -5
  52. package/lib/commands/update.js +0 -2
  53. package/lib/commands/widget.js +1 -20
  54. package/lib/common/bootstrap.js +0 -1
  55. package/lib/common/child-process.js +0 -3
  56. package/lib/common/codeGeneration/code-entity.js +0 -1
  57. package/lib/common/codeGeneration/code-printer.js +0 -1
  58. package/lib/common/command-params.js +0 -1
  59. package/lib/common/commands/analytics.js +0 -3
  60. package/lib/common/commands/autocompletion.js +0 -3
  61. package/lib/common/commands/device/device-log-stream.js +0 -1
  62. package/lib/common/commands/device/get-file.js +0 -2
  63. package/lib/common/commands/device/list-applications.js +0 -1
  64. package/lib/common/commands/device/list-devices.js +0 -3
  65. package/lib/common/commands/device/list-files.js +0 -2
  66. package/lib/common/commands/device/put-file.js +0 -2
  67. package/lib/common/commands/device/run-application.js +0 -1
  68. package/lib/common/commands/device/stop-application.js +0 -1
  69. package/lib/common/commands/device/uninstall-application.js +0 -1
  70. package/lib/common/commands/doctor.js +2 -3
  71. package/lib/common/commands/generate-messages.js +0 -1
  72. package/lib/common/commands/help.js +0 -1
  73. package/lib/common/commands/package-manager-get.js +0 -1
  74. package/lib/common/commands/package-manager-set.js +0 -1
  75. package/lib/common/commands/post-install.js +0 -1
  76. package/lib/common/commands/preuninstall.js +2 -11
  77. package/lib/common/commands/proxy/proxy-base.js +0 -4
  78. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  79. package/lib/common/commands/proxy/proxy-get.js +0 -1
  80. package/lib/common/commands/proxy/proxy-set.js +0 -1
  81. package/lib/common/common-lib.js +0 -1
  82. package/lib/common/constants.js +0 -11
  83. package/lib/common/decorators.js +0 -48
  84. package/lib/common/dispatchers.js +1 -10
  85. package/lib/common/errors.js +3 -13
  86. package/lib/common/file-system.js +2 -13
  87. package/lib/common/header.js +0 -3
  88. package/lib/common/helpers.js +3 -89
  89. package/lib/common/host-info.js +0 -4
  90. package/lib/common/http-client.js +0 -20
  91. package/lib/common/logger/appenders/cli-appender.js +0 -4
  92. package/lib/common/logger/appenders/emit-appender.js +0 -4
  93. package/lib/common/logger/layouts/cli-layout.js +0 -1
  94. package/lib/common/logger/logger.js +0 -5
  95. package/lib/common/messages/messages.js +0 -6
  96. package/lib/common/mobile/android/android-application-manager.js +1 -20
  97. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  98. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  99. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  100. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  101. package/lib/common/mobile/android/android-device.js +0 -8
  102. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  103. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  104. package/lib/common/mobile/android/android-log-filter.js +0 -4
  105. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  106. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  107. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  108. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  109. package/lib/common/mobile/android/logcat-helper.js +0 -13
  110. package/lib/common/mobile/application-manager-base.js +0 -6
  111. package/lib/common/mobile/device-emitter.js +0 -4
  112. package/lib/common/mobile/device-log-emitter.js +0 -1
  113. package/lib/common/mobile/device-log-provider-base.js +0 -1
  114. package/lib/common/mobile/device-log-provider.js +0 -23
  115. package/lib/common/mobile/device-platforms-constants.js +0 -1
  116. package/lib/common/mobile/emulator-helper.js +0 -3
  117. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  118. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  119. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  120. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  121. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  122. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  123. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  124. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  125. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  126. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  127. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  128. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  129. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  130. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  131. package/lib/common/mobile/log-filter.js +0 -2
  132. package/lib/common/mobile/logging-levels.js +0 -1
  133. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  134. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  135. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  136. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  137. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  138. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  139. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  140. package/lib/common/mobile/mobile-helper.js +0 -1
  141. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  142. package/lib/common/opener.js +0 -1
  143. package/lib/common/os-info.js +0 -1
  144. package/lib/common/plist-parser.js +0 -1
  145. package/lib/common/project-helper.js +0 -1
  146. package/lib/common/prompter.js +1 -9
  147. package/lib/common/queue.js +0 -1
  148. package/lib/common/resource-loader.js +0 -1
  149. package/lib/common/services/auto-completion-service.js +1 -13
  150. package/lib/common/services/cancellation.js +1 -2
  151. package/lib/common/services/commands-service.js +6 -17
  152. package/lib/common/services/help-service.js +3 -11
  153. package/lib/common/services/hooks-service.js +0 -13
  154. package/lib/common/services/ios-notification-service.js +0 -1
  155. package/lib/common/services/json-file-settings-service.js +0 -6
  156. package/lib/common/services/lock-service.js +0 -6
  157. package/lib/common/services/message-contract-generator.js +0 -1
  158. package/lib/common/services/messages-service.js +0 -1
  159. package/lib/common/services/micro-templating-service.js +0 -6
  160. package/lib/common/services/net-service.js +0 -3
  161. package/lib/common/services/project-files-manager.js +0 -5
  162. package/lib/common/services/project-files-provider-base.js +0 -1
  163. package/lib/common/services/proxy-service.js +0 -1
  164. package/lib/common/services/qr.js +0 -1
  165. package/lib/common/services/settings-service.js +0 -1
  166. package/lib/common/services/xcode-select-service.js +0 -1
  167. package/lib/common/utils.js +0 -1
  168. package/lib/common/validators/project-name-validator.js +0 -1
  169. package/lib/common/validators/validation-result.js +0 -1
  170. package/lib/common/verify-node-version.js +1 -8
  171. package/lib/common/yok.js +11 -32
  172. package/lib/config.js +1 -22
  173. package/lib/constants-provider.js +0 -1
  174. package/lib/constants.js +0 -53
  175. package/lib/controllers/build-controller.js +3 -4
  176. package/lib/controllers/debug-controller.js +3 -8
  177. package/lib/controllers/deploy-controller.js +0 -1
  178. package/lib/controllers/migrate-controller.js +4 -90
  179. package/lib/controllers/platform-controller.js +1 -9
  180. package/lib/controllers/prepare-controller.js +4 -17
  181. package/lib/controllers/run-controller.js +1 -17
  182. package/lib/controllers/update-controller-base.js +0 -1
  183. package/lib/controllers/update-controller.js +0 -11
  184. package/lib/data/build-data.js +0 -1
  185. package/lib/data/controller-data-base.js +0 -1
  186. package/lib/data/debug-data.js +0 -1
  187. package/lib/data/platform-data.js +0 -1
  188. package/lib/data/prepare-data.js +0 -1
  189. package/lib/data/run-data.js +0 -1
  190. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  191. package/lib/detached-processes/cleanup-process.js +14 -18
  192. package/lib/detached-processes/file-log-service.js +1 -2
  193. package/lib/device-path-provider.js +0 -1
  194. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  195. package/lib/device-sockets/ios/notification.js +0 -3
  196. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  197. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  198. package/lib/helpers/deploy-command-helper.js +0 -1
  199. package/lib/helpers/key-command-helper.js +2 -4
  200. package/lib/helpers/livesync-command-helper.js +1 -4
  201. package/lib/helpers/network-connectivity-validator.js +0 -1
  202. package/lib/helpers/options-track-helper.js +2 -3
  203. package/lib/helpers/package-path-helper.js +0 -1
  204. package/lib/helpers/platform-command-helper.js +2 -7
  205. package/lib/helpers/version-validator-helper.js +0 -1
  206. package/lib/key-commands/bootstrap.js +2 -3
  207. package/lib/key-commands/index.js +4 -5
  208. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  209. package/lib/nativescript-cli-lib.js +0 -1
  210. package/lib/nativescript-cli.js +1 -11
  211. package/lib/node/pbxproj-dom-xcode.js +0 -1
  212. package/lib/node/xcode.js +0 -1
  213. package/lib/node-package-manager.js +1 -11
  214. package/lib/options.js +119 -144
  215. package/lib/package-installation-manager.js +1 -8
  216. package/lib/package-manager.js +0 -2
  217. package/lib/platform-command-param.js +0 -1
  218. package/lib/pnpm-package-manager.js +1 -4
  219. package/lib/project-data.js +0 -12
  220. package/lib/providers/project-files-provider.js +0 -1
  221. package/lib/resolvers/livesync-service-resolver.js +0 -1
  222. package/lib/services/analytics/analytics-broker-process.js +6 -10
  223. package/lib/services/analytics/analytics-broker.js +1 -2
  224. package/lib/services/analytics/analytics-service.js +25 -29
  225. package/lib/services/analytics/google-analytics-provider.js +12 -13
  226. package/lib/services/analytics-settings-service.js +0 -5
  227. package/lib/services/android/android-bundle-tool-service.js +0 -1
  228. package/lib/services/android/gradle-build-args-service.js +0 -3
  229. package/lib/services/android/gradle-build-service.js +0 -1
  230. package/lib/services/android/gradle-command-service.js +0 -1
  231. package/lib/services/android-device-debug-service.js +0 -6
  232. package/lib/services/android-plugin-build-service.js +2 -31
  233. package/lib/services/android-project-service.js +4 -71
  234. package/lib/services/android-resources-migration-service.js +0 -7
  235. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  236. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  237. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  238. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  239. package/lib/services/assets-generation/assets-generation-service.js +5 -10
  240. package/lib/services/build-artifacts-service.js +1 -2
  241. package/lib/services/build-data-service.js +0 -1
  242. package/lib/services/build-info-file-service.js +0 -1
  243. package/lib/services/bundler/bundler-compiler-service.js +1 -68
  244. package/lib/services/bundler/bundler.js +0 -1
  245. package/lib/services/cleanup-service.js +9 -13
  246. package/lib/services/cocoapods-platform-manager.js +0 -9
  247. package/lib/services/cocoapods-service.js +1 -21
  248. package/lib/services/debug-data-service.js +0 -1
  249. package/lib/services/debug-service-base.js +0 -7
  250. package/lib/services/device/device-install-app-service.js +1 -2
  251. package/lib/services/doctor-service.js +6 -21
  252. package/lib/services/extensibility-service.js +0 -8
  253. package/lib/services/files-hash-service.js +0 -1
  254. package/lib/services/hmr-status-service.js +0 -2
  255. package/lib/services/info-service.js +0 -1
  256. package/lib/services/initialize-service.js +1 -5
  257. package/lib/services/ios/export-options-plist-service.js +0 -4
  258. package/lib/services/ios/ios-signing-service.js +10 -7
  259. package/lib/services/ios/spm-service.js +0 -18
  260. package/lib/services/ios/xcodebuild-args-service.js +0 -11
  261. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  262. package/lib/services/ios/xcodebuild-service.js +1 -2
  263. package/lib/services/ios-debugger-port-service.js +0 -1
  264. package/lib/services/ios-device-debug-service.js +0 -1
  265. package/lib/services/ios-entitlements-service.js +3 -2
  266. package/lib/services/ios-extensions-service.js +0 -1
  267. package/lib/services/ios-log-filter.js +0 -20
  268. package/lib/services/ios-native-target-service.js +4 -6
  269. package/lib/services/ios-project-service.js +11 -105
  270. package/lib/services/ios-provision-service.js +0 -3
  271. package/lib/services/ios-watch-app-service.js +0 -1
  272. package/lib/services/ip-service.js +0 -2
  273. package/lib/services/itmstransporter-service.js +0 -1
  274. package/lib/services/karma-execution.js +0 -2
  275. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  276. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  277. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  278. package/lib/services/livesync/android-livesync-service.js +0 -1
  279. package/lib/services/livesync/android-livesync-tool.js +0 -4
  280. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  281. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  282. package/lib/services/livesync/ios-livesync-service.js +0 -2
  283. package/lib/services/livesync/livesync-socket.js +0 -1
  284. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  285. package/lib/services/livesync-process-data-service.js +0 -1
  286. package/lib/services/log-parser-service.js +0 -1
  287. package/lib/services/log-source-map-service.js +0 -15
  288. package/lib/services/marking-mode-service.js +5 -8
  289. package/lib/services/metadata-filtering-service.js +0 -1
  290. package/lib/services/npm-config-service.js +0 -4
  291. package/lib/services/pacote-service.js +0 -7
  292. package/lib/services/performance-service.js +1 -3
  293. package/lib/services/platform/add-platform-service.js +2 -49
  294. package/lib/services/platform/platform-validation-service.js +0 -1
  295. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  296. package/lib/services/platform-environment-requirements.js +3 -8
  297. package/lib/services/platform-project-service-base.js +0 -1
  298. package/lib/services/platforms-data-service.js +0 -1
  299. package/lib/services/plugins-service.js +2 -20
  300. package/lib/services/prepare-data-service.js +0 -1
  301. package/lib/services/project-backup-service.js +0 -4
  302. package/lib/services/project-changes-service.js +3 -14
  303. package/lib/services/project-cleanup-service.js +0 -2
  304. package/lib/services/project-config-service.js +2 -21
  305. package/lib/services/project-data-service.js +7 -36
  306. package/lib/services/project-name-service.js +0 -1
  307. package/lib/services/project-service.js +0 -10
  308. package/lib/services/project-templates-service.js +2 -3
  309. package/lib/services/qr-code-terminal-service.js +0 -1
  310. package/lib/services/require-service.js +0 -1
  311. package/lib/services/start-service.js +0 -1
  312. package/lib/services/temp-service.js +0 -3
  313. package/lib/services/terminal-spinner-service.js +0 -2
  314. package/lib/services/test-execution-service.js +2 -9
  315. package/lib/services/test-initialization-service.js +0 -4
  316. package/lib/services/timeline-profiler-service.js +0 -1
  317. package/lib/services/user-settings-service.js +0 -1
  318. package/lib/services/versions-service.js +4 -6
  319. package/lib/services/watch-ignore-list-service.js +0 -1
  320. package/lib/services/xcconfig-service.js +0 -2
  321. package/lib/services/xcproj-service.js +0 -1
  322. package/lib/shared-event-bus.js +0 -6
  323. package/lib/sys-info.js +1 -2
  324. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  325. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  326. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  327. package/lib/yarn-package-manager.js +0 -1
  328. package/lib/yarn2-package-manager.js +0 -3
  329. package/package.json +1 -1
@@ -71,13 +71,6 @@ function doesCurrentNpmCommandMatch(patterns) {
71
71
  }
72
72
  return result;
73
73
  }
74
- /**
75
- * Equivalent of lodash's some, but instead of lambda, just pass array of Regular Expressions.
76
- * If any of them matches any of the given elements, true is returned.
77
- * @param {string[]} array Elements to be checked.
78
- * @param {RegExp[]} patterns Regular expressions to be tested
79
- * @returns {boolean} True in case any element of the array matches any of the patterns. False otherwise.
80
- */
81
74
  function someWithRegExps(array, patterns) {
82
75
  return _.some(array, (item) => _.some(patterns, (pattern) => !!item.match(pattern)));
83
76
  }
@@ -89,7 +82,6 @@ function getCurrentNpmCommandArgv() {
89
82
  result = npmConfigArgv.original || [];
90
83
  }
91
84
  catch (error) {
92
- // ignore
93
85
  }
94
86
  }
95
87
  return result;
@@ -108,7 +100,6 @@ function isInstallingNativeScriptGloballyWithNpm() {
108
100
  return isInstallCommand && isGlobalCommand && hasNativeScriptPackage;
109
101
  }
110
102
  function isInstallingNativeScriptGloballyWithYarn() {
111
- // yarn populates the same env used by npm - npm_config_argv, so check it for yarn specific command
112
103
  const isInstallCommand = doesCurrentNpmCommandMatch([/^add$/]);
113
104
  const isGlobalCommand = doesCurrentNpmCommandMatch([/^global$/]);
114
105
  const hasNativeScriptPackage = doesCurrentNpmCommandMatch([
@@ -117,13 +108,6 @@ function isInstallingNativeScriptGloballyWithYarn() {
117
108
  ]);
118
109
  return isInstallCommand && isGlobalCommand && hasNativeScriptPackage;
119
110
  }
120
- /**
121
- * Creates regular expression from input string.
122
- * The method replaces all occurences of RegExp special symbols in the input string with \<symbol>.
123
- * @param {string} input The string from which a regular expression should be created.
124
- * @param {string} opts RegExp options, for example "gm" - global and multiline.
125
- * @returns {RegExp} The regular expression created from the input string.
126
- */
127
111
  function createRegExp(input, opts) {
128
112
  if (!input || !_.isString(input)) {
129
113
  throw new Error("Input must be a string.");
@@ -131,20 +115,13 @@ function createRegExp(input, opts) {
131
115
  const escapedSource = regExpEscape(input);
132
116
  return new RegExp(escapedSource, opts);
133
117
  }
134
- /**
135
- * Escapes all special symbols used in regex.
136
- * @param {string} input The string in which to replace the special regexp symbols.
137
- * @returns {string} A string in which all regex symbols are escaped.
138
- */
139
118
  function regExpEscape(input) {
140
- // https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
141
119
  return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
142
120
  }
143
121
  function getShortPluginName(pluginName) {
144
122
  return sanitizePluginName(pluginName).replace(/[\-]/g, "_");
145
123
  }
146
124
  function sanitizePluginName(pluginName) {
147
- // avoid long plugin names, exclude the npm module scope (@scope/nativescript-plugin) from the android plugin name
148
125
  return pluginName.split("/").pop();
149
126
  }
150
127
  async function executeActionByChunks(initialData, chunkSize, elementAction) {
@@ -191,13 +168,6 @@ function deferPromise() {
191
168
  getResult: () => result,
192
169
  };
193
170
  }
194
- /**
195
- * Executes all promises and does not stop in case any of them throws.
196
- * Returns the results of all promises in array when all are successfully resolved.
197
- * In case any of the promises is rejected, rejects the resulted promise with all accumulated errors.
198
- * @param {Promise<T>[]} promises Promises to be resolved.
199
- * @returns {Promise<T[]>} New promise which will be resolved with the results of all promises.
200
- */
201
171
  function settlePromises(promises) {
202
172
  return new Promise((resolve, reject) => {
203
173
  let settledPromisesCount = 0;
@@ -213,7 +183,6 @@ function settlePromises(promises) {
213
183
  results[index] = result;
214
184
  })
215
185
  .catch((err) => {
216
- // Accumulate all errors.
217
186
  errors.push(err);
218
187
  })
219
188
  .then(() => {
@@ -245,14 +214,12 @@ function bashQuote(s) {
245
214
  if (s[0] === "'" && s[s.length - 1] === "'") {
246
215
  return s;
247
216
  }
248
- // replace ' with '"'"' and wrap in ''
249
217
  return "'" + s.replace(/'/g, "'\"'\"'") + "'";
250
218
  }
251
219
  function cmdQuote(s) {
252
220
  if (s[0] === '"' && s[s.length - 1] === '"') {
253
221
  return s;
254
222
  }
255
- // replace " with \" and wrap in ""
256
223
  return '"' + s.replace(/"/g, '\\"') + '"';
257
224
  }
258
225
  function quoteString(s) {
@@ -309,9 +276,6 @@ function isInteractive() {
309
276
  const result = isRunningInTTY() && !isCIEnvironment();
310
277
  return result;
311
278
  }
312
- /**
313
- * Checks if current process is running in Text Terminal (TTY)
314
- */
315
279
  function isRunningInTTY() {
316
280
  return (process.stdout &&
317
281
  process.stdout.isTTY &&
@@ -319,10 +283,6 @@ function isRunningInTTY() {
319
283
  process.stdin.isTTY);
320
284
  }
321
285
  function isCIEnvironment() {
322
- // The following CI environments set their own environment variables that we respect:
323
- // travis: "CI",
324
- // circleCI: "CI",
325
- // jenkins: "JENKINS_HOME"
326
286
  return !!(process.env && (process.env.CI || process.env.JENKINS_HOME));
327
287
  }
328
288
  function toBoolean(str) {
@@ -377,11 +337,11 @@ function getMessageWithBorders(message, spanLength = 3) {
377
337
  const longestRowLength = message.split("\n").sort((a, b) => {
378
338
  return b.length - a.length;
379
339
  })[0].length;
380
- let border = "*".repeat(longestRowLength + 2 * spanLength); // * 2 for both sides
340
+ let border = "*".repeat(longestRowLength + 2 * spanLength);
381
341
  if (border.length % 2 === 0) {
382
- border += "*"; // the * should always be an odd number in order to get * in each edge (we will remove the even *s below)
342
+ border += "*";
383
343
  }
384
- border = border.replace(/\*\*/g, "* "); // ***** => * * * in order to have similar padding to the side borders
344
+ border = border.replace(/\*\*/g, "* ");
385
345
  const formatRow = function (row) {
386
346
  return (_.padEnd("*", spanLength) +
387
347
  _.padEnd(row, border.length - 2 * spanLength) +
@@ -411,20 +371,12 @@ function trimSymbol(str, symbol) {
411
371
  return str;
412
372
  }
413
373
  function parseJson(data) {
414
- // Replace BOM from the header of the file if it exists
415
374
  return JSON.parse(data.replace(/^\uFEFF/, ""));
416
375
  }
417
- // TODO: Use generic for predicatе predicate: (element: T|T[]) when TypeScript support this.
418
376
  async function getFuturesResults(promises, predicate) {
419
377
  const results = await Promise.all(promises);
420
378
  return _(results).filter(predicate).flatten().value();
421
379
  }
422
- /**
423
- * Appends zeroes to a version string until it reaches a specified length.
424
- * @param {string} version The version on which to append zeroes.
425
- * @param requiredVersionLength The required length of the version string.
426
- * @returns {string} Appended version string. In case input is null, undefined or empty string, it is returned immediately without appending anything.
427
- */
428
380
  function appendZeroesToVersion(version, requiredVersionLength) {
429
381
  if (version) {
430
382
  const zeroesToAppend = requiredVersionLength - version.split(".").length;
@@ -569,14 +521,6 @@ function getProjectFilesConfig(opts) {
569
521
  };
570
522
  return projectFilesConfig;
571
523
  }
572
- /**
573
- * Tries to find the process id (PID) of the specified application identifier.
574
- * This is specific implementation for iOS Simulator, where the running applications are real processes.
575
- * Their PIDs are printed in a specific format in the the logs, once the application is started.
576
- * @param {string} applicationIdentifier Application Identifier of the app for which we try to get the PID.
577
- * @param {string} logLine Line that may contain the PID of the process.
578
- * @returns {string} The PID of the searched application identifier in case it's found in the current line, null otherwise.
579
- */
580
524
  function getPidFromiOSSimulatorLogs(applicationIdentifier, logLine) {
581
525
  if (logLine) {
582
526
  const pidRegExp = new RegExp(`${applicationIdentifier}:\\s?(\\d+)`);
@@ -624,7 +568,6 @@ function getWinRegPropertyValue(key, propertyName) {
624
568
  function stringify(value, replacer, space) {
625
569
  return JSON.stringify(value, replacer, space || 2);
626
570
  }
627
- //2019-01-07 18:29:50.745
628
571
  function getFixedLengthDateString() {
629
572
  const currentDate = new Date();
630
573
  const year = currentDate.getFullYear();
@@ -647,28 +590,6 @@ function getFormattedMilliseconds(date) {
647
590
  }
648
591
  return milliseconds;
649
592
  }
650
- //--- begin part copied from AngularJS
651
- //The MIT License
652
- //
653
- //Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
654
- //
655
- //Permission is hereby granted, free of charge, to any person obtaining a copy
656
- //of this software and associated documentation files (the "Software"), to deal
657
- //in the Software without restriction, including without limitation the rights
658
- //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
659
- //copies of the Software, and to permit persons to whom the Software is
660
- //furnished to do so, subject to the following conditions:
661
- //
662
- // The above copyright notice and this permission notice shall be included in
663
- //all copies or substantial portions of the Software.
664
- //
665
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
666
- //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
667
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
668
- //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
669
- //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
670
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
671
- //THE SOFTWARE.
672
593
  const CLASS_NAME = /class\s+([A-Z].+?)(?:\s+.*?)?\{/;
673
594
  const CONSTRUCTOR_ARGS = /constructor\s*([^\(]*)\(\s*([^\)]*)\)/m;
674
595
  const FN_NAME_AND_ARGS = /^(?:function)?\s*([^\(]*)\(\s*([^\)]*)\)\s*(=>)?\s*[{_]/m;
@@ -698,11 +619,6 @@ function annotate(fn) {
698
619
  }
699
620
  return $inject;
700
621
  }
701
- /**
702
- * Returns true if all Android signing options are provided, false otherwise.
703
- * @param {IAndroidSigningData} signingData The signing data to be validated.
704
- * @return {void}
705
- */
706
622
  function hasValidAndroidSigning(signingData) {
707
623
  const isValid = signingData &&
708
624
  signingData.keyStorePath &&
@@ -711,5 +627,3 @@ function hasValidAndroidSigning(signingData) {
711
627
  signingData.keyStoreAliasPassword;
712
628
  return !!isValid;
713
629
  }
714
- //--- end part copied from AngularJS
715
- //# sourceMappingURL=helpers.js.map
@@ -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 `ns 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