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