nativescript 8.7.0-rc.0 → 8.7.0-rc.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 (324) 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 +7 -1
  4. package/lib/color.js +3 -0
  5. package/lib/commands/add-platform.js +1 -0
  6. package/lib/commands/apple-login.js +1 -0
  7. package/lib/commands/appstore-list.js +1 -0
  8. package/lib/commands/appstore-upload.js +4 -0
  9. package/lib/commands/build.js +20 -3
  10. package/lib/commands/clean.js +22 -1
  11. package/lib/commands/command-base.js +1 -0
  12. package/lib/commands/config.js +3 -0
  13. package/lib/commands/create-project.js +34 -19
  14. package/lib/commands/debug.js +6 -1
  15. package/lib/commands/deploy.js +3 -2
  16. package/lib/commands/extensibility/install-extension.js +1 -0
  17. package/lib/commands/extensibility/list-extensions.js +1 -0
  18. package/lib/commands/extensibility/uninstall-extension.js +1 -0
  19. package/lib/commands/fonts.js +1 -0
  20. package/lib/commands/generate-assets.js +1 -0
  21. package/lib/commands/generate-help.js +1 -0
  22. package/lib/commands/generate.js +12 -2
  23. package/lib/commands/info.js +1 -0
  24. package/lib/commands/install.js +1 -0
  25. package/lib/commands/list-platforms.js +1 -0
  26. package/lib/commands/migrate.js +1 -0
  27. package/lib/commands/platform-clean.js +1 -0
  28. package/lib/commands/plugin/add-plugin.js +1 -0
  29. package/lib/commands/plugin/build-plugin.js +1 -0
  30. package/lib/commands/plugin/create-plugin.js +5 -0
  31. package/lib/commands/plugin/list-plugins.js +1 -0
  32. package/lib/commands/plugin/remove-plugin.js +2 -0
  33. package/lib/commands/plugin/update-plugin.js +1 -0
  34. package/lib/commands/post-install.js +6 -0
  35. package/lib/commands/prepare.js +3 -2
  36. package/lib/commands/preview.js +2 -0
  37. package/lib/commands/remove-platform.js +1 -0
  38. package/lib/commands/resources/resources-update.js +2 -0
  39. package/lib/commands/run.js +1 -0
  40. package/lib/commands/setup.js +1 -0
  41. package/lib/commands/start.js +1 -0
  42. package/lib/commands/test-init.js +4 -0
  43. package/lib/commands/test.js +9 -2
  44. package/lib/commands/typings.js +1 -0
  45. package/lib/commands/update-platform.js +5 -0
  46. package/lib/commands/update.js +2 -0
  47. package/lib/common/bootstrap.js +1 -0
  48. package/lib/common/child-process.js +3 -0
  49. package/lib/common/codeGeneration/code-entity.js +1 -0
  50. package/lib/common/codeGeneration/code-printer.js +1 -0
  51. package/lib/common/command-params.js +1 -0
  52. package/lib/common/commands/analytics.js +3 -0
  53. package/lib/common/commands/autocompletion.js +3 -0
  54. package/lib/common/commands/device/device-log-stream.js +1 -0
  55. package/lib/common/commands/device/get-file.js +2 -0
  56. package/lib/common/commands/device/list-applications.js +1 -0
  57. package/lib/common/commands/device/list-devices.js +3 -0
  58. package/lib/common/commands/device/list-files.js +2 -0
  59. package/lib/common/commands/device/put-file.js +2 -0
  60. package/lib/common/commands/device/run-application.js +1 -0
  61. package/lib/common/commands/device/stop-application.js +1 -0
  62. package/lib/common/commands/device/uninstall-application.js +1 -0
  63. package/lib/common/commands/doctor.js +3 -2
  64. package/lib/common/commands/generate-messages.js +1 -0
  65. package/lib/common/commands/help.js +1 -0
  66. package/lib/common/commands/package-manager-get.js +1 -0
  67. package/lib/common/commands/package-manager-set.js +1 -0
  68. package/lib/common/commands/post-install.js +1 -0
  69. package/lib/common/commands/preuninstall.js +11 -2
  70. package/lib/common/commands/proxy/proxy-base.js +4 -0
  71. package/lib/common/commands/proxy/proxy-clear.js +1 -0
  72. package/lib/common/commands/proxy/proxy-get.js +1 -0
  73. package/lib/common/commands/proxy/proxy-set.js +1 -0
  74. package/lib/common/common-lib.js +1 -0
  75. package/lib/common/constants.js +11 -0
  76. package/lib/common/decorators.js +48 -0
  77. package/lib/common/definitions/mobile.d.ts +1 -1
  78. package/lib/common/dispatchers.js +10 -1
  79. package/lib/common/errors.js +13 -3
  80. package/lib/common/file-system.js +13 -2
  81. package/lib/common/header.js +3 -0
  82. package/lib/common/helpers.js +89 -3
  83. package/lib/common/host-info.js +4 -0
  84. package/lib/common/http-client.js +20 -0
  85. package/lib/common/logger/appenders/cli-appender.js +4 -0
  86. package/lib/common/logger/appenders/emit-appender.js +4 -0
  87. package/lib/common/logger/layouts/cli-layout.js +1 -0
  88. package/lib/common/logger/logger.js +5 -0
  89. package/lib/common/messages/messages.js +6 -0
  90. package/lib/common/mobile/android/android-application-manager.js +20 -1
  91. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
  92. package/lib/common/mobile/android/android-debug-bridge.js +6 -0
  93. package/lib/common/mobile/android/android-device-file-system.js +4 -0
  94. package/lib/common/mobile/android/android-device-hash-service.js +3 -0
  95. package/lib/common/mobile/android/android-device.js +8 -0
  96. package/lib/common/mobile/android/android-emulator-services.js +2 -1
  97. package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
  98. package/lib/common/mobile/android/android-log-filter.js +4 -0
  99. package/lib/common/mobile/android/android-virtual-device-service.js +26 -0
  100. package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
  101. package/lib/common/mobile/android/genymotion/genymotion-service.js +5 -0
  102. package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
  103. package/lib/common/mobile/android/logcat-helper.js +20 -1
  104. package/lib/common/mobile/application-manager-base.js +6 -0
  105. package/lib/common/mobile/device-emitter.js +4 -0
  106. package/lib/common/mobile/device-log-emitter.js +1 -0
  107. package/lib/common/mobile/device-log-provider-base.js +1 -0
  108. package/lib/common/mobile/device-log-provider.js +23 -0
  109. package/lib/common/mobile/device-platforms-constants.js +1 -0
  110. package/lib/common/mobile/emulator-helper.js +3 -0
  111. package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
  112. package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
  113. package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
  114. package/lib/common/mobile/ios/device/ios-device.js +4 -0
  115. package/lib/common/mobile/ios/ios-device-base.js +1 -0
  116. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
  117. package/lib/common/mobile/ios/ios-log-filter.js +1 -0
  118. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
  119. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
  120. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
  121. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
  122. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
  123. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
  124. package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
  125. package/lib/common/mobile/log-filter.js +2 -0
  126. package/lib/common/mobile/logging-levels.js +1 -0
  127. package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
  128. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
  129. package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
  130. package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
  131. package/lib/common/mobile/mobile-core/devices-service.js +72 -3
  132. package/lib/common/mobile/mobile-core/ios-device-discovery.js +3 -1
  133. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
  134. package/lib/common/mobile/mobile-helper.js +2 -1
  135. package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
  136. package/lib/common/opener.js +1 -0
  137. package/lib/common/os-info.js +1 -0
  138. package/lib/common/plist-parser.js +1 -0
  139. package/lib/common/project-helper.js +1 -0
  140. package/lib/common/prompter.js +9 -1
  141. package/lib/common/queue.js +1 -0
  142. package/lib/common/resource-loader.js +1 -0
  143. package/lib/common/services/auto-completion-service.js +12 -1
  144. package/lib/common/services/cancellation.js +2 -1
  145. package/lib/common/services/commands-service.js +17 -6
  146. package/lib/common/services/help-service.js +11 -3
  147. package/lib/common/services/hooks-service.js +13 -0
  148. package/lib/common/services/ios-notification-service.js +1 -0
  149. package/lib/common/services/json-file-settings-service.js +6 -0
  150. package/lib/common/services/lock-service.js +6 -0
  151. package/lib/common/services/message-contract-generator.js +1 -0
  152. package/lib/common/services/messages-service.js +1 -0
  153. package/lib/common/services/micro-templating-service.js +6 -0
  154. package/lib/common/services/net-service.js +3 -0
  155. package/lib/common/services/project-files-manager.js +5 -0
  156. package/lib/common/services/project-files-provider-base.js +1 -0
  157. package/lib/common/services/proxy-service.js +1 -0
  158. package/lib/common/services/qr.js +1 -0
  159. package/lib/common/services/settings-service.js +1 -0
  160. package/lib/common/services/xcode-select-service.js +1 -0
  161. package/lib/common/utils.js +1 -0
  162. package/lib/common/validators/project-name-validator.js +1 -0
  163. package/lib/common/validators/validation-result.js +1 -0
  164. package/lib/common/verify-node-version.js +8 -1
  165. package/lib/common/yok.js +32 -11
  166. package/lib/config.js +22 -1
  167. package/lib/constants-provider.js +1 -0
  168. package/lib/constants.js +58 -5
  169. package/lib/controllers/build-controller.js +4 -3
  170. package/lib/controllers/debug-controller.js +8 -3
  171. package/lib/controllers/deploy-controller.js +1 -0
  172. package/lib/controllers/migrate-controller.js +91 -3
  173. package/lib/controllers/platform-controller.js +9 -1
  174. package/lib/controllers/prepare-controller.js +15 -5
  175. package/lib/controllers/run-controller.js +17 -1
  176. package/lib/controllers/update-controller-base.js +1 -0
  177. package/lib/controllers/update-controller.js +11 -0
  178. package/lib/data/build-data.js +1 -0
  179. package/lib/data/controller-data-base.js +1 -0
  180. package/lib/data/debug-data.js +1 -0
  181. package/lib/data/platform-data.js +1 -0
  182. package/lib/data/prepare-data.js +1 -0
  183. package/lib/data/run-data.js +1 -0
  184. package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
  185. package/lib/detached-processes/cleanup-process.js +18 -14
  186. package/lib/detached-processes/file-log-service.js +2 -1
  187. package/lib/device-path-provider.js +3 -2
  188. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
  189. package/lib/device-sockets/ios/notification.js +3 -0
  190. package/lib/device-sockets/ios/socket-request-executor.js +3 -0
  191. package/lib/helpers/android-bundle-validator-helper.js +2 -1
  192. package/lib/helpers/deploy-command-helper.js +1 -0
  193. package/lib/helpers/key-command-helper.js +4 -2
  194. package/lib/helpers/livesync-command-helper.js +5 -2
  195. package/lib/helpers/network-connectivity-validator.js +1 -0
  196. package/lib/helpers/options-track-helper.js +3 -2
  197. package/lib/helpers/package-path-helper.js +1 -0
  198. package/lib/helpers/platform-command-helper.js +7 -2
  199. package/lib/helpers/version-validator-helper.js +1 -0
  200. package/lib/key-commands/bootstrap.js +3 -2
  201. package/lib/key-commands/index.js +5 -4
  202. package/lib/nativescript-cli-lib-bootstrap.js +4 -0
  203. package/lib/nativescript-cli-lib.js +1 -0
  204. package/lib/nativescript-cli.js +10 -1
  205. package/lib/node/pbxproj-dom-xcode.js +1 -0
  206. package/lib/node/xcode.js +1 -0
  207. package/lib/node-package-manager.js +11 -1
  208. package/lib/options.js +141 -115
  209. package/lib/package-installation-manager.js +8 -1
  210. package/lib/package-manager.js +2 -0
  211. package/lib/platform-command-param.js +1 -0
  212. package/lib/pnpm-package-manager.js +4 -1
  213. package/lib/project-data.js +12 -0
  214. package/lib/providers/project-files-provider.js +1 -0
  215. package/lib/resolvers/livesync-service-resolver.js +2 -1
  216. package/lib/services/analytics/analytics-broker-process.js +10 -6
  217. package/lib/services/analytics/analytics-broker.js +2 -1
  218. package/lib/services/analytics/analytics-service.js +29 -25
  219. package/lib/services/analytics/google-analytics-provider.js +13 -12
  220. package/lib/services/analytics-settings-service.js +5 -0
  221. package/lib/services/android/android-bundle-tool-service.js +1 -0
  222. package/lib/services/android/gradle-build-args-service.js +3 -0
  223. package/lib/services/android/gradle-build-service.js +1 -0
  224. package/lib/services/android/gradle-command-service.js +1 -0
  225. package/lib/services/android-device-debug-service.js +6 -0
  226. package/lib/services/android-plugin-build-service.js +28 -0
  227. package/lib/services/android-project-service.js +71 -4
  228. package/lib/services/android-resources-migration-service.js +7 -0
  229. package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
  230. package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
  231. package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
  232. package/lib/services/assets-generation/assets-generation-service.js +16 -5
  233. package/lib/services/build-artifacts-service.js +2 -1
  234. package/lib/services/build-data-service.js +2 -1
  235. package/lib/services/build-info-file-service.js +1 -0
  236. package/lib/services/cleanup-service.js +13 -9
  237. package/lib/services/cocoapods-platform-manager.js +9 -0
  238. package/lib/services/cocoapods-service.js +21 -1
  239. package/lib/services/debug-data-service.js +1 -0
  240. package/lib/services/debug-service-base.js +7 -0
  241. package/lib/services/device/device-install-app-service.js +2 -1
  242. package/lib/services/doctor-service.js +21 -6
  243. package/lib/services/extensibility-service.js +8 -0
  244. package/lib/services/files-hash-service.js +1 -0
  245. package/lib/services/hmr-status-service.js +2 -0
  246. package/lib/services/info-service.js +1 -0
  247. package/lib/services/initialize-service.js +5 -1
  248. package/lib/services/ios/export-options-plist-service.js +4 -0
  249. package/lib/services/ios/ios-signing-service.js +4 -0
  250. package/lib/services/ios/spm-service.js +10 -1
  251. package/lib/services/ios/xcodebuild-args-service.js +13 -4
  252. package/lib/services/ios/xcodebuild-command-service.js +1 -0
  253. package/lib/services/ios/xcodebuild-service.js +1 -0
  254. package/lib/services/ios-debugger-port-service.js +1 -0
  255. package/lib/services/ios-device-debug-service.js +1 -0
  256. package/lib/services/ios-entitlements-service.js +1 -0
  257. package/lib/services/ios-extensions-service.js +1 -0
  258. package/lib/services/ios-log-filter.js +20 -0
  259. package/lib/services/ios-native-target-service.js +6 -4
  260. package/lib/services/ios-project-service.js +29 -7
  261. package/lib/services/ios-provision-service.js +3 -0
  262. package/lib/services/ios-watch-app-service.js +1 -0
  263. package/lib/services/ip-service.js +2 -0
  264. package/lib/services/itmstransporter-service.js +1 -0
  265. package/lib/services/karma-execution.js +2 -0
  266. package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
  267. package/lib/services/livesync/android-device-livesync-service.js +2 -0
  268. package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
  269. package/lib/services/livesync/android-livesync-service.js +1 -0
  270. package/lib/services/livesync/android-livesync-tool.js +4 -0
  271. package/lib/services/livesync/device-livesync-service-base.js +2 -0
  272. package/lib/services/livesync/ios-device-livesync-service.js +7 -0
  273. package/lib/services/livesync/ios-livesync-service.js +2 -0
  274. package/lib/services/livesync/livesync-socket.js +1 -0
  275. package/lib/services/livesync/platform-livesync-service-base.js +5 -0
  276. package/lib/services/livesync-process-data-service.js +1 -0
  277. package/lib/services/log-parser-service.js +1 -0
  278. package/lib/services/log-source-map-service.js +15 -0
  279. package/lib/services/marking-mode-service.js +8 -5
  280. package/lib/services/metadata-filtering-service.js +1 -0
  281. package/lib/services/npm-config-service.js +4 -0
  282. package/lib/services/pacote-service.js +7 -0
  283. package/lib/services/performance-service.js +3 -1
  284. package/lib/services/platform/add-platform-service.js +47 -2
  285. package/lib/services/platform/platform-validation-service.js +1 -0
  286. package/lib/services/platform/prepare-native-platform-service.js +5 -2
  287. package/lib/services/platform-environment-requirements.js +8 -3
  288. package/lib/services/platform-project-service-base.js +1 -0
  289. package/lib/services/platforms-data-service.js +1 -0
  290. package/lib/services/plugins-service.js +18 -2
  291. package/lib/services/prepare-data-service.js +2 -1
  292. package/lib/services/project-backup-service.js +4 -0
  293. package/lib/services/project-changes-service.js +12 -3
  294. package/lib/services/project-cleanup-service.js +2 -0
  295. package/lib/services/project-config-service.js +18 -1
  296. package/lib/services/project-data-service.js +36 -7
  297. package/lib/services/project-name-service.js +1 -0
  298. package/lib/services/project-service.js +10 -0
  299. package/lib/services/project-templates-service.js +3 -2
  300. package/lib/services/qr-code-terminal-service.js +1 -0
  301. package/lib/services/require-service.js +1 -0
  302. package/lib/services/start-service.js +1 -0
  303. package/lib/services/temp-service.js +1 -0
  304. package/lib/services/terminal-spinner-service.js +2 -0
  305. package/lib/services/test-execution-service.js +9 -2
  306. package/lib/services/test-initialization-service.js +4 -0
  307. package/lib/services/timeline-profiler-service.js +1 -0
  308. package/lib/services/user-settings-service.js +1 -0
  309. package/lib/services/versions-service.js +6 -4
  310. package/lib/services/watch-ignore-list-service.js +1 -0
  311. package/lib/services/webpack/webpack-compiler-service.js +42 -1
  312. package/lib/services/xcconfig-service.js +2 -0
  313. package/lib/services/xcproj-service.js +1 -0
  314. package/lib/shared-event-bus.js +6 -0
  315. package/lib/sys-info.js +2 -1
  316. package/lib/tools/config-manipulation/config-transformer.js +12 -0
  317. package/lib/tools/node-modules/node-modules-builder.js +1 -0
  318. package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
  319. package/lib/yarn-package-manager.js +1 -0
  320. package/lib/yarn2-package-manager.js +3 -0
  321. package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
  322. package/node_modules/rimraf/CHANGELOG.md +65 -0
  323. package/node_modules/stringify-package/CHANGELOG.md +16 -0
  324. package/package.json +1 -1
