nativescript 8.9.1 → 8.9.3-dev.0

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 (327) hide show
  1. package/config/test-deps-versions-generated.json +1 -1
  2. package/lib/android-tools-info.js +0 -12
  3. package/lib/base-package-manager.js +0 -7
  4. package/lib/bootstrap.js +1 -5
  5. package/lib/bun-package-manager.js +1 -17
  6. package/lib/color.js +0 -3
  7. package/lib/commands/add-platform.js +0 -1
  8. package/lib/commands/apple-login.js +0 -1
  9. package/lib/commands/appstore-list.js +0 -1
  10. package/lib/commands/appstore-upload.js +0 -3
  11. package/lib/commands/build.js +2 -3
  12. package/lib/commands/clean.js +1 -22
  13. package/lib/commands/command-base.js +0 -1
  14. package/lib/commands/config.js +0 -4
  15. package/lib/commands/create-project.js +0 -6
  16. package/lib/commands/debug.js +1 -6
  17. package/lib/commands/deploy.js +2 -3
  18. package/lib/commands/embedding/embed.js +0 -7
  19. package/lib/commands/extensibility/install-extension.js +0 -1
  20. package/lib/commands/extensibility/list-extensions.js +0 -1
  21. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  22. package/lib/commands/fonts.js +0 -1
  23. package/lib/commands/generate-assets.js +0 -1
  24. package/lib/commands/generate-help.js +0 -1
  25. package/lib/commands/generate.js +1 -48
  26. package/lib/commands/info.js +0 -1
  27. package/lib/commands/install.js +0 -1
  28. package/lib/commands/list-platforms.js +0 -1
  29. package/lib/commands/migrate.js +0 -1
  30. package/lib/commands/native-add.js +0 -5
  31. package/lib/commands/platform-clean.js +0 -1
  32. package/lib/commands/plugin/add-plugin.js +0 -1
  33. package/lib/commands/plugin/build-plugin.js +0 -1
  34. package/lib/commands/plugin/create-plugin.js +0 -5
  35. package/lib/commands/plugin/list-plugins.js +0 -1
  36. package/lib/commands/plugin/remove-plugin.js +0 -2
  37. package/lib/commands/plugin/update-plugin.js +0 -1
  38. package/lib/commands/post-install.js +0 -6
  39. package/lib/commands/prepare.js +3 -4
  40. package/lib/commands/preview.js +0 -2
  41. package/lib/commands/remove-platform.js +0 -1
  42. package/lib/commands/resources/resources-update.js +0 -2
  43. package/lib/commands/run.js +0 -1
  44. package/lib/commands/setup.js +0 -1
  45. package/lib/commands/start.js +0 -1
  46. package/lib/commands/test-init.js +0 -4
  47. package/lib/commands/test.js +2 -9
  48. package/lib/commands/typings.js +1 -2
  49. package/lib/commands/update-platform.js +0 -5
  50. package/lib/commands/update.js +0 -2
  51. package/lib/commands/widget.js +1 -20
  52. package/lib/common/bootstrap.js +0 -1
  53. package/lib/common/child-process.js +0 -3
  54. package/lib/common/codeGeneration/code-entity.js +0 -1
  55. package/lib/common/codeGeneration/code-printer.js +0 -1
  56. package/lib/common/command-params.js +0 -1
  57. package/lib/common/commands/analytics.js +0 -3
  58. package/lib/common/commands/autocompletion.js +0 -3
  59. package/lib/common/commands/device/device-log-stream.js +0 -1
  60. package/lib/common/commands/device/get-file.js +0 -2
  61. package/lib/common/commands/device/list-applications.js +0 -1
  62. package/lib/common/commands/device/list-devices.js +0 -3
  63. package/lib/common/commands/device/list-files.js +0 -2
  64. package/lib/common/commands/device/put-file.js +0 -2
  65. package/lib/common/commands/device/run-application.js +0 -1
  66. package/lib/common/commands/device/stop-application.js +0 -1
  67. package/lib/common/commands/device/uninstall-application.js +0 -1
  68. package/lib/common/commands/doctor.js +2 -3
  69. package/lib/common/commands/generate-messages.js +0 -1
  70. package/lib/common/commands/help.js +0 -1
  71. package/lib/common/commands/package-manager-get.js +0 -1
  72. package/lib/common/commands/package-manager-set.js +0 -1
  73. package/lib/common/commands/post-install.js +0 -1
  74. package/lib/common/commands/preuninstall.js +2 -11
  75. package/lib/common/commands/proxy/proxy-base.js +0 -4
  76. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  77. package/lib/common/commands/proxy/proxy-get.js +0 -1
  78. package/lib/common/commands/proxy/proxy-set.js +0 -1
  79. package/lib/common/common-lib.js +0 -1
  80. package/lib/common/constants.js +0 -11
  81. package/lib/common/decorators.js +0 -48
  82. package/lib/common/dispatchers.js +1 -10
  83. package/lib/common/errors.js +3 -13
  84. package/lib/common/file-system.js +2 -13
  85. package/lib/common/header.js +0 -3
  86. package/lib/common/helpers.js +3 -89
  87. package/lib/common/host-info.js +0 -4
  88. package/lib/common/http-client.js +0 -20
  89. package/lib/common/logger/appenders/cli-appender.js +0 -4
  90. package/lib/common/logger/appenders/emit-appender.js +0 -4
  91. package/lib/common/logger/layouts/cli-layout.js +0 -1
  92. package/lib/common/logger/logger.js +0 -5
  93. package/lib/common/messages/messages.js +0 -6
  94. package/lib/common/mobile/android/android-application-manager.js +1 -20
  95. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  96. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  97. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  98. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  99. package/lib/common/mobile/android/android-device.js +0 -8
  100. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  101. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  102. package/lib/common/mobile/android/android-log-filter.js +0 -4
  103. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  104. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  105. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  106. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  107. package/lib/common/mobile/android/logcat-helper.js +0 -13
  108. package/lib/common/mobile/application-manager-base.js +0 -6
  109. package/lib/common/mobile/device-emitter.js +0 -4
  110. package/lib/common/mobile/device-log-emitter.js +0 -1
  111. package/lib/common/mobile/device-log-provider-base.js +0 -1
  112. package/lib/common/mobile/device-log-provider.js +0 -23
  113. package/lib/common/mobile/device-platforms-constants.js +0 -1
  114. package/lib/common/mobile/emulator-helper.js +0 -3
  115. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  116. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  117. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  118. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  119. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  120. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  121. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  122. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  123. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  124. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  125. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  126. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  127. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  128. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  129. package/lib/common/mobile/log-filter.js +0 -2
  130. package/lib/common/mobile/logging-levels.js +0 -1
  131. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  132. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  133. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  134. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  135. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  136. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  137. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  138. package/lib/common/mobile/mobile-helper.js +0 -1
  139. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  140. package/lib/common/opener.js +0 -1
  141. package/lib/common/os-info.js +0 -1
  142. package/lib/common/plist-parser.js +0 -1
  143. package/lib/common/project-helper.js +0 -1
  144. package/lib/common/prompter.js +1 -9
  145. package/lib/common/queue.js +0 -1
  146. package/lib/common/resource-loader.js +0 -1
  147. package/lib/common/services/auto-completion-service.js +1 -13
  148. package/lib/common/services/cancellation.js +1 -2
  149. package/lib/common/services/commands-service.js +6 -17
  150. package/lib/common/services/help-service.js +3 -11
  151. package/lib/common/services/hooks-service.js +0 -13
  152. package/lib/common/services/ios-notification-service.js +0 -1
  153. package/lib/common/services/json-file-settings-service.js +0 -6
  154. package/lib/common/services/lock-service.js +0 -6
  155. package/lib/common/services/message-contract-generator.js +0 -1
  156. package/lib/common/services/messages-service.js +0 -1
  157. package/lib/common/services/micro-templating-service.js +0 -6
  158. package/lib/common/services/net-service.js +0 -3
  159. package/lib/common/services/project-files-manager.js +0 -5
  160. package/lib/common/services/project-files-provider-base.js +0 -1
  161. package/lib/common/services/proxy-service.js +0 -1
  162. package/lib/common/services/qr.js +0 -1
  163. package/lib/common/services/settings-service.js +0 -1
  164. package/lib/common/services/xcode-select-service.js +0 -1
  165. package/lib/common/utils.js +0 -1
  166. package/lib/common/validators/project-name-validator.js +0 -1
  167. package/lib/common/validators/validation-result.js +0 -1
  168. package/lib/common/verify-node-version.js +1 -8
  169. package/lib/common/yok.js +11 -32
  170. package/lib/config.js +1 -22
  171. package/lib/constants-provider.js +0 -1
  172. package/lib/constants.js +0 -53
  173. package/lib/controllers/build-controller.js +3 -4
  174. package/lib/controllers/debug-controller.js +3 -8
  175. package/lib/controllers/deploy-controller.js +0 -1
  176. package/lib/controllers/migrate-controller.js +4 -90
  177. package/lib/controllers/platform-controller.js +1 -9
  178. package/lib/controllers/prepare-controller.js +4 -17
  179. package/lib/controllers/run-controller.js +1 -17
  180. package/lib/controllers/update-controller-base.js +0 -1
  181. package/lib/controllers/update-controller.js +0 -11
  182. package/lib/data/build-data.js +0 -1
  183. package/lib/data/controller-data-base.js +0 -1
  184. package/lib/data/debug-data.js +0 -1
  185. package/lib/data/platform-data.js +0 -1
  186. package/lib/data/prepare-data.js +0 -1
  187. package/lib/data/run-data.js +0 -1
  188. package/lib/definitions/project.d.ts +7 -0
  189. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  190. package/lib/detached-processes/cleanup-process.js +14 -18
  191. package/lib/detached-processes/file-log-service.js +1 -2
  192. package/lib/device-path-provider.js +0 -1
  193. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  194. package/lib/device-sockets/ios/notification.js +0 -3
  195. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  196. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  197. package/lib/helpers/deploy-command-helper.js +0 -1
  198. package/lib/helpers/key-command-helper.js +2 -4
  199. package/lib/helpers/livesync-command-helper.js +1 -4
  200. package/lib/helpers/network-connectivity-validator.js +0 -1
  201. package/lib/helpers/options-track-helper.js +2 -3
  202. package/lib/helpers/package-path-helper.js +0 -1
  203. package/lib/helpers/platform-command-helper.js +2 -7
  204. package/lib/helpers/version-validator-helper.js +0 -1
  205. package/lib/key-commands/bootstrap.js +2 -3
  206. package/lib/key-commands/index.js +4 -5
  207. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  208. package/lib/nativescript-cli-lib.js +0 -1
  209. package/lib/nativescript-cli.js +1 -10
  210. package/lib/node/pbxproj-dom-xcode.js +0 -1
  211. package/lib/node/xcode.js +0 -1
  212. package/lib/node-package-manager.js +1 -11
  213. package/lib/options.js +119 -144
  214. package/lib/package-installation-manager.js +1 -8
  215. package/lib/package-manager.js +0 -2
  216. package/lib/platform-command-param.js +0 -1
  217. package/lib/pnpm-package-manager.js +1 -4
  218. package/lib/project-data.js +4 -12
  219. package/lib/providers/project-files-provider.js +0 -1
  220. package/lib/resolvers/livesync-service-resolver.js +0 -1
  221. package/lib/services/analytics/analytics-broker-process.js +6 -10
  222. package/lib/services/analytics/analytics-broker.js +1 -2
  223. package/lib/services/analytics/analytics-service.js +25 -29
  224. package/lib/services/analytics/google-analytics-provider.js +12 -13
  225. package/lib/services/analytics-settings-service.js +0 -5
  226. package/lib/services/android/android-bundle-tool-service.js +0 -1
  227. package/lib/services/android/gradle-build-args-service.js +0 -3
  228. package/lib/services/android/gradle-build-service.js +0 -1
  229. package/lib/services/android/gradle-command-service.js +0 -1
  230. package/lib/services/android-device-debug-service.js +0 -6
  231. package/lib/services/android-plugin-build-service.js +2 -31
  232. package/lib/services/android-project-service.js +4 -71
  233. package/lib/services/android-resources-migration-service.js +0 -7
  234. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  235. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  236. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  237. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  238. package/lib/services/assets-generation/assets-generation-service.js +5 -16
  239. package/lib/services/build-artifacts-service.js +1 -2
  240. package/lib/services/build-data-service.js +0 -1
  241. package/lib/services/build-info-file-service.js +0 -1
  242. package/lib/services/cleanup-service.js +9 -13
  243. package/lib/services/cocoapods-platform-manager.js +0 -9
  244. package/lib/services/cocoapods-service.js +1 -21
  245. package/lib/services/debug-data-service.js +0 -1
  246. package/lib/services/debug-service-base.js +0 -7
  247. package/lib/services/device/device-install-app-service.js +1 -2
  248. package/lib/services/doctor-service.js +6 -21
  249. package/lib/services/extensibility-service.js +0 -8
  250. package/lib/services/files-hash-service.js +0 -1
  251. package/lib/services/hmr-status-service.js +0 -2
  252. package/lib/services/info-service.js +0 -1
  253. package/lib/services/initialize-service.js +1 -5
  254. package/lib/services/ios/export-options-plist-service.js +0 -4
  255. package/lib/services/ios/ios-signing-service.js +0 -4
  256. package/lib/services/ios/spm-service.js +0 -11
  257. package/lib/services/ios/xcodebuild-args-service.js +0 -9
  258. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  259. package/lib/services/ios/xcodebuild-service.js +1 -2
  260. package/lib/services/ios-debugger-port-service.js +0 -1
  261. package/lib/services/ios-device-debug-service.js +0 -1
  262. package/lib/services/ios-entitlements-service.js +0 -1
  263. package/lib/services/ios-extensions-service.js +0 -1
  264. package/lib/services/ios-log-filter.js +0 -20
  265. package/lib/services/ios-native-target-service.js +4 -6
  266. package/lib/services/ios-project-service.js +1 -91
  267. package/lib/services/ios-provision-service.js +0 -3
  268. package/lib/services/ios-watch-app-service.js +0 -1
  269. package/lib/services/ip-service.js +0 -2
  270. package/lib/services/itmstransporter-service.js +0 -1
  271. package/lib/services/karma-execution.js +0 -2
  272. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  273. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  274. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  275. package/lib/services/livesync/android-livesync-service.js +0 -1
  276. package/lib/services/livesync/android-livesync-tool.js +0 -4
  277. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  278. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  279. package/lib/services/livesync/ios-livesync-service.js +0 -2
  280. package/lib/services/livesync/livesync-socket.js +0 -1
  281. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  282. package/lib/services/livesync-process-data-service.js +0 -1
  283. package/lib/services/log-parser-service.js +0 -1
  284. package/lib/services/log-source-map-service.js +0 -15
  285. package/lib/services/marking-mode-service.js +5 -8
  286. package/lib/services/metadata-filtering-service.js +0 -1
  287. package/lib/services/npm-config-service.js +0 -4
  288. package/lib/services/pacote-service.js +0 -7
  289. package/lib/services/performance-service.js +1 -3
  290. package/lib/services/platform/add-platform-service.js +2 -49
  291. package/lib/services/platform/platform-validation-service.js +0 -1
  292. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  293. package/lib/services/platform-environment-requirements.js +3 -8
  294. package/lib/services/platform-project-service-base.js +0 -1
  295. package/lib/services/platforms-data-service.js +0 -1
  296. package/lib/services/plugins-service.js +2 -20
  297. package/lib/services/prepare-data-service.js +0 -1
  298. package/lib/services/project-backup-service.js +0 -4
  299. package/lib/services/project-changes-service.js +3 -14
  300. package/lib/services/project-cleanup-service.js +0 -2
  301. package/lib/services/project-config-service.js +2 -21
  302. package/lib/services/project-data-service.js +7 -36
  303. package/lib/services/project-name-service.js +0 -1
  304. package/lib/services/project-service.js +0 -10
  305. package/lib/services/project-templates-service.js +2 -3
  306. package/lib/services/qr-code-terminal-service.js +0 -1
  307. package/lib/services/require-service.js +0 -1
  308. package/lib/services/start-service.js +0 -1
  309. package/lib/services/temp-service.js +0 -1
  310. package/lib/services/terminal-spinner-service.js +0 -2
  311. package/lib/services/test-execution-service.js +2 -9
  312. package/lib/services/test-initialization-service.js +0 -4
  313. package/lib/services/timeline-profiler-service.js +0 -1
  314. package/lib/services/user-settings-service.js +0 -1
  315. package/lib/services/versions-service.js +4 -6
  316. package/lib/services/watch-ignore-list-service.js +0 -1
  317. package/lib/services/webpack/webpack-compiler-service.js +35 -57
  318. package/lib/services/xcconfig-service.js +0 -2
  319. package/lib/services/xcproj-service.js +0 -1
  320. package/lib/shared-event-bus.js +0 -6
  321. package/lib/sys-info.js +1 -2
  322. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  323. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  324. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  325. package/lib/yarn-package-manager.js +0 -1
  326. package/lib/yarn2-package-manager.js +0 -3
  327. package/package.json +1 -1
