nativescript 9.0.4-dev.1 → 9.0.4-dev.2

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 +12 -0
  2. package/lib/base-package-manager.js +7 -0
  3. package/lib/bootstrap.js +5 -1
  4. package/lib/bun-package-manager.js +14 -1
  5. package/lib/color.js +4 -0
  6. package/lib/commands/add-platform.js +1 -0
  7. package/lib/commands/apple-login.js +1 -0
  8. package/lib/commands/appstore-list.js +1 -0
  9. package/lib/commands/appstore-upload.js +3 -0
  10. package/lib/commands/build.js +3 -2
  11. package/lib/commands/clean.js +22 -1
  12. package/lib/commands/command-base.js +1 -0
  13. package/lib/commands/config.js +5 -0
  14. package/lib/commands/create-project.js +6 -0
  15. package/lib/commands/debug.js +6 -1
  16. package/lib/commands/deploy.js +3 -2
  17. package/lib/commands/embedding/embed.js +7 -0
  18. package/lib/commands/extensibility/install-extension.js +1 -0
  19. package/lib/commands/extensibility/list-extensions.js +1 -0
  20. package/lib/commands/extensibility/uninstall-extension.js +1 -0
  21. package/lib/commands/fonts.js +1 -0
  22. package/lib/commands/generate-assets.js +1 -0
  23. package/lib/commands/generate-help.js +1 -0
  24. package/lib/commands/generate.js +48 -1
  25. package/lib/commands/hooks/common.js +2 -1
  26. package/lib/commands/hooks/hooks-lock.js +1 -0
  27. package/lib/commands/hooks/hooks.js +1 -0
  28. package/lib/commands/info.js +1 -0
  29. package/lib/commands/install.js +1 -0
  30. package/lib/commands/list-platforms.js +1 -0
  31. package/lib/commands/migrate.js +1 -0
  32. package/lib/commands/native-add.js +5 -0
  33. package/lib/commands/platform-clean.js +1 -0
  34. package/lib/commands/plugin/add-plugin.js +1 -0
  35. package/lib/commands/plugin/build-plugin.js +1 -0
  36. package/lib/commands/plugin/create-plugin.js +5 -0
  37. package/lib/commands/plugin/list-plugins.js +1 -0
  38. package/lib/commands/plugin/remove-plugin.js +2 -0
  39. package/lib/commands/plugin/update-plugin.js +1 -0
  40. package/lib/commands/post-install.js +6 -0
  41. package/lib/commands/prepare.js +4 -3
  42. package/lib/commands/preview.js +2 -0
  43. package/lib/commands/remove-platform.js +1 -0
  44. package/lib/commands/resources/resources-update.js +2 -0
  45. package/lib/commands/run.js +1 -0
  46. package/lib/commands/setup.js +1 -0
  47. package/lib/commands/start.js +1 -0
  48. package/lib/commands/test-init.js +4 -0
  49. package/lib/commands/test.js +9 -2
  50. package/lib/commands/typings.js +2 -1
  51. package/lib/commands/update-platform.js +5 -0
  52. package/lib/commands/update.js +2 -0
  53. package/lib/commands/widget.js +20 -1
  54. package/lib/common/bootstrap.js +1 -0
  55. package/lib/common/child-process.js +3 -0
  56. package/lib/common/codeGeneration/code-entity.js +1 -0
  57. package/lib/common/codeGeneration/code-printer.js +1 -0
  58. package/lib/common/command-params.js +1 -0
  59. package/lib/common/commands/analytics.js +3 -0
  60. package/lib/common/commands/autocompletion.js +3 -0
  61. package/lib/common/commands/device/device-log-stream.js +1 -0
  62. package/lib/common/commands/device/get-file.js +2 -0
  63. package/lib/common/commands/device/list-applications.js +1 -0
  64. package/lib/common/commands/device/list-devices.js +3 -0
  65. package/lib/common/commands/device/list-files.js +2 -0
  66. package/lib/common/commands/device/put-file.js +2 -0
  67. package/lib/common/commands/device/run-application.js +1 -0
  68. package/lib/common/commands/device/stop-application.js +1 -0
  69. package/lib/common/commands/device/uninstall-application.js +1 -0
  70. package/lib/common/commands/doctor.js +3 -2
  71. package/lib/common/commands/generate-messages.js +1 -0
  72. package/lib/common/commands/help.js +1 -0
  73. package/lib/common/commands/package-manager-get.js +1 -0
  74. package/lib/common/commands/package-manager-set.js +1 -0
  75. package/lib/common/commands/post-install.js +1 -0
  76. package/lib/common/commands/preuninstall.js +11 -2
  77. package/lib/common/commands/proxy/proxy-base.js +4 -0
  78. package/lib/common/commands/proxy/proxy-clear.js +1 -0
  79. package/lib/common/commands/proxy/proxy-get.js +1 -0
  80. package/lib/common/commands/proxy/proxy-set.js +1 -0
  81. package/lib/common/common-lib.js +1 -0
  82. package/lib/common/constants.js +11 -0
  83. package/lib/common/decorators.js +48 -0
  84. package/lib/common/dispatchers.js +10 -1
  85. package/lib/common/errors.js +13 -3
  86. package/lib/common/file-system.js +13 -2
  87. package/lib/common/header.js +3 -0
  88. package/lib/common/helpers.js +89 -3
  89. package/lib/common/host-info.js +4 -0
  90. package/lib/common/http-client.js +20 -0
  91. package/lib/common/logger/appenders/cli-appender.js +4 -0
  92. package/lib/common/logger/appenders/emit-appender.js +4 -0
  93. package/lib/common/logger/layouts/cli-layout.js +1 -0
  94. package/lib/common/logger/logger.js +5 -0
  95. package/lib/common/messages/messages.js +6 -0
  96. package/lib/common/mobile/android/android-application-manager.js +20 -1
  97. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
  98. package/lib/common/mobile/android/android-debug-bridge.js +6 -0
  99. package/lib/common/mobile/android/android-device-file-system.js +4 -0
  100. package/lib/common/mobile/android/android-device-hash-service.js +3 -0
  101. package/lib/common/mobile/android/android-device.js +8 -0
  102. package/lib/common/mobile/android/android-emulator-services.js +2 -1
  103. package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
  104. package/lib/common/mobile/android/android-log-filter.js +4 -0
  105. package/lib/common/mobile/android/android-virtual-device-service.js +26 -0
  106. package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
  107. package/lib/common/mobile/android/genymotion/genymotion-service.js +6 -1
  108. package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
  109. package/lib/common/mobile/android/logcat-helper.js +13 -0
  110. package/lib/common/mobile/application-manager-base.js +6 -0
  111. package/lib/common/mobile/device-emitter.js +4 -0
  112. package/lib/common/mobile/device-log-emitter.js +1 -0
  113. package/lib/common/mobile/device-log-provider-base.js +1 -0
  114. package/lib/common/mobile/device-log-provider.js +23 -0
  115. package/lib/common/mobile/device-platforms-constants.js +1 -0
  116. package/lib/common/mobile/emulator-helper.js +3 -0
  117. package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
  118. package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
  119. package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
  120. package/lib/common/mobile/ios/device/ios-device.js +4 -0
  121. package/lib/common/mobile/ios/ios-device-base.js +1 -0
  122. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
  123. package/lib/common/mobile/ios/ios-log-filter.js +1 -0
  124. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
  125. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
  126. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
  127. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
  128. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
  129. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
  130. package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
  131. package/lib/common/mobile/log-filter.js +2 -0
  132. package/lib/common/mobile/logging-levels.js +1 -0
  133. package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
  134. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
  135. package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
  136. package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
  137. package/lib/common/mobile/mobile-core/devices-service.js +69 -0
  138. package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
  139. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
  140. package/lib/common/mobile/mobile-helper.js +1 -0
  141. package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
  142. package/lib/common/opener.js +1 -0
  143. package/lib/common/os-info.js +1 -0
  144. package/lib/common/plist-parser.js +1 -0
  145. package/lib/common/project-helper.js +1 -0
  146. package/lib/common/prompter.js +9 -1
  147. package/lib/common/queue.js +1 -0
  148. package/lib/common/resource-loader.js +1 -0
  149. package/lib/common/services/auto-completion-service.js +13 -1
  150. package/lib/common/services/cancellation.js +2 -1
  151. package/lib/common/services/commands-service.js +17 -6
  152. package/lib/common/services/help-service.js +11 -3
  153. package/lib/common/services/hooks-service.js +13 -0
  154. package/lib/common/services/ios-notification-service.js +1 -0
  155. package/lib/common/services/json-file-settings-service.js +6 -0
  156. package/lib/common/services/lock-service.js +6 -0
  157. package/lib/common/services/message-contract-generator.js +1 -0
  158. package/lib/common/services/messages-service.js +1 -0
  159. package/lib/common/services/micro-templating-service.js +6 -0
  160. package/lib/common/services/net-service.js +3 -0
  161. package/lib/common/services/project-files-manager.js +5 -0
  162. package/lib/common/services/project-files-provider-base.js +1 -0
  163. package/lib/common/services/proxy-service.js +1 -0
  164. package/lib/common/services/qr.js +1 -0
  165. package/lib/common/services/settings-service.js +1 -0
  166. package/lib/common/services/xcode-select-service.js +1 -0
  167. package/lib/common/utils.js +1 -0
  168. package/lib/common/validators/project-name-validator.js +1 -0
  169. package/lib/common/validators/validation-result.js +1 -0
  170. package/lib/common/verify-node-version.js +8 -1
  171. package/lib/common/yok.js +32 -11
  172. package/lib/config.js +22 -1
  173. package/lib/constants-provider.js +1 -0
  174. package/lib/constants.js +53 -0
  175. package/lib/controllers/build-controller.js +4 -3
  176. package/lib/controllers/debug-controller.js +8 -3
  177. package/lib/controllers/deploy-controller.js +1 -0
  178. package/lib/controllers/migrate-controller.js +90 -4
  179. package/lib/controllers/platform-controller.js +9 -1
  180. package/lib/controllers/prepare-controller.js +17 -4
  181. package/lib/controllers/run-controller.js +17 -1
  182. package/lib/controllers/update-controller-base.js +1 -0
  183. package/lib/controllers/update-controller.js +11 -0
  184. package/lib/data/build-data.js +1 -0
  185. package/lib/data/controller-data-base.js +1 -0
  186. package/lib/data/debug-data.js +1 -0
  187. package/lib/data/platform-data.js +1 -0
  188. package/lib/data/prepare-data.js +1 -0
  189. package/lib/data/run-data.js +1 -0
  190. package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
  191. package/lib/detached-processes/cleanup-process.js +18 -14
  192. package/lib/detached-processes/file-log-service.js +2 -1
  193. package/lib/device-path-provider.js +1 -0
  194. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
  195. package/lib/device-sockets/ios/notification.js +3 -0
  196. package/lib/device-sockets/ios/socket-request-executor.js +3 -0
  197. package/lib/helpers/android-bundle-validator-helper.js +2 -1
  198. package/lib/helpers/deploy-command-helper.js +1 -0
  199. package/lib/helpers/key-command-helper.js +4 -2
  200. package/lib/helpers/livesync-command-helper.js +4 -1
  201. package/lib/helpers/network-connectivity-validator.js +1 -0
  202. package/lib/helpers/options-track-helper.js +3 -2
  203. package/lib/helpers/package-path-helper.js +1 -0
  204. package/lib/helpers/platform-command-helper.js +7 -2
  205. package/lib/helpers/version-validator-helper.js +1 -0
  206. package/lib/key-commands/bootstrap.js +3 -2
  207. package/lib/key-commands/index.js +5 -4
  208. package/lib/nativescript-cli-lib-bootstrap.js +4 -0
  209. package/lib/nativescript-cli-lib.js +1 -0
  210. package/lib/nativescript-cli.js +11 -1
  211. package/lib/node/pbxproj-dom-xcode.js +1 -0
  212. package/lib/node/xcode.js +1 -0
  213. package/lib/node-package-manager.js +11 -1
  214. package/lib/options.js +144 -119
  215. package/lib/package-installation-manager.js +8 -1
  216. package/lib/package-manager.js +2 -0
  217. package/lib/platform-command-param.js +1 -0
  218. package/lib/pnpm-package-manager.js +4 -1
  219. package/lib/project-data.js +12 -0
  220. package/lib/providers/project-files-provider.js +1 -0
  221. package/lib/resolvers/livesync-service-resolver.js +1 -0
  222. package/lib/services/analytics/analytics-broker-process.js +10 -6
  223. package/lib/services/analytics/analytics-broker.js +2 -1
  224. package/lib/services/analytics/analytics-service.js +29 -25
  225. package/lib/services/analytics/google-analytics-provider.js +13 -12
  226. package/lib/services/analytics-settings-service.js +5 -0
  227. package/lib/services/android/android-bundle-tool-service.js +1 -0
  228. package/lib/services/android/gradle-build-args-service.js +3 -0
  229. package/lib/services/android/gradle-build-service.js +1 -0
  230. package/lib/services/android/gradle-command-service.js +1 -0
  231. package/lib/services/android-device-debug-service.js +6 -0
  232. package/lib/services/android-plugin-build-service.js +31 -2
  233. package/lib/services/android-project-service.js +71 -4
  234. package/lib/services/android-resources-migration-service.js +7 -0
  235. package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
  236. package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
  237. package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
  238. package/lib/services/apple-portal/srp/srp-wrapper.js +4 -1
  239. package/lib/services/assets-generation/assets-generation-service.js +10 -5
  240. package/lib/services/build-artifacts-service.js +2 -1
  241. package/lib/services/build-data-service.js +1 -0
  242. package/lib/services/build-info-file-service.js +1 -0
  243. package/lib/services/bundler/bundler-compiler-service.js +68 -1
  244. package/lib/services/bundler/bundler.js +1 -0
  245. package/lib/services/cleanup-service.js +13 -9
  246. package/lib/services/cocoapods-platform-manager.js +9 -0
  247. package/lib/services/cocoapods-service.js +21 -1
  248. package/lib/services/debug-data-service.js +1 -0
  249. package/lib/services/debug-service-base.js +7 -0
  250. package/lib/services/device/device-install-app-service.js +2 -1
  251. package/lib/services/doctor-service.js +21 -6
  252. package/lib/services/extensibility-service.js +8 -0
  253. package/lib/services/files-hash-service.js +1 -0
  254. package/lib/services/hmr-status-service.js +2 -0
  255. package/lib/services/info-service.js +1 -0
  256. package/lib/services/initialize-service.js +5 -1
  257. package/lib/services/ios/export-options-plist-service.js +4 -0
  258. package/lib/services/ios/ios-signing-service.js +4 -0
  259. package/lib/services/ios/spm-service.js +18 -0
  260. package/lib/services/ios/xcodebuild-args-service.js +11 -0
  261. package/lib/services/ios/xcodebuild-command-service.js +1 -0
  262. package/lib/services/ios/xcodebuild-service.js +2 -1
  263. package/lib/services/ios-debugger-port-service.js +1 -0
  264. package/lib/services/ios-device-debug-service.js +1 -0
  265. package/lib/services/ios-entitlements-service.js +1 -0
  266. package/lib/services/ios-extensions-service.js +1 -0
  267. package/lib/services/ios-log-filter.js +20 -0
  268. package/lib/services/ios-native-target-service.js +6 -4
  269. package/lib/services/ios-project-service.js +100 -1
  270. package/lib/services/ios-provision-service.js +3 -0
  271. package/lib/services/ios-watch-app-service.js +1 -0
  272. package/lib/services/ip-service.js +2 -0
  273. package/lib/services/itmstransporter-service.js +1 -0
  274. package/lib/services/karma-execution.js +2 -0
  275. package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
  276. package/lib/services/livesync/android-device-livesync-service.js +2 -0
  277. package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
  278. package/lib/services/livesync/android-livesync-service.js +1 -0
  279. package/lib/services/livesync/android-livesync-tool.js +4 -0
  280. package/lib/services/livesync/device-livesync-service-base.js +2 -0
  281. package/lib/services/livesync/ios-device-livesync-service.js +7 -0
  282. package/lib/services/livesync/ios-livesync-service.js +2 -0
  283. package/lib/services/livesync/livesync-socket.js +1 -0
  284. package/lib/services/livesync/platform-livesync-service-base.js +5 -0
  285. package/lib/services/livesync-process-data-service.js +1 -0
  286. package/lib/services/log-parser-service.js +1 -0
  287. package/lib/services/log-source-map-service.js +15 -0
  288. package/lib/services/marking-mode-service.js +8 -5
  289. package/lib/services/metadata-filtering-service.js +1 -0
  290. package/lib/services/npm-config-service.js +4 -0
  291. package/lib/services/pacote-service.js +7 -0
  292. package/lib/services/performance-service.js +3 -1
  293. package/lib/services/platform/add-platform-service.js +49 -2
  294. package/lib/services/platform/platform-validation-service.js +1 -0
  295. package/lib/services/platform/prepare-native-platform-service.js +5 -2
  296. package/lib/services/platform-environment-requirements.js +8 -3
  297. package/lib/services/platform-project-service-base.js +1 -0
  298. package/lib/services/platforms-data-service.js +1 -0
  299. package/lib/services/plugins-service.js +20 -2
  300. package/lib/services/prepare-data-service.js +1 -0
  301. package/lib/services/project-backup-service.js +4 -0
  302. package/lib/services/project-changes-service.js +14 -3
  303. package/lib/services/project-cleanup-service.js +2 -0
  304. package/lib/services/project-config-service.js +21 -2
  305. package/lib/services/project-data-service.js +36 -7
  306. package/lib/services/project-name-service.js +1 -0
  307. package/lib/services/project-service.js +10 -0
  308. package/lib/services/project-templates-service.js +3 -2
  309. package/lib/services/qr-code-terminal-service.js +1 -0
  310. package/lib/services/require-service.js +1 -0
  311. package/lib/services/start-service.js +1 -0
  312. package/lib/services/temp-service.js +3 -0
  313. package/lib/services/terminal-spinner-service.js +2 -0
  314. package/lib/services/test-execution-service.js +9 -2
  315. package/lib/services/test-initialization-service.js +4 -0
  316. package/lib/services/timeline-profiler-service.js +1 -0
  317. package/lib/services/user-settings-service.js +1 -0
  318. package/lib/services/versions-service.js +6 -4
  319. package/lib/services/watch-ignore-list-service.js +1 -0
  320. package/lib/services/xcconfig-service.js +2 -0
  321. package/lib/services/xcproj-service.js +1 -0
  322. package/lib/shared-event-bus.js +6 -0
  323. package/lib/sys-info.js +2 -1
  324. package/lib/tools/config-manipulation/config-transformer.js +12 -0
  325. package/lib/tools/node-modules/node-modules-builder.js +1 -0
  326. package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
  327. package/lib/yarn-package-manager.js +1 -0
  328. package/lib/yarn2-package-manager.js +3 -0
  329. package/package.json +1 -1
