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
@@ -38,6 +38,7 @@ class IPService {
38
38
  return ipAddress;
39
39
  }
40
40
  async getIPAddressFromIpifyOrgAPI() {
41
+ // https://www.ipify.org/
41
42
  const ipifyOrgAPIEndpoint = "https://api.ipify.org";
42
43
  let ipAddress = null;
43
44
  try {
@@ -61,3 +62,4 @@ __decorate([
61
62
  (0, decorators_1.cache)()
62
63
  ], IPService.prototype, "getCurrentIPv4Address", null);
63
64
  yok_1.injector.register("ipService", IPService);
65
+ //# sourceMappingURL=ip-service.js.map
@@ -191,3 +191,4 @@ __decorate([
191
191
  (0, decorators_1.cache)()
192
192
  ], ITMSTransporterService.prototype, "getITMSTransporterPath", null);
193
193
  yok_1.injector.register("itmsTransporterService", ITMSTransporterService);
194
+ //# 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
@@ -49,3 +49,4 @@ class AndroidDeviceLiveSyncServiceBase extends device_livesync_service_base_1.De
49
49
  }
50
50
  }
51
51
  exports.AndroidDeviceLiveSyncServiceBase = AndroidDeviceLiveSyncServiceBase;
52
+ //# sourceMappingURL=android-device-livesync-service-base.js.map
@@ -97,6 +97,7 @@ class AndroidDeviceLiveSyncService extends android_device_livesync_service_base_
97
97
  ]);
98
98
  const regex = new RegExp(`^-.*${deviceRootBasename}$`, "m");
99
99
  const matchingFile = (listResult || "").match(regex);
100
+ // Check if there is already a file with deviceRootBasename. If so, delete it as it breaks LiveSyncing.
100
101
  if (matchingFile && matchingFile[0] && _.startsWith(matchingFile[0], "-")) {
101
102
  await this.device.adb.executeShellCommand(["rm", "-f", deviceRootPath]);
102
103
  }
@@ -172,3 +173,4 @@ __decorate([
172
173
  __decorate([
173
174
  (0, decorators_1.performanceLog)()
174
175
  ], AndroidDeviceLiveSyncService.prototype, "removeFiles", null);
176
+ //# sourceMappingURL=android-device-livesync-service.js.map
@@ -95,6 +95,8 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
95
95
  await this.$cleanupService.removeCleanupCommand(cleanupCommand);
96
96
  };
97
97
  await this.$cleanupService.addCleanupCommand(cleanupCommand);
98
+ // We need to clear resources when the action fails
99
+ // But we also need the real result of the action.
98
100
  await doSyncPromise.then(actionOnEnd.bind(this), actionOnEnd.bind(this));
99
101
  result = await doSyncPromise;
100
102
  }
@@ -164,3 +166,4 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
164
166
  exports.AndroidDeviceSocketsLiveSyncService = AndroidDeviceSocketsLiveSyncService;
165
167
  AndroidDeviceSocketsLiveSyncService.STATUS_UPDATE_INTERVAL = 10000;
166
168
  AndroidDeviceSocketsLiveSyncService.MINIMAL_VERSION_LONG_LIVING_CONNECTION = "0.2.0";
169
+ //# sourceMappingURL=android-device-livesync-sockets-service.js.map
@@ -53,3 +53,4 @@ __decorate([
53
53
  (0, decorators_1.performanceLog)()
54
54
  ], AndroidLiveSyncService.prototype, "fullSync", null);
55
55
  yok_1.injector.register("androidLiveSyncService", AndroidLiveSyncService);
56
+ //# sourceMappingURL=android-livesync-service.js.map
@@ -140,9 +140,12 @@ class AndroidLivesyncTool {
140
140
  error =
141
141
  error ||
142
142
  this.getErrorWithMessage("Socket connection ended before sync operation is complete.");
143
+ //remove listeners and delete this.socketConnection
143
144
  this.cleanState(socketUid);
145
+ //call end of the connection (close and error callbacks won't be called - listeners removed)
144
146
  socket.end();
145
147
  socket.destroy();
148
+ //reject all pending sync requests and clear timeouts
146
149
  this.rejectPendingSyncOperations(socketUid, error);
147
150
  }
