nativescript 9.0.3 → 9.0.4-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/lib/android-tools-info.js +0 -12
  2. package/lib/base-package-manager.js +0 -7
  3. package/lib/bootstrap.js +1 -5
  4. package/lib/bun-package-manager.js +1 -14
  5. package/lib/color.js +0 -4
  6. package/lib/commands/add-platform.js +0 -1
  7. package/lib/commands/apple-login.js +0 -1
  8. package/lib/commands/appstore-list.js +0 -1
  9. package/lib/commands/appstore-upload.js +0 -3
  10. package/lib/commands/build.js +2 -3
  11. package/lib/commands/clean.js +1 -22
  12. package/lib/commands/command-base.js +0 -1
  13. package/lib/commands/config.js +0 -5
  14. package/lib/commands/create-project.js +0 -6
  15. package/lib/commands/debug.js +1 -6
  16. package/lib/commands/deploy.js +2 -3
  17. package/lib/commands/embedding/embed.js +0 -7
  18. package/lib/commands/extensibility/install-extension.js +0 -1
  19. package/lib/commands/extensibility/list-extensions.js +0 -1
  20. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  21. package/lib/commands/fonts.js +0 -1
  22. package/lib/commands/generate-assets.js +0 -1
  23. package/lib/commands/generate-help.js +0 -1
  24. package/lib/commands/generate.js +1 -48
  25. package/lib/commands/hooks/common.js +1 -2
  26. package/lib/commands/hooks/hooks-lock.js +0 -1
  27. package/lib/commands/hooks/hooks.js +0 -1
  28. package/lib/commands/info.js +0 -1
  29. package/lib/commands/install.js +0 -1
  30. package/lib/commands/list-platforms.js +0 -1
  31. package/lib/commands/migrate.js +0 -1
  32. package/lib/commands/native-add.js +0 -5
  33. package/lib/commands/platform-clean.js +0 -1
  34. package/lib/commands/plugin/add-plugin.js +0 -1
  35. package/lib/commands/plugin/build-plugin.js +0 -1
  36. package/lib/commands/plugin/create-plugin.js +0 -5
  37. package/lib/commands/plugin/list-plugins.js +0 -1
  38. package/lib/commands/plugin/remove-plugin.js +0 -2
  39. package/lib/commands/plugin/update-plugin.js +0 -1
  40. package/lib/commands/post-install.js +0 -6
  41. package/lib/commands/prepare.js +3 -4
  42. package/lib/commands/preview.js +0 -2
  43. package/lib/commands/remove-platform.js +0 -1
  44. package/lib/commands/resources/resources-update.js +0 -2
  45. package/lib/commands/run.js +0 -1
  46. package/lib/commands/setup.js +0 -1
  47. package/lib/commands/start.js +0 -1
  48. package/lib/commands/test-init.js +0 -4
  49. package/lib/commands/test.js +2 -9
  50. package/lib/commands/typings.js +1 -2
  51. package/lib/commands/update-platform.js +0 -5
  52. package/lib/commands/update.js +0 -2
  53. package/lib/commands/widget.js +1 -20
  54. package/lib/common/bootstrap.js +0 -1
  55. package/lib/common/child-process.js +0 -3
  56. package/lib/common/codeGeneration/code-entity.js +0 -1
  57. package/lib/common/codeGeneration/code-printer.js +0 -1
  58. package/lib/common/command-params.js +0 -1
  59. package/lib/common/commands/analytics.js +0 -3
  60. package/lib/common/commands/autocompletion.js +0 -3
  61. package/lib/common/commands/device/device-log-stream.js +0 -1
  62. package/lib/common/commands/device/get-file.js +0 -2
  63. package/lib/common/commands/device/list-applications.js +0 -1
  64. package/lib/common/commands/device/list-devices.js +0 -3
  65. package/lib/common/commands/device/list-files.js +0 -2
  66. package/lib/common/commands/device/put-file.js +0 -2
  67. package/lib/common/commands/device/run-application.js +0 -1
  68. package/lib/common/commands/device/stop-application.js +0 -1
  69. package/lib/common/commands/device/uninstall-application.js +0 -1
  70. package/lib/common/commands/doctor.js +2 -3
  71. package/lib/common/commands/generate-messages.js +0 -1
  72. package/lib/common/commands/help.js +0 -1
  73. package/lib/common/commands/package-manager-get.js +0 -1
  74. package/lib/common/commands/package-manager-set.js +0 -1
  75. package/lib/common/commands/post-install.js +0 -1
  76. package/lib/common/commands/preuninstall.js +2 -11
  77. package/lib/common/commands/proxy/proxy-base.js +0 -4
  78. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  79. package/lib/common/commands/proxy/proxy-get.js +0 -1
  80. package/lib/common/commands/proxy/proxy-set.js +0 -1
  81. package/lib/common/common-lib.js +0 -1
  82. package/lib/common/constants.js +0 -11
  83. package/lib/common/decorators.js +0 -48
  84. package/lib/common/dispatchers.js +1 -10
  85. package/lib/common/errors.js +3 -13
  86. package/lib/common/file-system.js +2 -13
  87. package/lib/common/header.js +0 -3
  88. package/lib/common/helpers.js +3 -89
  89. package/lib/common/host-info.js +0 -4
  90. package/lib/common/http-client.js +0 -20
  91. package/lib/common/logger/appenders/cli-appender.js +0 -4
  92. package/lib/common/logger/appenders/emit-appender.js +0 -4
  93. package/lib/common/logger/layouts/cli-layout.js +0 -1
  94. package/lib/common/logger/logger.js +0 -5
  95. package/lib/common/messages/messages.js +0 -6
  96. package/lib/common/mobile/android/android-application-manager.js +1 -20
  97. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  98. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  99. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  100. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  101. package/lib/common/mobile/android/android-device.js +0 -8
  102. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  103. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  104. package/lib/common/mobile/android/android-log-filter.js +0 -4
  105. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  106. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  107. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  108. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  109. package/lib/common/mobile/android/logcat-helper.js +0 -13
  110. package/lib/common/mobile/application-manager-base.js +0 -6
  111. package/lib/common/mobile/device-emitter.js +0 -4
  112. package/lib/common/mobile/device-log-emitter.js +0 -1
  113. package/lib/common/mobile/device-log-provider-base.js +0 -1
  114. package/lib/common/mobile/device-log-provider.js +0 -23
  115. package/lib/common/mobile/device-platforms-constants.js +0 -1
  116. package/lib/common/mobile/emulator-helper.js +0 -3
  117. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  118. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  119. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  120. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  121. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  122. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  123. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  124. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  125. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  126. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  127. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  128. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  129. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  130. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  131. package/lib/common/mobile/log-filter.js +0 -2
  132. package/lib/common/mobile/logging-levels.js +0 -1
  133. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  134. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  135. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  136. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  137. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  138. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  139. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  140. package/lib/common/mobile/mobile-helper.js +0 -1
  141. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  142. package/lib/common/opener.js +0 -1
  143. package/lib/common/os-info.js +0 -1
  144. package/lib/common/plist-parser.js +0 -1
  145. package/lib/common/project-helper.js +0 -1
  146. package/lib/common/prompter.js +1 -9
  147. package/lib/common/queue.js +0 -1
  148. package/lib/common/resource-loader.js +0 -1
  149. package/lib/common/services/auto-completion-service.js +1 -13
  150. package/lib/common/services/cancellation.js +1 -2
  151. package/lib/common/services/commands-service.js +6 -17
  152. package/lib/common/services/help-service.js +3 -11
  153. package/lib/common/services/hooks-service.js +0 -13
  154. package/lib/common/services/ios-notification-service.js +0 -1
  155. package/lib/common/services/json-file-settings-service.js +0 -6
  156. package/lib/common/services/lock-service.js +0 -6
  157. package/lib/common/services/message-contract-generator.js +0 -1
  158. package/lib/common/services/messages-service.js +0 -1
  159. package/lib/common/services/micro-templating-service.js +0 -6
  160. package/lib/common/services/net-service.js +0 -3
  161. package/lib/common/services/project-files-manager.js +0 -5
  162. package/lib/common/services/project-files-provider-base.js +0 -1
  163. package/lib/common/services/proxy-service.js +0 -1
  164. package/lib/common/services/qr.js +0 -1
  165. package/lib/common/services/settings-service.js +0 -1
  166. package/lib/common/services/xcode-select-service.js +0 -1
  167. package/lib/common/utils.js +0 -1
  168. package/lib/common/validators/project-name-validator.js +0 -1
  169. package/lib/common/validators/validation-result.js +0 -1
  170. package/lib/common/verify-node-version.js +1 -8
  171. package/lib/common/yok.js +11 -32
  172. package/lib/config.js +1 -22
  173. package/lib/constants-provider.js +0 -1
  174. package/lib/constants.js +0 -53
  175. package/lib/controllers/build-controller.js +3 -4
  176. package/lib/controllers/debug-controller.js +3 -8
  177. package/lib/controllers/deploy-controller.js +0 -1
  178. package/lib/controllers/migrate-controller.js +4 -90
  179. package/lib/controllers/platform-controller.js +1 -9
  180. package/lib/controllers/prepare-controller.js +4 -17
  181. package/lib/controllers/run-controller.js +1 -17
  182. package/lib/controllers/update-controller-base.js +0 -1
  183. package/lib/controllers/update-controller.js +0 -11
  184. package/lib/data/build-data.js +0 -1
  185. package/lib/data/controller-data-base.js +0 -1
  186. package/lib/data/debug-data.js +0 -1
  187. package/lib/data/platform-data.js +0 -1
  188. package/lib/data/prepare-data.js +0 -1
  189. package/lib/data/run-data.js +0 -1
  190. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  191. package/lib/detached-processes/cleanup-process.js +14 -18
  192. package/lib/detached-processes/file-log-service.js +1 -2
  193. package/lib/device-path-provider.js +0 -1
  194. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  195. package/lib/device-sockets/ios/notification.js +0 -3
  196. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  197. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  198. package/lib/helpers/deploy-command-helper.js +0 -1
  199. package/lib/helpers/key-command-helper.js +2 -4
  200. package/lib/helpers/livesync-command-helper.js +1 -4
  201. package/lib/helpers/network-connectivity-validator.js +0 -1
  202. package/lib/helpers/options-track-helper.js +2 -3
  203. package/lib/helpers/package-path-helper.js +0 -1
  204. package/lib/helpers/platform-command-helper.js +2 -7
  205. package/lib/helpers/version-validator-helper.js +0 -1
  206. package/lib/key-commands/bootstrap.js +2 -3
  207. package/lib/key-commands/index.js +4 -5
  208. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  209. package/lib/nativescript-cli-lib.js +0 -1
  210. package/lib/nativescript-cli.js +1 -11
  211. package/lib/node/pbxproj-dom-xcode.js +0 -1
  212. package/lib/node/xcode.js +0 -1
  213. package/lib/node-package-manager.js +1 -11
  214. package/lib/options.js +119 -144
  215. package/lib/package-installation-manager.js +1 -8
  216. package/lib/package-manager.js +0 -2
  217. package/lib/platform-command-param.js +0 -1
  218. package/lib/pnpm-package-manager.js +1 -4
  219. package/lib/project-data.js +0 -12
  220. package/lib/providers/project-files-provider.js +0 -1
  221. package/lib/resolvers/livesync-service-resolver.js +0 -1
  222. package/lib/services/analytics/analytics-broker-process.js +6 -10
  223. package/lib/services/analytics/analytics-broker.js +1 -2
  224. package/lib/services/analytics/analytics-service.js +25 -29
  225. package/lib/services/analytics/google-analytics-provider.js +12 -13
  226. package/lib/services/analytics-settings-service.js +0 -5
  227. package/lib/services/android/android-bundle-tool-service.js +0 -1
  228. package/lib/services/android/gradle-build-args-service.js +0 -3
  229. package/lib/services/android/gradle-build-service.js +0 -1
  230. package/lib/services/android/gradle-command-service.js +0 -1
  231. package/lib/services/android-device-debug-service.js +0 -6
  232. package/lib/services/android-plugin-build-service.js +2 -31
  233. package/lib/services/android-project-service.js +4 -71
  234. package/lib/services/android-resources-migration-service.js +0 -7
  235. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  236. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  237. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  238. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  239. package/lib/services/assets-generation/assets-generation-service.js +5 -10
  240. package/lib/services/build-artifacts-service.js +1 -2
  241. package/lib/services/build-data-service.js +0 -1
  242. package/lib/services/build-info-file-service.js +0 -1
  243. package/lib/services/bundler/bundler-compiler-service.js +1 -68
  244. package/lib/services/bundler/bundler.js +0 -1
  245. package/lib/services/cleanup-service.js +9 -13
  246. package/lib/services/cocoapods-platform-manager.js +0 -9
  247. package/lib/services/cocoapods-service.js +1 -21
  248. package/lib/services/debug-data-service.js +0 -1
  249. package/lib/services/debug-service-base.js +0 -7
  250. package/lib/services/device/device-install-app-service.js +1 -2
  251. package/lib/services/doctor-service.js +6 -21
  252. package/lib/services/extensibility-service.js +0 -8
  253. package/lib/services/files-hash-service.js +0 -1
  254. package/lib/services/hmr-status-service.js +0 -2
  255. package/lib/services/info-service.js +0 -1
  256. package/lib/services/initialize-service.js +1 -5
  257. package/lib/services/ios/export-options-plist-service.js +0 -4
  258. package/lib/services/ios/ios-signing-service.js +10 -7
  259. package/lib/services/ios/spm-service.js +0 -18
  260. package/lib/services/ios/xcodebuild-args-service.js +0 -11
  261. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  262. package/lib/services/ios/xcodebuild-service.js +1 -2
  263. package/lib/services/ios-debugger-port-service.js +0 -1
  264. package/lib/services/ios-device-debug-service.js +0 -1
  265. package/lib/services/ios-entitlements-service.js +3 -2
  266. package/lib/services/ios-extensions-service.js +0 -1
  267. package/lib/services/ios-log-filter.js +0 -20
  268. package/lib/services/ios-native-target-service.js +4 -6
  269. package/lib/services/ios-project-service.js +11 -105
  270. package/lib/services/ios-provision-service.js +0 -3
  271. package/lib/services/ios-watch-app-service.js +0 -1
  272. package/lib/services/ip-service.js +0 -2
  273. package/lib/services/itmstransporter-service.js +0 -1
  274. package/lib/services/karma-execution.js +0 -2
  275. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  276. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  277. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  278. package/lib/services/livesync/android-livesync-service.js +0 -1
  279. package/lib/services/livesync/android-livesync-tool.js +0 -4
  280. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  281. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  282. package/lib/services/livesync/ios-livesync-service.js +0 -2
  283. package/lib/services/livesync/livesync-socket.js +0 -1
  284. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  285. package/lib/services/livesync-process-data-service.js +0 -1
  286. package/lib/services/log-parser-service.js +0 -1
  287. package/lib/services/log-source-map-service.js +0 -15
  288. package/lib/services/marking-mode-service.js +5 -8
  289. package/lib/services/metadata-filtering-service.js +0 -1
  290. package/lib/services/npm-config-service.js +0 -4
  291. package/lib/services/pacote-service.js +0 -7
  292. package/lib/services/performance-service.js +1 -3
  293. package/lib/services/platform/add-platform-service.js +2 -49
  294. package/lib/services/platform/platform-validation-service.js +0 -1
  295. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  296. package/lib/services/platform-environment-requirements.js +3 -8
  297. package/lib/services/platform-project-service-base.js +0 -1
  298. package/lib/services/platforms-data-service.js +0 -1
  299. package/lib/services/plugins-service.js +2 -20
  300. package/lib/services/prepare-data-service.js +0 -1
  301. package/lib/services/project-backup-service.js +0 -4
  302. package/lib/services/project-changes-service.js +3 -14
  303. package/lib/services/project-cleanup-service.js +0 -2
  304. package/lib/services/project-config-service.js +2 -21
  305. package/lib/services/project-data-service.js +7 -36
  306. package/lib/services/project-name-service.js +0 -1
  307. package/lib/services/project-service.js +0 -10
  308. package/lib/services/project-templates-service.js +2 -3
  309. package/lib/services/qr-code-terminal-service.js +0 -1
  310. package/lib/services/require-service.js +0 -1
  311. package/lib/services/start-service.js +0 -1
  312. package/lib/services/temp-service.js +0 -3
  313. package/lib/services/terminal-spinner-service.js +0 -2
  314. package/lib/services/test-execution-service.js +2 -9
  315. package/lib/services/test-initialization-service.js +0 -4
  316. package/lib/services/timeline-profiler-service.js +0 -1
  317. package/lib/services/user-settings-service.js +0 -1
  318. package/lib/services/versions-service.js +4 -6
  319. package/lib/services/watch-ignore-list-service.js +0 -1
  320. package/lib/services/xcconfig-service.js +0 -2
  321. package/lib/services/xcproj-service.js +0 -1
  322. package/lib/shared-event-bus.js +0 -6
  323. package/lib/sys-info.js +1 -2
  324. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  325. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  326. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  327. package/lib/yarn-package-manager.js +0 -1
  328. package/lib/yarn2-package-manager.js +0 -3
  329. package/package.json +1 -1
@@ -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,31 +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, image);
116
116
  break;
117
- case "blank" /* Operations.Blank */:
117
+ case "blank":
118
118
  image = this.generateImage(background, width, height);
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, 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
- // Add an underlying white layer
135
131
  image = this.generateImage("#FFFFFF", image.width, image.height, image);
136
132
  }
137
133
  if (this.isAssetFilePath(outputPath)) {
@@ -185,4 +181,3 @@ __decorate([
185
181
  (0, decorators_1.exported)("assetsGenerationService")
186
182
  ], AssetsGenerationService.prototype, "generateSplashScreens", null);
187
183
  yok_1.injector.register("assetsGenerationService", AssetsGenerationService);
188
- //# 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