@@ -74,3 +74,4 @@ IOSWatchAppService.WATCH_APP_IDENTIFIER = "watchkitapp";
74
74
  IOSWatchAppService.WACTCH_EXTENSION_IDENTIFIER = "watchkitextension";
75
75
  exports.IOSWatchAppService = IOSWatchAppService;
76
76
  yok_1.injector.register("iOSWatchAppService", IOSWatchAppService);
77
+ //# sourceMappingURL=ios-watch-app-service.js.map
@@ -52,6 +52,7 @@ class IPService {
52
52
  }
53
53
  getIPAddressFromIpifyOrgAPI() {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ // https://www.ipify.org/
55
56
  const ipifyOrgAPIEndpoint = "https://api.ipify.org";
56
57
  let ipAddress = null;
57
58
  try {
@@ -76,3 +77,4 @@ __decorate([
76
77
  ], IPService.prototype, "getCurrentIPv4Address", null);
77
78
  exports.IPService = IPService;
78
79
  yok_1.injector.register("ipService", IPService);
80
+ //# sourceMappingURL=ip-service.js.map
@@ -214,3 +214,4 @@ __decorate([
214
214
  ], ITMSTransporterService.prototype, "getITMSTransporterPath", null);
215
215
  exports.ITMSTransporterService = ITMSTransporterService;
216
216
  yok_1.injector.register("itmsTransporterService", ITMSTransporterService);
217
+ //# sourceMappingURL=itmstransporter-service.js.map
@@ -9,8 +9,10 @@ process.on("message", (data) => {
9
9
  });
10
10
  const KarmaServer = require(path.join(pathToKarma, "lib/server"));
11
11
  const karma = new KarmaServer(data.karmaConfig, (exitCode) => {
12
+ // Exit with the correct exit code and signal the manager process.
12
13
  process.exit(exitCode);
13
14
  });
14
15
  karma.start();
15
16
  }
16
17
  });