148
151
  }
@@ -404,3 +407,4 @@ AndroidLivesyncTool.SOCKET_CONNECTION_ALREADY_EXISTS_ERROR = "Socket connection
404
407
  AndroidLivesyncTool.SOCKET_CONNECTION_TIMED_OUT_ERROR = "Socket connection timed out.";
405
408
  AndroidLivesyncTool.NO_SOCKET_CONNECTION_AVAILABLE_ERROR = "No socket connection available.";
406
409
  yok_1.injector.register("androidLivesyncTool", AndroidLivesyncTool);
410
+ //# sourceMappingURL=android-livesync-tool.js.map
@@ -40,6 +40,7 @@ class DeviceLiveSyncServiceBase {
40
40
  return transferredFiles;
41
41
  }
42
42
  async finalizeSync(liveSyncInfo, projectData) {
43
+ //implement in case a sync point for all remove/create operation is needed
43
44
  return {
44
45
  didRefresh: true,
45
46
  operationId: "",
@@ -54,3 +55,4 @@ __decorate([
54
55
  __decorate([
55
56
  (0, decorators_2.performanceLog)()
56
57
  ], DeviceLiveSyncServiceBase.prototype, "transferFiles", null);
58
+ //# sourceMappingURL=device-livesync-service-base.js.map
@@ -37,11 +37,13 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
37
37
  return canRefresh;
38
38
  }
39
39
  async setupSocketIfNeeded(projectData) {
40
+ // TODO: persist the sockets per app in order to support LiveSync on multiple apps on the same device
40
41
  if (this.socket) {
41
42
  return true;
42
43
  }
43
44
  const appId = projectData.projectIdentifiers.ios;
44
45
  try {
46
+ // TODO: temp workaround till we setup the sockets along with the app start
45
47
  const ensureAppStarted = true;
46
48
  this.socket = await this.device.getDebugSocket(appId, projectData.projectName, projectData.projectDir, ensureAppStarted);
47
49
  }
@@ -121,6 +123,7 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
121
123
  projectDir: projectData.projectDir,
122
124
  });
123
125
  if (liveSyncInfo.useHotModuleReload) {
126
+ // enable HOT updates
124
127
  await this.setupSocketIfNeeded(projectData);
125
128
  }
126
129
  }
@@ -177,6 +180,9 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
177
180
  }
178
181
  async destroySocket() {
179
182
  if (this.socket) {
183
+ // we do not support LiveSync on multiple apps on the same device
184
+ // in order to do that, we should cache the socket per app
185
+ // and destroy just the current app socket when possible
180
186
  await this.device.destroyAllSockets();
181
187
  this.socket = null;
182
188
  }
@@ -187,3 +193,4 @@ IOSDeviceLiveSyncService.MIN_RUNTIME_VERSION_WITH_REFRESH_NOTIFICATION = "6.1.0"
187
193
  __decorate([
188
194
  (0, decorators_1.performanceLog)()
189
195
  ], IOSDeviceLiveSyncService.prototype, "removeFiles", null);
196
+ //# sourceMappingURL=ios-device-livesync-service.js.map
@@ -58,6 +58,7 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
58
58
  }