@@ -18,40 +18,7 @@ const constants_1 = require("../common/constants");
18
18
  const helpers_1 = require("../common/helpers");
19
19
  const decorators_1 = require(".././common/decorators");
20
20
  const yok_1 = require("../common/yok");
21
- //
22
- // we sort the native dependencies topologically to make sure they are processed in the right order
23
- // native dependenciess need to be sorted so the deepst dependencies are built before it's parents
24
- //
25
- // for example, given this dep structure (assuming these are all native dependencies that need to be built)
26
- // (note: we list all dependencies at the root level, so the leaf nodes are essentially references to the root nodes)
27
- //
28
- // |- dep1
29
- // |- dep2
30
- // |- |- dep3
31
- // |- |- dep4
32
- // |- |- |- dep5
33
- // |- dep3
34
- // |- dep4
35
- // |- |- dep5
36
- // |- dep5
37
- //
38
- // It is sorted:
39
- //
40
- // |- dep1
41
- // |- dep3
42
- // |- dep5
43
- // |- dep4 # depends on dep5, so dep5 must be built first, ie above ^
44
- // |- |- dep5
45
- // |- dep2 # depends on dep3, dep4 (and dep5 through dep4) so all of them must be built first before dep2 is built
46
- // |- |- dep3
47
- // |- |- dep4
48
- // |- |- |- dep5
49
- //
50
- // for more details see: https://wikiless.org/wiki/Topological_sorting?lang=en
51
- //
52
- function topologicalSortNativeDependencies(dependencies, start = [], depth = 0, total = 0 // do not pass in, we calculate it in the initial run!
53
- ) {
54
- // we set the total on the initial call - and never increment it, as it's used for esacaping the recursion
21
+ function topologicalSortNativeDependencies(dependencies, start = [], depth = 0, total = 0) {
55
22
  if (total === 0) {
56
23
  total = dependencies.length;
57
24
  }
@@ -65,8 +32,6 @@ function topologicalSortNativeDependencies(dependencies, start = [], depth = 0,
65
32
  return sortedDeps;
66
33
  }, start);
67
34
  const remainingDeps = dependencies.filter((nativeDep) => !sortedDeps.includes(nativeDep));
68
- // recurse if we still have remaining deps
69
- // the second condition here prevents infinite recursion
70
35
  if (remainingDeps.length && sortedDeps.length < total) {
71
36
  return topologicalSortNativeDependencies(remainingDeps, sortedDeps, depth + 1, total);
72
37
  }
@@ -120,7 +85,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
120
85
  constants.APK_DIR,
121
86
  ];
