nativescript 9.0.4-dev.0 → 9.0.4-dev.1

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 +0 -12
  2. package/lib/base-package-manager.js +0 -7
  3. package/lib/bootstrap.js +1 -5
  4. package/lib/bun-package-manager.js +1 -14
  5. package/lib/color.js +0 -4
  6. package/lib/commands/add-platform.js +0 -1
  7. package/lib/commands/apple-login.js +0 -1
  8. package/lib/commands/appstore-list.js +0 -1
  9. package/lib/commands/appstore-upload.js +0 -3
  10. package/lib/commands/build.js +2 -3
  11. package/lib/commands/clean.js +1 -22
  12. package/lib/commands/command-base.js +0 -1
  13. package/lib/commands/config.js +0 -5
  14. package/lib/commands/create-project.js +0 -6
  15. package/lib/commands/debug.js +1 -6
  16. package/lib/commands/deploy.js +2 -3
  17. package/lib/commands/embedding/embed.js +0 -7
  18. package/lib/commands/extensibility/install-extension.js +0 -1
  19. package/lib/commands/extensibility/list-extensions.js +0 -1
  20. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  21. package/lib/commands/fonts.js +0 -1
  22. package/lib/commands/generate-assets.js +0 -1
  23. package/lib/commands/generate-help.js +0 -1
  24. package/lib/commands/generate.js +1 -48
  25. package/lib/commands/hooks/common.js +1 -2
  26. package/lib/commands/hooks/hooks-lock.js +0 -1
  27. package/lib/commands/hooks/hooks.js +0 -1
  28. package/lib/commands/info.js +0 -1
  29. package/lib/commands/install.js +0 -1
  30. package/lib/commands/list-platforms.js +0 -1
  31. package/lib/commands/migrate.js +0 -1
  32. package/lib/commands/native-add.js +0 -5
  33. package/lib/commands/platform-clean.js +0 -1
  34. package/lib/commands/plugin/add-plugin.js +0 -1
  35. package/lib/commands/plugin/build-plugin.js +0 -1
  36. package/lib/commands/plugin/create-plugin.js +0 -5
  37. package/lib/commands/plugin/list-plugins.js +0 -1
  38. package/lib/commands/plugin/remove-plugin.js +0 -2
  39. package/lib/commands/plugin/update-plugin.js +0 -1
  40. package/lib/commands/post-install.js +0 -6
  41. package/lib/commands/prepare.js +3 -4
  42. package/lib/commands/preview.js +0 -2
  43. package/lib/commands/remove-platform.js +0 -1
  44. package/lib/commands/resources/resources-update.js +0 -2
  45. package/lib/commands/run.js +0 -1
  46. package/lib/commands/setup.js +0 -1
  47. package/lib/commands/start.js +0 -1
  48. package/lib/commands/test-init.js +0 -4
  49. package/lib/commands/test.js +2 -9
  50. package/lib/commands/typings.js +1 -2
  51. package/lib/commands/update-platform.js +0 -5
  52. package/lib/commands/update.js +0 -2
  53. package/lib/commands/widget.js +1 -20
  54. package/lib/common/bootstrap.js +0 -1
  55. package/lib/common/child-process.js +0 -3
  56. package/lib/common/codeGeneration/code-entity.js +0 -1
  57. package/lib/common/codeGeneration/code-printer.js +0 -1
  58. package/lib/common/command-params.js +0 -1
  59. package/lib/common/commands/analytics.js +0 -3
  60. package/lib/common/commands/autocompletion.js +0 -3
  61. package/lib/common/commands/device/device-log-stream.js +0 -1
  62. package/lib/common/commands/device/get-file.js +0 -2
  63. package/lib/common/commands/device/list-applications.js +0 -1
  64. package/lib/common/commands/device/list-devices.js +0 -3
  65. package/lib/common/commands/device/list-files.js +0 -2
  66. package/lib/common/commands/device/put-file.js +0 -2
  67. package/lib/common/commands/device/run-application.js +0 -1
  68. package/lib/common/commands/device/stop-application.js +0 -1
  69. package/lib/common/commands/device/uninstall-application.js +0 -1
  70. package/lib/common/commands/doctor.js +2 -3
  71. package/lib/common/commands/generate-messages.js +0 -1
  72. package/lib/common/commands/help.js +0 -1
  73. package/lib/common/commands/package-manager-get.js +0 -1
  74. package/lib/common/commands/package-manager-set.js +0 -1
  75. package/lib/common/commands/post-install.js +0 -1
  76. package/lib/common/commands/preuninstall.js +2 -11
  77. package/lib/common/commands/proxy/proxy-base.js +0 -4
  78. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  79. package/lib/common/commands/proxy/proxy-get.js +0 -1
  80. package/lib/common/commands/proxy/proxy-set.js +0 -1
  81. package/lib/common/common-lib.js +0 -1
  82. package/lib/common/constants.js +0 -11
  83. package/lib/common/decorators.js +0 -48
  84. package/lib/common/dispatchers.js +1 -10
  85. package/lib/common/errors.js +3 -13
  86. package/lib/common/file-system.js +2 -13
  87. package/lib/common/header.js +0 -3
  88. package/lib/common/helpers.js +3 -89
  89. package/lib/common/host-info.js +0 -4
  90. package/lib/common/http-client.js +0 -20
  91. package/lib/common/logger/appenders/cli-appender.js +0 -4
  92. package/lib/common/logger/appenders/emit-appender.js +0 -4
  93. package/lib/common/logger/layouts/cli-layout.js +0 -1
  94. package/lib/common/logger/logger.js +0 -5
  95. package/lib/common/messages/messages.js +0 -6
  96. package/lib/common/mobile/android/android-application-manager.js +1 -20
  97. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  98. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  99. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  100. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  101. package/lib/common/mobile/android/android-device.js +0 -8
  102. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  103. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  104. package/lib/common/mobile/android/android-log-filter.js +0 -4
  105. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  106. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  107. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  108. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  109. package/lib/common/mobile/android/logcat-helper.js +0 -13
  110. package/lib/common/mobile/application-manager-base.js +0 -6
  111. package/lib/common/mobile/device-emitter.js +0 -4
  112. package/lib/common/mobile/device-log-emitter.js +0 -1
  113. package/lib/common/mobile/device-log-provider-base.js +0 -1
  114. package/lib/common/mobile/device-log-provider.js +0 -23
  115. package/lib/common/mobile/device-platforms-constants.js +0 -1
  116. package/lib/common/mobile/emulator-helper.js +0 -3
  117. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  118. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  119. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  120. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  121. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  122. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  123. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  124. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  125. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  126. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  127. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  128. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  129. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  130. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  131. package/lib/common/mobile/log-filter.js +0 -2
  132. package/lib/common/mobile/logging-levels.js +0 -1
  133. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  134. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  135. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  136. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  137. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  138. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  139. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  140. package/lib/common/mobile/mobile-helper.js +0 -1
  141. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  142. package/lib/common/opener.js +0 -1
  143. package/lib/common/os-info.js +0 -1
  144. package/lib/common/plist-parser.js +0 -1
  145. package/lib/common/project-helper.js +0 -1
  146. package/lib/common/prompter.js +1 -9
  147. package/lib/common/queue.js +0 -1
  148. package/lib/common/resource-loader.js +0 -1
  149. package/lib/common/services/auto-completion-service.js +1 -13
  150. package/lib/common/services/cancellation.js +1 -2
  151. package/lib/common/services/commands-service.js +6 -17
  152. package/lib/common/services/help-service.js +3 -11
  153. package/lib/common/services/hooks-service.js +0 -13
  154. package/lib/common/services/ios-notification-service.js +0 -1
  155. package/lib/common/services/json-file-settings-service.js +0 -6
  156. package/lib/common/services/lock-service.js +0 -6
  157. package/lib/common/services/message-contract-generator.js +0 -1
  158. package/lib/common/services/messages-service.js +0 -1
  159. package/lib/common/services/micro-templating-service.js +0 -6
  160. package/lib/common/services/net-service.js +0 -3
  161. package/lib/common/services/project-files-manager.js +0 -5
  162. package/lib/common/services/project-files-provider-base.js +0 -1
  163. package/lib/common/services/proxy-service.js +0 -1
  164. package/lib/common/services/qr.js +0 -1
  165. package/lib/common/services/settings-service.js +0 -1
  166. package/lib/common/services/xcode-select-service.js +0 -1
  167. package/lib/common/utils.js +0 -1
  168. package/lib/common/validators/project-name-validator.js +0 -1
  169. package/lib/common/validators/validation-result.js +0 -1
  170. package/lib/common/verify-node-version.js +1 -8
  171. package/lib/common/yok.js +11 -32
  172. package/lib/config.js +1 -22
  173. package/lib/constants-provider.js +0 -1
  174. package/lib/constants.js +0 -53
  175. package/lib/controllers/build-controller.js +3 -4
  176. package/lib/controllers/debug-controller.js +3 -8
  177. package/lib/controllers/deploy-controller.js +0 -1
  178. package/lib/controllers/migrate-controller.js +4 -90
  179. package/lib/controllers/platform-controller.js +1 -9
  180. package/lib/controllers/prepare-controller.js +4 -17
  181. package/lib/controllers/run-controller.js +1 -17
  182. package/lib/controllers/update-controller-base.js +0 -1
  183. package/lib/controllers/update-controller.js +0 -11
  184. package/lib/data/build-data.js +0 -1
  185. package/lib/data/controller-data-base.js +0 -1
  186. package/lib/data/debug-data.js +0 -1
  187. package/lib/data/platform-data.js +0 -1
  188. package/lib/data/prepare-data.js +0 -1
  189. package/lib/data/run-data.js +0 -1
  190. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  191. package/lib/detached-processes/cleanup-process.js +14 -18
  192. package/lib/detached-processes/file-log-service.js +1 -2
  193. package/lib/device-path-provider.js +0 -1
  194. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  195. package/lib/device-sockets/ios/notification.js +0 -3
  196. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  197. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  198. package/lib/helpers/deploy-command-helper.js +0 -1
  199. package/lib/helpers/key-command-helper.js +2 -4
  200. package/lib/helpers/livesync-command-helper.js +1 -4
  201. package/lib/helpers/network-connectivity-validator.js +0 -1
  202. package/lib/helpers/options-track-helper.js +2 -3
  203. package/lib/helpers/package-path-helper.js +0 -1
  204. package/lib/helpers/platform-command-helper.js +2 -7
  205. package/lib/helpers/version-validator-helper.js +0 -1
  206. package/lib/key-commands/bootstrap.js +2 -3
  207. package/lib/key-commands/index.js +4 -5
  208. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  209. package/lib/nativescript-cli-lib.js +0 -1
  210. package/lib/nativescript-cli.js +1 -11
  211. package/lib/node/pbxproj-dom-xcode.js +0 -1
  212. package/lib/node/xcode.js +0 -1
  213. package/lib/node-package-manager.js +1 -11
  214. package/lib/options.js +119 -144
  215. package/lib/package-installation-manager.js +1 -8
  216. package/lib/package-manager.js +0 -2
  217. package/lib/platform-command-param.js +0 -1
  218. package/lib/pnpm-package-manager.js +1 -4
  219. package/lib/project-data.js +0 -12
  220. package/lib/providers/project-files-provider.js +0 -1
  221. package/lib/resolvers/livesync-service-resolver.js +0 -1
  222. package/lib/services/analytics/analytics-broker-process.js +6 -10
  223. package/lib/services/analytics/analytics-broker.js +1 -2
  224. package/lib/services/analytics/analytics-service.js +25 -29
  225. package/lib/services/analytics/google-analytics-provider.js +12 -13
  226. package/lib/services/analytics-settings-service.js +0 -5
  227. package/lib/services/android/android-bundle-tool-service.js +0 -1
  228. package/lib/services/android/gradle-build-args-service.js +0 -3
  229. package/lib/services/android/gradle-build-service.js +0 -1
  230. package/lib/services/android/gradle-command-service.js +0 -1
  231. package/lib/services/android-device-debug-service.js +0 -6
  232. package/lib/services/android-plugin-build-service.js +2 -31
  233. package/lib/services/android-project-service.js +4 -71
  234. package/lib/services/android-resources-migration-service.js +0 -7
  235. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  236. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  237. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  238. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  239. package/lib/services/assets-generation/assets-generation-service.js +5 -10
  240. package/lib/services/build-artifacts-service.js +1 -2
  241. package/lib/services/build-data-service.js +0 -1
  242. package/lib/services/build-info-file-service.js +0 -1
  243. package/lib/services/bundler/bundler-compiler-service.js +1 -68
  244. package/lib/services/bundler/bundler.js +0 -1
  245. package/lib/services/cleanup-service.js +9 -13
  246. package/lib/services/cocoapods-platform-manager.js +0 -9
  247. package/lib/services/cocoapods-service.js +1 -21
  248. package/lib/services/debug-data-service.js +0 -1
  249. package/lib/services/debug-service-base.js +0 -7
  250. package/lib/services/device/device-install-app-service.js +1 -2
  251. package/lib/services/doctor-service.js +6 -21
  252. package/lib/services/extensibility-service.js +0 -8
  253. package/lib/services/files-hash-service.js +0 -1
  254. package/lib/services/hmr-status-service.js +0 -2
  255. package/lib/services/info-service.js +0 -1
  256. package/lib/services/initialize-service.js +1 -5
  257. package/lib/services/ios/export-options-plist-service.js +0 -4
  258. package/lib/services/ios/ios-signing-service.js +10 -7
  259. package/lib/services/ios/spm-service.js +0 -18
  260. package/lib/services/ios/xcodebuild-args-service.js +0 -11
  261. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  262. package/lib/services/ios/xcodebuild-service.js +1 -2
  263. package/lib/services/ios-debugger-port-service.js +0 -1
  264. package/lib/services/ios-device-debug-service.js +0 -1
  265. package/lib/services/ios-entitlements-service.js +0 -1
  266. package/lib/services/ios-extensions-service.js +0 -1
  267. package/lib/services/ios-log-filter.js +0 -20
  268. package/lib/services/ios-native-target-service.js +4 -6
  269. package/lib/services/ios-project-service.js +1 -100
  270. package/lib/services/ios-provision-service.js +0 -3
  271. package/lib/services/ios-watch-app-service.js +0 -1
  272. package/lib/services/ip-service.js +0 -2
  273. package/lib/services/itmstransporter-service.js +0 -1
  274. package/lib/services/karma-execution.js +0 -2
  275. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  276. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  277. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  278. package/lib/services/livesync/android-livesync-service.js +0 -1
  279. package/lib/services/livesync/android-livesync-tool.js +0 -4
  280. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  281. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  282. package/lib/services/livesync/ios-livesync-service.js +0 -2
  283. package/lib/services/livesync/livesync-socket.js +0 -1
  284. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  285. package/lib/services/livesync-process-data-service.js +0 -1
  286. package/lib/services/log-parser-service.js +0 -1
  287. package/lib/services/log-source-map-service.js +0 -15
  288. package/lib/services/marking-mode-service.js +5 -8
  289. package/lib/services/metadata-filtering-service.js +0 -1
  290. package/lib/services/npm-config-service.js +0 -4
  291. package/lib/services/pacote-service.js +0 -7
  292. package/lib/services/performance-service.js +1 -3
  293. package/lib/services/platform/add-platform-service.js +2 -49
  294. package/lib/services/platform/platform-validation-service.js +0 -1
  295. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  296. package/lib/services/platform-environment-requirements.js +3 -8
  297. package/lib/services/platform-project-service-base.js +0 -1
  298. package/lib/services/platforms-data-service.js +0 -1
  299. package/lib/services/plugins-service.js +2 -20
  300. package/lib/services/prepare-data-service.js +0 -1
  301. package/lib/services/project-backup-service.js +0 -4
  302. package/lib/services/project-changes-service.js +3 -14
  303. package/lib/services/project-cleanup-service.js +0 -2
  304. package/lib/services/project-config-service.js +2 -21
  305. package/lib/services/project-data-service.js +7 -36
  306. package/lib/services/project-name-service.js +0 -1
  307. package/lib/services/project-service.js +0 -10
  308. package/lib/services/project-templates-service.js +2 -3
  309. package/lib/services/qr-code-terminal-service.js +0 -1
  310. package/lib/services/require-service.js +0 -1
  311. package/lib/services/start-service.js +0 -1
  312. package/lib/services/temp-service.js +0 -3
  313. package/lib/services/terminal-spinner-service.js +0 -2
  314. package/lib/services/test-execution-service.js +2 -9
  315. package/lib/services/test-initialization-service.js +0 -4
  316. package/lib/services/timeline-profiler-service.js +0 -1
  317. package/lib/services/user-settings-service.js +0 -1
  318. package/lib/services/versions-service.js +4 -6
  319. package/lib/services/watch-ignore-list-service.js +0 -1
  320. package/lib/services/xcconfig-service.js +0 -2
  321. package/lib/services/xcproj-service.js +0 -1
  322. package/lib/shared-event-bus.js +0 -6
  323. package/lib/sys-info.js +1 -2
  324. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  325. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  326. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  327. package/lib/yarn-package-manager.js +0 -1
  328. package/lib/yarn2-package-manager.js +0 -3
  329. package/package.json +1 -1
