nativescript 9.1.0-alpha.15 → 9.1.0-alpha.16

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 (344) hide show
  1. package/docs/build-jekyll-md.sh +1 -1
  2. package/docs/man_pages/config/config-set.md +2 -0
  3. package/lib/android-tools-info.js +0 -12
  4. package/lib/base-package-manager.js +0 -7
  5. package/lib/bootstrap.js +1 -5
  6. package/lib/bun-package-manager.js +1 -14
  7. package/lib/color.js +0 -4
  8. package/lib/commands/add-platform.js +0 -1
  9. package/lib/commands/apple-login.js +0 -1
  10. package/lib/commands/appstore-list.js +0 -1
  11. package/lib/commands/appstore-upload.js +0 -3
  12. package/lib/commands/build.js +3 -3
  13. package/lib/commands/clean.js +1 -22
  14. package/lib/commands/command-base.js +0 -1
  15. package/lib/commands/config.js +0 -5
  16. package/lib/commands/create-project.js +0 -6
  17. package/lib/commands/debug.js +2 -6
  18. package/lib/commands/deploy.js +3 -3
  19. package/lib/commands/embedding/embed.js +0 -7
  20. package/lib/commands/extensibility/install-extension.js +0 -1
  21. package/lib/commands/extensibility/list-extensions.js +0 -1
  22. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  23. package/lib/commands/fonts.js +0 -1
  24. package/lib/commands/generate-assets.js +0 -1
  25. package/lib/commands/generate-help.js +0 -1
  26. package/lib/commands/generate.js +1 -48
  27. package/lib/commands/hooks/common.js +1 -2
  28. package/lib/commands/hooks/hooks-lock.js +0 -1
  29. package/lib/commands/hooks/hooks.js +0 -1
  30. package/lib/commands/info.js +0 -1
  31. package/lib/commands/install.js +0 -1
  32. package/lib/commands/list-platforms.js +0 -1
  33. package/lib/commands/migrate.js +0 -1
  34. package/lib/commands/native-add.js +0 -5
  35. package/lib/commands/platform-clean.js +0 -1
  36. package/lib/commands/plugin/add-plugin.js +0 -1
  37. package/lib/commands/plugin/build-plugin.js +0 -1
  38. package/lib/commands/plugin/create-plugin.js +0 -5
  39. package/lib/commands/plugin/list-plugins.js +0 -1
  40. package/lib/commands/plugin/remove-plugin.js +0 -2
  41. package/lib/commands/plugin/update-plugin.js +0 -1
  42. package/lib/commands/post-install.js +0 -6
  43. package/lib/commands/prepare.js +5 -5
  44. package/lib/commands/preview.js +0 -2
  45. package/lib/commands/remove-platform.js +0 -1
  46. package/lib/commands/resources/resources-update.js +0 -2
  47. package/lib/commands/run.js +0 -1
  48. package/lib/commands/setup.js +0 -1
  49. package/lib/commands/start.js +0 -1
  50. package/lib/commands/test-init.js +0 -4
  51. package/lib/commands/test.js +3 -9
  52. package/lib/commands/typings.js +1 -2
  53. package/lib/commands/update-platform.js +0 -5
  54. package/lib/commands/update.js +0 -2
  55. package/lib/commands/widget.js +0 -18
  56. package/lib/common/bootstrap.js +0 -1
  57. package/lib/common/child-process.js +0 -3
  58. package/lib/common/codeGeneration/code-entity.js +0 -1
  59. package/lib/common/codeGeneration/code-printer.js +0 -1
  60. package/lib/common/command-params.js +0 -1
  61. package/lib/common/commands/analytics.js +0 -3
  62. package/lib/common/commands/autocompletion.js +0 -3
  63. package/lib/common/commands/device/device-log-stream.js +0 -1
  64. package/lib/common/commands/device/get-file.js +0 -2
  65. package/lib/common/commands/device/list-applications.js +0 -1
  66. package/lib/common/commands/device/list-devices.js +0 -3
  67. package/lib/common/commands/device/list-files.js +0 -2
  68. package/lib/common/commands/device/put-file.js +0 -2
  69. package/lib/common/commands/device/run-application.js +0 -1
  70. package/lib/common/commands/device/stop-application.js +0 -1
  71. package/lib/common/commands/device/uninstall-application.js +0 -1
  72. package/lib/common/commands/doctor.js +3 -3
  73. package/lib/common/commands/generate-messages.js +0 -1
  74. package/lib/common/commands/help.js +0 -1
  75. package/lib/common/commands/package-manager-get.js +0 -1
  76. package/lib/common/commands/package-manager-set.js +0 -1
  77. package/lib/common/commands/post-install.js +0 -1
  78. package/lib/common/commands/preuninstall.js +2 -11
  79. package/lib/common/commands/proxy/proxy-base.js +0 -4
  80. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  81. package/lib/common/commands/proxy/proxy-get.js +0 -1
  82. package/lib/common/commands/proxy/proxy-set.js +0 -1
  83. package/lib/common/common-lib.js +0 -1
  84. package/lib/common/constants.js +14 -12
  85. package/lib/common/declarations.d.ts +37 -117
  86. package/lib/common/decorators.js +0 -48
  87. package/lib/common/definitions/key-commands.js +8 -0
  88. package/lib/common/dispatchers.js +1 -10
  89. package/lib/common/enums.js +42 -0
  90. package/lib/common/errors.js +4 -13
  91. package/lib/common/file-system.js +2 -13
  92. package/lib/common/header.js +0 -3
  93. package/lib/common/helpers.js +3 -89
  94. package/lib/common/host-info.js +0 -4
  95. package/lib/common/http-client.js +0 -20
  96. package/lib/common/logger/appenders/cli-appender.js +0 -4
  97. package/lib/common/logger/appenders/emit-appender.js +0 -4
  98. package/lib/common/logger/layouts/cli-layout.js +0 -1
  99. package/lib/common/logger/logger.js +0 -5
  100. package/lib/common/messages/messages.js +0 -6
  101. package/lib/common/mobile/android/android-application-manager.js +1 -20
  102. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  103. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  104. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  105. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  106. package/lib/common/mobile/android/android-device.js +0 -8
  107. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  108. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  109. package/lib/common/mobile/android/android-log-filter.js +0 -4
  110. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  111. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  112. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  113. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  114. package/lib/common/mobile/android/logcat-helper.js +0 -13
  115. package/lib/common/mobile/application-manager-base.js +0 -6
  116. package/lib/common/mobile/device-emitter.js +0 -4
  117. package/lib/common/mobile/device-log-emitter.js +0 -1
  118. package/lib/common/mobile/device-log-provider-base.js +0 -1
  119. package/lib/common/mobile/device-log-provider.js +0 -23
  120. package/lib/common/mobile/device-platforms-constants.js +0 -1
  121. package/lib/common/mobile/emulator-helper.js +0 -3
  122. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  123. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -9
  124. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  125. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  126. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  127. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  128. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  129. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  130. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  131. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  132. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  133. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  134. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  135. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  136. package/lib/common/mobile/log-filter.js +0 -2
  137. package/lib/common/mobile/logging-levels.js +0 -1
  138. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  139. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  140. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  141. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  142. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  143. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  144. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  145. package/lib/common/mobile/mobile-helper.js +0 -1
  146. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  147. package/lib/common/opener.js +0 -1
  148. package/lib/common/os-info.js +0 -1
  149. package/lib/common/plist-parser.js +0 -1
  150. package/lib/common/project-helper.js +0 -1
  151. package/lib/common/prompter.js +1 -9
  152. package/lib/common/queue.js +0 -1
  153. package/lib/common/resource-loader.js +0 -1
  154. package/lib/common/services/analytics/google-analytics-custom-dimensions.js +13 -0
  155. package/lib/common/services/auto-completion-service.js +1 -13
  156. package/lib/common/services/cancellation.js +2 -2
  157. package/lib/common/services/commands-service.js +8 -17
  158. package/lib/common/services/help-service.js +4 -11
  159. package/lib/common/services/hooks-service.js +0 -13
  160. package/lib/common/services/ios-notification-service.js +0 -1
  161. package/lib/common/services/json-file-settings-service.js +0 -6
  162. package/lib/common/services/lock-service.js +0 -6
  163. package/lib/common/services/message-contract-generator.js +0 -1
  164. package/lib/common/services/messages-service.js +0 -1
  165. package/lib/common/services/micro-templating-service.js +0 -6
  166. package/lib/common/services/net-service.js +0 -3
  167. package/lib/common/services/project-files-manager.js +0 -5
  168. package/lib/common/services/project-files-provider-base.js +0 -1
  169. package/lib/common/services/proxy-service.js +0 -1
  170. package/lib/common/services/qr.js +0 -1
  171. package/lib/common/services/settings-service.js +0 -1
  172. package/lib/common/services/xcode-select-service.js +0 -1
  173. package/lib/common/utils.js +0 -1
  174. package/lib/common/validators/project-name-validator.js +0 -1
  175. package/lib/common/validators/validation-result.js +0 -1
  176. package/lib/common/verify-node-version.js +2 -8
  177. package/lib/common/yok.js +12 -32
  178. package/lib/config.js +1 -22
  179. package/lib/constants-provider.js +0 -1
  180. package/lib/constants.js +54 -58
  181. package/lib/controllers/build-controller.js +3 -4
  182. package/lib/controllers/debug-controller.js +3 -8
  183. package/lib/controllers/deploy-controller.js +0 -1
  184. package/lib/controllers/migrate-controller.js +4 -90
  185. package/lib/controllers/platform-controller.js +2 -9
  186. package/lib/controllers/prepare-controller.js +8 -24
  187. package/lib/controllers/run-controller.js +1 -81
  188. package/lib/controllers/update-controller-base.js +0 -1
  189. package/lib/controllers/update-controller.js +0 -11
  190. package/lib/data/build-data.js +0 -1
  191. package/lib/data/controller-data-base.js +0 -1
  192. package/lib/data/debug-data.js +0 -1
  193. package/lib/data/platform-data.js +0 -1
  194. package/lib/data/prepare-data.js +0 -1
  195. package/lib/data/run-data.js +0 -1
  196. package/lib/definitions/project.d.ts +1 -6
  197. package/lib/definitions/system-warnings.js +8 -0
  198. package/lib/detached-processes/cleanup-js-subprocess.js +3 -8
  199. package/lib/detached-processes/cleanup-process.js +15 -18
  200. package/lib/detached-processes/detached-process-enums.js +24 -0
  201. package/lib/detached-processes/file-log-service.js +2 -2
  202. package/lib/device-path-provider.js +0 -1
  203. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  204. package/lib/device-sockets/ios/notification.js +0 -3
  205. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  206. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  207. package/lib/helpers/deploy-command-helper.js +0 -1
  208. package/lib/helpers/key-command-helper.js +3 -4
  209. package/lib/helpers/livesync-command-helper.js +2 -4
  210. package/lib/helpers/network-connectivity-validator.js +0 -1
  211. package/lib/helpers/options-track-helper.js +4 -3
  212. package/lib/helpers/package-path-helper.js +0 -1
  213. package/lib/helpers/platform-command-helper.js +2 -7
  214. package/lib/helpers/version-validator-helper.js +0 -1
  215. package/lib/key-commands/bootstrap.js +3 -3
  216. package/lib/key-commands/index.js +5 -5
  217. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  218. package/lib/nativescript-cli-lib.js +0 -1
  219. package/lib/nativescript-cli.js +2 -11
  220. package/lib/node/pbxproj-dom-xcode.js +0 -1
  221. package/lib/node/xcode.js +0 -1
  222. package/lib/node-package-manager.js +1 -11
  223. package/lib/options.js +121 -145
  224. package/lib/package-installation-manager.js +1 -8
  225. package/lib/package-manager.js +0 -2
  226. package/lib/platform-command-param.js +0 -1
  227. package/lib/pnpm-package-manager.js +1 -4
  228. package/lib/project-data.js +0 -12
  229. package/lib/providers/project-files-provider.js +0 -1
  230. package/lib/resolvers/livesync-service-resolver.js +0 -1
  231. package/lib/services/analytics/analytics-broker-process.js +8 -10
  232. package/lib/services/analytics/analytics-broker.js +2 -2
  233. package/lib/services/analytics/analytics-service.js +29 -29
  234. package/lib/services/analytics/google-analytics-provider.js +16 -13
  235. package/lib/services/analytics-settings-service.js +0 -5
  236. package/lib/services/android/android-bundle-tool-service.js +0 -1
  237. package/lib/services/android/gradle-build-args-service.js +0 -3
  238. package/lib/services/android/gradle-build-service.js +0 -1
  239. package/lib/services/android/gradle-command-service.js +0 -1
  240. package/lib/services/android-device-debug-service.js +0 -6
  241. package/lib/services/android-plugin-build-service.js +2 -31
  242. package/lib/services/android-project-service.js +4 -71
  243. package/lib/services/android-resources-migration-service.js +0 -7
  244. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  245. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  246. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  247. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  248. package/lib/services/assets-generation/assets-generation-service.js +13 -11
  249. package/lib/services/build-artifacts-service.js +1 -2
  250. package/lib/services/build-data-service.js +0 -1
  251. package/lib/services/build-info-file-service.js +0 -1
  252. package/lib/services/bundler/bundler-compiler-service.js +1 -144
  253. package/lib/services/bundler/bundler.js +0 -1
  254. package/lib/services/cleanup-service.js +10 -13
  255. package/lib/services/cocoapods-platform-manager.js +0 -9
  256. package/lib/services/cocoapods-service.js +1 -21
  257. package/lib/services/debug-data-service.js +0 -1
  258. package/lib/services/debug-service-base.js +0 -7
  259. package/lib/services/device/device-install-app-service.js +1 -2
  260. package/lib/services/doctor-service.js +6 -21
  261. package/lib/services/extensibility-service.js +0 -8
  262. package/lib/services/files-hash-service.js +0 -1
  263. package/lib/services/hmr-status-service.js +0 -2
  264. package/lib/services/info-service.js +0 -1
  265. package/lib/services/initialize-service.js +2 -5
  266. package/lib/services/ios/export-options-plist-service.js +0 -4
  267. package/lib/services/ios/ios-signing-service.js +0 -4
  268. package/lib/services/ios/spm-service.js +0 -119
  269. package/lib/services/ios/xcodebuild-args-service.js +0 -29
  270. package/lib/services/ios/xcodebuild-command-service.js +0 -3
  271. package/lib/services/ios/xcodebuild-service.js +1 -2
  272. package/lib/services/ios-debugger-port-service.js +0 -1
  273. package/lib/services/ios-device-debug-service.js +0 -1
  274. package/lib/services/ios-entitlements-service.js +0 -1
  275. package/lib/services/ios-extensions-service.js +0 -1
  276. package/lib/services/ios-log-filter.js +0 -20
  277. package/lib/services/ios-native-target-service.js +5 -6
  278. package/lib/services/ios-project-service.js +7 -133
  279. package/lib/services/ios-provision-service.js +0 -3
  280. package/lib/services/ios-watch-app-service.js +10 -60
  281. package/lib/services/ip-service.js +0 -2
  282. package/lib/services/itmstransporter-service.js +0 -1
  283. package/lib/services/karma-execution.js +0 -2
  284. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  285. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  286. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  287. package/lib/services/livesync/android-livesync-service.js +0 -1
  288. package/lib/services/livesync/android-livesync-tool.js +0 -4
  289. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  290. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  291. package/lib/services/livesync/ios-livesync-service.js +0 -55
  292. package/lib/services/livesync/livesync-socket.js +0 -1
  293. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  294. package/lib/services/livesync-process-data-service.js +0 -1
  295. package/lib/services/log-parser-service.js +0 -1
  296. package/lib/services/log-source-map-service.js +0 -15
  297. package/lib/services/marking-mode-service.js +10 -8
  298. package/lib/services/metadata-filtering-service.js +0 -1
  299. package/lib/services/npm-config-service.js +0 -4
  300. package/lib/services/pacote-service.js +0 -7
  301. package/lib/services/performance-service.js +2 -3
  302. package/lib/services/platform/add-platform-service.js +2 -49
  303. package/lib/services/platform/platform-validation-service.js +0 -1
  304. package/lib/services/platform/prepare-native-platform-service.js +3 -5
  305. package/lib/services/platform-environment-requirements.js +4 -8
  306. package/lib/services/platform-project-service-base.js +0 -1
  307. package/lib/services/platforms-data-service.js +0 -1
  308. package/lib/services/plugins-service.js +2 -20
  309. package/lib/services/prepare-data-service.js +0 -1
  310. package/lib/services/project-backup-service.js +0 -4
  311. package/lib/services/project-changes-service.js +3 -14
  312. package/lib/services/project-cleanup-service.js +0 -2
  313. package/lib/services/project-config-service.js +2 -21
  314. package/lib/services/project-data-service.js +7 -36
  315. package/lib/services/project-name-service.js +0 -1
  316. package/lib/services/project-service.js +0 -10
  317. package/lib/services/project-templates-service.js +2 -3
  318. package/lib/services/qr-code-terminal-service.js +0 -1
  319. package/lib/services/require-service.js +0 -1
  320. package/lib/services/start-service.js +0 -1
  321. package/lib/services/temp-service.js +0 -3
  322. package/lib/services/terminal-spinner-service.js +0 -2
  323. package/lib/services/test-execution-service.js +3 -9
  324. package/lib/services/test-initialization-service.js +0 -4
  325. package/lib/services/timeline-profiler-service.js +0 -1
  326. package/lib/services/user-settings-service.js +0 -1
  327. package/lib/services/versions-service.js +5 -6
  328. package/lib/services/watch-ignore-list-service.js +0 -1
  329. package/lib/services/xcconfig-service.js +45 -12
  330. package/lib/services/xcproj-service.js +0 -1
  331. package/lib/shared-event-bus.js +0 -6
  332. package/lib/sys-info.js +2 -2
  333. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  334. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  335. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  336. package/lib/yarn-package-manager.js +0 -1
  337. package/lib/yarn2-package-manager.js +0 -3
  338. package/package.json +7 -18
  339. package/lib/.d.ts +0 -504
  340. package/lib/common/definitions/key-commands.d.ts +0 -62
  341. package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +0 -16
  342. package/lib/definitions/system-warnings.d.ts +0 -4
  343. package/lib/detached-processes/detached-process-enums.d.ts +0 -70
  344. package/lib/services/analytics/google-analytics-cross-client-custom-dimensions.d.ts +0 -6