122
87
  const packageName = this.getProjectNameFromId(projectData);
123
- const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android" /* constants.PlatformTypes.android */);
88
+ const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android");
124
89
  this._platformData = {
125
90
  frameworkPackageName: runtimePackage.name,
126
91
  normalizedPlatformName: "Android",
@@ -161,7 +126,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
161
126
  configurationFileName: constants.MANIFEST_FILE_NAME,
162
127
  configurationFilePath: path.join(...configurationsDirectoryArr),
163
128
  relativeToFrameworkConfigurationFilePath: path.join(constants.SRC_DIR, constants.MAIN_DIR, constants.MANIFEST_FILE_NAME),
164
- fastLivesyncFileExtensions: [".jpg", ".gif", ".png", ".bmp", ".webp"], // http://developer.android.com/guide/appendix/media-formats.html
129
+ fastLivesyncFileExtensions: [".jpg", ".gif", ".png", ".bmp", ".webp"],
165
130
  };
166
131
  }
167
132
  return this._platformData;
@@ -211,7 +176,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
211
176
  const targetSdkVersion = androidToolsInfo && androidToolsInfo.targetSdkVersion;
212
177
  this.$logger.trace(`Using Android SDK '${targetSdkVersion}'.`);
213
178
  this.copy(this.getPlatformData(projectData).projectRoot, frameworkDir, "*", "-R");