@@ -78,11 +78,14 @@ class RunController extends events_1.EventEmitter {
78
78
  const { projectDir, deviceIdentifiers, stopOptions } = data;
79
79
  const liveSyncProcessInfo = this.$liveSyncProcessDataService.getPersistedData(projectDir);
80
80
  if (liveSyncProcessInfo && !liveSyncProcessInfo.isStopped) {
81
+ // In case we are coming from error during livesync, the current action is the one that erred (but we are still executing it),
82
+ // so we cannot await it as this will cause infinite loop.
81
83
  const shouldAwaitPendingOperation = !stopOptions || stopOptions.shouldAwaitAllActions;
82
84
  const deviceIdentifiersToRemove = deviceIdentifiers && deviceIdentifiers.length
83
85
  ? deviceIdentifiers
84
86
  : _.map(liveSyncProcessInfo.deviceDescriptors, (d) => d.identifier);
85
87
  const removedDeviceIdentifiers = _.remove(liveSyncProcessInfo.deviceDescriptors, (descriptor) => _.includes(deviceIdentifiersToRemove, descriptor.identifier)).map((descriptor) => descriptor.identifier);
88
+ // Handle the case when no more devices left for any of the persisted platforms
86
89
  for (let i = 0; i < liveSyncProcessInfo.platforms.length; i++) {
87
90
  const platform = liveSyncProcessInfo.platforms[i];
88
91
  const devices = this.$devicesService.getDevicesForPlatform(platform);
@@ -90,6 +93,7 @@ class RunController extends events_1.EventEmitter {
90
93
  await this.$prepareController.stopWatchers(projectDir, platform);
91
94
  }
92
95
  }
96
+ // In case deviceIdentifiers are not passed, we should stop the whole LiveSync.
93
97
  if (!deviceIdentifiers ||
94
98
  !deviceIdentifiers.length ||
95
99
  !liveSyncProcessInfo.deviceDescriptors ||
@@ -120,6 +124,7 @@ class RunController extends events_1.EventEmitter {
120
124
  shouldAwaitPendingOperation) {
121
125
  await liveSyncProcessInfo.currentSyncAction;
122
126
  }
127
+ // Emit RunOnDevice stopped when we've really stopped.
123
128
  _.each(removedDeviceIdentifiers, (deviceIdentifier) => {
124
129
  this.emitCore(constants_2.RunOnDeviceEvents.runOnDeviceStopped, {
125
130
  projectDir,
@@ -157,6 +162,8 @@ class RunController extends events_1.EventEmitter {
157
162
  shouldSkipEmitLiveSyncNotification: true,
158
163
  shouldCheckDeveloperDiscImage: true,
159
164
  });
165
+ // we do not stop the application when debugBrk is false, so we need to attach, instead of launch
166
+ // if we try to send the launch request, the debugger port will not be printed and the command will timeout
160
167
  debugOptions.start = !debugOptions.debugBrk;
161
168
  debugOptions.forceDebuggerAttachedEvent = refreshInfo.didRestart;
162
169
  await this.$debugController.enableDebuggingCoreWithoutWaitingCurrentAction(projectData.projectDir, deviceDescriptor.identifier, debugOptions);
@@ -224,6 +231,7 @@ class RunController extends events_1.EventEmitter {
224
231
  getDeviceDescriptorsForInitialSync(projectDir, deviceDescriptors) {
225
232
  const currentRunData = this.$liveSyncProcessDataService.getPersistedData(projectDir);
226
233
  const isAlreadyLiveSyncing = currentRunData && !currentRunData.isStopped;
234
+ // Prevent cases where liveSync is called consecutive times with the same device, for example [ A, B, C ] and then [ A, B, D ] - we want to execute initialSync only for D.
227
235
  const deviceDescriptorsForInitialSync = isAlreadyLiveSyncing
228
236
  ? _.differenceBy(deviceDescriptors, currentRunData.deviceDescriptors, "identifier")
229
237
  : deviceDescriptors;
@@ -277,6 +285,8 @@ class RunController extends events_1.EventEmitter {
277
285
  const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
278
286
  try {
279
287
  let packageFilePath = null;
288
+ // Case where we have three devices attached, a change that requires build is found,
289
+ // we'll rebuild the app only for the first device, but we should install new package on all three devices.
280
290
  if (rebuiltInformation[platformData.platformNameLowerCase] &&
281
291
  (this.$mobileHelper.isAndroidPlatform(platformData.platformNameLowerCase) ||
282
292
  rebuiltInformation[platformData.platformNameLowerCase]
@@ -300,7 +310,7 @@ class RunController extends events_1.EventEmitter {
300
310
  }
301
311
  else {
302
312
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
303
- action: "LiveSync",
313
+ action: "LiveSync" /* TrackActionNames.LiveSync */,
304
314
  device,
305
315
  projectDir: projectData.projectDir,
306
316
  });
@@ -370,6 +380,9 @@ class RunController extends events_1.EventEmitter {
370
380
  const watchInfo = {
371
381
  liveSyncDeviceData: deviceDescriptor,
372
382
  projectData,
383
+ // todo: remove stale files once everything is stable
384
+ // currently, watcher fires multiple times & may clean up unsynced files
385
+ // filesToRemove: data.staleFiles ?? [],
373
386
  filesToRemove: [],
374
387
  filesToSync,
375
388
  hmrData: data.hmrData,
@@ -415,6 +428,7 @@ class RunController extends events_1.EventEmitter {
415
428
  const fullSyncAction = async () => {
416
429
  watchInfo.filesToSync = allAppFiles;
417
430
  const fullLiveSyncResultInfo = await platformLiveSyncService.liveSyncWatchAction(device, watchInfo);
431
+ // IMPORTANT: keep the same instance as we rely on side effects
418
432
  _.assign(liveSyncResultInfo, fullLiveSyncResultInfo);
419
433
  };
420
434
  await this.$hooksService.executeBeforeHooks("watchAction", {
@@ -429,6 +443,7 @@ class RunController extends events_1.EventEmitter {
429
443
  await this.refreshApplication(projectData, liveSyncResultInfo, data, deviceDescriptor, fullSyncAction);
430
444
  if (!liveSyncResultInfo.didRecover && isInHMRMode) {
431
445
  const status = await this.$hmrStatusService.getHmrStatus(device.deviceInfo.identifier, data.hmrData.hash);
446
+ // the timeout is assumed OK as the app could be blocked on a breakpoint
432
447
  if (status === constants_1.HmrConstants.HMR_ERROR_STATUS) {
433
448
  await fullSyncAction();
434
449
  liveSyncResultInfo.isFullSync = true;
@@ -510,3 +525,4 @@ __decorate([
510
525
  (0, decorators_1.cache)()
511
526
  ], RunController.prototype, "attachDeviceLostHandler", null);
512
527
  yok_1.injector.register("runController", RunController);
528
+ //# sourceMappingURL=run-controller.js.map
@@ -69,3 +69,4 @@ class UpdateControllerBase {
69
69
  }
70
70
  }
71
71
  exports.UpdateControllerBase = UpdateControllerBase;
72
+ //# sourceMappingURL=update-controller-base.js.map
@@ -28,12 +28,15 @@ class UpdateController extends update_controller_base_1.UpdateControllerBase {
28
28
  this.spinner = this.$terminalSpinnerService.createSpinner();
29
29
  const projectData = this.$projectDataService.getProjectData(updateOptions.projectDir);
30
30
  updateOptions.version = updateOptions.version || constants_1.PackageVersion.LATEST;
31
+ // back up project files and folders
31
32
  this.spinner.info("Backing up project files before update");
32
33
  await this.backupProject();
33
34
  this.spinner.succeed("Project files have been backed up");
35
+ // clean up project files
34
36
  this.spinner.info("Cleaning up project files before update");
35
37
  await this.cleanUpProject();
36
38
  this.spinner.succeed("Project files have been cleaned up");
39
+ // update dependencies
37
40
  this.spinner.info("Updating project dependencies");
38
41
  await this.updateDependencies(projectData, updateOptions.version);
39
42
  this.spinner.succeed("Project dependencies have been updated");
@@ -79,6 +82,10 @@ class UpdateController extends update_controller_base_1.UpdateControllerBase {
79
82
  if (!shouldUpdate) {
80
83
  return;
81
84
  }
85
+ // check if the coerced version is the same as desired and prefix it with a ~
86
+ // for example:
87
+ // 8.0.0 -> ~8.0.0
88
+ // 8.0.8-next-XXX -> 8.0.8-next-XXX
82
89
  const updatedVersion = (() => {
83
90
  if (desiredVersion === version) {
84
91
  return desiredVersion;
@@ -131,9 +138,11 @@ class UpdateController extends update_controller_base_1.UpdateControllerBase {
131
138
  }
132
139
  exports.UpdateController = UpdateController;
133
140
  UpdateController.updatableDependencies = [
141
+ // dependencies
134
142
  {
135
143
  packageName: "@nativescript/core",
136
144
  },
145
+ // devDependencies
137
146
  {
138
147
  packageName: "@nativescript/webpack",
139
148
  isDev: true,
@@ -142,6 +151,7 @@ UpdateController.updatableDependencies = [
142
151
  packageName: "@nativescript/types",
143
152
  isDev: true,
144
153
  },
154
+ // runtimes
145
155
  {
146
156
  packageName: "@nativescript/ios",
147
157
  isDev: true,
@@ -161,3 +171,4 @@ UpdateController.pathsToBackup = [
161
171
  constants.CONFIG_NS_FILE_NAME,
162
172
  ];
163
173
  yok_1.injector.register("updateController", UpdateController);
174
+ //# sourceMappingURL=update-controller.js.map
@@ -42,3 +42,4 @@ class AndroidBuildData extends BuildData {
42
42
  }
43
43
  }
44
44
  exports.AndroidBuildData = AndroidBuildData;
45
+ //# sourceMappingURL=build-data.js.map
@@ -9,3 +9,4 @@ class ControllerDataBase {
9
9
  }
10
10
  }
11
11
  exports.ControllerDataBase = ControllerDataBase;
12
+ //# sourceMappingURL=controller-data-base.js.map
@@ -4,3 +4,4 @@ exports.DebugData = void 0;
4
4
  class DebugData {
5
5
  }
6
6
  exports.DebugData = DebugData;
7
+ //# sourceMappingURL=debug-data.js.map
@@ -11,3 +11,4 @@ class AddPlatformData extends controller_data_base_1.ControllerDataBase {
11
11
  }
12
12
  }
13
13
  exports.AddPlatformData = AddPlatformData;
14
+ //# sourceMappingURL=platform-data.js.map
@@ -49,3 +49,4 @@ exports.IOSPrepareData = IOSPrepareData;
49
49
  class AndroidPrepareData extends PrepareData {
50
50
  }
51
51
  exports.AndroidPrepareData = AndroidPrepareData;
52
+ //# sourceMappingURL=prepare-data.js.map
@@ -9,3 +9,4 @@ class RunData {
9
9
  }
10
10
  }
11
11
  exports.RunData = RunData;
12
+ //# sourceMappingURL=run-data.js.map
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ // NOTE: This file is used to call JS functions when cleaning resources used by CLI, after the CLI is killed.
5
+ // The instances here are not shared with the ones in main CLI process.
4
6
  const fs = require("fs");
5
7
  const uuid_1 = require("uuid");
6
8
  const file_log_service_1 = require("./file-log-service");
@@ -9,6 +11,7 @@ const pathToBootstrap = process.argv[2];
9
11
  if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
10
12
  throw new Error("Invalid path to bootstrap.");
11
13
  }
14
+ // After requiring the bootstrap we can use $injector
12
15
  require(pathToBootstrap);
13
16
  const logFile = process.argv[3];
14
17
  const jsFilePath = process.argv[4];
@@ -32,6 +35,7 @@ catch (err) {
32
35
  const logMessage = (msg, type) => {
33
36
  fileLogService.logData({ message: `[${uniqueId}] ${msg}`, type });
34
37
  };
38
+ /* tslint:disable:no-floating-promises */
35
39
  (async () => {
36
40
  try {
37
41
  logMessage(`Requiring file ${jsFilePath}`);
@@ -43,11 +47,13 @@ const logMessage = (msg, type) => {
43
47
  logMessage(`Finished execution with data: ${JSON.stringify(data)} to the default function exported by currently required file ${jsFilePath}`);
44
48
  }
45
49
  catch (err) {
46
- logMessage(`Unable to execute action of file ${jsFilePath} when passed data is ${JSON.stringify(data)}. Error is: ${err}.`, "Error");
50
+ logMessage(`Unable to execute action of file ${jsFilePath} when passed data is ${JSON.stringify(data)}. Error is: ${err}.`, "Error" /* FileLogMessageType.Error */);
47
51
  }
48
52
  }
49
53
  }
50
54
  catch (err) {
51
- logMessage(`Unable to require file: ${jsFilePath}. Error is: ${err}.`, "Error");
55
+ logMessage(`Unable to require file: ${jsFilePath}. Error is: ${err}.`, "Error" /* FileLogMessageType.Error */);
52
56
  }
53
57
  })();
58
+ /* tslint:enable:no-floating-promises */
59
+ //# sourceMappingURL=cleanup-js-subprocess.js.map
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ // NOTE: This file is used to clean up resources used by CLI, when the CLI is killed.
4
+ // The instances here are not shared with the ones in main CLI process.
3
5
  const fs = require("fs");
4
6
  const path = require("path");
5
7
  const shelljs = require("shelljs");
@@ -11,6 +13,7 @@ if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
11
13
  throw new Error("Invalid path to bootstrap.");
12
14
  }
13
15
  const logFile = process.argv[3];
16
+ // After requiring the bootstrap we can use $injector
14
17
  require(pathToBootstrap);
15
18
  const fileLogService = yok_1.injector.resolve(file_log_service_1.FileLogService, {
16
19
  logFile,
@@ -63,7 +66,7 @@ const executeJSCleanup = async (jsCommand) => {
63
66
  catch (err) {
64
67
  fileLogService.logData({
65
68
  message: `Unable to execute action for file ${jsCommand.filePath} with data ${JSON.stringify(jsCommand.data)}. Error is: ${err}.`,
66
- type: "Error",
69
+ type: "Error" /* FileLogMessageType.Error */,
67
70
  });
68
71
  }
69
72
  };
@@ -88,7 +91,7 @@ const executeCleanup = async () => {
88
91
  catch (err) {
89
92
  fileLogService.logData({
90
93
  message: `Unable to execute command: ${JSON.stringify(commandInfo)}. Error is: ${err}.`,
91
- type: "Error",
94
+ type: "Error" /* FileLogMessageType.Error */,
92
95
  });
93
96
  }
94
97
  }
@@ -102,7 +105,7 @@ const executeCleanup = async () => {
102
105
  catch (err) {
103
106
  fileLogService.logData({
104
107
  message: `Unable to delete files: ${JSON.stringify(filesToDelete)}. Error is: ${err}.`,
105
- type: "Error",
108
+ type: "Error" /* FileLogMessageType.Error */,
106
109
  });
107
110
  }
108
111
  }
@@ -224,36 +227,36 @@ process.on("message", async (cleanupProcessMessage) => {
224
227
  message: `cleanup-process received message of type: ${JSON.stringify(cleanupProcessMessage)}`,
225
228
  });
226
229
  switch (cleanupProcessMessage.messageType) {
227
- case "AddCleanCommand":
230
+ case "AddCleanCommand" /* CleanupProcessMessage.AddCleanCommand */:
228
231
  addCleanupAction(cleanupProcessMessage.commandInfo);
229
232
  break;
230
- case "RemoveCleanCommand":
233
+ case "RemoveCleanCommand" /* CleanupProcessMessage.RemoveCleanCommand */:
231
234
  removeCleanupAction(cleanupProcessMessage.commandInfo);
232
235
  break;
233
- case "AddRequest":
236
+ case "AddRequest" /* CleanupProcessMessage.AddRequest */:
234
237
  addRequest(cleanupProcessMessage.requestInfo);
235
238
  break;
236
- case "RemoveRequest":
239
+ case "RemoveRequest" /* CleanupProcessMessage.RemoveRequest */:
237
240
  removeRequest(cleanupProcessMessage.requestInfo);
238
241
  break;
239
- case "AddDeleteFileAction":
242
+ case "AddDeleteFileAction" /* CleanupProcessMessage.AddDeleteFileAction */:
240
243
  addDeleteAction(cleanupProcessMessage.filePath);
241
244
  break;
242
- case "RemoveDeleteFileAction":
245
+ case "RemoveDeleteFileAction" /* CleanupProcessMessage.RemoveDeleteFileAction */:
243
246
  removeDeleteAction(cleanupProcessMessage.filePath);
244
247
  break;
245
- case "AddJSFileToRequire":
248
+ case "AddJSFileToRequire" /* CleanupProcessMessage.AddJSFileToRequire */:
246
249
  const jsCleanupMessage = cleanupProcessMessage;
247
250
  addJSFile(jsCleanupMessage.jsCommand);
248
251
  break;
249
- case "RemoveJSFileToRequire":
252
+ case "RemoveJSFileToRequire" /* CleanupProcessMessage.RemoveJSFileToRequire */:
250
253
  const msgToRemove = cleanupProcessMessage;
251
254
  removeJSFile(msgToRemove.jsCommand);
252
255
  break;
253
256
  default:
254
257
  fileLogService.logData({
255
258
  message: `Unable to handle message of type ${cleanupProcessMessage.messageType}. Full message is ${JSON.stringify(cleanupProcessMessage)}`,
256
- type: "Error",
259
+ type: "Error" /* FileLogMessageType.Error */,
257
260
  });
258
261
  break;
259
262
  }
@@ -267,6 +270,7 @@ process.on("disconnect", async () => {
267
270
  process.exit();
268
271
  });
269
272
  fileLogService.logData({
270
- message: `cleanup-process will send ${"ProcessReadyToReceive"} message`,
273
+ message: `cleanup-process will send ${"ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */} message`,
271
274
  });
272
- process.send("ProcessReadyToReceive");
275
+ process.send("ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */);
276
+ //# sourceMappingURL=cleanup-process.js.map
@@ -11,10 +11,11 @@ class FileLogService {
11
11
  logData(fileLoggingMessage) {
12
12
  if (this.logFile && fileLoggingMessage && fileLoggingMessage.message) {
13
13
  fileLoggingMessage.type =
14
- fileLoggingMessage.type || "Info";
14
+ fileLoggingMessage.type || "Info" /* FileLogMessageType.Info */;
15
15
  const formattedDate = (0, helpers_1.getFixedLengthDateString)();
16
16
  this.$fs.appendFile(this.logFile, `[${formattedDate}] [${fileLoggingMessage.type}] ${fileLoggingMessage.message}${os_1.EOL}`);
17
17
  }
18
18
  }
19
19
  }
20
20
  exports.FileLogService = FileLogService;
21
+ //# sourceMappingURL=file-log-service.js.map
@@ -47,3 +47,4 @@ class DevicePathProvider {
47
47
  }
48
48
  exports.DevicePathProvider = DevicePathProvider;
49
49
  yok_1.injector.register("devicePathProvider", DevicePathProvider);
50
+ //# sourceMappingURL=device-path-provider.js.map
@@ -76,6 +76,7 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
76
76
  const existingWebProxy = this.deviceWebServers[`${device.deviceInfo.identifier}-${appId}`];
77
77
  const result = existingWebProxy ||
78
78
  (await this.addWebSocketProxy(device, appId, projectName, projectDir));
79
+ // TODO: do not remove till VSCode waits for this message in order to reattach
79
80
  this.$logger.info("Opened localhost " + result.options.port);
80
81
  return result;
81
82
  }
@@ -86,8 +87,13 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
86
87
  if (existingServer) {
87
88
  this.$errors.fail(`Web socket proxy is already running for device '${device.deviceInfo.identifier}' and app '${appId}'`);
88
89
  }
90
+ // NOTE: We will try to provide command line options to select ports, at least on the localhost.
89
91
  const localPort = await this.$net.getAvailablePortInRange(41000);
90
92
  this.$logger.info("\nSetting up debugger proxy...\nPress Ctrl + C to terminate, or disconnect.\n");
93
+ // NB: When the inspector frontend connects we might not have connected to the inspector backend yet.
94
+ // That's why we use the verifyClient callback of the websocket server to stall the upgrade request until we connect.
95
+ // We store the socket that connects us to the device in the upgrade request object itself and later on retrieve it
96
+ // in the connection callback.
91
97
  let currentAppSocket = null;
92
98
  let currentWebSocket = null;
93
99
  const server = new ws.Server({
@@ -200,3 +206,4 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
200
206
  }
201
207
  exports.AppDebugSocketProxyFactory = AppDebugSocketProxyFactory;
202
208
  yok_1.injector.register("appDebugSocketProxyFactory", AppDebugSocketProxyFactory);
209
+ //# sourceMappingURL=app-debug-socket-proxy-factory.js.map
@@ -6,6 +6,8 @@ const constants_1 = require("../../common/constants");
6
6
  const yok_1 = require("../../common/yok");
7
7
  class IOSNotification extends events_1.EventEmitter {
8
8
  getAttachRequest(appId, deviceId) {
9
+ // It could be too early to emit this event, but we rely that if you construct attach request,
10
+ // you will execute it immediately.
9
11
  this.emit(constants_1.ATTACH_REQUEST_EVENT_NAME, { deviceId, appId });
10
12
  return this.formatNotification(IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME, appId);
11
13
  }
@@ -28,3 +30,4 @@ IOSNotification.APP_REFRESH_STARTED_NOTIFICATION_NAME = "AppRefreshStarted";
28
30
  IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME = "AttachRequest";
29
31
  IOSNotification.READY_FOR_ATTACH_NOTIFICATION_NAME = "ReadyForAttach";
30
32
  yok_1.injector.register("iOSNotification", IOSNotification);
33
+ //# sourceMappingURL=notification.js.map
@@ -25,6 +25,8 @@ class IOSSocketRequestExecutor {
25
25
  async executeRequest(mainRequestName, successfulyExecutedNotificationName, appId, deviceId, timeout) {
26
26
  let isSuccessful = false;
27
27
  try {
28
+ // We should create this promise here because we need to send the ObserveNotification on the device
29
+ // before we send the PostNotification.
28
30
  const socket = await this.$iOSNotificationService.postNotification(deviceId, successfulyExecutedNotificationName, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
29
31
  const notificationPromise = this.$iOSNotificationService.awaitNotification(deviceId, +socket, timeout);
30
32
  await this.$iOSNotificationService.postNotification(deviceId, mainRequestName);
@@ -39,3 +41,4 @@ class IOSSocketRequestExecutor {
39
41
  }
40
42
  exports.IOSSocketRequestExecutor = IOSSocketRequestExecutor;
41
43
  yok_1.injector.register("iOSSocketRequestExecutor", IOSSocketRequestExecutor);
44
+ //# sourceMappingURL=socket-request-executor.js.map
@@ -22,7 +22,7 @@ class AndroidBundleValidatorHelper extends version_validator_helper_1.VersionVal
22
22
  }
23
23
  validateRuntimeVersion(projectData) {
24
24
  if (this.$options.aab) {
25
- const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android");
25
+ const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android" /* PlatformTypes.android */);
26
26
  const androidRuntimeVersion = runtimePackage
27
27
  ? runtimePackage.version
28
28
  : "";
@@ -50,3 +50,4 @@ exports.AndroidBundleValidatorHelper = AndroidBundleValidatorHelper;
50
50
  AndroidBundleValidatorHelper.MIN_RUNTIME_VERSION = "5.0.0";
51
51
  AndroidBundleValidatorHelper.MIN_ANDROID_WITH_AAB_SUPPORT = "4.4.0";
52
52
  yok_1.injector.register("androidBundleValidatorHelper", AndroidBundleValidatorHelper);
53
+ //# sourceMappingURL=android-bundle-validator-helper.js.map
@@ -63,3 +63,4 @@ class DeployCommandHelper {
63
63
  }
64
64
  exports.DeployCommandHelper = DeployCommandHelper;
65
65
  yok_1.injector.register("deployCommandHelper", DeployCommandHelper);
66
+ //# sourceMappingURL=deploy-command-helper.js.map
@@ -9,7 +9,8 @@ class KeyCommandHelper {
9
9
  this.overrides = {};
10
10
  this.onKeyPressed = async (data) => {
11
11
  const key = data.toString();
12
- if (this.keyCommandExecutionBlocked && key !== "\u0003")
12
+ // Allow Ctrl + C always.
13
+ if (this.keyCommandExecutionBlocked && key !== "\u0003" /* SpecialKeys.CtrlC */)
13
14
  return;
14
15
  try {
15
16
  const exists = yok_1.injector.getRegisteredKeyCommandsNames().includes(key);
@@ -32,7 +33,7 @@ class KeyCommandHelper {
32
33
  return;
33
34
  }
34
35
  }
35
- if (keyCommand.key !== "\u0003") {
36
+ if (keyCommand.key !== "\u0003" /* SpecialKeys.CtrlC */) {
36
37
  const line = ` ${color_1.color.dim("→")} ${color_1.color.bold(keyCommand.key)} — ${keyCommand.description}`;
37
38
  const lineLength = (0, node_util_1.stripVTControlCharacters)(line).length - 1;
38
39
  console.log(color_1.color.dim(` ┌${"─".repeat(lineLength)}┐`));
@@ -114,3 +115,4 @@ class KeyCommandHelper {
114
115
  }
115
116
  exports.default = KeyCommandHelper;
116
117
  yok_1.injector.register("keyCommandHelper", KeyCommandHelper);
118
+ //# sourceMappingURL=key-command-helper.js.map
@@ -25,6 +25,7 @@ class LiveSyncCommandHelper {
25
25
  get $platformsDataService() {
26
26
  return this.$injector.resolve("platformsDataService");
27
27
  }
28
+ // TODO: Remove this and replace it with buildData
28
29
  getLiveSyncData(projectDir) {
29
30
  const liveSyncInfo = {
30
31
  projectDir,
@@ -54,6 +55,7 @@ class LiveSyncCommandHelper {
54
55
  return devices;
55
56
  }
56
57
  async createDeviceDescriptors(devices, platform, additionalOptions) {
58
+ // Now let's take data for each device:
57
59
  const deviceDescriptors = devices.map((d) => {
58
60
  const outputPath = additionalOptions &&
59
61
  additionalOptions.getOutputDirectory &&
@@ -133,7 +135,7 @@ class LiveSyncCommandHelper {
133
135
  const remainingDevicesToSync = devices.map((d) => d.deviceInfo.identifier);
134
136
  _.remove(remainingDevicesToSync, (d) => d === data.deviceIdentifier);
135
137
  if (remainingDevicesToSync.length === 0 && !data.keepProcessAlive) {
136
- process.exit(134);
138
+ process.exit(134 /* ErrorCodes.ALL_DEVICES_DISCONNECTED */);
137
139
  }
138
140
  });
139
141
  }
@@ -203,3 +205,4 @@ class LiveSyncCommandHelper {
203
205
  }
204
206
  exports.LiveSyncCommandHelper = LiveSyncCommandHelper;
205
207
  yok_1.injector.register("liveSyncCommandHelper", LiveSyncCommandHelper);
208
+ //# sourceMappingURL=livesync-command-helper.js.map
@@ -34,3 +34,4 @@ NetworkConnectivityValidator.DNS_LOOKUP_URL = "play.nativescript.org";
34
34
  NetworkConnectivityValidator.NO_INTERNET_ERROR_CODE = "ENOTFOUND";
35
35
  NetworkConnectivityValidator.NO_INTERNET_ERROR_MESSAGE = "No internet connection. Check your internet settings and try again.";
36
36
  yok_1.injector.register("networkConnectivityValidator", NetworkConnectivityValidator);
37
+ //# sourceMappingURL=network-connectivity-validator.js.map
@@ -11,7 +11,7 @@ class OptionsTracker {
11
11
  async trackOptions(options) {
12
12
  const trackObject = this.getTrackObject(options);
13
13
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
14
- action: "Options",
14
+ action: "Options" /* TrackActionNames.Options */,
15
15
  additionalData: JSON.stringify(trackObject),
16
16
  });
17
17
  }
@@ -58,7 +58,7 @@ class OptionsTracker {
58
58
  return true;
59
59
  }
60
60
  const optionDef = options[key];
61
- if (optionDef && optionDef.type === "boolean") {
61
+ if (optionDef && optionDef.type === "boolean" /* OptionType.Boolean */) {
62
62
  if ((optionDef.default !== true && value === false) ||
63
63
  (optionDef.default === true && value === true)) {
64
64
  return true;
@@ -75,3 +75,4 @@ OptionsTracker.PRIVATE_REPLACE_VALUE = "private";
75
75
  OptionsTracker.PATH_REPLACE_VALUE = "_localpath";
76
76
  OptionsTracker.SIZE_EXEEDED_REPLACE_VALUE = "sizeExceeded";
77
77
  yok_1.injector.register("optionsTracker", OptionsTracker);
78
+ //# sourceMappingURL=options-track-helper.js.map
@@ -4,3 +4,4 @@ exports.resolvePackageJSONPath = exports.resolvePackagePath = void 0;
4
4
  const resolve_package_path_1 = require("@rigor789/resolve-package-path");
5
5
  Object.defineProperty(exports, "resolvePackagePath", { enumerable: true, get: function () { return resolve_package_path_1.resolvePackagePath; } });
6
6
  Object.defineProperty(exports, "resolvePackageJSONPath", { enumerable: true, get: function () { return resolve_package_path_1.resolvePackageJSONPath; } });
7
+ //# sourceMappingURL=package-path-helper.js.map
@@ -70,6 +70,10 @@ class PlatformCommandHelper {
70
70
  const platformDir = path.join(projectData.platformsDir, platform.toLowerCase());
71
71
  this.$fs.deleteDirectory(platformDir);
72
72
  await this.$packageInstallationManager.uninstall(platformData.frameworkPackageName, projectData.projectDir);
73
+ // this.$projectDataService.removeNSProperty(
74
+ // projectData.projectDir,
75
+ // platformData.frameworkPackageName
76
+ // );
73
77
  this.$logger.info(`Platform ${platform} successfully removed.`);
74
78
  }
75
79
  catch (err) {
@@ -108,7 +112,7 @@ class PlatformCommandHelper {
108
112
  const installedPlatforms = this.getInstalledPlatforms(projectData);
109
113
  return _.filter(this.$mobileHelper.platformNames, (p) => {
110
114
  return (installedPlatforms.indexOf(p) < 0 &&
111
- this.$platformValidationService.isPlatformSupportedForOS(p, projectData));
115
+ this.$platformValidationService.isPlatformSupportedForOS(p, projectData)); // Only those not already installed
112
116
  });
113
117
  }
114
118
  getPreparedPlatforms(projectData) {
@@ -132,7 +136,7 @@ class PlatformCommandHelper {
132
136
  return true;
133
137
  }
134
138
  return (prepareInfo.nativePlatformStatus !==
135
- "1");
139
+ "1" /* constants.NativePlatformStatus.requiresPlatformAdd */);
136
140
  }
137
141
  async updatePlatform(platform, version, projectData) {
138
142
  const platformData = this.$platformsDataService.getPlatformData(platform, projectData);
@@ -178,3 +182,4 @@ class PlatformCommandHelper {
178
182
  }
179
183
  exports.PlatformCommandHelper = PlatformCommandHelper;
180
184
  yok_1.injector.register("platformCommandHelper", PlatformCommandHelper);
185
+ //# sourceMappingURL=platform-command-helper.js.map
@@ -23,3 +23,4 @@ class VersionValidatorHelper {
23
23
  }
24
24
  }
25
25
  exports.VersionValidatorHelper = VersionValidatorHelper;
26
+ //# sourceMappingURL=version-validator-helper.js.map
@@ -13,9 +13,10 @@ yok_1.injector.requireKeyCommand("R", path);
13
13
  yok_1.injector.requireKeyCommand("w", path);
14
14
  yok_1.injector.requireKeyCommand("c", path);
15
15
  yok_1.injector.requireKeyCommand("n", path);
16
- yok_1.injector.requireKeyCommand("?", path);
17
- yok_1.injector.requireKeyCommand("\u0003", path);
16
+ yok_1.injector.requireKeyCommand("?" /* SpecialKeys.QuestionMark */, path);
17
+ yok_1.injector.requireKeyCommand("\u0003" /* SpecialKeys.CtrlC */, path);
18
18
  yok_1.injector.requireCommand("open|ios", path);
19
19
  yok_1.injector.requireCommand("open|android", path);
20
20
  yok_1.injector.requireCommand("open|visionos", path);
21
21
  yok_1.injector.requireCommand("open|vision", path);
22
+ //# sourceMappingURL=bootstrap.js.map
@@ -294,7 +294,7 @@ class ShiftR {
294
294
  exports.ShiftR = ShiftR;
295
295
  class CtrlC {
296
296
  constructor() {
297
- this.key = "\u0003";
297
+ this.key = "\u0003" /* SpecialKeys.CtrlC */;
298
298
  this.platform = "all";
299
299
  this.group = "Development Workflow";
300
300
  this.willBlockKeyCommandExecution = false;
@@ -365,7 +365,7 @@ exports.N = N;
365
365
  class QuestionMark {
366
366
  constructor($keyCommandHelper) {
367
367
  this.$keyCommandHelper = $keyCommandHelper;
368
- this.key = "?";
368
+ this.key = "?" /* SpecialKeys.QuestionMark */;
369
369
  this.platform = "all";
370
370
  this.description = "Show this help";
371
371
  this.group = "Development Workflow";
@@ -405,9 +405,10 @@ yok_1.injector.registerKeyCommand("w", W);
405
405
  yok_1.injector.registerKeyCommand("c", C);
406
406
  yok_1.injector.registerKeyCommand("A", ShiftA);
407
407
  yok_1.injector.registerKeyCommand("n", N);
408
- yok_1.injector.registerKeyCommand("?", QuestionMark);
409
- yok_1.injector.registerKeyCommand("\u0003", CtrlC);
408
+ yok_1.injector.registerKeyCommand("?" /* SpecialKeys.QuestionMark */, QuestionMark);
409
+ yok_1.injector.registerKeyCommand("\u0003" /* SpecialKeys.CtrlC */, CtrlC);
410
410
  yok_1.injector.registerCommand("open|ios", OpenIOSCommand);
411
411
  yok_1.injector.registerCommand("open|visionos", OpenVisionOSCommand);
412
412
  yok_1.injector.registerCommand("open|vision", OpenVisionOSCommand);
413
413
  yok_1.injector.registerCommand("open|android", OpenAndroidCommand);
414
+ //# sourceMappingURL=index.js.map
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const yok_1 = require("./common/yok");
4
4
  require("./bootstrap");
5
5
  yok_1.injector.overrideAlreadyRequiredModule = true;
6
+ // Temporary!!! Should not require appbuilder's entry point of mobile-cli-lib,
7
+ // but once we separate logics in mobile-cli-lib, we should be able to require only specific bootstrap.
8
+ // Use this hack for now, as this will allow requiring {N} CLI as library directly and executing some device specific operations.
6
9
  yok_1.injector.requirePublicClass("deviceEmitter", "./common/mobile/device-emitter");
7
10
  yok_1.injector.requirePublicClass("deviceLogProvider", "./common/mobile/device-log-emitter");
8
11
  yok_1.injector.resolve("staticConfig").disableAnalytics = true;
12
+ //# sourceMappingURL=nativescript-cli-lib-bootstrap.js.map
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const yok_1 = require("./common/yok");
4
4
  require("./nativescript-cli-lib-bootstrap");
5
5
  module.exports = yok_1.injector.publicApi;
6
+ //# sourceMappingURL=nativescript-cli-lib.js.map