@@ -9,10 +9,8 @@ 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.
13
12
  process.exit(exitCode);
14
13
  });
15
14
  karma.start();
16
15
  }
17
16
  });
18
- //# sourceMappingURL=karma-execution.js.map
@@ -49,4 +49,3 @@ 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,7 +97,6 @@ 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.
101
100
  if (matchingFile && matchingFile[0] && _.startsWith(matchingFile[0], "-")) {
102
101
  await this.device.adb.executeShellCommand(["rm", "-f", deviceRootPath]);
103
102
  }
@@ -173,4 +172,3 @@ __decorate([
173
172
  __decorate([
174
173
  (0, decorators_1.performanceLog)()
175
174
  ], AndroidDeviceLiveSyncService.prototype, "removeFiles", null);
176
- //# sourceMappingURL=android-device-livesync-service.js.map
@@ -95,8 +95,6 @@ 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.
100
98
  await doSyncPromise.then(actionOnEnd.bind(this), actionOnEnd.bind(this));
101
99
  result = await doSyncPromise;
102
100
  }
@@ -166,4 +164,3 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
166
164
  exports.AndroidDeviceSocketsLiveSyncService = AndroidDeviceSocketsLiveSyncService;
167
165
  AndroidDeviceSocketsLiveSyncService.STATUS_UPDATE_INTERVAL = 10000;
168
166
  AndroidDeviceSocketsLiveSyncService.MINIMAL_VERSION_LONG_LIVING_CONNECTION = "0.2.0";
169
- //# sourceMappingURL=android-device-livesync-sockets-service.js.map
@@ -53,4 +53,3 @@ __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,12 +140,9 @@ 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
144
143
  this.cleanState(socketUid);
145
- //call end of the connection (close and error callbacks won't be called - listeners removed)
146
144
  socket.end();
147
145
  socket.destroy();
148
- //reject all pending sync requests and clear timeouts
149
146
  this.rejectPendingSyncOperations(socketUid, error);
150
147
  }