18
+ //# sourceMappingURL=karma-execution.js.map
@@ -66,3 +66,4 @@ class AndroidDeviceLiveSyncServiceBase extends device_livesync_service_base_1.De
66
66
  }
67
67
  }
68
68
  exports.AndroidDeviceLiveSyncServiceBase = AndroidDeviceLiveSyncServiceBase;
69
+ //# sourceMappingURL=android-device-livesync-service-base.js.map
@@ -119,6 +119,7 @@ class AndroidDeviceLiveSyncService extends android_device_livesync_service_base_
119
119
  ]);
120
120
  const regex = new RegExp(`^-.*${deviceRootBasename}$`, "m");
121
121
  const matchingFile = (listResult || "").match(regex);
122
+ // Check if there is already a file with deviceRootBasename. If so, delete it as it breaks LiveSyncing.
122
123
  if (matchingFile && matchingFile[0] && _.startsWith(matchingFile[0], "-")) {
123
124
  yield this.device.adb.executeShellCommand(["rm", "-f", deviceRootPath]);
124
125
  }
@@ -201,3 +202,4 @@ __decorate([
201
202
  (0, decorators_1.performanceLog)()
202
203
  ], AndroidDeviceLiveSyncService.prototype, "removeFiles", null);
203
204
  exports.AndroidDeviceLiveSyncService = AndroidDeviceLiveSyncService;