@@ -41,7 +41,7 @@ class PerformanceService {
41
41
  trackAnalyticsData(methodInfo, executionTime) {
42
42
  this.$analyticsService
43
43
  .trackEventActionInGoogleAnalytics({
44
- action: "Performance" /* TrackActionNames.Performance */,
44
+ action: "Performance",
45
45
  additionalData: methodInfo,
46
46
  value: executionTime,
47
47
  })
@@ -71,7 +71,6 @@ 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
75
74
  getJsonSanitizer() {
76
75
  const seen = new WeakSet();
77
76
  seen.add(this.$options);
@@ -91,4 +90,3 @@ PerformanceService.LOG_MESSAGE_TEMPLATE = `Execution of method "%s" took %s ms.`
91
90
  PerformanceService.FAIL_LOG_MESSAGE_TEMPLATE = `Failed to log pefromance data in file for method %s.`;
92
91
  PerformanceService.MIN_NODE_PERFORMANCE_MODULE_VERSION = "8.5.0";
93
92
  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: "Add Platform",
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
@@ -49,19 +49,17 @@ 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" /* NativePlatformStatus.alreadyPrepared */ });
52
+ await this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: "3" });
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
58
56
  if (platformData.platformNameLowerCase !== "android") {
59
57
  return;
60
58
  }
61
59
  const previousPrepareInfo = this.$projectChangesService.getPrepareInfo(platformData);
62
60
  if (!previousPrepareInfo ||
63
61
  previousPrepareInfo.nativePlatformStatus !==
64
- "3" /* NativePlatformStatus.alreadyPrepared */) {
62
+ "3") {
65
63
  return;
66
64
  }
67
65
  const { release: previousWasRelease } = previousPrepareInfo;
@@ -77,4 +75,3 @@ __decorate([
77
75
  (0, helpers_1.hook)("prepareNativeApp")
78
76
  ], PrepareNativePlatformService.prototype, "prepareNativePlatform", null);
79
77
  yok_1.injector.register("prepareNativePlatformService", PrepareNativePlatformService);
80
- //# sourceMappingURL=prepare-native-platform-service.js.map
@@ -11,9 +11,7 @@ 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,
15
- // @ts-ignore - required by the hook helper!
16
- $injector) {
14
+ constructor($doctorService, $errors, $analyticsService, $injector) {
17
15
  this.$doctorService = $doctorService;
18
16
  this.$errors = $errors;
19
17
  this.$analyticsService = $analyticsService;
@@ -24,7 +22,7 @@ class PlatformEnvironmentRequirements {
24
22
  const selectedOption = null;
25
23
  if (process.env.NS_SKIP_ENV_CHECK) {
26
24
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
27
- action: "Check Environment Requirements" /* TrackActionNames.CheckEnvironmentRequirements */,
25
+ action: "Check Environment Requirements",
28
26
  additionalData: "Skipped: NS_SKIP_ENV_CHECK is set",
29
27
  });
30
28
  return {
@@ -39,9 +37,8 @@ class PlatformEnvironmentRequirements {
39
37
  forceCheck: input.forceCheck,
40
38
  });
41
39
  if (!canExecute) {
42
- // if (!isInteractive()) {
43
40
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
44
- action: "Check Environment Requirements" /* TrackActionNames.CheckEnvironmentRequirements */,
41
+ action: "Check Environment Requirements",
45
42
  additionalData: "Non-interactive terminal, unable to execute local builds.",
46
43
  });
47
44
  this.fail(this.getNonInteractiveConsoleMessage(platform));
@@ -61,7 +58,6 @@ class PlatformEnvironmentRequirements {
61
58
  ].join(os_1.EOL);
62
59
  }