151
148
  }
@@ -407,4 +404,3 @@ AndroidLivesyncTool.SOCKET_CONNECTION_ALREADY_EXISTS_ERROR = "Socket connection
407
404
  AndroidLivesyncTool.SOCKET_CONNECTION_TIMED_OUT_ERROR = "Socket connection timed out.";
408
405
  AndroidLivesyncTool.NO_SOCKET_CONNECTION_AVAILABLE_ERROR = "No socket connection available.";
409
406
  yok_1.injector.register("androidLivesyncTool", AndroidLivesyncTool);
410
- //# sourceMappingURL=android-livesync-tool.js.map
@@ -40,7 +40,6 @@ 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
44
43
  return {
45
44
  didRefresh: true,
46
45
  operationId: "",
@@ -55,4 +54,3 @@ __decorate([
55
54
  __decorate([
56
55
  (0, decorators_2.performanceLog)()
57
56
  ], DeviceLiveSyncServiceBase.prototype, "transferFiles", null);
58
- //# sourceMappingURL=device-livesync-service-base.js.map
@@ -37,13 +37,11 @@ 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
41
40
  if (this.socket) {
42
41
  return true;
43
42
  }
44
43
  const appId = projectData.projectIdentifiers.ios;
45
44
  try {
46
- // TODO: temp workaround till we setup the sockets along with the app start
47
45
  const ensureAppStarted = true;
48
46
  this.socket = await this.device.getDebugSocket(appId, projectData.projectName, projectData.projectDir, ensureAppStarted);
49
47
  }
@@ -123,7 +121,6 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
123
121
  projectDir: projectData.projectDir,
124
122
  });
125
123
  if (liveSyncInfo.useHotModuleReload) {
126
- // enable HOT updates
127
124
  await this.setupSocketIfNeeded(projectData);
128
125
  }
129
126
  }