205
+ //# sourceMappingURL=android-device-livesync-service.js.map
@@ -112,6 +112,8 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
112
112
  yield this.$cleanupService.removeCleanupCommand(cleanupCommand);
113
113
  });
114
114
  yield this.$cleanupService.addCleanupCommand(cleanupCommand);
115
+ // We need to clear resources when the action fails
116
+ // But we also need the real result of the action.
115
117
  yield doSyncPromise.then(actionOnEnd.bind(this), actionOnEnd.bind(this));
116
118
  result = yield doSyncPromise;
117
119
  }
@@ -196,3 +198,4 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
196
198
  AndroidDeviceSocketsLiveSyncService.STATUS_UPDATE_INTERVAL = 10000;
197
199
  AndroidDeviceSocketsLiveSyncService.MINIMAL_VERSION_LONG_LIVING_CONNECTION = "0.2.0";
198
200
  exports.AndroidDeviceSocketsLiveSyncService = AndroidDeviceSocketsLiveSyncService;
201
+ //# sourceMappingURL=android-device-livesync-sockets-service.js.map
@@ -74,3 +74,4 @@ __decorate([
74
74
  ], AndroidLiveSyncService.prototype, "fullSync", null);
75
75
  exports.AndroidLiveSyncService = AndroidLiveSyncService;
76
76
  yok_1.injector.register("androidLiveSyncService", AndroidLiveSyncService);
77
+ //# sourceMappingURL=android-livesync-service.js.map
@@ -159,9 +159,12 @@ class AndroidLivesyncTool {
159
159
  error =
160
160
  error ||
161
161
  this.getErrorWithMessage("Socket connection ended before sync operation is complete.");
162
+ //remove listeners and delete this.socketConnection
162
163
  this.cleanState(socketUid);
164
+ //call end of the connection (close and error callbacks won't be called - listeners removed)
163
165
  socket.end();
164
166
  socket.destroy();
167
+ //reject all pending sync requests and clear timeouts
165
168
  this.rejectPendingSyncOperations(socketUid, error);
166
169
  }
167
170
  }
@@ -425,3 +428,4 @@ AndroidLivesyncTool.SOCKET_CONNECTION_TIMED_OUT_ERROR = "Socket connection timed
425
428
  AndroidLivesyncTool.NO_SOCKET_CONNECTION_AVAILABLE_ERROR = "No socket connection available.";
426
429
  exports.AndroidLivesyncTool = AndroidLivesyncTool;
427
430
  yok_1.injector.register("androidLivesyncTool", AndroidLivesyncTool);
431
+ //# sourceMappingURL=android-livesync-tool.js.map
@@ -52,6 +52,7 @@ class DeviceLiveSyncServiceBase {
52
52
  }
53
53
  finalizeSync(liveSyncInfo, projectData) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ //implement in case a sync point for all remove/create operation is needed
55
56
  return {
56
57
  didRefresh: true,
57
58
  operationId: "",
@@ -67,3 +68,4 @@ __decorate([
67
68
  (0, decorators_2.performanceLog)()
68
69
  ], DeviceLiveSyncServiceBase.prototype, "transferFiles", null);
69
70
  exports.DeviceLiveSyncServiceBase = DeviceLiveSyncServiceBase;
71
+ //# sourceMappingURL=device-livesync-service-base.js.map
@@ -47,11 +47,13 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
47
47
  }
48
48
  setupSocketIfNeeded(projectData) {
49
49
  return __awaiter(this, void 0, void 0, function* () {
50
+ // TODO: persist the sockets per app in order to support LiveSync on multiple apps on the same device
50
51
  if (this.socket) {
51
52
  return true;
52
53
  }
53
54
  const appId = projectData.projectIdentifiers.ios;
54
55
  try {
56
+ // TODO: temp workaround till we setup the sockets along with the app start
55
57
  const ensureAppStarted = true;
56
58
  this.socket = yield this.device.getDebugSocket(appId, projectData.projectName, projectData.projectDir, ensureAppStarted);
57
59
  }
@@ -143,6 +145,7 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
143
145
  projectDir: projectData.projectDir,
144
146
  });
145
147
  if (liveSyncInfo.useHotModuleReload) {
148
+ // enable HOT updates
146
149
  yield this.setupSocketIfNeeded(projectData);
147
150
  }
148
151
  });