214
- // TODO: Check if we actually need this and if it should be targetSdk or compileSdk
215
179
  this.cleanResValues(targetSdkVersion, projectData);
216
180
  }
217
181
  getResDestinationDir(projectData) {
@@ -243,7 +207,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
243
207
  _.map(directoriesToClean, (dir) => this.$fs.deleteDirectory(dir));
244
208
  }
245
209
  async interpolateData(projectData) {
246
- // Interpolate the apilevel and package
247
210
  this.interpolateConfigurationFile(projectData);
248
211
  const appResourcesDirectoryPath = projectData.getAppResourcesDirectoryPath();
249
212
  let stringsFilePath;
@@ -259,10 +222,8 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
259
222
  const gradleSettingsFilePath = path.join(this.getPlatformData(projectData).projectRoot, "settings.gradle");
260
223
  shell.sed("-i", /__PROJECT_NAME__/, this.getProjectNameFromId(projectData), gradleSettingsFilePath);
261
224
  try {
262
- // will replace applicationId in app/App_Resources/Android/app.gradle if it has not been edited by the user
263
225
  const appGradleContent = this.$fs.readText(projectData.appGradlePath);
264
226
  if (appGradleContent.indexOf(constants.PACKAGE_PLACEHOLDER_NAME) !== -1) {
265
- //TODO: For compatibility with old templates. Once all templates are updated should delete.
266
227
  shell.sed("-i", new RegExp(constants.PACKAGE_PLACEHOLDER_NAME), projectData.projectIdentifiers.android, projectData.appGradlePath);
267
228
  }
268
229
  }
@@ -313,7 +274,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
313
274
  return [".jar", ".dat"];
314
275
  }
315
276
  async prepareProject() {
316
- // Intentionally left empty.
317
277
  }
318
278
  ensureConfigurationFileInAppResources(projectData) {
319
279
  const appResourcesDirectoryPath = projectData.appResourcesDirectoryPath;
@@ -330,7 +290,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
330
290
  this.$logger.warn("No manifest found in " + originalAndroidManifestFilePath);
331
291
  return;
332
292
  }
333
- // Overwrite the AndroidManifest from runtime.
334
293
  if (!appResourcesDirStructureHasMigrated) {
335
294
  this.$fs.copyFile(originalAndroidManifestFilePath, this.getPlatformData(projectData).configurationFilePath);
336
295
  }
@@ -347,8 +306,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
347
306
  }
348
307
  else {
349
308
  this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "*"), platformsAppResourcesPath);
350
- // https://github.com/NativeScript/android-runtime/issues/899
351
- // App_Resources/Android/libs is reserved to user's aars and jars, but they should not be copied as resources
352
309
  this.$fs.deleteDirectory(path.join(platformsAppResourcesPath, "libs"));
353
310
  }