@@ -180,9 +177,6 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
180
177
  }
181
178
  async destroySocket() {
182
179
  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
186
180
  await this.device.destroyAllSockets();
187
181
  this.socket = null;
188
182
  }
@@ -193,4 +187,3 @@ IOSDeviceLiveSyncService.MIN_RUNTIME_VERSION_WITH_REFRESH_NOTIFICATION = "6.1.0"
193
187
  __decorate([
194
188
  (0, decorators_1.performanceLog)()
195
189
  ], IOSDeviceLiveSyncService.prototype, "removeFiles", null);
196
- //# sourceMappingURL=ios-device-livesync-service.js.map
@@ -50,49 +50,11 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
50
50
  deviceProjectRootPath,
51
51
  },
52
52
  ]);
53
- // ── Fail-closed delivery verification ──────────────────────────
54
- //
55
- // The AFC transfer has been observed to fail without surfacing an
56
- // error, leaving the app to boot the stale JavaScript baked into
57
- // the installed .app payload with no indication anywhere that the
58
- // sync was lost. After the transfer we therefore confirm the zip
59
- // is actually present in the app sandbox; one retry covers
60
- // transient AFC hiccups, and an unconfirmed delivery fails the
61
- // sync loudly instead of printing "Successfully synced" over
62
- // stale code (the run-controller surfaces the error; --clean
63
- // reinstalls the full package).
64
- //
65
- // Presence alone is NOT sufficient evidence: a previous run that
66
- // transferred the zip but aborted before the app restarted leaves
67
- // a LEFTOVER sync.zip behind (the runtime only consumes it at
68
- // boot), which would satisfy the check even when THIS upload
69
- // failed. So any pre-existing zip is deleted up front — after
70
- // that, post-transfer presence can only be produced by this run's
71
- // upload.
72
- //
73
- // NOTE: deviceProjectRootPath is `.../LiveSync/app` (the extracted
74
- // app folder); the zip is uploaded one level up, at the LiveSync
75
- // root — the listing targets THAT directory.
76
- //
77
- // Escape hatch: NS_SKIP_IOS_SYNC_VERIFICATION=1 disables the
78
- // whole verification for exotic setups where directory listing
79
- // misbehaves but uploads are known-good.
80
53
  const syncZipDevicePath = deviceAppData.deviceSyncZipPath;