63
60
  getEnvVerificationMessage(platform) {
64
- // map process.platform to OS name used in docs
65
61
  const os = {
66
62
  linux: "linux",
67
63
  win32: "windows",
@@ -80,4 +76,3 @@ __decorate([
80
76
  (0, helpers_1.hook)("checkEnvironment")
81
77
  ], PlatformEnvironmentRequirements.prototype, "checkEnvironmentRequirements", null);
82
78
  yok_1.injector.register("platformEnvironmentRequirements", PlatformEnvironmentRequirements);
83
- //# sourceMappingURL=platform-environment-requirements.js.map
@@ -30,4 +30,3 @@ class PlatformProjectServiceBase extends events_1.EventEmitter {
30
30
  }
31
31
  }
32
32
  exports.PlatformProjectServiceBase = PlatformProjectServiceBase;
33
- //# sourceMappingURL=platform-project-service-base.js.map
@@ -29,4 +29,3 @@ class PlatformsDataService {
29
29
  }
30
30
  exports.PlatformsDataService = PlatformsDataService;
31
31
  yok_1.injector.register("platformsDataService", PlatformsDataService);
32
- //# sourceMappingURL=platforms-data-service.js.map
@@ -54,7 +54,6 @@ class PluginsService {
54
54
  const realNpmPackageJson = this.$fs.readJson(pathToRealNpmPackageJson);
55
55
  if (realNpmPackageJson.nativescript) {
56
56
  const pluginData = this.convertToPluginData(realNpmPackageJson, projectData.projectDir);
57
- // Validate
58
57
  const action = async (pluginDestinationPath, platform, platformData) => {
59
58
  this.isPluginDataValidForPlatform(pluginData, platform, projectData);
60
59
  };
@@ -137,9 +136,6 @@ class PluginsService {
137
136
  paths: [projectData.projectDir],
138
137
  });
139
138
  if (pathToPackage) {
140
- // return false if the dependency is installed - we'll filter out boolean values
141
- // and end up with an array of dep names that are not installed if we end up
142
- // inside the catch block.
143
139
  return false;
144
140
  }
145
141
  this.$logger.trace(`${dep} is not installed, or couldn't be found`);
@@ -172,9 +168,6 @@ class PluginsService {
172
168
  return productionPlugins
173
169
  .map((plugin) => this.convertToPluginData(plugin, projectData.projectDir))
174
170
  .filter((item, idx, self) => {
175
- // Filter out duplicates to speed up build times by not building the same dependency
176
- // multiple times. One possible downside is that if there are different versions
177
- // of the same native dependency only the first one in the array will be built
178
171
  return self.findIndex((p) => p.name === item.name) === idx;
179
172
  });
180
173
  }
@@ -206,11 +199,9 @@ class PluginsService {
206
199
  const dependenciesGroupedByName = _.groupBy(productionDependencies, (p) => p.name);
207
200
  _.each(dependenciesGroupedByName, (dependencyOccurrences, dependencyName) => {
208
201
  if (dependencyOccurrences.length > 1) {
209
- // the dependency exists multiple times in node_modules
210
202
  const dependencyOccurrencesGroupedByVersion = _.groupBy(dependencyOccurrences, (g) => g.version);
211
203
  const versions = _.keys(dependencyOccurrencesGroupedByVersion);
212
204
  if (versions.length === 1) {
213
- // all dependencies with this name have the same version
214
205
  this.$logger.trace(`Detected same versions (${_.first(versions)}) of the ${dependencyName} installed at locations: ${_.map(dependencyOccurrences, (d) => d.directory).join(", ")}`);
215
206
  }
216
207
  else {
@@ -240,11 +231,9 @@ class PluginsService {
240
231
  const dependenciesGroupedByFrameworkName = _.groupBy(dependenciesWithFrameworks, (d) => d.frameworkName);
241
232
  _.each(dependenciesGroupedByFrameworkName, (dependencyOccurrences, frameworkName) => {
242
233
  if (dependencyOccurrences.length > 1) {
243
- // A framework exists multiple times in node_modules
244
234
  const groupedByName = _.groupBy(dependencyOccurrences, (d) => d.name);
245
235
  const pluginsNames = _.keys(groupedByName);
246
236
  if (pluginsNames.length > 1) {
247
- // fail - the same framework is installed by different dependencies.
248
237
  const locations = dependencyOccurrences.map((d) => d.frameworkLocation);
249
238
  let msg = `Detected the framework ${frameworkName} is installed from multiple plugins at locations:\n${locations.join("\n")}\n`;
250
239
  msg += this.getHelpMessage(projectDir);
@@ -254,7 +243,6 @@ class PluginsService {
254
243
  const dependencyOccurrencesGroupedByVersion = _.groupBy(dependencyOccurrences, (g) => g.version);
255
244
  const versions = _.keys(dependencyOccurrencesGroupedByVersion);
256
245
  if (versions.length === 1) {
257
- // all dependencies with this name have the same version
258
246
  this.$logger.warn(`Detected the framework ${frameworkName} is installed multiple times from the same versions of plugin (${_.first(versions)}) at locations: ${_.map(dependencyOccurrences, (d) => d.directory).join(", ")}`);
259
247
  const selectedPackage = _.minBy(dependencyOccurrences, (d) => d.depth);
260
248
  this.$logger.info(color_1.color.green(`CLI will use only the native code from '${selectedPackage.directory}'.`));
@@ -306,7 +294,7 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
306
294
  pluginData.isPlugin = !!cacheData.nativescript;
307
295
  pluginData.pluginPlatformsFolderPath = (platform) => {
308
296
  if (this.$mobileHelper.isvisionOSPlatform(platform)) {
309
- platform = "ios" /* constants.PlatformTypes.ios */;
297
+ platform = "ios";
310
298
  }
311
299
  return path.join(pluginData.fullPath, "platforms", platform.toLowerCase());
312
300
  };
@@ -364,7 +352,6 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
364
352
  return _.keys(require(packageJsonFilePath).dependencies);
365
353
  }
366
354
  getNodeModuleData(module, projectDir) {
367
- // module can be modulePath or moduleName
368
355
  if (!this.$fs.exists(module) || path.basename(module) !== "package.json") {
369
356
  module = this.getPackageJsonFilePathForModule(module, projectDir);
370
357
  }
@@ -396,7 +383,7 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
396
383
  return this.parseNpmCommandResult(npmCommandArguments);
397
384
  }
398
385
  parseNpmCommandResult(npmCommandResult) {
399
- return npmCommandResult.split("@")[0]; // returns plugin name
386
+ return npmCommandResult.split("@")[0];
400
387
  }
401
388
  async executeForAllInstalledPlatforms(action, projectData) {
402
389
  const availablePlatforms = this.$mobileHelper.platformNames.map((p) => p.toLowerCase());
@@ -411,8 +398,6 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
411
398
  }
412
399
  getInstalledFrameworkVersion(platform, projectData) {
413
400
  const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, platform);
414
- // const platformData = this.$platformsDataService.getPlatformData(platform, projectData);
415
- // const frameworkData = this.$projectDataService.getNSValue(projectData.projectDir, platformData.frameworkPackageName);
416
401
  return runtimePackage.version;
417
402
  }
418
403
  isPluginDataValidForPlatform(pluginData, platform, projectData) {
@@ -442,7 +427,6 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
442
427
  }
443
428
  getAllPluginsNativeHashes(pathToPluginsBuildFile) {
444
429
  if (this.$options.hostProjectPath) {
445
- // TODO: force rebuild plugins for now until we decide where to put .ns-plugins-build-data.json when embedding
446
430
  return {};
447
431
  }
448
432
  let data = {};
@@ -453,7 +437,6 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
453
437
  }
454
438
  setPluginNativeHashes(opts) {
455
439
  if (this.$options.hostProjectPath) {
456
- // TODO: force rebuild plugins for now until we decide where to put .ns-plugins-build-data.json when embedding
457
440
  return;
458
441
  }
459
442
  opts.allPluginsNativeHashes[opts.pluginData.name] =
@@ -474,4 +457,3 @@ PluginsService.LOCK_FILES = [
474
457
  "pnpm-lock.yaml",
475
458
  ];
476
459
  yok_1.injector.register("pluginsService", PluginsService);
477
- //# sourceMappingURL=plugins-service.js.map
@@ -19,4 +19,3 @@ class PrepareDataService {
19
19
  }
20
20
  exports.PrepareDataService = PrepareDataService;
21
21
  yok_1.injector.register("prepareDataService", PrepareDataService);
22
- //# sourceMappingURL=prepare-data-service.js.map
@@ -47,7 +47,6 @@ ProjectBackupService.Backup = class Backup {
47
47
  backedUpPaths.push(pathToBackup);
48
48
  }
49
49
  }
50
- // create backup.json
51
50
  this.$super.$fs.writeJson(path.resolve(this.backupDir, "_backup.json"), {
52
51
  name: this.name,
53
52
  paths: backedUpPaths,
@@ -68,7 +67,6 @@ ProjectBackupService.Backup = class Backup {
68
67
  }
69
68
  }
70
69
  this.$super.$logger.trace(backupData);
71
- // restore files
72
70
  return this;
73
71
  }
74
72
  isUpToDate() {
@@ -78,7 +76,6 @@ ProjectBackupService.Backup = class Backup {
78
76
  }
79
77
  for (const pathToBackup of backupData.paths) {
80
78
  const sourcePath = path.resolve(this.backupDir, pathToBackup);
81
- // if any of the files don't exist the backup is not up-to-date
82
79
  if (!this.$super.$fs.exists(sourcePath)) {
83
80
  return false;
84
81
  }
@@ -115,4 +112,3 @@ ProjectBackupService.Backup = class Backup {
115
112
  }
116
113
  };
117
114
  yok_1.injector.register("projectBackupService", ProjectBackupService);
118
- //# sourceMappingURL=project-backup-service.js.map
@@ -64,7 +64,6 @@ class ProjectChangesService {
64
64
  this._prepareInfo.projectFileHash = this.getProjectFileStrippedHash(projectData.projectDir, platformData);
65
65
  this._changesInfo.nativeChanged = this.isProjectFileChanged(projectData.projectDir, platformData);
66
66
  }
67
- // If this causes too much rebuilds of the plugins or uncecessary builds for Android, move overrideCocoapods to prepareInfo.
68
67
  this._changesInfo.nsConfigChanged = this.filesChanged([
69
68
  path.join(projectData.projectDir, constants_1.CONFIG_FILE_NAME_JS),
70
69
  path.join(projectData.projectDir, constants_1.CONFIG_FILE_NAME_TS),
@@ -122,7 +121,6 @@ class ProjectChangesService {
122
121
  }
123
122
  getPrepareInfo(platformData) {
124
123
  if (this.$options.hostProjectPath) {
125
- // TODO: always prepare for now until we decide where to keep the .nsprepareinfo file when embedding
126
124
  return null;
127
125
  }
128
126
  const prepareInfoFilePath = this.getPrepareInfoFilePath(platformData);
@@ -142,7 +140,6 @@ class ProjectChangesService {
142
140
  await this.ensurePrepareInfo(platformData, projectData, prepareData);
143
141
  }
144
142
  if (this.$options.hostProjectPath) {
145
- // TODO: do not save for now until we decide where to keep the .nsprepareinfo file when embedding
146
143
  return null;
147
144
  }
148
145
  const prepareInfoFilePath = this.getPrepareInfoFilePath(platformData);
@@ -152,7 +149,7 @@ class ProjectChangesService {
152
149
  this._prepareInfo = this._prepareInfo || this.getPrepareInfo(platformData);
153
150
  if (this._prepareInfo &&
154
151
  addedPlatform.nativePlatformStatus ===
155
- "3" /* NativePlatformStatus.alreadyPrepared */) {
152
+ "3") {
156
153
  this._prepareInfo.nativePlatformStatus =
157
154
  addedPlatform.nativePlatformStatus;
158
155
  }
@@ -176,8 +173,8 @@ class ProjectChangesService {
176
173
  return false;
177
174
  }
178
175
  const nativePlatformStatus = !prepareData.nativePrepare || !prepareData.nativePrepare.skipNativePrepare
179
- ? "2" /* NativePlatformStatus.requiresPrepare */
180
- : "1" /* NativePlatformStatus.requiresPlatformAdd */;
176
+ ? "2"
177
+ : "1";
181
178
  this._prepareInfo = {
182
179
  time: "",
183
180
  nativePlatformStatus,
@@ -200,13 +197,6 @@ class ProjectChangesService {
200
197
  const projectFileContents = this.$fs.readJson(projectFilePath);
201
198
  const relevantProperties = ["dependencies"];
202
199
  const projectFileStrippedContents = _.pick(projectFileContents, relevantProperties);
203
- // _(this.$devicePlatformsConstants)
204
- // .keys()
205
- // .map(k => k.toLowerCase())
206
- // .difference([platformData.platformNameLowerCase])
207
- // .each(otherPlatform => {
208
- // delete projectFileContents.nativescript[`tns-${otherPlatform}`];
209
- // });
210
200
  return (0, helpers_1.getHash)(JSON.stringify(projectFileStrippedContents));
211
201
  }
212
202
  isProjectFileChanged(projectDir, platformData) {
@@ -272,4 +262,3 @@ __decorate([
272
262
  (0, helpers_1.hook)("checkForChanges")
273
263
  ], ProjectChangesService.prototype, "checkForChanges", null);
274
264
  yok_1.injector.register("projectChangesService", ProjectChangesService);
275
- //# sourceMappingURL=project-changes-service.js.map
@@ -28,7 +28,6 @@ class ProjectCleanupService {
28
28
  success = success && cleanRes.ok;
29
29
  }
30
30
  if (!(options === null || options === void 0 ? void 0 : options.silent)) {
31
- // required to print an empty line for the spinner to not replace the last status... (probably a bug in the spinners)
32
31
  console.log();
33
32
  }
34
33
  if (stats) {
@@ -88,4 +87,3 @@ class ProjectCleanupService {
88
87
  }
89
88
  exports.ProjectCleanupService = ProjectCleanupService;
90
89
  yok_1.injector.register("projectCleanupService", ProjectCleanupService);
91
- //# sourceMappingURL=project-cleanup-service.js.map
@@ -35,7 +35,6 @@ class ProjectConfigService {
35
35
  return (this.forceUsingLegacyConfig = force);
36
36
  }
37
37
  requireFromString(src, filename) {
38
- // @ts-ignore
39
38
  const m = new module.constructor();
40
39
  m.paths = module.paths;
41
40
  m._compile(src, filename);
@@ -58,7 +57,6 @@ export default {
58
57
  } as NativeScriptConfig;`.trim();
59
58
  }
60
59
  warnUsingLegacyNSConfig() {
61
- // todo: remove hack
62
60
  const isMigrate = _.get(this.$options, "argv._[0]") === "migrate";
63
61
  if (isMigrate) {
64
62
  return;
@@ -67,7 +65,6 @@ export default {
67
65
  }
68
66
  detectProjectConfigs(projectDir) {
69
67
  var _a;
70
- // allow overriding config name with env variable or --config (or -c)
71
68
  let configName = (_a = process.env.NATIVESCRIPT_CONFIG_NAME) !== null && _a !== void 0 ? _a : this.$options.config;
72
69
  if (configName === "false") {
73
70
  configName = false;
@@ -97,7 +94,6 @@ export default {
97
94
  const existingConfigs = possibleConfigPaths.filter((path) => {
98
95
  return this.$fs.exists(path);
99
96
  });
100
- // push the first possible config into the "existing" list
101
97
  const hasExistingConfig = !!existingConfigs.length;
102
98
  if (!hasExistingConfig) {
103
99
  this.$logger.trace(`No config file found - falling back to ${possibleConfigPaths[0]}.`);
@@ -192,8 +188,6 @@ export default {
192
188
  this.$fs.writeFile(configFilePath, await (0, prettier_1.format)(newContent, {
193
189
  ...prettierOptions,
194
190
  parser: "typescript",
195
- // note: we don't use plugins here, since we are only formatting ts files, and they are supported by default
196
- // and this also causes issues with certain plugins, like prettier-plugin-tailwindcss.
197
191
  plugins: [],
198
192
  }));
199
193
  }
@@ -201,11 +195,9 @@ export default {
201
195
  this.$logger.error(`Failed to update config.` + error);
202
196
  }
203
197
  finally {
204
- // verify config is updated correctly
205
198
  if (!Array.isArray(this.getValue(key)) && this.getValue(key) !== value) {
206
199
  this.$logger.error(`${os_1.EOL}Failed to update ${hasTSConfig ? constants_1.CONFIG_FILE_NAME_TS : constants_1.CONFIG_FILE_NAME_JS}.${os_1.EOL}`);
207
200
  this.$logger.printMarkdown(`Please manually update \`${hasTSConfig ? constants_1.CONFIG_FILE_NAME_TS : constants_1.CONFIG_FILE_NAME_JS}\` and set \`${key}\` to \`${value}\`.${os_1.EOL}`);
208
- // restore original content
209
201
  this.$fs.writeFile(configFilePath, configContent);
210
202
  return false;
211
203
  }
@@ -234,11 +226,9 @@ export default {
234
226
  ? this.$fs.readJson(info.NSConfigPath)
235
227
  : {};
236
228
  try {
237
- // injecting here to avoid circular dependency
238
229
  const projectData = this.$injector.resolve("projectData");
239
230
  const embeddedPackageJsonPath = path.resolve(this.projectHelper.projectDir, projectData.getAppDirectoryRelativePath(), constants.PACKAGE_JSON_FILE_NAME);
240
231
  const embeddedPackageJson = this.$fs.readJson(embeddedPackageJsonPath);
241
- // filter only the supported keys
242
232
  additionalData.push(_.pick(embeddedPackageJson, [
243
233
  "android",
244
234
  "ios",
@@ -250,11 +240,9 @@ export default {
250
240
  }
251
241
  catch (err) {
252
242
  this.$logger.trace("failed to add embedded package.json data to config", err);
253
- // ignore if the file doesn't exist
254
243
  }
255
244
  try {
256
245
  const packageJson = this.$fs.readJson(path.join(this.projectHelper.projectDir, "package.json"));
257
- // add app id to additionalData for backwards compatibility
258
246
  if (!NSConfig.id &&
259
247
  packageJson &&
260
248
  packageJson.nativescript &&
@@ -278,10 +266,8 @@ export default {
278
266
  }
279
267
  catch (err) {
280
268
  this.$logger.trace("failed to read package.json data for config", err);
281
- // ignore if the file doesn't exist
282
269
  }
283
270
  return _.defaultsDeep({}, ...additionalData, NSConfig);
284
- // return Object.assign({}, ...additionalData, NSConfig);
285
271
  }
286
272
  async writeLegacyNSConfigIfNeeded(projectDir, runtimePackage) {
287
273
  const { usingNSConfig } = this.detectProjectConfigs(projectDir);
@@ -290,8 +276,6 @@ export default {
290
276
  }
291
277
  if (runtimePackage.version &&
292
278
  semver.gte(semver.coerce(runtimePackage.version), "7.0.0-rc.5")) {
293
- // runtimes >= 7.0.0-rc.5 support passing appPath and appResourcesPath through gradle project flags
294
- // so writing an nsconfig is not necessary.
295
279
  return;
296
280
  }
297
281
  const runtimePackageDisplay = `${runtimePackage.name}${runtimePackage.version ? " v" + runtimePackage.version : ""}`;
@@ -308,10 +292,8 @@ You may add \`nsconfig.json\` to \`.gitignore\` as the CLI will regenerate it as
308
292
  appPath: this.getValue("appPath"),
309
293
  appResourcesPath: this.getValue("appResourcesPath"),
310
294
  });
311
- // mark the file for cleanup after the CLI exits
312
295
  await this.$cleanupService.addCleanupDeleteAction(nsConfigPath);
313
296
  }
314
- // todo: move into config manipulation
315
297
  flattenObjectToPaths(obj, basePath) {
316
298
  const toPath = (key) => [basePath, key].filter(Boolean).join(".");
317
299
  return Object.keys(obj).reduce((all, key) => {
@@ -320,7 +302,7 @@ You may add \`nsconfig.json\` to \`.gitignore\` as the CLI will regenerate it as
320
302
  ...all,
321
303
  {
322
304
  key: toPath(key),
323
- value: obj[key], // Preserve arrays as they are
305
+ value: obj[key],
324
306
  },
325
307
  ];
326
308
  }
@@ -339,7 +321,7 @@ You may add \`nsconfig.json\` to \`.gitignore\` as the CLI will regenerate it as
339
321
  }
340
322
  exports.ProjectConfigService = ProjectConfigService;
341
323
  __decorate([
342
- (0, decorators_1.cache)() // @cache should prevent the message being printed multiple times
324
+ (0, decorators_1.cache)()
343
325
  ], ProjectConfigService.prototype, "warnUsingLegacyNSConfig", null);
344
326
  __decorate([
345
327
  (0, decorators_1.exported)("projectConfigService")
@@ -351,4 +333,3 @@ __decorate([
351
333
  (0, decorators_1.exported)("projectConfigService")
352
334
  ], ProjectConfigService.prototype, "setValue", null);
353
335
  yok_1.injector.register("projectConfigService", ProjectConfigService);
354
- //# sourceMappingURL=project-config-service.js.map