354
311
  const androidToolsInfo = this.$androidToolsInfo.getToolsInfo({
@@ -358,7 +315,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
358
315
  this.cleanResValues(compileSdkVersion, projectData);
359
316
  }
360
317
  async preparePluginNativeCode(pluginData, projectData) {
361
- // build Android plugins which contain AndroidManifest.xml and/or resources
362
318
  const pluginPlatformsFolderPath = this.getPluginPlatformsFolderPath(pluginData, AndroidProjectService.ANDROID_PLATFORM_NAME);
363
319
  if (this.$fs.exists(pluginPlatformsFolderPath)) {
364
320
  const options = {
@@ -380,7 +336,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
380
336
  return;
381
337
  }
382
338
  async removePluginNativeCode(pluginData, projectData) {
383
- // not implemented
384
339
  }
385
340
  async beforePrepareAllPlugins(projectData, dependencies) {
386
341
  if (dependencies) {
@@ -394,7 +349,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
394
349
  filterUniqueDependencies(dependencies) {
395
350
  const depsDictionary = dependencies.reduce((dict, dep) => {
396
351
  const collision = dict[dep.name];
397
- // in case there are multiple dependencies to the same module, the one declared in the package.json takes precedence
398
352
  if (!collision || collision.depth > dep.depth) {
399
353
  dict[dep.name] = dep;
400
354
  }
@@ -413,7 +367,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
413
367
  name,
414
368
  directory: path.relative(platformDir, directory),
415
369
  dependencies: dependencies.filter((dep) => {
416
- // filter out transient dependencies that don't have native dependencies
417
370
  return (nativeDependencyData.findIndex((nativeDep) => nativeDep.name === dep) !== -1);
418
371
  }),
419
372
  };
@@ -421,7 +374,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
421
374
  nativeDependencies = topologicalSortNativeDependencies(nativeDependencies);
422
375
  const jsonContent = JSON.stringify(nativeDependencies, null, 4);
423
376
  this.$fs.writeFile(dependenciesJsonPath, jsonContent);
424
- // we sort all the dependencies to respect the topological sorting of the native dependencies
425
377
  return dependencies.sort(function (a, b) {
426
378
  return (nativeDependencies.findIndex((n) => n.name === a.name) -
427
379
  nativeDependencies.findIndex((n) => n.name === b.name));
@@ -453,7 +405,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
453
405
  await adb.executeShellCommand(["rm", "-rf", deviceRootPath]);
454
406
  }
455
407
  async checkForChanges() {
456
- // Nothing android specific to check yet.
457
408
  }
458
409
  getDeploymentTarget(projectData) {
459
410
  return;
@@ -463,12 +414,9 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
463
414
  shell.cp(cpArg, paths, projectRoot);
464
415
  }
465
416
  validatePackageName(packageName) {
466
- //Make the package conform to Java package types
467
- //Enforce underscore limitation
468
417
  if (!/^[a-zA-Z]+(\.[a-zA-Z0-9][a-zA-Z0-9_]*)+$/.test(packageName)) {
469
418
  this.$errors.fail(`Package name must look like: com.company.Name. Got: ${packageName}`);
470
419
  }
471
- //Class is a reserved word
472
420
  if (/\b[Cc]lass\b/.test(packageName)) {
473
421
  this.$errors.fail("class is a reserved word");
474
422
  }
@@ -477,7 +425,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
477
425
  if (projectName === "") {
478
426
  this.$errors.fail("Project name cannot be empty");
479
427
  }
480
- //Classes in Java don't begin with numbers
481
428
  if (/^[0-9]/.test(projectName)) {
482
429
  this.$errors.fail("Project name must not begin with a number");
483
430
  }
@@ -498,19 +445,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
498
445
  ];
499
446
  return path.join(this.getPlatformData(projectData).projectRoot, ...resourcePath);
500
447
  }
501
- /**
502
- * The purpose of this method is to delete the previously prepared user resources.
503
- * The content of the `<platforms>/android/.../res` directory is based on user's resources and gradle project template from android-runtime.
504
- * During preparation of the `<path to user's App_Resources>/Android` we want to clean all the users files from previous preparation,
505
- * but keep the ones that were introduced during `platform add` of the android-runtime.
506
- * Currently the Gradle project template contains resources only in values and values-v21 directories.
507
- * So the current logic of the method is cleaning al resources from `<platforms>/android/.../res` that are not in `values.*` directories
508
- * and that exist in the `<path to user's App_Resources>/Android/.../res` directory
509
- * This means that if user has a resource file in values-v29 for example, builds the project and then deletes this resource,
510
- * it will be kept in platforms directory. Reference issue: `https://github.com/NativeScript/nativescript-cli/issues/5083`
511
- * Same is valid for files in `drawable-<resolution>` directories - in case in user's resources there's drawable-hdpi directory,
512
- * which is deleted after the first build of app, it will remain in platforms directory.
513
- */
514
448
  cleanUpPreparedResources(projectData) {
515
449
  let resourcesDirPath = path.join(projectData.appResourcesDirectoryPath, this.getPlatformData(projectData).normalizedPlatformName);
516
450
  if (this.$androidResourcesMigrationService.hasMigrated(projectData.appResourcesDirectoryPath)) {
@@ -535,7 +469,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
535
469
  const hasUseKotlinPropertyInAppData = `hasUseKotlinPropertyInApp${analyticsDelimiter}${buildStatistics.kotlinUsage.hasUseKotlinPropertyInApp}`;
536
470
  const hasKotlinRuntimeClassesData = `hasKotlinRuntimeClasses${analyticsDelimiter}${buildStatistics.kotlinUsage.hasKotlinRuntimeClasses}`;
537
471
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
538
- action: "Using Kotlin" /* constants.TrackActionNames.UsingKotlin */,
472
+ action: "Using Kotlin",
539
473
  additionalData: `${hasUseKotlinPropertyInAppData}${analyticsDelimiter}${hasKotlinRuntimeClassesData}`,
540
474
  });
541
475
  }
@@ -568,4 +502,3 @@ __decorate([
568
502
  (0, helpers_1.hook)("buildAndroid")
569
503
  ], AndroidProjectService.prototype, "buildProject", null);
570
504
  yok_1.injector.register("androidProjectService", AndroidProjectService);
571
- //# sourceMappingURL=android-project-service.js.map
@@ -46,7 +46,6 @@ class AndroidResourcesMigrationService {
46
46
  const appResourcesMainSourceSetResourcesDestination = path.join(appMainSourceSet, constants.RESOURCES_DIR);
47
47
  this.$fs.ensureDirectoryExists(appResourcesDestination);
48
48
  this.$fs.ensureDirectoryExists(appMainSourceSet);
49
- // create /java, /res and /assets in the App_Resources/Android/src/main directory
50
49
  this.$fs.ensureDirectoryExists(appResourcesMainSourceSetResourcesDestination);
51
50
  this.$fs.ensureDirectoryExists(path.join(appMainSourceSet, "java"));
52
51
  this.$fs.ensureDirectoryExists(path.join(appMainSourceSet, constants.ASSETS_DIR));
@@ -60,25 +59,20 @@ class AndroidResourcesMigrationService {
60
59
  const resourceFiles = getFiles(appResourcesFiles);
61
60
  resourceDirectories.forEach((dir) => {
62
61
  if (path.basename(dir) !== "libs") {
63
- // don't copy /App_Resources/Android/libs into the src/main/res/libs directory
64
62
  this.$fs.copyFile(dir, appResourcesMainSourceSetResourcesDestination);
65
63
  }
66
64
  else {
67
- // copy App_Resources/Android/libs to App_ResourcesNew/Android/libs
68
65
  this.$fs.copyFile(dir, path.join(appResourcesDestination));
69
66
  }
70
67
  });
71
68
  resourceFiles.forEach((file) => {
72
69
  const fileName = path.basename(file);
73
70
  if (fileName !== constants.MANIFEST_FILE_NAME) {
74
- // don't copy AndroidManifest into /App_Resources/Android as it needs to be inside src/main/
75
71
  this.$fs.copyFile(file, path.join(appResourcesDestination, fileName));
76
72
  }
77
73
  });
78
74
  this.$fs.copyFile(path.join(originalAppResources, constants.MANIFEST_FILE_NAME), path.join(appMainSourceSet, constants.MANIFEST_FILE_NAME));
79
- // rename the legacy app_resources to ANDROID_DIR_OLD
80
75
  this.$fs.rename(originalAppResources, appResourcesBackup);
81
- // move the new, updated app_resources to App_Resources/Android, as the de facto resources
82
76
  this.$fs.rename(appResourcesDestination, originalAppResources);
83
77
  }
84
78
  recover(originalAppResources, appResourcesDestination, appResourcesBackup) {
@@ -95,4 +89,3 @@ AndroidResourcesMigrationService.ANDROID_DIR = "Android";
95
89
  AndroidResourcesMigrationService.ANDROID_DIR_TEMP = "Android-Updated";
96
90
  AndroidResourcesMigrationService.ANDROID_DIR_OLD = "Android-Pre-v4";
97
91
  yok_1.injector.register("androidResourcesMigrationService", AndroidResourcesMigrationService);
98
- //# sourceMappingURL=android-resources-migration-service.js.map
@@ -63,4 +63,3 @@ class ApplePortalApplicationService {
63
63
  }
64
64
  exports.ApplePortalApplicationService = ApplePortalApplicationService;
65
65
  yok_1.injector.register("applePortalApplicationService", ApplePortalApplicationService);
66
- //# sourceMappingURL=apple-portal-application-service.js.map
@@ -51,4 +51,3 @@ class ApplePortalCookieService {
51
51
  }
52
52
  exports.ApplePortalCookieService = ApplePortalCookieService;
53
53
  yok_1.injector.register("applePortalCookieService", ApplePortalCookieService);
54
- //# sourceMappingURL=apple-portal-cookie-service.js.map
@@ -201,10 +201,10 @@ For more details how to set up your environment, please execute "ns publish ios
201
201
  const data = JSON.parse(authResponse.body);
202
202
  const isSMS = data.trustedPhoneNumbers &&
203
203
  data.trustedPhoneNumbers.length === 1 &&
204
- data.noTrustedDevices; // 1 device and no trusted devices means sms was automatically sent.
204
+ data.noTrustedDevices;
205
205
  const multiSMS = data.trustedPhoneNumbers &&
206
206
  data.trustedPhoneNumbers.length !== 1 &&
207
- data.noTrustedDevices; // Not handling more than 1 sms device and no trusted devices.
207
+ data.noTrustedDevices;
208
208
  let token;
209
209
  if (data.trustedPhoneNumbers &&
210
210
  data.trustedPhoneNumbers.length &&
@@ -218,7 +218,6 @@ For more details how to set up your environment, please execute "ns publish ios
218
218
  };
219
219
  let url = `https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode`;
220
220
  if (isSMS) {
221
- // No trusted devices means it must be sms.
222
221
  body.mode = "sms";
223
222
  body.phoneNumber = {
224
223
  id: data.trustedPhoneNumbers[0].id,
@@ -281,9 +280,8 @@ function checkBits(bits, digest) {
281
280
  return result;
282
281
  }
283
282
  function checkBit(position, buffer) {
284
- const bitOffset = position & 7; // in byte
285
- const byteIndex = position >> 3; // in buffer
283
+ const bitOffset = position & 7;
284
+ const byteIndex = position >> 3;
286
285
  const bit = (buffer[byteIndex] >> bitOffset) & 1;
287
286
  return bit === 0;
288
287
  }
289
- //# sourceMappingURL=apple-portal-session-service.js.map
@@ -28,9 +28,7 @@ class GSASRPAuthenticator {
28
28
  async getInit() {
29
29
  if (this.srpClient)
30
30
  throw new Error("Already initialized");
31
- this.srpClient = await srp.newClient(stringToU8Array(this.username),
32
- // provide fake passsword because we need to get data from server
33
- new Uint8Array());
31
+ this.srpClient = await srp.newClient(stringToU8Array(this.username), new Uint8Array());
34
32
  let a = Buffer.from(js_srp_1.util.bytesFromBigint(this.srpClient.A)).toString("base64");
35
33
  return {
36
34
  a,
@@ -61,4 +59,3 @@ class GSASRPAuthenticator {
61
59
  }
62
60
  }
63
61
  exports.GSASRPAuthenticator = GSASRPAuthenticator;
64
- //# sourceMappingURL=srp-wrapper.js.map
@@ -82,7 +82,7 @@ class AssetsGenerationService {
82
82
  }
83
83
  continue;
84
84
  }
85
- const operation = assetItem.resizeOperation || "resize" /* Operations.Resize */;
85
+ const operation = assetItem.resizeOperation || "resize";
86
86
  let tempScale = null;
87
87
  if (assetItem.scale) {
88
88
  if (_.isNumber(assetItem.scale)) {
@@ -107,36 +107,27 @@ class AssetsGenerationService {
107
107
  }
108
108
  let image;
109
109
  switch (operation) {
110
- case "overlayWith" /* Operations.OverlayWith */:
110
+ case "overlayWith":
111
111
  const overlayImageScale = assetItem.overlayImageScale ||
112
112
  constants_1.AssetConstants.defaultOverlayImageScale;
113
113
  const imageResize = Math.round(Math.min(width, height) * overlayImageScale);
114
114
  image = await this.resize(generationData.imagePath, imageResize, imageResize);
115
115
  image = this.generateImage(background, width, height, outputPath, image);
116
116
  break;
117
- case "blank" /* Operations.Blank */:
117
+ case "blank":
118
118
  image = this.generateImage(background, width, height, outputPath);
119
119
  break;
120
- case "resize" /* Operations.Resize */:
120
+ case "resize":
121
121
  image = await this.resize(generationData.imagePath, width, height);
122
122
  break;
123
- case "outerScale" /* Operations.OuterScale */:
124
- // Resize image without applying scale
123
+ case "outerScale":
125
124
  image = await this.resize(generationData.imagePath, assetItem.width, assetItem.height);
126
- // The scale will apply to the underlying layer of the generated image
127
125
  image = this.generateImage("#00000000", width, height, outputPath, image);
128
126
  break;
129
127
  default:
130
128
  throw new Error(`Invalid image generation operation: ${operation}`);
131
129
  }
132
- // This code disables the alpha chanel, as some images for the Apple App Store must not have transparency.
133
130
  if (assetItem.rgba === false) {
134
- //
135
- // The original code here became broken at some time and there is an issue posted here..
136
- // https://github.com/oliver-moran/jimp/issues/954
137
- // But NathanaelA recommended the below change and it works so maybe that's just what we go with.
138
- //
139
- // image = image.rgba(false);
140
131
  image = image.colorType(2);
141
132
  }
142
133
  image.write(outputPath);
@@ -150,7 +141,6 @@ class AssetsGenerationService {
150
141
  });
151
142
  }
152
143
  generateImage(background, width, height, outputPath, overlayImage) {
153
- // Typescript declarations for Jimp are not updated to define the constructor with backgroundColor so we workaround it by casting it to <any> for this case only.
154
144
  const J = jimp_1.Jimp;
155
145
  const backgroundColor = this.getRgbaNumber(background);
156
146
  let image = new J(width, height, backgroundColor);
@@ -176,4 +166,3 @@ __decorate([
176
166
  (0, decorators_1.exported)("assetsGenerationService")
177
167
  ], AssetsGenerationService.prototype, "generateSplashScreens", null);
178
168
  yok_1.injector.register("assetsGenerationService", AssetsGenerationService);
179
- //# sourceMappingURL=assets-generation-service.js.map
@@ -64,7 +64,7 @@ class BuildArtifactsService {
64
64
  if (packages.length > 1) {
65
65
  this.$logger.warn(`More than one ${packageExtName} found in ${buildOutputPath} directory. Using the last one produced from build.`);
66
66
  }
67
- packages = _.sortBy(packages, (pkg) => pkg.time).reverse(); // We need to reverse because sortBy always sorts in ascending order
67
+ packages = _.sortBy(packages, (pkg) => pkg.time).reverse();
68
68
  return packages[0];
69
69
  }
70
70
  getApplicationPackagesCore(candidates, validPackageNames) {
@@ -85,4 +85,3 @@ class BuildArtifactsService {
85
85
  }
86
86
  exports.BuildArtifactsService = BuildArtifactsService;
87
87
  yok_1.injector.register("buildArtifactsService", BuildArtifactsService);
88
- //# sourceMappingURL=build-artifacts-service.js.map
@@ -18,4 +18,3 @@ class BuildDataService {
18
18
  }
19
19
  exports.BuildDataService = BuildDataService;
20
20
  yok_1.injector.register("buildDataService", BuildDataService);
21
- //# sourceMappingURL=build-data-service.js.map
@@ -62,4 +62,3 @@ class BuildInfoFileService {
62
62
  }
63
63
  exports.BuildInfoFileService = BuildInfoFileService;
64
64
  yok_1.injector.register("buildInfoFileService", BuildInfoFileService);
65
- //# sourceMappingURL=build-info-file-service.js.map
@@ -20,56 +20,56 @@ class CleanupService {
20
20
  async addCleanupCommand(commandInfo) {
21
21
  const cleanupProcess = await this.getCleanupProcess();
22
22
  cleanupProcess.send({
23
- messageType: "AddCleanCommand" /* CleanupProcessMessage.AddCleanCommand */,
23
+ messageType: "AddCleanCommand",
24
24
  commandInfo,
25
25
  });
26
26
  }
27
27
  async removeCleanupCommand(commandInfo) {
28
28
  const cleanupProcess = await this.getCleanupProcess();
29
29
  cleanupProcess.send({
30
- messageType: "RemoveCleanCommand" /* CleanupProcessMessage.RemoveCleanCommand */,
30
+ messageType: "RemoveCleanCommand",
31
31
  commandInfo,
32
32
  });
33
33
  }
34
34
  async addRequest(requestInfo) {
35
35
  const cleanupProcess = await this.getCleanupProcess();
36
36
  cleanupProcess.send({
37
- messageType: "AddRequest" /* CleanupProcessMessage.AddRequest */,
37
+ messageType: "AddRequest",
38
38
  requestInfo,
39
39
  });
40
40
  }
41
41
  async removeRequest(requestInfo) {
42
42
  const cleanupProcess = await this.getCleanupProcess();
43
43
  cleanupProcess.send({
44
- messageType: "RemoveRequest" /* CleanupProcessMessage.RemoveRequest */,
44
+ messageType: "RemoveRequest",
45
45
  requestInfo,
46
46
  });
47
47
  }
48
48
  async addCleanupDeleteAction(filePath) {
49
49
  const cleanupProcess = await this.getCleanupProcess();
50
50
  cleanupProcess.send({
51
- messageType: "AddDeleteFileAction" /* CleanupProcessMessage.AddDeleteFileAction */,
51
+ messageType: "AddDeleteFileAction",
52
52
  filePath,
53
53
  });
54
54
  }
55
55
  async removeCleanupDeleteAction(filePath) {
56
56
  const cleanupProcess = await this.getCleanupProcess();
57
57
  cleanupProcess.send({
58
- messageType: "RemoveDeleteFileAction" /* CleanupProcessMessage.RemoveDeleteFileAction */,
58
+ messageType: "RemoveDeleteFileAction",
59
59
  filePath,
60
60
  });
61
61
  }
62
62
  async addCleanupJS(jsCommand) {
63
63
  const cleanupProcess = await this.getCleanupProcess();
64
64
  cleanupProcess.send({
65
- messageType: "AddJSFileToRequire" /* CleanupProcessMessage.AddJSFileToRequire */,
65
+ messageType: "AddJSFileToRequire",
66
66
  jsCommand,
67
67
  });
68
68
  }
69
69
  async removeCleanupJS(jsCommand) {
70
70
  const cleanupProcess = await this.getCleanupProcess();
71
71
  cleanupProcess.send({
72
- messageType: "RemoveJSFileToRequire" /* CleanupProcessMessage.RemoveJSFileToRequire */,
72
+ messageType: "RemoveJSFileToRequire",
73
73
  jsCommand,
74
74
  });
75
75
  }
@@ -92,8 +92,6 @@ class CleanupService {
92
92
  setShouldDispose(shouldDispose) {
93
93
  this.shouldDispose = shouldDispose;
94
94
  }
95
- // TODO: Consider extracting this method to a separate service
96
- // as it has the same logic as the one used in analytics-service
97
95
  getCleanupProcess() {
98
96
  return new Promise((resolve, reject) => {
99
97
  const cleanupProcessArgs = this.getCleanupProcessArgs();
@@ -112,12 +110,11 @@ class CleanupService {
112
110
  clearTimeout(timeoutId);
113
111
  if (!isSettled) {
114
112
  isSettled = true;
115
- // In case we throw error here, CLI will break its execution.
116
113
  reject(err);
117
114
  }
118
115
  });
119
116
  cleanupProcess.on("message", (data) => {
120
- if (data === "ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */) {
117
+ if (data === "ProcessReadyToReceive") {
121
118
  clearTimeout(timeoutId);
122
119
  if (!isSettled) {
123
120
  isSettled = true;
@@ -166,4 +163,3 @@ __decorate([
166
163
  (0, decorators_1.cache)()
167
164
  ], CleanupService.prototype, "getCleanupProcess", null);
168
165
  yok_1.injector.register("cleanupService", CleanupService);
169
- //# sourceMappingURL=cleanup-service.js.map
@@ -82,7 +82,6 @@ class CocoaPodsPlatformManager {
82
82
  _.each(allPodfiles, (podfileContent) => {
83
83
  const platformMatch = platformRowRegExp.exec(podfileContent);
84
84
  const podfilePathMatch = podfilePathRegExp.exec(podfileContent) || [];
85
- // platform without version -> select it with highest priority
86
85
  if (platformMatch && platformMatch[0] && !platformMatch[2]) {
87
86
  selectedPlatformData = {
88
87
  version: null,
@@ -91,7 +90,6 @@ class CocoaPodsPlatformManager {
91
90
  };
92
91
  return false;
93
92
  }
94
- // platform with version
95
93
  if (platformMatch && platformMatch[0] && platformMatch[2]) {
96
94
  if (!selectedPlatformData ||
97
95
  semver.gt(semver.coerce(platformMatch[2]), semver.coerce(selectedPlatformData.version))) {
@@ -106,12 +104,6 @@ class CocoaPodsPlatformManager {
106
104
  return selectedPlatformData;
107
105
  }
108
106
  shouldReplacePlatformSection(projectData, oldPodfilePlatformData, currentPodfilePlatformData) {
109
- // The selected platform should be replaced in the following cases:
110
- // 1. When the pod file is from App_Resources and the selected platform is not from App_Resources
111
- // 2. When the pod file is from App_Resources, the selected platform is also from App_Resources
112
- // and the pod's version is greater than the selected one
113
- // 3. When the pod file doesn't have platform's version -> `platform :ios`
114
- // 4. When the pod file has a version greater than the selected platform's version
115
107
  const appResourcesPodfilePath = path.join(projectData.getAppResourcesDirectoryPath(), "iOS", constants_1.PODFILE_NAME);
116
108
  const isFromAppResources = oldPodfilePlatformData.path !== appResourcesPodfilePath &&
117
109
  currentPodfilePlatformData.path === appResourcesPodfilePath;
@@ -143,4 +135,3 @@ class CocoaPodsPlatformManager {
143
135
  }
144
136
  exports.CocoaPodsPlatformManager = CocoaPodsPlatformManager;
145
137
  yok_1.injector.register("cocoaPodsPlatformManager", CocoaPodsPlatformManager);
146
- //# sourceMappingURL=cocoapods-platform-manager.js.map
@@ -34,12 +34,6 @@ class CocoaPodsService {
34
34
  let podTool = this.$config.USE_POD_SANDBOX ? "sandbox-pod" : "pod";
35
35
  const args = ["install"];
36
36
  if (process.platform === "darwin" && process.arch === "arm64") {
37
- // check if pod is installed as an x86_64 binary or a native arm64 one
38
- // we run the following:
39
- // arch -x86_64 pod --version
40
- // if it's an arm64 binary, we'll get something like this as a result:
41
- // arch: posix_spawnp: pod: Bad CPU type in executable
42
- // in which case, we should run it natively.
43
37
  const res = await this.$childProcess
44
38
  .exec("arch -x86_64 pod --version", null, {
45
39
  showStderr: true,
@@ -53,11 +47,8 @@ class CocoaPodsService {
53
47
  podTool = "arch";
54
48
  }
55
49
  }
56
- // cocoapods print a lot of non-error information on stderr. Pipe the `stderr` to `stdout`, so we won't polute CLI's stderr output.
57
50
  const podInstallResult = await this.$childProcess.spawnFromEvent(podTool, args, "close", { cwd: projectRoot, stdio: ["pipe", process.stdout, process.stdout] }, { throwError: false });
58
51
  if (podInstallResult.exitCode !== 0) {
59
- // https://github.com/CocoaPods/CocoaPods/blob/92aaf0f1120d32f3487960b485fb69fcaf61486c/lib/cocoapods/resolver.rb#L498
60
- // TODO add article
61
52
  const versionResolutionHint = podInstallResult.exitCode === 31
62
53
  ? `For more information on resolving CocoaPod issues in NativeScript read.`
63
54
  : "";
@@ -89,7 +80,6 @@ ${versionResolutionHint}`);
89
80
  }
90
81
  async applyPodfileArchExclusions(projectData, platformData) {
91
82
  const xcodeVersionData = await this.$xcodeSelectService.getXcodeVersion();
92
- // only apply EXCLUDED_ARCHS workaround on XCode 12
93
83
  if (+xcodeVersionData.major !== 12) {
94
84
  return;
95
85
  }
@@ -108,7 +98,6 @@ end`.trim();
108
98
  this.$fs.writeFile(exclusionsPodfile, exclusions);
109
99
  }
110
100
  await this.applyPodfileToProject("NativeScript-CLI-Architecture-Exclusions", exclusionsPodfile, projectData, platformData);
111
- // clean up
112
101
  this.$fs.deleteFile(exclusionsPodfile);
113
102
  }
114
103
  async applyPodfileFromExtensions(projectData, platformData) {
@@ -131,7 +120,6 @@ end`.trim();
131
120
  podfilePath: path.join(extensionFolderPath, name, constants.PODFILE_NAME),
132
121
  }));
133
122
  extensionsPodfile.forEach(({ targetName, podfilePath }) => {
134
- // Remove the data between #Begin Podfile and #EndPodfile
135
123
  const regExpToRemove = new RegExp(`${this.getExtensionPodfileHeader(podfilePath, targetName)}[\\s\\S]*?${this.getExtensionPodfileEnd()}`, "mg");
136
124
  projectPodFileContent = projectPodFileContent.replace(regExpToRemove, "");
137
125
  if (this.$fs.exists(podfilePath)) {
@@ -158,7 +146,6 @@ end`.trim();
158
146
  ? this.$fs.readText(pathToProjectPodfile).trim()
159
147
  : "";
160
148
  if (projectPodfileContent.indexOf(podfileContent) === -1) {
161
- // Remove old occurences of the plugin from the project's Podfile.
162
149
  this.removePodfileFromProject(moduleName, podfilePath, projectData, nativeProjectPath);
163
150
  let finalPodfileContent = this.$fs.exists(pathToProjectPodfile)
164
151
  ? this.getPodfileContentWithoutTarget(projectData, this.$fs.readText(pathToProjectPodfile))
@@ -176,7 +163,6 @@ end`.trim();
176
163
  removePodfileFromProject(moduleName, podfilePath, projectData, projectRoot) {
177
164
  if (this.$fs.exists(this.getProjectPodfilePath(projectRoot))) {
178
165
  let projectPodFileContent = this.$fs.readText(this.getProjectPodfilePath(projectRoot));
179
- // Remove the data between #Begin Podfile and #EndPodfile
180
166
  const regExpToRemove = new RegExp(`${this.getPluginPodfileHeader(podfilePath)}[\\s\\S]*?${this.getPluginPodfileEnd()}`, "mg");
181
167
  projectPodFileContent = projectPodFileContent.replace(regExpToRemove, "");
182
168
  projectPodFileContent = this.removePostInstallHook(moduleName, projectPodFileContent);
@@ -197,7 +183,7 @@ end`.trim();
197
183
  }
198
184
  }
199
185
  getPluginPodfilePath(pluginData) {
200
- const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath("ios" /* PlatformTypes.ios */);
186
+ const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath("ios");
201
187
  const pluginPodFilePath = path.join(pluginPlatformsFolderPath, constants_1.PODFILE_NAME);
202
188
  return pluginPodFilePath;
203
189
  }
@@ -233,7 +219,6 @@ end`.trim();
233
219
  if (_.startsWith(projectPodfileContent, podFileHeader)) {
234
220
  projectPodfileContent = projectPodfileContent.substr(podFileHeader.length);
235
221
  const podFileFooter = this.getPodfileFooter();
236
- // Only remove the final end in case the file starts with the podFileHeader
237
222
  if (_.endsWith(projectPodfileContent, podFileFooter)) {
238
223
  projectPodfileContent = projectPodfileContent.substr(0, projectPodfileContent.length - podFileFooter.length);
239
224
  }
@@ -254,8 +239,6 @@ end`.trim();
254
239
  return projectPodFileContent;
255
240
  }
256
241
  getHookBasicFuncNameForPlugin(hookName, pluginName) {
257
- // nativescript-hook and nativescript_hook should have different names, so replace all _ with ___ first and then replace all special symbols with _
258
- // This will lead to a clash in case plugins are called nativescript-hook and nativescript___hook
259
242
  const replacedPluginName = pluginName
260
243
  .replace(/_/g, "___")
261
244
  .replace(/[^A-Za-z0-9_]/g, "_");
@@ -269,7 +252,6 @@ end`.trim();
269
252
  const newFunctionName = `${this.getHookBasicFuncNameForPlugin(hookName, pluginName)}_${newFunctions.length}`;
270
253
  let newDefinition = `def ${newFunctionName}`;
271
254
  const rubyFunction = { functionName: newFunctionName };
272
- // firstGroup is the block parameter, secondGroup is the block parameter name.
273
255
  if (firstGroup && secondGroup) {
274
256
  newDefinition = `${newDefinition} (${secondGroup})`;
275
257
  rubyFunction.functionParameters = secondGroup;
@@ -280,7 +262,6 @@ end`.trim();
280
262
  return { replacedContent, newFunctions };
281
263
  }
282
264
  getPluginPodfileHeader(pluginPodFilePath) {
283
- // escape special + from the podfile path (pnpm)
284
265
  pluginPodFilePath = pluginPodFilePath.replace(/\+/g, "\\+");
285
266
  return `# Begin Podfile - ${pluginPodFilePath}`;
286
267
  }
@@ -350,4 +331,3 @@ exports.CocoaPodsService = CocoaPodsService;
350
331
  CocoaPodsService.PODFILE_POST_INSTALL_SECTION_NAME = "post_install";
351
332
  CocoaPodsService.INSTALLER_BLOCK_PARAMETER_NAME = "installer";
352
333
  yok_1.injector.register("cocoapodsService", CocoaPodsService);
353
- //# sourceMappingURL=cocoapods-service.js.map
@@ -19,4 +19,3 @@ class DebugDataService {
19
19
  }
20
20
  exports.DebugDataService = DebugDataService;
21
21
  yok_1.injector.register("debugDataService", DebugDataService);
22
- //# sourceMappingURL=debug-data-service.js.map