59
59
  async syncAfterInstall(device, liveSyncInfo) {
60
60
  if (!device.isEmulator) {
61
+ // 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.
61
62
  await this.fullSync({
62
63
  projectData: liveSyncInfo.projectData,
63
64
  device,
@@ -77,3 +78,4 @@ __decorate([
77
78
  (0, decorators_1.performanceLog)()
78
79
  ], IOSLiveSyncService.prototype, "fullSync", null);
79
80
  yok_1.injector.register("iOSLiveSyncService", IOSLiveSyncService);
81
+ //# 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
@@ -40,6 +40,7 @@ class PlatformLiveSyncServiceBase {
40
40
  return shouldRestart;
41
41
  }
42
42
  async syncAfterInstall(device, liveSyncInfo) {
43
+ /* intentionally left blank */
43
44
  }
44
45
  async restartApplication(projectData, liveSyncInfo) {
45
46
  const deviceLiveSyncService = this.getDeviceLiveSyncService(liveSyncInfo.deviceAppData.device, projectData);
@@ -85,6 +86,8 @@ class PlatformLiveSyncServiceBase {
85
86
  let modifiedLocalToDevicePaths = [];
86
87
  if (liveSyncInfo.filesToSync.length) {
87
88
  const filesToSync = liveSyncInfo.filesToSync;
89
+ // const mappedFiles = _.map(filesToSync, filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData));
90
+ // Some plugins modify platforms dir on afterPrepare (check nativescript-dev-sass) - we want to sync only existing file.
88
91
  const existingFiles = filesToSync.filter((m) => m && this.$fs.exists(m));
89
92
  this.$logger.trace("Will execute livesync for files: ", existingFiles);
90
93
  const skippedFiles = _.difference(filesToSync, existingFiles);
@@ -103,6 +106,7 @@ class PlatformLiveSyncServiceBase {
103
106
  const filePaths = liveSyncInfo.filesToRemove;
104
107
  const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
105
108
  const mappedFiles = _(filePaths)
109
+ // .map(filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData))
106
110
  .filter((filePath) => !!filePath)
107
111
  .value();
108
112
  const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants_1.APP_FOLDER_NAME);
@@ -154,3 +158,4 @@ exports.PlatformLiveSyncServiceBase = PlatformLiveSyncServiceBase;
154
158
  __decorate([
155
159
  (0, decorators_1.performanceLog)()
156
160
  ], PlatformLiveSyncServiceBase.prototype, "liveSyncWatchAction", null);
161
+ //# 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
  (0, decorators_1.cache)()
51
51
  ], LogParserService.prototype, "startParsingLogCore", null);
52
52
  yok_1.injector.register("logParserService", LogParserService);
53
+ //# sourceMappingURL=log-parser-service.js.map
@@ -31,6 +31,7 @@ class LogSourceMapService {
31
31
  if (!this.$fs.getFsStats(filePath).isDirectory()) {
32
32
  const mapFile = filePath + ".map";
33
33
  let sourceMapRaw;
34
+ // Skip files bigger than 50MB
34
35
  if (this.$fs.getFileSize(filePath) > 50 * 1000 * 1000) {
35
36
  this.$logger.trace(`Skipping source map for file ${filePath} because it is too big (> 50MB).`);
36
37
  return;
@@ -155,6 +156,8 @@ class LogSourceMapService {
155
156
  }
156
157
  }
157
158
  parseAndroidLog(projectData, rawMessage) {
159
+ // "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap (file:///data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
160
+ // "System.err: File: "file:///data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
158
161
  const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
159
162
  const deviceProjectPath = util.format(constants_1.ANDROID_DEVICE_APP_ROOT_TEMPLATE, projectData.projectIdentifiers.android);
160
163
  let separator = ",";
@@ -162,18 +165,25 @@ class LogSourceMapService {
162
165
  let parts, filePath, line, column, messagePrefix;
163
166
  if (fileIndex >= 0) {
164
167
  const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
168
+ //"data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
165
169
  parts = fileSubstring.split(separator);
166
170
  if (parts.length >= 3) {
171
+ // "data/data/org.nativescript.sourceMap/files/app/bundle.js"
167
172
  parts[0] = parts[0].replace("'", "");
173
+ // " line: 304"
168
174
  parts[1] = parts[1].replace(" line: ", "");
175
+ // " column: 8"
169
176
  parts[2] = parts[2].replace(" column: ", "");
170
177
  }
171
178
  else {
179
+ // "data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
172
180
  separator = ":";
173
181
  parts = fileSubstring.split(separator);
174
182
  }
175
183
  if (parts.length >= 3) {
184
+ // "/data/data/org.nativescript.sourceMap/files/app/"
176
185
  const devicePath = `${deviceProjectPath}/${constants_1.APP_FOLDER_NAME}/`;
186
+ // "bundle.js"
177
187
  filePath = path.relative(devicePath, `${"/"}${parts[0]}`);
178
188
  line = parseInt(parts[1]);
179
189
  column = parseInt(parts[2]);
@@ -181,20 +191,24 @@ class LogSourceMapService {
181
191
  for (let i = 3; i < parts.length; i++) {
182
192
  messageSuffix += `${parts[i]}${i === parts.length - 1 ? "" : separator}`;
183
193
  }
194
+ // "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap ("
184
195
  messagePrefix = _.trimEnd(messagePrefix, "(");
185
196
  }
186
197
  }
187
198
  return { filePath, line, column, messagePrefix, messageSuffix };
188
199
  }
189
200
  parseIosLog(rawMessage) {
201
+ // "CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
190
202
  const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
191
203
  let messageSuffix = "";
192
204
  let parts, filePath, line, column, messagePrefix;
193
205
  if (fileIndex >= 0) {
206
+ // "app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
194
207
  const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
195
208
  parts = fileSubstring.split(":");
196
209
  if (parts && parts.length >= 3) {
197
210
  filePath = parts[0];
211
+ // "app/vendor.js"
198
212
  if (_.startsWith(filePath, constants_1.APP_FOLDER_NAME)) {
199
213
  filePath = path.relative(constants_1.APP_FOLDER_NAME, parts[0]);
200
214
  }
@@ -223,3 +237,4 @@ LogSourceMapService.FILE_PREFIX = "file:///";
223
237
  LogSourceMapService.FILE_PREFIX_REPLACEMENT = "file: ";
224
238
  LogSourceMapService.MEMOIZE_FUNCTION_RANDOM_KEY_FOR_JOIN = "__some_random_value__";
225
239
  yok_1.injector.register("logSourceMapService", LogSourceMapService);
240
+ //# sourceMappingURL=log-source-map-service.js.map
@@ -6,7 +6,7 @@ const constants_1 = require("../constants");
6
6
  const yok_1 = require("../common/yok");
7
7
  const semver = require("semver/preload");
8
8
  const MARKING_MODE_PROP = "markingMode";
9
- const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full"}" is no longer supported.`;
9
+ const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full" /* MarkingMode.Full */}" is no longer supported.`;
10
10
  class MarkingModeService {
11
11
  constructor($logger, $projectConfigService, $projectHelper, $projectDataService) {
12
12
  this.$logger = $logger;
@@ -18,11 +18,13 @@ class MarkingModeService {
18
18
  const markingModeValue = this.$projectConfigService.getValue("android.markingMode");
19
19
  const { skipWarnings, forceSwitch } = options;
20
20
  if (forceSwitch) {
21
- await this.setMarkingMode("none");
21
+ await this.setMarkingMode("none" /* MarkingMode.None */);
22
22
  return;
23
23
  }
24
- if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none") {
25
- const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android");
24
+ if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none" /* MarkingMode.None */) {
25
+ // only warn if runtime is less than 7.0.0-rc.5 - where the default has been changed to None
26
+ // if version is null - we are about to add the latest runtime, so no need to warn
27
+ const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android" /* PlatformTypes.android */);
26
28
  const isMarkingModeFullDefault = version && semver.lt(semver.coerce(version), "7.0.0-rc.5");
27
29
  if (isMarkingModeFullDefault) {
28
30
  this.showMarkingModeFullWarning();
@@ -33,7 +35,7 @@ class MarkingModeService {
33
35
  await this.$projectConfigService.setValue("android.markingMode", newMode);
34
36
  }
35
37
  showMarkingModeFullWarning() {
36
- 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'.`;
38
+ 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'.`;
37
39
  this.$logger.warn(markingModeFullWarning, {
38
40
  [constants_1.LoggerConfigData.wrapMessageWithBorders]: true,
39
41
  });
@@ -41,3 +43,4 @@ class MarkingModeService {
41
43
  }
42
44
  exports.MarkingModeService = MarkingModeService;
43
45
  yok_1.injector.register("markingModeService", MarkingModeService);
46
+ //# 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
  (0, decorators_1.cache)()
38
41
  ], NpmConfigService.prototype, "readConfig", null);
39
42
  yok_1.injector.register("npmConfigService", NpmConfigService);
43
+ //# sourceMappingURL=npm-config-service.js.map
@@ -24,6 +24,7 @@ class PacoteService {
24
24
  this.$proxyService = $proxyService;
25
25
  }
26
26
  get $packageManager() {
27
+ // need to be resolved here due to cyclic dependency
27
28
  return this.$injector.resolve("packageManager");
28
29
  }
29
30
  async manifest(packageName, options) {
@@ -39,6 +40,8 @@ class PacoteService {
39
40
  return result;
40
41
  }
41
42
  async extractPackage(packageName, destinationDirectory, options) {
43
+ // 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
44
+ // C: Create an archive
42
45
  this.$logger.trace(`Calling pacoteService.extractPackage for packageName: '${packageName}', destinationDir: '${destinationDirectory}' and options: ${options}`);
43
46
  const extractOptions = { strip: 1, C: destinationDirectory };
44
47
  if (options) {
@@ -56,6 +59,7 @@ class PacoteService {
56
59
  });
57
60
  this.$logger.trace(`Creating extract tar stream with options: ${JSON.stringify(extractOptions, null, 2)}`);
58
61
  const destination = tar.x(extractOptions);
62
+ // Initiate the source
59
63
  const sourceStream = new stream_1.PassThrough();
60
64
  sourceStream.end(source);
61
65
  sourceStream.pipe(destination);
@@ -70,7 +74,9 @@ class PacoteService {
70
74
  });
71
75
  }
72
76
  async getPacoteBaseOptions() {
77
+ // In case `ns 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.
73
78
  const cachePath = await this.$packageManager.getCachePath();
79
+ // Add NPM Configuration to our Manifest options
74
80
  const npmConfig = this.$npmConfigService.getConfig();
75
81
  const pacoteOptions = _.extend(npmConfig, { cache: cachePath, Arborist: arborist_1.Arborist });
76
82
  const proxySettings = await this.$proxyService.getCache();
@@ -92,3 +98,4 @@ __decorate([
92
98
  (0, decorators_1.cache)()
93
99
  ], PacoteService.prototype, "$packageManager", null);
94
100
  yok_1.injector.register("pacoteService", PacoteService);
101
+ //# 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.LOG_MESSAGE_TEMPLATE = `Execution of method "%s" took %s ms.`
90
91
  PerformanceService.FAIL_LOG_MESSAGE_TEMPLATE = `Failed to log pefromance data in file for method %s.`;
91
92
  PerformanceService.MIN_NODE_PERFORMANCE_MODULE_VERSION = "8.5.0";
92
93
  yok_1.injector.register("performanceService", PerformanceService);
94
+ //# sourceMappingURL=performance-service.js.map
@@ -12,7 +12,11 @@ const constants_1 = require("../../constants");
12
12
  const decorators_1 = require("../../common/decorators");
13
13
  const yok_1 = require("../../common/yok");
14
14
  class AddPlatformService {
15
- constructor($fs, $logger, $options, $packageManager, $terminalSpinnerService, $analyticsService) {
15
+ constructor($fs, $logger, $options,
16
+ // private $pacoteService: IPacoteService,
17
+ // private $projectDataService: IProjectDataService,
18
+ $packageManager, $terminalSpinnerService, $analyticsService // private $tempService: ITempService
19
+ ) {
16
20
  this.$fs = $fs;
17
21
  this.$logger = $logger;
18
22
  this.$options = $options;
@@ -25,9 +29,13 @@ class AddPlatformService {
25
29
  const spinner = this.$terminalSpinnerService.createSpinner();
26
30
  try {
27
31
  spinner.start();
32
+ // const frameworkDirPath = addPlatformData.frameworkPath ?
33
+ // await this.extractPackage(packageToInstall)
34
+ // : await this.installPackage(projectData.projectDir, packageToInstall);
28
35
  const frameworkDirPath = await this.installPackage(projectData.projectDir, packageToInstall);
29
36
  const frameworkPackageJsonContent = this.$fs.readJson(path.join(frameworkDirPath, "..", "package.json"));
30
37
  const frameworkVersion = frameworkPackageJsonContent.version;
38
+ // await this.setPlatformVersion(platformData, projectData, frameworkVersion);
31
39
  await this.trackPlatformVersion(frameworkVersion, platformData);
32
40
  if (!addPlatformData.nativePrepare ||
33
41
  !addPlatformData.nativePrepare.skipNativePrepare) {
@@ -47,9 +55,21 @@ class AddPlatformService {
47
55
  async setPlatformVersion(platformData, projectData, frameworkVersion) {
48
56
  await this.installPackage(projectData.projectDir, `${platformData.frameworkPackageName}@${frameworkVersion}`);
49
57
  }
58
+ // private async extractPackage(pkg: string): Promise<string> {
59
+ // const downloadedPackagePath = await this.$tempService.mkdirSync(
60
+ // "runtimeDir"
61
+ // );
62
+ // await this.$pacoteService.extractPackage(pkg, downloadedPackagePath);
63
+ // const frameworkDir = path.join(
64
+ // downloadedPackagePath,
65
+ // PROJECT_FRAMEWORK_FOLDER_NAME
66
+ // );
67
+ // return path.resolve(frameworkDir);
68
+ // }
50
69
  async installPackage(projectDir, packageName) {
51
70
  const frameworkDir = this.resolveFrameworkDir(projectDir, packageName);
52
71
  if (frameworkDir && this.$fs.exists(frameworkDir)) {
72
+ // don't install if it's already installed
53
73
  return frameworkDir;
54
74
  }
55
75
  const installedPackage = await this.$packageManager.install(packageName, projectDir, {
@@ -65,6 +85,30 @@ class AddPlatformService {
65
85
  }
66
86
  resolveFrameworkDir(projectDir, packageName) {
67
87
  try {
88
+ // strip version info if present <package>@1.2.3-rc.0 -> <package>
89
+ // tested cases:
90
+ // @nativescript/ios
91
+ // @nativescript/ios@1
92
+ // @nativescript/ios@1.2
93
+ // @nativescript/ios@1.2.3
94
+ // @nativescript/ios@1.2.3-
95
+ // @nativescript/ios@1.2.3-rc
96
+ // @nativescript/ios@1.2.3-rc.
97
+ // @nativescript/ios@1.2.3-rc.0
98
+ // @nativescript/ios@rc
99
+ // @nativescript/ios@^7.0.0
100
+ // @nativescript/ios@~7.0.0
101
+ // tns-ios
102
+ // tns-ios@1
103
+ // tns-ios@1.2
104
+ // tns-ios@1.2.3
105
+ // tns-ios@1.2.3-
106
+ // tns-ios@1.2.3-rc
107
+ // tns-ios@1.2.3-rc.
108
+ // tns-ios@1.2.3-rc.0
109
+ // tns-ios@rc
110
+ // tns-ios@^7.0.0
111
+ // tns-ios@~7.0.0
68
112
  packageName = packageName.replace(/(.+)@.+$/g, "$1");
69
113
  const frameworkDir = require
70
114
  .resolve(`${packageName}/package.json`, {
@@ -82,8 +126,10 @@ class AddPlatformService {
82
126
  }
83
127
  async addNativePlatform(platformData, projectData, frameworkDirPath, frameworkVersion) {
84
128
  var _a;
129
+ // here we should use ios OR android
85
130
  const platformDir = (_a = this.$options.hostProjectPath) !== null && _a !== void 0 ? _a : path.join(projectData.platformsDir, platformData.normalizedPlatformName.toLowerCase());
86
131
  this.$fs.deleteDirectory(platformDir);
132
+ //if iosHost - dont create project
87
133
  await platformData.platformProjectService.createProject(path.resolve(frameworkDirPath), frameworkVersion, projectData);
88
134
  platformData.platformProjectService.ensureConfigurationFileInAppResources(projectData);
89
135
  await platformData.platformProjectService.interpolateData(projectData);
@@ -91,7 +137,7 @@ class AddPlatformService {
91
137
  }
92
138
  async trackPlatformVersion(frameworkVersion, platformData) {
93
139
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
94
- action: "Add Platform",
140
+ action: "Add Platform" /* TrackActionNames.AddPlatform */,
95
141
  additionalData: `${platformData.platformNameLowerCase}${constants_1.AnalyticsEventLabelDelimiter}${frameworkVersion}`,
96
142
  });
97
143
  }
@@ -101,3 +147,4 @@ __decorate([
101
147
  (0, decorators_1.performanceLog)()
102
148
  ], AddPlatformService.prototype, "addNativePlatform", null);
103
149
  yok_1.injector.register("addPlatformService", AddPlatformService);
150
+ //# sourceMappingURL=add-platform-service.js.map
@@ -72,3 +72,4 @@ class PlatformValidationService {
72
72
  }
73
73
  exports.PlatformValidationService = PlatformValidationService;
74
74
  yok_1.injector.register("platformValidationService", PlatformValidationService);
75
+ //# sourceMappingURL=platform-validation-service.js.map
@@ -49,17 +49,19 @@ class PrepareNativePlatformService {
49
49
  this.$metadataFilteringService.generateMetadataFilters(projectData, platformData.platformNameLowerCase);
50
50
  }
51
51
  platformData.platformProjectService.interpolateConfigurationFile(projectData);
52
- await this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: "3" });
52
+ await this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: "3" /* NativePlatformStatus.alreadyPrepared */ });
53
53
  return hasChanges;
54
54
  }
55
55
  async cleanProject(platformData, options) {
56
+ // android build artifacts need to be cleaned up
57
+ // when switching between debug, release and webpack builds
56
58
  if (platformData.platformNameLowerCase !== "android") {
57
59
  return;
58
60
  }
59
61
  const previousPrepareInfo = this.$projectChangesService.getPrepareInfo(platformData);
60
62
  if (!previousPrepareInfo ||
61
63
  previousPrepareInfo.nativePlatformStatus !==
62
- "3") {
64
+ "3" /* NativePlatformStatus.alreadyPrepared */) {
63
65
  return;
64
66
  }
65
67
  const { release: previousWasRelease } = previousPrepareInfo;
@@ -75,3 +77,4 @@ __decorate([
75
77
  (0, helpers_1.hook)("prepareNativeApp")
76
78
  ], PrepareNativePlatformService.prototype, "prepareNativePlatform", null);
77
79
  yok_1.injector.register("prepareNativePlatformService", PrepareNativePlatformService);
80
+ //# sourceMappingURL=prepare-native-platform-service.js.map
@@ -11,7 +11,9 @@ const helpers_1 = require("../common/helpers");
11
11
  const os_1 = require("os");
12
12
  const yok_1 = require("../common/yok");
13
13
  class PlatformEnvironmentRequirements {
14
- constructor($doctorService, $errors, $analyticsService, $injector) {
14
+ constructor($doctorService, $errors, $analyticsService,
15
+ // @ts-ignore - required by the hook helper!
16
+ $injector) {
15
17
  this.$doctorService = $doctorService;
16
18
  this.$errors = $errors;
17
19
  this.$analyticsService = $analyticsService;
@@ -22,7 +24,7 @@ class PlatformEnvironmentRequirements {
22
24
  const selectedOption = null;
23
25
  if (process.env.NS_SKIP_ENV_CHECK) {
24
26
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
25
- action: "Check Environment Requirements",
27
+ action: "Check Environment Requirements" /* TrackActionNames.CheckEnvironmentRequirements */,
26
28
  additionalData: "Skipped: NS_SKIP_ENV_CHECK is set",
27
29
  });
28
30
  return {
@@ -37,8 +39,9 @@ class PlatformEnvironmentRequirements {
37
39
  forceCheck: input.forceCheck,
38
40
  });
39
41
  if (!canExecute) {
42
+ // if (!isInteractive()) {
40
43
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
41
- action: "Check Environment Requirements",
44
+ action: "Check Environment Requirements" /* TrackActionNames.CheckEnvironmentRequirements */,
42
45
  additionalData: "Non-interactive terminal, unable to execute local builds.",
43
46
  });
44
47
  this.fail(this.getNonInteractiveConsoleMessage(platform));
@@ -58,6 +61,7 @@ class PlatformEnvironmentRequirements {
58
61
  ].join(os_1.EOL);
59
62
  }
60
63
  getEnvVerificationMessage(platform) {
64
+ // map process.platform to OS name used in docs
61
65
  const os = {
62
66
  linux: "linux",
63
67
  win32: "windows",
@@ -76,3 +80,4 @@ __decorate([
76
80
  (0, helpers_1.hook)("checkEnvironment")
77
81
  ], PlatformEnvironmentRequirements.prototype, "checkEnvironmentRequirements", null);
78
82
  yok_1.injector.register("platformEnvironmentRequirements", PlatformEnvironmentRequirements);
83
+ //# 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