@@ -205,6 +208,9 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
205
208
  destroySocket() {
206
209
  return __awaiter(this, void 0, void 0, function* () {
207
210
  if (this.socket) {
211
+ // we do not support LiveSync on multiple apps on the same device
212
+ // in order to do that, we should cache the socket per app
213
+ // and destroy just the current app socket when possible
208
214
  yield this.device.destroyAllSockets();
209
215
  this.socket = null;
210
216
  }
@@ -216,3 +222,4 @@ __decorate([
216
222
  (0, decorators_1.performanceLog)()
217
223
  ], IOSDeviceLiveSyncService.prototype, "removeFiles", null);
218
224
  exports.IOSDeviceLiveSyncService = IOSDeviceLiveSyncService;
225
+ //# sourceMappingURL=ios-device-livesync-service.js.map
@@ -73,6 +73,7 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
73
73
  syncAfterInstall(device, liveSyncInfo) {
74
74
  return __awaiter(this, void 0, void 0, function* () {
75
75
  if (!device.isEmulator) {
76
+ // In this case we should execute fullsync because iOS Runtime requires the full content of app dir to be extracted in the root of sync dir.
76
77
  yield this.fullSync({
77
78
  projectData: liveSyncInfo.projectData,
78
79
  device,
@@ -93,3 +94,4 @@ __decorate([
93
94
  ], IOSLiveSyncService.prototype, "fullSync", null);
94
95
  exports.IOSLiveSyncService = IOSLiveSyncService;
95
96
  yok_1.injector.register("iOSLiveSyncService", IOSLiveSyncService);
97
+ //# sourceMappingURL=ios-livesync-service.js.map
@@ -12,3 +12,4 @@ class LiveSyncSocket extends net.Socket {
12
12
  }
13
13
  exports.LiveSyncSocket = LiveSyncSocket;
14
14
  yok_1.injector.register("LiveSyncSocket", LiveSyncSocket, false);
15
+ //# sourceMappingURL=livesync-socket.js.map
@@ -51,6 +51,7 @@ class PlatformLiveSyncServiceBase {
51
51
  }
52
52
  syncAfterInstall(device, liveSyncInfo) {
53
53
  return __awaiter(this, void 0, void 0, function* () {
54
+ /* intentionally left blank */
54
55
  });
55
56
  }
56
57
  restartApplication(projectData, liveSyncInfo) {
@@ -104,6 +105,8 @@ class PlatformLiveSyncServiceBase {
104
105
  let modifiedLocalToDevicePaths = [];
105
106
  if (liveSyncInfo.filesToSync.length) {
106
107
  const filesToSync = liveSyncInfo.filesToSync;
108
+ // const mappedFiles = _.map(filesToSync, filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData));
109
+ // Some plugins modify platforms dir on afterPrepare (check nativescript-dev-sass) - we want to sync only existing file.
107
110
  const existingFiles = filesToSync.filter((m) => m && this.$fs.exists(m));
108
111
  this.$logger.trace("Will execute livesync for files: ", existingFiles);
109
112
  const skippedFiles = _.difference(filesToSync, existingFiles);
@@ -122,6 +125,7 @@ class PlatformLiveSyncServiceBase {
122
125
  const filePaths = liveSyncInfo.filesToRemove;
123
126
  const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
124
127
  const mappedFiles = _(filePaths)
128
+ // .map(filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData))
125
129
  .filter((filePath) => !!filePath)
126
130
  .value();
127
131
  const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants_1.APP_FOLDER_NAME);
@@ -178,3 +182,4 @@ __decorate([
178
182
  (0, decorators_1.performanceLog)()
179
183
  ], PlatformLiveSyncServiceBase.prototype, "liveSyncWatchAction", null);
180
184
  exports.PlatformLiveSyncServiceBase = PlatformLiveSyncServiceBase;
185
+ //# sourceMappingURL=platform-livesync-service-base.js.map
@@ -41,3 +41,4 @@ class LiveSyncProcessDataService {
41
41
  }
42
42
  exports.LiveSyncProcessDataService = LiveSyncProcessDataService;
43
43
  yok_1.injector.register("liveSyncProcessDataService", LiveSyncProcessDataService);
44
+ //# sourceMappingURL=livesync-process-data-service.js.map
@@ -50,3 +50,4 @@ __decorate([
50
50
  ], LogParserService.prototype, "startParsingLogCore", null);
51
51
  exports.LogParserService = LogParserService;
52
52
  yok_1.injector.register("logParserService", LogParserService);
53
+ //# sourceMappingURL=log-parser-service.js.map
@@ -40,6 +40,7 @@ class LogSourceMapService {
40
40
  if (!this.$fs.getFsStats(filePath).isDirectory()) {
41
41
  const mapFile = filePath + ".map";
42
42
  let sourceMapRaw;
43
+ // Skip files bigger than 50MB
43
44
  if (this.$fs.getFileSize(filePath) > 50 * 1000 * 1000) {
44
45
  this.$logger.trace(`Skipping source map for file ${filePath} because it is too big (> 50MB).`);
45
46
  return;
@@ -165,6 +166,8 @@ class LogSourceMapService {
165
166
  }
166
167
  }
167
168
  parseAndroidLog(projectData, rawMessage) {
169
+ // "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap (file:///data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
170
+ // "System.err: File: "file:///data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
168
171
  const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
169
172
  const deviceProjectPath = util.format(constants_1.ANDROID_DEVICE_APP_ROOT_TEMPLATE, projectData.projectIdentifiers.android);
170
173
  let separator = ",";
@@ -172,18 +175,25 @@ class LogSourceMapService {
172
175
  let parts, filePath, line, column, messagePrefix;
173
176
  if (fileIndex >= 0) {
174
177
  const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
178
+ //"data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
175
179
  parts = fileSubstring.split(separator);
176
180
  if (parts.length >= 3) {
181
+ // "data/data/org.nativescript.sourceMap/files/app/bundle.js"
177
182
  parts[0] = parts[0].replace("'", "");
183
+ // " line: 304"
178
184
  parts[1] = parts[1].replace(" line: ", "");
185
+ // " column: 8"
179
186
  parts[2] = parts[2].replace(" column: ", "");
180
187
  }
181
188
  else {
189
+ // "data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
182
190
  separator = ":";
183
191
  parts = fileSubstring.split(separator);
184
192
  }
185
193
  if (parts.length >= 3) {
194
+ // "/data/data/org.nativescript.sourceMap/files/app/"
186
195
  const devicePath = `${deviceProjectPath}/${constants_1.APP_FOLDER_NAME}/`;
196
+ // "bundle.js"
187
197
  filePath = path.relative(devicePath, `${"/"}${parts[0]}`);
188
198
  line = parseInt(parts[1]);
189
199
  column = parseInt(parts[2]);
@@ -191,20 +201,24 @@ class LogSourceMapService {
191
201
  for (let i = 3; i < parts.length; i++) {
192
202
  messageSuffix += `${parts[i]}${i === parts.length - 1 ? "" : separator}`;
193
203
  }
204
+ // "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap ("
194
205
  messagePrefix = _.trimEnd(messagePrefix, "(");
195
206
  }
196
207
  }
197
208
  return { filePath, line, column, messagePrefix, messageSuffix };
198
209
  }
199
210
  parseIosLog(rawMessage) {
211
+ // "CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
200
212
  const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
201
213
  let messageSuffix = "";
202
214
  let parts, filePath, line, column, messagePrefix;
203
215
  if (fileIndex >= 0) {
216
+ // "app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
204
217
  const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
205
218
  parts = fileSubstring.split(":");
206
219
  if (parts && parts.length >= 3) {
207
220
  filePath = parts[0];
221
+ // "app/vendor.js"
208
222
  if (_.startsWith(filePath, constants_1.APP_FOLDER_NAME)) {
209
223
  filePath = path.relative(constants_1.APP_FOLDER_NAME, parts[0]);
210
224
  }
@@ -233,3 +247,4 @@ LogSourceMapService.FILE_PREFIX_REPLACEMENT = "file: ";
233
247
  LogSourceMapService.MEMOIZE_FUNCTION_RANDOM_KEY_FOR_JOIN = "__some_random_value__";
234
248
  exports.LogSourceMapService = LogSourceMapService;
235
249
  yok_1.injector.register("logSourceMapService", LogSourceMapService);
250
+ //# sourceMappingURL=log-source-map-service.js.map
@@ -15,7 +15,7 @@ const constants_1 = require("../constants");
15
15
  const yok_1 = require("../common/yok");
16
16
  const semver = require("semver/preload");
17
17
  const MARKING_MODE_PROP = "markingMode";
18
- const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full"}" is no longer supported.`;
18
+ const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full" /* MarkingMode.Full */}" is no longer supported.`;
19
19
  class MarkingModeService {
20
20
  constructor($logger, $projectConfigService, $projectHelper, $projectDataService) {
21
21
  this.$logger = $logger;
@@ -28,11 +28,13 @@ class MarkingModeService {
28
28
  const markingModeValue = this.$projectConfigService.getValue("android.markingMode");
29
29
  const { skipWarnings, forceSwitch } = options;
30
30
  if (forceSwitch) {
31
- yield this.setMarkingMode("none");
31
+ yield this.setMarkingMode("none" /* MarkingMode.None */);
32
32
  return;
33
33
  }
34
- if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none") {
35
- const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android");
34
+ if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none" /* MarkingMode.None */) {
35
+ // only warn if runtime is less than 7.0.0-rc.5 - where the default has been changed to None
36
+ // if version is null - we are about to add the latest runtime, so no need to warn
37
+ const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android" /* PlatformTypes.android */);
36
38
  const isMarkingModeFullDefault = version && semver.lt(semver.coerce(version), "7.0.0-rc.5");
37
39
  if (isMarkingModeFullDefault) {
38
40
  this.showMarkingModeFullWarning();
@@ -46,7 +48,7 @@ class MarkingModeService {
46
48
  });
47
49
  }
48
50
  showMarkingModeFullWarning() {
49
- const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${"full"}".${os_1.EOL}${os_1.EOL}${MARKING_MODE_FULL_DEPRECATION_MSG}${os_1.EOL}${os_1.EOL}You should update your marking mode by executing 'ns update --markingMode'.`;
51
+ const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${"full" /* MarkingMode.Full */}".${os_1.EOL}${os_1.EOL}${MARKING_MODE_FULL_DEPRECATION_MSG}${os_1.EOL}${os_1.EOL}You should update your marking mode by executing 'ns update --markingMode'.`;
50
52
  this.$logger.warn(markingModeFullWarning, {
51
53
  [constants_1.LoggerConfigData.wrapMessageWithBorders]: true,
52
54
  });
@@ -54,3 +56,4 @@ class MarkingModeService {
54
56
  }
55
57
  exports.MarkingModeService = MarkingModeService;
56
58
  yok_1.injector.register("markingModeService", MarkingModeService);
59
+ //# sourceMappingURL=marking-mode-service.js.map
@@ -103,3 +103,4 @@ class MetadataFilteringService {
103
103
  }
104
104
  exports.MetadataFilteringService = MetadataFilteringService;
105
105
  yok_1.injector.register("metadataFilteringService", MetadataFilteringService);
106
+ //# sourceMappingURL=metadata-filtering-service.js.map
@@ -21,8 +21,11 @@ class NpmConfigService {
21
21
  readConfig() {
22
22
  try {
23
23
  const res = (0, child_process_1.execSync)("npm config list --json --global");
24
+ // const data: any = npmconfig.read();
24
25
  const data = JSON.parse(res.toString());
26
+ // todo: remove if not needed with npm config list --json?
25
27
  Object.entries(data).forEach(([key, value]) => {
28
+ // replace env ${VARS} in strings with the process.env value
26
29
  this.config[key] =
27
30
  typeof value !== "string"
28
31
  ? value
@@ -37,3 +40,4 @@ __decorate([
37
40
  ], NpmConfigService.prototype, "readConfig", null);
38
41
  exports.NpmConfigService = NpmConfigService;
39
42
  yok_1.injector.register("npmConfigService", NpmConfigService);
43
+ //# sourceMappingURL=npm-config-service.js.map
@@ -33,6 +33,7 @@ class PacoteService {
33
33
  this.$proxyService = $proxyService;
34
34
  }
35
35
  get $packageManager() {
36
+ // need to be resolved here due to cyclic dependency
36
37
  return this.$injector.resolve("packageManager");
37
38
  }
38
39
  manifest(packageName, options) {
@@ -51,6 +52,8 @@ class PacoteService {
51
52
  }
52
53
  extractPackage(packageName, destinationDirectory, options) {
53
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ // strip: Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. More info: https://github.com/npm/node-tar/blob/e89c4d37519b1c20133a9f49d5f6b85fa34c203b/README.md
56
+ // C: Create an archive
54
57
  this.$logger.trace(`Calling pacoteService.extractPackage for packageName: '${packageName}', destinationDir: '${destinationDirectory}' and options: ${options}`);
55
58
  const extractOptions = { strip: 1, C: destinationDirectory };
56
59
  if (options) {
@@ -68,6 +71,7 @@ class PacoteService {
68
71
  });
69
72
  this.$logger.trace(`Creating extract tar stream with options: ${JSON.stringify(extractOptions, null, 2)}`);
70
73
  const destination = tar.x(extractOptions);
74
+ // Initiate the source
71
75
  const sourceStream = new stream_1.PassThrough();
72
76
  sourceStream.end(source);
73
77
  sourceStream.pipe(destination);
@@ -84,7 +88,9 @@ class PacoteService {
84
88
  }
85
89
  getPacoteBaseOptions() {
86
90
  return __awaiter(this, void 0, void 0, function* () {
91
+ // In case `tns create myapp --template https://github.com/NativeScript/template-hello-world.git` command is executed, pacote module throws an error if cache option is not provided.
87
92
  const cachePath = yield this.$packageManager.getCachePath();
93
+ // Add NPM Configuration to our Manifest options
88
94
  const npmConfig = this.$npmConfigService.getConfig();
89
95
  const pacoteOptions = _.extend(npmConfig, { cache: cachePath, Arborist: arborist_1.Arborist });
90
96
  const proxySettings = yield this.$proxyService.getCache();
@@ -107,3 +113,4 @@ __decorate([
107
113
  ], PacoteService.prototype, "$packageManager", null);
108
114
  exports.PacoteService = PacoteService;
109
115
  yok_1.injector.register("pacoteService", PacoteService);
116
+ //# sourceMappingURL=pacote-service.js.map
@@ -41,7 +41,7 @@ class PerformanceService {
41
41
  trackAnalyticsData(methodInfo, executionTime) {
42
42
  this.$analyticsService
43
43
  .trackEventActionInGoogleAnalytics({
44
- action: "Performance",
44
+ action: "Performance" /* TrackActionNames.Performance */,
45
45
  additionalData: methodInfo,
46
46
  value: executionTime,
47
47
  })
@@ -71,6 +71,7 @@ class PerformanceService {
71
71
  this.$logger.info(PerformanceService.LOG_MESSAGE_TEMPLATE, methodInfo, executionTime);
72
72
  }
73
73
  }
74
+ //removes any injected members of the arguments and excludes the options object even if it was renamed
74
75
  getJsonSanitizer() {
75
76
  const seen = new WeakSet();
76
77
  seen.add(this.$options);
@@ -90,3 +91,4 @@ PerformanceService.FAIL_LOG_MESSAGE_TEMPLATE = `Failed to log pefromance data in
90
91
  PerformanceService.MIN_NODE_PERFORMANCE_MODULE_VERSION = "8.5.0";
91
92
  exports.PerformanceService = PerformanceService;
92
93
  yok_1.injector.register("performanceService", PerformanceService);
94
+ //# sourceMappingURL=performance-service.js.map
@@ -21,7 +21,11 @@ const constants_1 = require("../../constants");
21
21
  const decorators_1 = require("../../common/decorators");
22
22
  const yok_1 = require("../../common/yok");
23
23
  class AddPlatformService {
24
- constructor($fs, $logger, $packageManager, $terminalSpinnerService, $analyticsService) {
24
+ constructor($fs, $logger,
25
+ // private $pacoteService: IPacoteService,
26
+ // private $projectDataService: IProjectDataService,
27
+ $packageManager, $terminalSpinnerService, $analyticsService // private $tempService: ITempService
28
+ ) {
25
29
  this.$fs = $fs;
26
30
  this.$logger = $logger;
27
31
  this.$packageManager = $packageManager;
@@ -33,9 +37,13 @@ class AddPlatformService {
33
37
  const spinner = this.$terminalSpinnerService.createSpinner();
34
38
  try {
35
39
  spinner.start();
40
+ // const frameworkDirPath = addPlatformData.frameworkPath ?
41
+ // await this.extractPackage(packageToInstall)
42
+ // : await this.installPackage(projectData.projectDir, packageToInstall);
36
43
  const frameworkDirPath = yield this.installPackage(projectData.projectDir, packageToInstall);
37
44
  const frameworkPackageJsonContent = this.$fs.readJson(path.join(frameworkDirPath, "..", "package.json"));
38
45
  const frameworkVersion = frameworkPackageJsonContent.version;
46
+ // await this.setPlatformVersion(platformData, projectData, frameworkVersion);
39
47
  yield this.trackPlatformVersion(frameworkVersion, platformData);
40
48
  if (!addPlatformData.nativePrepare ||
41
49
  !addPlatformData.nativePrepare.skipNativePrepare) {
@@ -58,10 +66,22 @@ class AddPlatformService {
58
66
  yield this.installPackage(projectData.projectDir, `${platformData.frameworkPackageName}@${frameworkVersion}`);
59
67
  });
60
68
  }
69
+ // private async extractPackage(pkg: string): Promise<string> {
70
+ // const downloadedPackagePath = await this.$tempService.mkdirSync(
71
+ // "runtimeDir"
72
+ // );
73
+ // await this.$pacoteService.extractPackage(pkg, downloadedPackagePath);
74
+ // const frameworkDir = path.join(
75
+ // downloadedPackagePath,
76
+ // PROJECT_FRAMEWORK_FOLDER_NAME
77
+ // );
78
+ // return path.resolve(frameworkDir);
79
+ // }
61
80
  installPackage(projectDir, packageName) {
62
81
  return __awaiter(this, void 0, void 0, function* () {
63
82
  const frameworkDir = this.resolveFrameworkDir(projectDir, packageName);
64
83
  if (frameworkDir && this.$fs.exists(frameworkDir)) {
84
+ // don't install if it's already installed
65
85
  return frameworkDir;
66
86
  }
67
87
  const installedPackage = yield this.$packageManager.install(packageName, projectDir, {
@@ -78,6 +98,30 @@ class AddPlatformService {
78
98
  }
79
99
  resolveFrameworkDir(projectDir, packageName) {
80
100
  try {
101
+ // strip version info if present <package>@1.2.3-rc.0 -> <package>
102
+ // tested cases:
103
+ // @nativescript/ios
104
+ // @nativescript/ios@1
105
+ // @nativescript/ios@1.2
106
+ // @nativescript/ios@1.2.3
107
+ // @nativescript/ios@1.2.3-
108
+ // @nativescript/ios@1.2.3-rc
109
+ // @nativescript/ios@1.2.3-rc.
110
+ // @nativescript/ios@1.2.3-rc.0
111
+ // @nativescript/ios@rc
112
+ // @nativescript/ios@^7.0.0
113
+ // @nativescript/ios@~7.0.0
114
+ // tns-ios
115
+ // tns-ios@1
116
+ // tns-ios@1.2
117
+ // tns-ios@1.2.3
118
+ // tns-ios@1.2.3-
119
+ // tns-ios@1.2.3-rc
120
+ // tns-ios@1.2.3-rc.
121
+ // tns-ios@1.2.3-rc.0
122
+ // tns-ios@rc
123
+ // tns-ios@^7.0.0
124
+ // tns-ios@~7.0.0
81
125
  packageName = packageName.replace(/(.+)@.+$/g, "$1");
82
126
  const frameworkDir = require
83
127
  .resolve(`${packageName}/package.json`, {
@@ -106,7 +150,7 @@ class AddPlatformService {
106
150
  trackPlatformVersion(frameworkVersion, platformData) {
107
151
  return __awaiter(this, void 0, void 0, function* () {
108
152
  yield this.$analyticsService.trackEventActionInGoogleAnalytics({
109
- action: "Add Platform",
153
+ action: "Add Platform" /* TrackActionNames.AddPlatform */,
110
154
  additionalData: `${platformData.platformNameLowerCase}${constants_1.AnalyticsEventLabelDelimiter}${frameworkVersion}`,
111
155
  });
112
156
  });
@@ -117,3 +161,4 @@ __decorate([
117
161
  ], AddPlatformService.prototype, "addNativePlatform", null);
118
162
  exports.AddPlatformService = AddPlatformService;
119
163
  yok_1.injector.register("addPlatformService", AddPlatformService);
164
+ //# sourceMappingURL=add-platform-service.js.map
@@ -83,3 +83,4 @@ class PlatformValidationService {
83
83
  }
84
84
  exports.PlatformValidationService = PlatformValidationService;
85
85
  yok_1.injector.register("platformValidationService", PlatformValidationService);
86
+ //# sourceMappingURL=platform-validation-service.js.map
@@ -56,19 +56,21 @@ class PrepareNativePlatformService {
56
56
  this.$metadataFilteringService.generateMetadataFilters(projectData, platformData.platformNameLowerCase);
57
57
  }
58
58
  platformData.platformProjectService.interpolateConfigurationFile(projectData);
59
- yield this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: "3" });
59
+ yield this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: "3" /* NativePlatformStatus.alreadyPrepared */ });
60
60
  return hasChanges;
61
61
  });
62
62
  }
63
63
  cleanProject(platformData, options) {
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
+ // android build artifacts need to be cleaned up
66
+ // when switching between debug, release and webpack builds
65
67
  if (platformData.platformNameLowerCase !== "android") {
66
68
  return;
67
69
  }
68
70
  const previousPrepareInfo = this.$projectChangesService.getPrepareInfo(platformData);
69
71
  if (!previousPrepareInfo ||
70
72
  previousPrepareInfo.nativePlatformStatus !==
71
- "3") {
73
+ "3" /* NativePlatformStatus.alreadyPrepared */) {
72
74
  return;
73
75
  }
74
76
  const { release: previousWasRelease } = previousPrepareInfo;
@@ -85,3 +87,4 @@ __decorate([
85
87
  ], PrepareNativePlatformService.prototype, "prepareNativePlatform", null);
86
88
  exports.PrepareNativePlatformService = PrepareNativePlatformService;
87
89
  yok_1.injector.register("prepareNativePlatformService", PrepareNativePlatformService);
90
+ //# sourceMappingURL=prepare-native-platform-service.js.map
@@ -20,7 +20,9 @@ const helpers_1 = require("../common/helpers");
20
20
  const os_1 = require("os");
21
21
  const yok_1 = require("../common/yok");
22
22
  class PlatformEnvironmentRequirements {
23
- constructor($doctorService, $errors, $analyticsService, $injector) {
23
+ constructor($doctorService, $errors, $analyticsService,
24
+ // @ts-ignore - required by the hook helper!
25
+ $injector) {
24
26
  this.$doctorService = $doctorService;
25
27
  this.$errors = $errors;
26
28
  this.$analyticsService = $analyticsService;
@@ -32,7 +34,7 @@ class PlatformEnvironmentRequirements {
32
34
  const selectedOption = null;
33
35
  if (process.env.NS_SKIP_ENV_CHECK) {
34
36
  yield this.$analyticsService.trackEventActionInGoogleAnalytics({
35
- action: "Check Environment Requirements",
37
+ action: "Check Environment Requirements" /* TrackActionNames.CheckEnvironmentRequirements */,
36
38
  additionalData: "Skipped: NS_SKIP_ENV_CHECK is set",
37
39
  });
38
40
  return {
@@ -47,8 +49,9 @@ class PlatformEnvironmentRequirements {
47
49
  forceCheck: input.forceCheck,
48
50
  });
49
51
  if (!canExecute) {
52
+ // if (!isInteractive()) {
50
53
  yield this.$analyticsService.trackEventActionInGoogleAnalytics({
51
- action: "Check Environment Requirements",
54
+ action: "Check Environment Requirements" /* TrackActionNames.CheckEnvironmentRequirements */,
52
55
  additionalData: "Non-interactive terminal, unable to execute local builds.",
53
56
  });
54
57
  this.fail(this.getNonInteractiveConsoleMessage(platform));
@@ -69,6 +72,7 @@ class PlatformEnvironmentRequirements {
69
72
  ].join(os_1.EOL);
70
73
  }
71
74
  getEnvVerificationMessage(platform) {
75
+ // map process.platform to OS name used in docs
72
76
  const os = {
73
77
  linux: "linux",
74
78
  win32: "windows",
@@ -85,3 +89,4 @@ __decorate([
85
89
  ], PlatformEnvironmentRequirements.prototype, "checkEnvironmentRequirements", null);
86
90
  exports.PlatformEnvironmentRequirements = PlatformEnvironmentRequirements;
87
91
  yok_1.injector.register("platformEnvironmentRequirements", PlatformEnvironmentRequirements);
92
+ //# sourceMappingURL=platform-environment-requirements.js.map
@@ -30,3 +30,4 @@ class PlatformProjectServiceBase extends events_1.EventEmitter {
30
30
  }
31
31
  }
32
32
  exports.PlatformProjectServiceBase = PlatformProjectServiceBase;
33
+ //# sourceMappingURL=platform-project-service-base.js.map
@@ -29,3 +29,4 @@ class PlatformsDataService {
29
29
  }
30
30
  exports.PlatformsDataService = PlatformsDataService;
31
31
  yok_1.injector.register("platformsDataService", PlatformsDataService);
32
+ //# sourceMappingURL=platforms-data-service.js.map