81
54
  const verificationSupported = !!device.fileSystem.getDirectoryEntries &&
82
55
  process.env.NS_SKIP_IOS_SYNC_VERIFICATION !== "1";
83
56
  const listLiveSyncRoot = () => device.fileSystem.getDirectoryEntries(constants_2.LiveSyncPaths.IOS_DEVICE_PROJECT_ROOT_PATH, deviceAppData.appIdentifier);
84
- // Entry shape: ios-device-lib's native `read_dir` recursively joins
85
- // `<requested dir>/<entry>` and returns FULL paths rooted at the
86
- // requested directory (verified against IOSDeviceLib.cpp and live
87
- // device output), so the canonical match is exact equality with
88
- // `Library/Application Support/LiveSync/sync.zip`. The bare
89
- // `"sync.zip"` equality is defensive cover for listing
90
- // implementations that return root-relative names. Deliberately NO
91
- // suffix matching — `endsWith("/sync.zip")` would false-positively
92
- // accept a nested app asset like `.../LiveSync/app/sync.zip`.
93
57
  const containsSyncZip = (entries) => entries.some((entry) => entry === syncZipDevicePath || entry === "sync.zip");
94
- // "delivered" / "missing" are definitive listings; "unknown" means
95
- // the listing itself could not be read (after one retry).
96
58
  const checkDelivery = async () => {
97
59
  let entries = await listLiveSyncRoot();
98
60
  if (entries === null) {
@@ -106,9 +68,6 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
106
68
  let preListingAvailable = false;
107
69
  let leftoverZipPresent = false;
108
70
  if (verificationSupported) {
109
- // Clear any leftover zip so the post-transfer check attributes
110
- // presence to this run. Best-effort: AFC "file not found" is
111
- // tolerated inside deleteFile.
112
71
  await device.fileSystem.deleteFile(syncZipDevicePath, deviceAppData.appIdentifier);
113
72
  const preEntries = await listLiveSyncRoot();
114
73
  preListingAvailable = Array.isArray(preEntries);
@@ -117,10 +76,6 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
117
76
  await transferSyncZip();
118
77
  if (verificationSupported) {
119
78
  if (leftoverZipPresent) {
120
- // The pre-transfer delete did not take effect, so presence
121
- // can no longer be attributed to this run. Most likely the
122
- // upload succeeded too, but say so explicitly rather than
123
- // claim verification.
124
79
  this.$logger.warn("A leftover sync.zip from a previous run could not be removed — delivery verification for this sync is inconclusive. " +
125
80
  "If the app runs stale code, re-run the command or use a clean rebuild (--clean).");
126
81
  }
@@ -141,19 +96,11 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
141
96
  }
142
97
  if (state === "unknown") {
143
98
  if (preListingAvailable) {
144
- // The listing worked moments before the upload and
145
- // broke right after it — the AFC session is
146
- // misbehaving at exactly the point where the upload
147
- // itself is suspect. Fail closed.
148
99
  throw new Error(`Unable to confirm delivery of the application payload (sync.zip) to device ${device.deviceInfo.identifier}: ` +
149
100
  `the device directory listing failed right after the transfer. ` +
150
101
  `Re-run the command, or use a clean rebuild (--clean) to reinstall the full application package. ` +
151
102
  `(Set NS_SKIP_IOS_SYNC_VERIFICATION=1 to bypass delivery verification.)`);
152
103
  }
153
- // Listing was unavailable both before and after the
154
- // transfer — verification is unsupported for this
155
- // device/session. This is the single fail-open path,
156
- // and it is loud rather than silent.
157
104
  this.$logger.warn("Could not verify sync.zip delivery (device directory listing unavailable). " +
158
105
  "If the transfer failed, the app will run stale JavaScript — re-run the command or use a clean rebuild (--clean).");
159
106
  }
@@ -169,7 +116,6 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
169
116
  }
170
117
  async syncAfterInstall(device, liveSyncInfo) {
171
118
  if (!device.isEmulator) {
172
- // 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.
173
119
  await this.fullSync({
174
120
  projectData: liveSyncInfo.projectData,
175
121
  device,
@@ -189,4 +135,3 @@ __decorate([
189
135
  (0, decorators_1.performanceLog)()
190
136
  ], IOSLiveSyncService.prototype, "fullSync", null);
191
137
  yok_1.injector.register("iOSLiveSyncService", IOSLiveSyncService);
192
- //# sourceMappingURL=ios-livesync-service.js.map
@@ -12,4 +12,3 @@ 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,7 +40,6 @@ class PlatformLiveSyncServiceBase {
40
40
  return shouldRestart;
41
41
  }
42
42
  async syncAfterInstall(device, liveSyncInfo) {
43
- /* intentionally left blank */
44
43
  }
45
44
  async restartApplication(projectData, liveSyncInfo) {
46
45
  const deviceLiveSyncService = this.getDeviceLiveSyncService(liveSyncInfo.deviceAppData.device, projectData);
@@ -86,8 +85,6 @@ class PlatformLiveSyncServiceBase {
86
85
  let modifiedLocalToDevicePaths = [];
87
86
  if (liveSyncInfo.filesToSync.length) {
88
87
  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.
91
88
  const existingFiles = filesToSync.filter((m) => m && this.$fs.exists(m));
92
89
  this.$logger.trace("Will execute livesync for files: ", existingFiles);
93
90
  const skippedFiles = _.difference(filesToSync, existingFiles);
@@ -106,7 +103,6 @@ class PlatformLiveSyncServiceBase {
106
103
  const filePaths = liveSyncInfo.filesToRemove;
107
104
  const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
108
105
  const mappedFiles = _(filePaths)
109
- // .map(filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData))
110
106
  .filter((filePath) => !!filePath)
111
107
  .value();
112
108
  const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants_1.APP_FOLDER_NAME);
@@ -158,4 +154,3 @@ exports.PlatformLiveSyncServiceBase = PlatformLiveSyncServiceBase;
158
154
  __decorate([
159
155
  (0, decorators_1.performanceLog)()
160
156
  ], PlatformLiveSyncServiceBase.prototype, "liveSyncWatchAction", null);
161
- //# sourceMappingURL=platform-livesync-service-base.js.map
@@ -41,4 +41,3 @@ 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,4 +50,3 @@ __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,7 +31,6 @@ 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
35
34
  if (this.$fs.getFileSize(filePath) > 50 * 1000 * 1000) {
36
35
  this.$logger.trace(`Skipping source map for file ${filePath} because it is too big (> 50MB).`);
37
36
  return;
@@ -156,8 +155,6 @@ class LogSourceMapService {
156
155
  }
157
156
  }
158
157
  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"
161
158
  const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
162
159
  const deviceProjectPath = util.format(constants_1.ANDROID_DEVICE_APP_ROOT_TEMPLATE, projectData.projectIdentifiers.android);
163
160
  let separator = ",";
@@ -165,25 +162,18 @@ class LogSourceMapService {
165
162
  let parts, filePath, line, column, messagePrefix;
166
163
  if (fileIndex >= 0) {
167
164
  const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
168
- //"data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
169
165
  parts = fileSubstring.split(separator);
170
166
  if (parts.length >= 3) {
171
- // "data/data/org.nativescript.sourceMap/files/app/bundle.js"
172
167
  parts[0] = parts[0].replace("'", "");
173
- // " line: 304"
174
168
  parts[1] = parts[1].replace(" line: ", "");
175
- // " column: 8"
176
169
  parts[2] = parts[2].replace(" column: ", "");
177
170
  }
178
171
  else {
179
- // "data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
180
172
  separator = ":";
181
173
  parts = fileSubstring.split(separator);
182
174
  }
183
175
  if (parts.length >= 3) {
184
- // "/data/data/org.nativescript.sourceMap/files/app/"
185
176
  const devicePath = `${deviceProjectPath}/${constants_1.APP_FOLDER_NAME}/`;
186
- // "bundle.js"
187
177
  filePath = path.relative(devicePath, `${"/"}${parts[0]}`);
188
178
  line = parseInt(parts[1]);
189
179
  column = parseInt(parts[2]);
@@ -191,24 +181,20 @@ class LogSourceMapService {
191
181
  for (let i = 3; i < parts.length; i++) {
192
182
  messageSuffix += `${parts[i]}${i === parts.length - 1 ? "" : separator}`;
193
183
  }
194
- // "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap ("
195
184
  messagePrefix = _.trimEnd(messagePrefix, "(");
196
185
  }
197
186
  }
198
187
  return { filePath, line, column, messagePrefix, messageSuffix };
199
188
  }
200
189
  parseIosLog(rawMessage) {
201
- // "CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
202
190
  const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
203
191
  let messageSuffix = "";
204
192
  let parts, filePath, line, column, messagePrefix;
205
193
  if (fileIndex >= 0) {
206
- // "app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
207
194
  const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
208
195
  parts = fileSubstring.split(":");
209
196
  if (parts && parts.length >= 3) {
210
197
  filePath = parts[0];
211
- // "app/vendor.js"
212
198
  if (_.startsWith(filePath, constants_1.APP_FOLDER_NAME)) {
213
199
  filePath = path.relative(constants_1.APP_FOLDER_NAME, parts[0]);
214
200
  }
@@ -237,4 +223,3 @@ LogSourceMapService.FILE_PREFIX = "file:///";
237
223
  LogSourceMapService.FILE_PREFIX_REPLACEMENT = "file: ";
238
224
  LogSourceMapService.MEMOIZE_FUNCTION_RANDOM_KEY_FOR_JOIN = "__some_random_value__";
239
225
  yok_1.injector.register("logSourceMapService", LogSourceMapService);
240
- //# sourceMappingURL=log-source-map-service.js.map
@@ -5,8 +5,13 @@ const os_1 = require("os");
5
5
  const constants_1 = require("../constants");
6
6
  const yok_1 = require("../common/yok");
7
7
  const semver = require("semver/preload");
8
+ var MarkingMode;
9
+ (function (MarkingMode) {
10
+ MarkingMode["None"] = "none";
11
+ MarkingMode["Full"] = "full";
12
+ })(MarkingMode || (MarkingMode = {}));
8
13
  const MARKING_MODE_PROP = "markingMode";
9
- const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full" /* MarkingMode.Full */}" is no longer supported.`;
14
+ const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${MarkingMode.Full}" is no longer supported.`;
10
15
  class MarkingModeService {
11
16
  constructor($logger, $projectConfigService, $projectHelper, $projectDataService) {
12
17
  this.$logger = $logger;
@@ -18,13 +23,11 @@ class MarkingModeService {
18
23
  const markingModeValue = this.$projectConfigService.getValue("android.markingMode");
19
24
  const { skipWarnings, forceSwitch } = options;
20
25
  if (forceSwitch) {
21
- await this.setMarkingMode("none" /* MarkingMode.None */);
26
+ await this.setMarkingMode(MarkingMode.None);
22
27
  return;
23
28
  }
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 */);
29
+ if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== MarkingMode.None) {
30
+ const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, constants_1.PlatformTypes.android);
28
31
  const isMarkingModeFullDefault = version && semver.lt(semver.coerce(version), "7.0.0-rc.5");
29
32
  if (isMarkingModeFullDefault) {
30
33
  this.showMarkingModeFullWarning();
@@ -35,7 +38,7 @@ class MarkingModeService {
35
38
  await this.$projectConfigService.setValue("android.markingMode", newMode);
36
39
  }
37
40
  showMarkingModeFullWarning() {
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'.`;
41
+ const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${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'.`;
39
42
  this.$logger.warn(markingModeFullWarning, {
40
43
  [constants_1.LoggerConfigData.wrapMessageWithBorders]: true,
41
44
  });
@@ -43,4 +46,3 @@ class MarkingModeService {
43
46
  }
44
47
  exports.MarkingModeService = MarkingModeService;
45
48
  yok_1.injector.register("markingModeService", MarkingModeService);
46
- //# sourceMappingURL=marking-mode-service.js.map
@@ -103,4 +103,3 @@ 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,11 +21,8 @@ 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();
25
24
  const data = JSON.parse(res.toString());
26
- // todo: remove if not needed with npm config list --json?
27
25
  Object.entries(data).forEach(([key, value]) => {
28
- // replace env ${VARS} in strings with the process.env value
29
26
  this.config[key] =
30
27
  typeof value !== "string"
31
28
  ? value
@@ -40,4 +37,3 @@ __decorate([
40
37
  (0, decorators_1.cache)()
41
38
  ], NpmConfigService.prototype, "readConfig", null);
42
39
  yok_1.injector.register("npmConfigService", NpmConfigService);
43
- //# sourceMappingURL=npm-config-service.js.map
@@ -24,7 +24,6 @@ class PacoteService {
24
24
  this.$proxyService = $proxyService;
25
25
  }
26
26
  get $packageManager() {
27
- // need to be resolved here due to cyclic dependency
28
27
  return this.$injector.resolve("packageManager");
29
28
  }
30
29
  async manifest(packageName, options) {
@@ -40,8 +39,6 @@ class PacoteService {
40
39
  return result;
41
40
  }
42
41
  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
45
42
  this.$logger.trace(`Calling pacoteService.extractPackage for packageName: '${packageName}', destinationDir: '${destinationDirectory}' and options: ${options}`);
46
43
  const extractOptions = { strip: 1, C: destinationDirectory };
47
44
  if (options) {
@@ -59,7 +56,6 @@ class PacoteService {
59
56
  });
60
57
  this.$logger.trace(`Creating extract tar stream with options: ${JSON.stringify(extractOptions, null, 2)}`);
61
58
  const destination = tar.x(extractOptions);
62
- // Initiate the source
63
59
  const sourceStream = new stream_1.PassThrough();
64
60
  sourceStream.end(source);
65
61
  sourceStream.pipe(destination);
@@ -74,9 +70,7 @@ class PacoteService {
74
70
  });
75
71
  }
76
72
  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.
78
73
  const cachePath = await this.$packageManager.getCachePath();
79
- // Add NPM Configuration to our Manifest options
80
74
  const npmConfig = this.$npmConfigService.getConfig();
81
75
  const pacoteOptions = _.extend(npmConfig, { cache: cachePath, Arborist: arborist_1.Arborist });
82
76
  const proxySettings = await this.$proxyService.getCache();
@@ -98,4 +92,3 @@ __decorate([
98
92
  (0, decorators_1.cache)()
99
93
  ], PacoteService.prototype, "$packageManager", null);
100
94
  yok_1.injector.register("pacoteService", PacoteService);
101
- //# sourceMappingURL=pacote-service.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PerformanceService = void 0;
4
+ const constants_1 = require("../constants");
4
5
  const os_1 = require("os");
5
6
  const helpers_1 = require("../common/helpers");
6
7
  const semver = require("semver");
@@ -41,7 +42,7 @@ class PerformanceService {
41
42
  trackAnalyticsData(methodInfo, executionTime) {
42
43
  this.$analyticsService
43
44
  .trackEventActionInGoogleAnalytics({
44
- action: "Performance" /* TrackActionNames.Performance */,
45
+ action: constants_1.TrackActionNames.Performance,
45
46
  additionalData: methodInfo,
46
47
  value: executionTime,
47
48
  })
@@ -71,7 +72,6 @@ class PerformanceService {
71
72
  this.$logger.info(PerformanceService.LOG_MESSAGE_TEMPLATE, methodInfo, executionTime);
72
73
  }
73
74
  }
74
- //removes any injected members of the arguments and excludes the options object even if it was renamed
75
75
  getJsonSanitizer() {
76
76
  const seen = new WeakSet();
77
77
  seen.add(this.$options);
@@ -91,4 +91,3 @@ PerformanceService.LOG_MESSAGE_TEMPLATE = `Execution of method "%s" took %s ms.`
91
91
  PerformanceService.FAIL_LOG_MESSAGE_TEMPLATE = `Failed to log pefromance data in file for method %s.`;
92
92
  PerformanceService.MIN_NODE_PERFORMANCE_MODULE_VERSION = "8.5.0";
93
93
  yok_1.injector.register("performanceService", PerformanceService);
94
- //# sourceMappingURL=performance-service.js.map
@@ -12,11 +12,7 @@ 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,
16
- // private $pacoteService: IPacoteService,
17
- // private $projectDataService: IProjectDataService,
18
- $packageManager, $terminalSpinnerService, $analyticsService // private $tempService: ITempService
19
- ) {
15
+ constructor($fs, $logger, $options, $packageManager, $terminalSpinnerService, $analyticsService) {
20
16
  this.$fs = $fs;
21
17
  this.$logger = $logger;
22
18
  this.$options = $options;
@@ -29,13 +25,9 @@ class AddPlatformService {
29
25
  const spinner = this.$terminalSpinnerService.createSpinner();
30
26
  try {
31
27
  spinner.start();
32
- // const frameworkDirPath = addPlatformData.frameworkPath ?
33
- // await this.extractPackage(packageToInstall)
34
- // : await this.installPackage(projectData.projectDir, packageToInstall);
35
28
  const frameworkDirPath = await this.installPackage(projectData.projectDir, packageToInstall);
36
29
  const frameworkPackageJsonContent = this.$fs.readJson(path.join(frameworkDirPath, "..", "package.json"));
37
30
  const frameworkVersion = frameworkPackageJsonContent.version;
38
- // await this.setPlatformVersion(platformData, projectData, frameworkVersion);
39
31
  await this.trackPlatformVersion(frameworkVersion, platformData);
40
32
  if (!addPlatformData.nativePrepare ||
41
33
  !addPlatformData.nativePrepare.skipNativePrepare) {
@@ -55,21 +47,9 @@ class AddPlatformService {
55
47
  async setPlatformVersion(platformData, projectData, frameworkVersion) {
56
48
  await this.installPackage(projectData.projectDir, `${platformData.frameworkPackageName}@${frameworkVersion}`);
57
49
  }
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
- // }
69
50
  async installPackage(projectDir, packageName) {
70
51
  const frameworkDir = this.resolveFrameworkDir(projectDir, packageName);
71
52
  if (frameworkDir && this.$fs.exists(frameworkDir)) {
72
- // don't install if it's already installed
73
53
  return frameworkDir;
74
54
  }
75
55
  const installedPackage = await this.$packageManager.install(packageName, projectDir, {
@@ -85,30 +65,6 @@ class AddPlatformService {
85
65
  }
86
66
  resolveFrameworkDir(projectDir, packageName) {
87
67
  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
112
68
  packageName = packageName.replace(/(.+)@.+$/g, "$1");
113
69
  const frameworkDir = require
114
70
  .resolve(`${packageName}/package.json`, {
@@ -126,10 +82,8 @@ class AddPlatformService {
126
82
  }
127
83
  async addNativePlatform(platformData, projectData, frameworkDirPath, frameworkVersion) {
128
84
  var _a;
129
- // here we should use ios OR android
130
85
  const platformDir = (_a = this.$options.hostProjectPath) !== null && _a !== void 0 ? _a : path.join(projectData.platformsDir, platformData.normalizedPlatformName.toLowerCase());
131
86
  this.$fs.deleteDirectory(platformDir);
132
- //if iosHost - dont create project
133
87
  await platformData.platformProjectService.createProject(path.resolve(frameworkDirPath), frameworkVersion, projectData);
134
88
  platformData.platformProjectService.ensureConfigurationFileInAppResources(projectData);
135
89
  await platformData.platformProjectService.interpolateData(projectData);
@@ -137,7 +91,7 @@ class AddPlatformService {
137
91
  }
138
92
  async trackPlatformVersion(frameworkVersion, platformData) {
139
93
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
140
- action: "Add Platform" /* TrackActionNames.AddPlatform */,
94
+ action: constants_1.TrackActionNames.AddPlatform,
141
95
  additionalData: `${platformData.platformNameLowerCase}${constants_1.AnalyticsEventLabelDelimiter}${frameworkVersion}`,
142
96
  });
143
97
  }
@@ -147,4 +101,3 @@ __decorate([
147
101
  (0, decorators_1.performanceLog)()
148
102
  ], AddPlatformService.prototype, "addNativePlatform", null);
149
103
  yok_1.injector.register("addPlatformService", AddPlatformService);
150
- //# sourceMappingURL=add-platform-service.js.map
@@ -72,4 +72,3 @@ class PlatformValidationService {
72
72
  }
73
73
  exports.PlatformValidationService = PlatformValidationService;
74
74
  yok_1.injector.register("platformValidationService", PlatformValidationService);
75
- //# sourceMappingURL=platform-validation-service.js.map
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.PrepareNativePlatformService = void 0;
10
10
  const helpers_1 = require("../../common/helpers");
11
11
  const decorators_1 = require("../../common/decorators");
12
+ const constants_1 = require("../../constants");
12
13
  const yok_1 = require("../../common/yok");
13
14
  class PrepareNativePlatformService {
14
15
  constructor($hooksService, $nodeModulesBuilder, $projectChangesService, $metadataFilteringService, $options) {
@@ -49,19 +50,17 @@ class PrepareNativePlatformService {
49
50
  this.$metadataFilteringService.generateMetadataFilters(projectData, platformData.platformNameLowerCase);
50
51
  }
51
52
  platformData.platformProjectService.interpolateConfigurationFile(projectData);
52
- await this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: "3" /* NativePlatformStatus.alreadyPrepared */ });
53
+ await this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: constants_1.NativePlatformStatus.alreadyPrepared });
53
54
  return hasChanges;
54
55
  }
55
56
  async cleanProject(platformData, options) {
56
- // android build artifacts need to be cleaned up
57
- // when switching between debug, release and webpack builds
58
57
  if (platformData.platformNameLowerCase !== "android") {
59
58
  return;
60
59
  }
61
60
  const previousPrepareInfo = this.$projectChangesService.getPrepareInfo(platformData);
62
61
  if (!previousPrepareInfo ||
63
62
  previousPrepareInfo.nativePlatformStatus !==
64
- "3" /* NativePlatformStatus.alreadyPrepared */) {
63
+ constants_1.NativePlatformStatus.alreadyPrepared) {
65
64
  return;
66
65
  }
67
66
  const { release: previousWasRelease } = previousPrepareInfo;
@@ -77,4 +76,3 @@ __decorate([
77
76
  (0, helpers_1.hook)("prepareNativeApp")
78
77
  ], PrepareNativePlatformService.prototype, "prepareNativePlatform", null);
79
78
  yok_1.injector.register("prepareNativePlatformService", PrepareNativePlatformService);
80
- //# sourceMappingURL=prepare-native-platform-service.js.map