nativescript 9.0.0-alpha.6 → 9.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 -22
  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 +16 -16
@@ -36,9 +36,6 @@ class ApplicationManagerBase extends events_1.EventEmitter {
36
36
  if (!this.checkForApplicationUpdatesPromise) {
37
37
  this.checkForApplicationUpdatesPromise = new Promise(async (resolve, reject) => {
38
38
  let isFulfilled = false;
39
- // As this method is called on 500ms, but it's execution may last much longer
40
- // use locking, so the next executions will not get into the body, while the first one is still working.
41
- // In case we do not break the next executions, we'll report each app as newly installed several times.
42
39
  try {
43
40
  const currentlyInstalledAppIdentifiers = await this.getInstalledApplications();
44
41
  const previouslyInstalledAppIdentifiers = this.lastInstalledAppIdentifiers || [];
@@ -83,7 +80,6 @@ class ApplicationManagerBase extends events_1.EventEmitter {
83
80
  _.each(notAvailableAppsForDebugging, (appInfo) => {
84
81
  this.emit("debuggableAppLost", appInfo);
85
82
  if (_.has(this.lastAvailableDebuggableAppViews, appInfo.appIdentifier)) {
86
- // Prevent emitting debuggableViewLost when application cannot be debugged anymore.
87
83
  delete this.lastAvailableDebuggableAppViews[appInfo.appIdentifier];
88
84
  }
89
85
  });
@@ -102,7 +98,6 @@ class ApplicationManagerBase extends events_1.EventEmitter {
102
98
  _.each(newAvailableViews, (debugWebViewInfo) => {
103
99
  this.emit("debuggableViewFound", appIdentifier, debugWebViewInfo);
104
100
  });
105
- // Determine which of the views had changed since last check and raise debuggableViewChanged event for them:
106
101
  const keptViews = _.differenceBy(currentlyAvailableViews, newAvailableViews, "id");
107
102
  _.each(keptViews, (view) => {
108
103
  const previousTimeViewInfo = _.find(previouslyAvailableViews, (previousView) => previousView.id === view.id);
@@ -116,4 +111,3 @@ class ApplicationManagerBase extends events_1.EventEmitter {
116
111
  }
117
112
  }
118
113
  exports.ApplicationManagerBase = ApplicationManagerBase;
119
- //# sourceMappingURL=application-manager-base.js.map
@@ -15,10 +15,7 @@ class DeviceEmitter extends events_1.EventEmitter {
15
15
  this.$devicesService.on(constants_1.DeviceDiscoveryEventNames.DEVICE_FOUND, (device) => {
16
16
  this.emit(constants_1.DeviceDiscoveryEventNames.DEVICE_FOUND, device.deviceInfo);
17
17
  this.attachApplicationChangedHandlers(device);
18
- // await: Do not await as this will require to mark the lambda with async keyword, but there's no way to await the lambda itself.
19
- /* tslint:disable:no-floating-promises */
20
18
  device.openDeviceLogStream();
21
- /* tslint:enable:no-floating-promises */
22
19
  });
23
20
  this.$devicesService.on(constants_1.DeviceDiscoveryEventNames.DEVICE_LOST, (device) => {
24
21
  this.emit(constants_1.DeviceDiscoveryEventNames.DEVICE_LOST, device.deviceInfo);
@@ -62,4 +59,3 @@ class DeviceEmitter extends events_1.EventEmitter {
62
59
  }
63
60
  exports.DeviceEmitter = DeviceEmitter;
64
61
  yok_1.injector.register("deviceEmitter", DeviceEmitter);
65
- //# sourceMappingURL=device-emitter.js.map
@@ -38,4 +38,3 @@ class DeviceLogEmitter extends device_log_provider_base_1.DeviceLogProviderBase
38
38
  }
39
39
  exports.DeviceLogEmitter = DeviceLogEmitter;
40
40
  yok_1.injector.register("deviceLogProvider", DeviceLogEmitter);
41
- //# sourceMappingURL=device-log-emitter.js.map
@@ -63,4 +63,3 @@ class DeviceLogProviderBase extends events_1.EventEmitter {
63
63
  }
64
64
  }
65
65
  exports.DeviceLogProviderBase = DeviceLogProviderBase;
66
- //# sourceMappingURL=device-log-provider-base.js.map
@@ -35,7 +35,6 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
35
35
  this.colorPoolIndex = 0;
36
36
  }
37
37
  logData(lineText, platform, deviceIdentifier) {
38
- // console.log(lineText)
39
38
  const loggingOptions = this.getDeviceLogOptionsForDevice(deviceIdentifier);
40
39
  let data = this.$logFilter.filterData(platform, lineText, loggingOptions);
41
40
  data = this.$logSourceMapService.replaceWithOriginalFileLocations(platform, data, loggingOptions);
@@ -53,7 +52,6 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
53
52
  return this.deviceColorMap.get(deviceIdentifier);
54
53
  }
55
54
  const color = this.colorPool[this.colorPoolIndex];
56
- // wrap around if we have no more colors in the pool
57
55
  this.colorPoolIndex =
58
56
  this.colorPoolIndex === this.colorPool.length - 1
59
57
  ? 0
@@ -63,13 +61,10 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
63
61
  }
64
62
  logDataCore(data, deviceIdentifier) {
65
63
  var _a, _b, _c;
66
- // todo: use config to set logger - --env.classicLogs is temporary!
67
64
  if ("classicLogs" in ((_a = this.$options.env) !== null && _a !== void 0 ? _a : {})) {
68
- // legacy logging
69
65
  this.$logger.info(data, { [constants_2.LoggerConfigData.skipNewLine]: true });
70
66
  return;
71
67
  }
72
- // todo: extract into an injectable printer/logger service
73
68
  let shouldPrepend = false;
74
69
  let splitIndexes = [];
75
70
  const lines = data
@@ -124,25 +119,7 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
124
119
  printLine(prefix, ...parts) {
125
120
  const fullLine = parts.join(" ");
126
121
  console.log(prefix, fullLine);
127
- /**
128
- * Note: Disabled
129
- *
130
- * This splits the output into lines that fit within the current
131
- * terminal width, however this makes copying json objects that
132
- * span across multiple lines difficult, as it introduces
133
- * whitespace & line breaks
134
- */
135
- // const maxWidth = process.stdout.columns - 2;
136
- // if (!maxWidth || maxWidth < 10 || fullLine.length < maxWidth) {
137
- // console.log(prefix, fullLine);
138
- // } else {
139
- // for (let i = 0; i < fullLine.length; i += maxWidth) {
140
- // const part = fullLine.substring(i, i + maxWidth);
141
- // console.log(prefix, part);
142
- // }
143
- // }
144
122
  }
145
123
  }
146
124
  exports.DeviceLogProvider = DeviceLogProvider;
147
125
  yok_1.injector.register("deviceLogProvider", DeviceLogProvider);
148
- //# sourceMappingURL=device-log-provider.js.map
@@ -20,4 +20,3 @@ class DevicePlatformsConstants {
20
20
  }
21
21
  exports.DevicePlatformsConstants = DevicePlatformsConstants;
22
22
  yok_1.injector.register("devicePlatformsConstants", DevicePlatformsConstants);
23
- //# sourceMappingURL=device-platforms-constants.js.map
@@ -6,7 +6,6 @@ const _ = require("lodash");
6
6
  const yok_1 = require("../yok");
7
7
  class EmulatorHelper {
8
8
  constructor() {
9
- // https://developer.android.com/guide/topics/manifest/uses-sdk-element
10
9
  this.mapAndroidApiLevelToVersion = {
11
10
  "android-36": "16.0.0",
12
11
  "android-35": "15.0.0",
@@ -81,9 +80,7 @@ class EmulatorHelper {
81
80
  emulator.identifier = emulatorId;
82
81
  emulator.status = constants_1.RUNNING_EMULATOR_STATUS;
83
82
  emulator.type = constants_1.DeviceTypes.Device;
84
- //emulator.isTablet; // TODO: consider to do this here!!!
85
83
  }
86
84
  }
87
85
  exports.EmulatorHelper = EmulatorHelper;
88
86
  yok_1.injector.register("emulatorHelper", EmulatorHelper);
89
- //# sourceMappingURL=emulator-helper.js.map
@@ -115,11 +115,9 @@ class IOSApplicationManager extends application_manager_base_1.ApplicationManage
115
115
  await this.device.openDeviceLogStream();
116
116
  }
117
117
  getDebuggableApps() {
118
- // Implement when we can find debuggable applications for iOS.
119
118
  return Promise.resolve([]);
120
119
  }
121
120
  getDebuggableAppViews(appIdentifiers) {
122
- // Implement when we can find debuggable applications for iOS.
123
121
  return Promise.resolve(null);
124
122
  }
125
123
  }
@@ -130,4 +128,3 @@ __decorate([
130
128
  __decorate([
131
129
  (0, decorators_1.cache)()
132
130
  ], IOSApplicationManager.prototype, "startDeviceLog", null);
133
- //# sourceMappingURL=ios-application-manager.js.map
@@ -104,4 +104,3 @@ class IOSDeviceFileSystem {
104
104
  }
105
105
  exports.IOSDeviceFileSystem = IOSDeviceFileSystem;
106
106
  IOSDeviceFileSystem.AFC_DELETE_FILE_NOT_FOUND_ERROR = 8;
107
- //# sourceMappingURL=ios-device-file-system.js.map
@@ -44,7 +44,6 @@ class IOSDeviceOperations extends events_1.EventEmitter {
44
44
  if (options && options.shouldReturnImmediateResult) {
45
45
  return;
46
46
  }
47
- // We need this because we need to make sure that we have devices.
48
47
  await new Promise((resolve, reject) => {
49
48
  let iterationsCount = 0;
50
49
  const maxIterationsCount = 3;
@@ -126,8 +125,6 @@ class IOSDeviceOperations extends events_1.EventEmitter {
126
125
  return this.getMultipleResults(() => this.deviceLib.stop(stopArray), errorHandler);
127
126
  }
128
127
  dispose(signal) {
129
- // We need to check if we should dispose the device lib.
130
- // For example we do not want to dispose it when we start printing the device logs.
131
128
  if (this.shouldDispose && this.deviceLib) {
132
129
  this.deviceLib.removeAllListeners();
133
130
  this.deviceLib.dispose(signal);
@@ -198,4 +195,3 @@ __decorate([
198
195
  (0, decorators_1.cache)()
199
196
  ], IOSDeviceOperations.prototype, "attacheDeviceLogDataHandler", null);
200
197
  yok_1.injector.register("iosDeviceOperations", IOSDeviceOperations);
201
- //# sourceMappingURL=ios-device-operations.js.map
@@ -106,7 +106,6 @@ class IOSDevice extends ios_device_base_1.IOSDeviceBase {
106
106
  const majorVersionAsString = productType.match(/.*?(\d+)\,(\d+)/)[1];
107
107
  const majorVersion = parseInt(majorVersionAsString);
108
108
  let isArm64Architecture = false;
109
- //https://en.wikipedia.org/wiki/List_of_iOS_devices
110
109
  if (_.startsWith(productType, "iphone")) {
111
110
  isArm64Architecture = majorVersion >= 6;
112
111
  }
@@ -117,7 +116,6 @@ class IOSDevice extends ios_device_base_1.IOSDeviceBase {
117
116
  isArm64Architecture = majorVersion >= 7;
118
117
  }
119
118
  else if (_.startsWith(productType, "realitydevice")) {
120
- // visionos
121
119
  isArm64Architecture = true;
122
120
  }
123
121
  activeArchitecture = isArm64Architecture ? "arm64" : "armv7";
@@ -127,7 +125,6 @@ class IOSDevice extends ios_device_base_1.IOSDeviceBase {
127
125
  getPlatform(productType) {
128
126
  productType = productType.toLowerCase().trim();
129
127
  if (_.startsWith(productType, "realitydevice")) {
130
- // visionos
131
128
  return this.$devicePlatformsConstants.visionOS;
132
129
  }
133
130
  return this.$devicePlatformsConstants.iOS;
@@ -138,4 +135,3 @@ __decorate([
138
135
  (0, decorators_1.cache)()
139
136
  ], IOSDevice.prototype, "openDeviceLogStream", null);
140
137
  yok_1.injector.register("iOSDevice", IOSDevice);
141
- //# sourceMappingURL=ios-device.js.map
@@ -83,4 +83,3 @@ exports.IOSDeviceBase = IOSDeviceBase;
83
83
  __decorate([
84
84
  (0, decorators_1.performanceLog)()
85
85
  ], IOSDeviceBase.prototype, "getDebugSocket", null);
86
- //# sourceMappingURL=ios-device-base.js.map
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const yok_1 = require("../../yok");
4
4
  class IosDeviceProductNameMapper {
5
5
  constructor() {
6
- // http://support.hockeyapp.net/kb/client-integration-ios-mac-os-x/ios-device-types
7
6
  this.map = {
8
7
  "iPhone1,1": "iPhone",
9
8
  "iPhone1,2": "iPhone 3G",
@@ -64,4 +63,3 @@ class IosDeviceProductNameMapper {
64
63
  }
65
64
  }
66
65
  yok_1.injector.register("iOSDeviceProductNameMapper", IosDeviceProductNameMapper);
67
- //# sourceMappingURL=ios-device-product-name-mapper.js.map
@@ -22,4 +22,3 @@ class IOSLogFilter {
22
22
  }
23
23
  exports.IOSLogFilter = IOSLogFilter;
24
24
  yok_1.injector.register("iOSLogFilter", IOSLogFilter);
25
- //# sourceMappingURL=ios-log-filter.js.map
@@ -18,7 +18,6 @@ class IosEmulatorServices {
18
18
  try {
19
19
  if (options.platform === this.$devicePlatformsConstants.visionOS &&
20
20
  !options.emulatorIdOrName) {
21
- // find first available visionOS simulator (for now).
22
21
  const { devices } = await this.tryGetiOSSimDevices();
23
22
  options.emulatorIdOrName = (_a = devices.find((device) => device.platform === this.$devicePlatformsConstants.visionOS)) === null || _a === void 0 ? void 0 : _a.id;
24
23
  }
@@ -52,8 +51,6 @@ class IosEmulatorServices {
52
51
  }
53
52
  async connectToPort(data) {
54
53
  try {
55
- // node v17+ resolves localhost to ::1 (ipv6) instead of 127.0.0.1 (ipv4)
56
- // so we explicitly pass ipv4
57
54
  const socket = net.connect(data.port, "127.0.0.1");
58
55
  return socket;
59
56
  }
@@ -111,4 +108,3 @@ class IosEmulatorServices {
111
108
  }
112
109
  }
113
110
  yok_1.injector.register("iOSEmulatorServices", IosEmulatorServices);
114
- //# sourceMappingURL=ios-emulator-services.js.map
@@ -21,4 +21,3 @@ exports.IOSSimResolver = IOSSimResolver;
21
21
  IOSSimResolver.iOSSimName = "ios-sim-portable";
22
22
  IOSSimResolver.iOSStandaloneExecutableName = "ios-sim-standalone.js";
23
23
  yok_1.injector.register("iOSSimResolver", IOSSimResolver);
24
- //# sourceMappingURL=ios-sim-resolver.js.map
@@ -73,13 +73,8 @@ class IOSSimulatorApplicationManager extends application_manager_base_1.Applicat
73
73
  return [];
74
74
  }
75
75
  async getDebuggableAppViews(appIdentifiers) {
76
- // Implement when we can find debuggable applications for iOS.
77
76
  return Promise.resolve(null);
78
77
  }
79
- // iOS will kill the app if we freeze it in the NativeScript Runtime and wait for debug-brk.
80
- // In order to avoid that, we are attaching lldb and passing it "process continue".
81
- // In this way, iOS will not kill the app because it has a native debugger attached
82
- // and the users will be able to attach a debug session using the debug-brk flag.
83
78
  attachNativeDebugger(appId, pid) {
84
79
  this._lldbProcesses[appId] = this.$childProcess.spawn("lldb", ["-p", pid]);
85
80
  if (log4js.levels.TRACE.isGreaterThanOrEqualTo(this.$logger.getLevel())) {
@@ -121,4 +116,3 @@ __decorate([
121
116
  __decorate([
122
117
  (0, decorators_1.cache)()
123
118
  ], IOSSimulatorApplicationManager.prototype, "startDeviceLog", null);
124
- //# sourceMappingURL=ios-simulator-application-manager.js.map
@@ -65,15 +65,11 @@ class IOSSimulator extends ios_device_base_1.IOSDeviceBase {
65
65
  let socket;
66
66
  const attachRequestMessage = this.$iOSNotification.getAttachRequest(appId, this.deviceInfo.identifier);
67
67
  await this.$iOSEmulatorServices.postDarwinNotification(attachRequestMessage, this.deviceInfo.identifier);
68
- // Retry posting the notification every five seconds, in case the AttachRequest
69
- // event handler wasn't registered when the first one was sent
70
68
  const postNotificationRetryInterval = setInterval(() => {
71
69
  this.$iOSEmulatorServices
72
70
  .postDarwinNotification(attachRequestMessage, this.deviceInfo.identifier)
73
71
  .catch((e) => this.$logger.error(e));
74
72
  }, 5e3);
75
- // the internal retry-mechanism of getDebuggerPort will ensure the above
76
- // interval has a chance to execute multiple times
77
73
  const port = await super.getDebuggerPort(appId).finally(() => {
78
74
  clearInterval(postNotificationRetryInterval);
79
75
  });
@@ -92,4 +88,3 @@ exports.IOSSimulator = IOSSimulator;
92
88
  __decorate([
93
89
  (0, decorators_1.cache)()
94
90
  ], IOSSimulator.prototype, "openDeviceLogStream", null);
95
- //# sourceMappingURL=ios-simulator-device.js.map
@@ -54,4 +54,3 @@ class IOSSimulatorFileSystem {
54
54
  }
55
55
  }
56
56
  exports.IOSSimulatorFileSystem = IOSSimulatorFileSystem;
57
- //# sourceMappingURL=ios-simulator-file-system.js.map
@@ -56,4 +56,3 @@ class IOSSimulatorLogProvider extends events_1.EventEmitter {
56
56
  }
57
57
  exports.IOSSimulatorLogProvider = IOSSimulatorLogProvider;
58
58
  yok_1.injector.register("iOSSimulatorLogProvider", IOSSimulatorLogProvider);
59
- //# sourceMappingURL=ios-simulator-log-provider.js.map
@@ -35,4 +35,3 @@ class LocalToDevicePathDataFactory {
35
35
  }
36
36
  exports.LocalToDevicePathDataFactory = LocalToDevicePathDataFactory;
37
37
  yok_1.injector.register("localToDevicePathDataFactory", LocalToDevicePathDataFactory);
38
- //# sourceMappingURL=local-to-device-path-data-factory.js.map
@@ -24,7 +24,6 @@ class LogFilter {
24
24
  if (deviceLogFilter) {
25
25
  return deviceLogFilter.filterData(data, loggingOptions);
26
26
  }
27
- // In case the platform is not valid, just return the data without filtering.
28
27
  return data;
29
28
  }
30
29
  getDeviceLogFilterInstance(platform) {
@@ -50,4 +49,3 @@ class LogFilter {
50
49
  }
51
50
  exports.LogFilter = LogFilter;
52
51
  yok_1.injector.register("logFilter", LogFilter);
53
- //# sourceMappingURL=log-filter.js.map
@@ -10,4 +10,3 @@ class LoggingLevels {
10
10
  }
11
11
  exports.LoggingLevels = LoggingLevels;
12
12
  yok_1.injector.register("loggingLevels", LoggingLevels);
13
- //# sourceMappingURL=logging-levels.js.map
@@ -38,7 +38,6 @@ class AndroidDeviceDiscovery extends device_discovery_1.DeviceDiscovery {
38
38
  }
39
39
  async checkCurrentData(result) {
40
40
  const currentDevices = result.map((element) => {
41
- // http://developer.android.com/tools/help/adb.html#devicestatus
42
41
  const data = element.split("\t");
43
42
  const identifier = data[0];
44
43
  const status = data[1];
@@ -71,4 +70,3 @@ class AndroidDeviceDiscovery extends device_discovery_1.DeviceDiscovery {
71
70
  }
72
71
  exports.AndroidDeviceDiscovery = AndroidDeviceDiscovery;
73
72
  yok_1.injector.register("androidDeviceDiscovery", AndroidDeviceDiscovery);
74
- //# sourceMappingURL=android-device-discovery.js.map
@@ -21,11 +21,9 @@ class AndroidEmulatorDiscovery extends events_1.EventEmitter {
21
21
  const availableEmulatorsOutput = await this.$androidEmulatorServices.getEmulatorImages();
22
22
  const currentEmulators = availableEmulatorsOutput.devices;
23
23
  const cachedEmulators = _.values(this._emulators);
24
- // Remove old emulators
25
24
  const lostEmulators = _(cachedEmulators)
26
25
  .reject((e) => _.some(currentEmulators, (emulator) => emulator && e && emulator.imageIdentifier === e.imageIdentifier))
27
26
  .value();
28
- // Add new emulators
29
27
  const foundEmulators = _(currentEmulators)
30
28
  .reject((e) => _.some(cachedEmulators, (emulator) => emulator && e && emulator.imageIdentifier === e.imageIdentifier))
31
29
  .value();
@@ -54,4 +52,3 @@ class AndroidEmulatorDiscovery extends events_1.EventEmitter {
54
52
  }
55
53
  exports.AndroidEmulatorDiscovery = AndroidEmulatorDiscovery;
56
54
  yok_1.injector.register("androidEmulatorDiscovery", AndroidEmulatorDiscovery);
57
- //# sourceMappingURL=android-emulator-discovery.js.map
@@ -71,19 +71,6 @@ class AndroidProcessService {
71
71
  async getDebuggableApps(deviceIdentifier) {
72
72
  const adb = this.getAdb(deviceIdentifier);
73
73
  const androidWebViewPortInformation = (await this.getAbstractPortsInformation(adb)).split(os_1.EOL);
74
- // TODO: Add tests and make sure only unique names are returned. Input before groupBy is:
75
- // [ { deviceIdentifier: 'SH26BW100473',
76
- // appIdentifier: 'com.telerik.EmptyNS',
77
- // framework: 'NativeScript' },
78
- // { deviceIdentifier: 'SH26BW100473',
79
- // appIdentifier: 'com.telerik.EmptyNS',
80
- // framework: 'Cordova' },
81
- // { deviceIdentifier: 'SH26BW100473',
82
- // appIdentifier: 'chrome',
83
- // framework: 'Cordova' },
84
- // { deviceIdentifier: 'SH26BW100473',
85
- // appIdentifier: 'chrome',
86
- // framework: 'Cordova' } ]
87
74
  const portInformation = await Promise.all(_.map(androidWebViewPortInformation, async (line) => (await this.getApplicationInfoFromWebViewPortInformation(adb, deviceIdentifier, line)) ||
88
75
  (await this.getNativeScriptApplicationInformation(adb, deviceIdentifier, line))));
89
76
  return _(portInformation)
@@ -122,7 +109,6 @@ class AndroidProcessService {
122
109
  return adb;
123
110
  }
124
111
  async getApplicationInfoFromWebViewPortInformation(adb, deviceIdentifier, information) {
125
- // Need to search by processId to check for old Android webviews (@webview_devtools_remote_<processId>).
126
112
  const processIdRegExp = /@webview_devtools_remote_(.+)/g;
127
113
  const processIdMatches = processIdRegExp.exec(information);
128
114
  let cordovaAppIdentifier;
@@ -131,7 +117,6 @@ class AndroidProcessService {
131
117
  cordovaAppIdentifier = await this.getApplicationIdentifierFromPid(adb, processId);
132
118
  }
133
119
  else {
134
- // Search for appIdentifier (@<appIdentifier>_devtools_remote).
135
120
  const chromeAppIdentifierRegExp = /@(.+)_devtools_remote\s?/g;
136
121
  const chromeAppIdentifierMatches = chromeAppIdentifierRegExp.exec(information);
137
122
  if (chromeAppIdentifierMatches && chromeAppIdentifierMatches.length > 0) {
@@ -148,7 +133,6 @@ class AndroidProcessService {
148
133
  return null;
149
134
  }
150
135
  async getNativeScriptApplicationInformation(adb, deviceIdentifier, information) {
151
- // Search for appIdentifier (@<appIdentifier-debug>).
152
136
  const nativeScriptAppIdentifierRegExp = /@(.+)-(debug|inspectorServer)/g;
153
137
  const nativeScriptAppIdentifierMatches = nativeScriptAppIdentifierRegExp.exec(information);
154
138
  if (nativeScriptAppIdentifierMatches &&
@@ -163,10 +147,6 @@ class AndroidProcessService {
163
147
  return null;
164
148
  }
165
149
  async getAbstractPortForApplication(adb, processId, appIdentifier, abstractPortsInformation, framework) {
166
- // The result will look like this (without the columns names):
167
- // Num RefCount Protocol Flags Type St Inode Path
168
- // 0000000000000000: 00000002 00000000 00010000 0001 01 189004 @webview_devtools_remote_25512
169
- // The Path column is the abstract port.
170
150
  framework = framework || "";
171
151
  switch (framework.toLowerCase()) {
172
152
  case constants_1.TARGET_FRAMEWORK_IDENTIFIERS.Cordova.toLowerCase():
@@ -193,9 +173,6 @@ class AndroidProcessService {
193
173
  return match && match[1];
194
174
  }
195
175
  async getProcessIds(adb, appIdentifiers) {
196
- // Process information will look like this (without the columns names):
197
- // USER PID PPID VSIZE RSS WCHAN PC NAME
198
- // u0_a63 25512 1334 1519560 96040 ffffffff f76a8f75 S com.telerik.appbuildertabstest
199
176
  const result = {};
200
177
  const processIdInformation = await adb.executeShellCommand(["ps"]);
201
178
  _.each(appIdentifiers, (appIdentifier) => {
@@ -206,11 +183,6 @@ class AndroidProcessService {
206
183
  }
207
184
  async getAlreadyMappedPort(adb, deviceIdentifier, abstractPort, adbForwardList) {
208
185
  const allForwardedPorts = adbForwardList || (await adb.executeCommand(["forward", "--list"])) || "";
209
- // Sample output:
210
- // 5e2e580b tcp:62503 localabstract:webview_devtools_remote_7985
211
- // 5e2e580b tcp:62524 localabstract:webview_devtools_remote_7986
212
- // 5e2e580b tcp:63160 localabstract:webview_devtools_remote_7987
213
- // 5e2e580b tcp:57577 localabstract:com.telerik.nrel-debug
214
186
  const regex = new RegExp(`${deviceIdentifier}\\s+?tcp:(\\d+?)\\s+?.*?${abstractPort}$`);
215
187
  return this.getFirstMatchingGroupFromMultilineResult(allForwardedPorts, regex);
216
188
  }
@@ -224,9 +196,6 @@ class AndroidProcessService {
224
196
  }
225
197
  async getApplicationIdentifierFromPid(adb, pid, psData) {
226
198
  psData = psData || (await adb.executeShellCommand(["ps"]));
227
- // Process information will look like this (without the columns names):
228
- // USER PID PPID VSIZE RSS WCHAN PC NAME
229
- // u0_a63 25512 1334 1519560 96040 ffffffff f76a8f75 S com.telerik.appbuildertabstest
230
199
  return this.getFirstMatchingGroupFromMultilineResult(psData, new RegExp(`\\s+${pid}(?:\\s+\\d+){3}\\s+.*\\s+(.*?)$`));
231
200
  }
232
201
  getFirstMatchingGroupFromMultilineResult(input, regex) {
@@ -249,4 +218,3 @@ __decorate([
249
218
  (0, decorators_1.exported)("androidProcessService")
250
219
  ], AndroidProcessService.prototype, "getAppProcessId", null);
251
220
  yok_1.injector.register("androidProcessService", AndroidProcessService);
252
- //# sourceMappingURL=android-process-service.js.map
@@ -51,4 +51,3 @@ class DeviceDiscovery extends events_1.EventEmitter {
51
51
  }
52
52
  exports.DeviceDiscovery = DeviceDiscovery;
53
53
  yok_1.injector.register("deviceDiscovery", DeviceDiscovery);
54
- //# sourceMappingURL=device-discovery.js.map