nativescript 9.0.0-alpha.7 → 9.0.0-alpha.8

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 (326) 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 -4
  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/info.js +0 -1
  26. package/lib/commands/install.js +0 -1
  27. package/lib/commands/list-platforms.js +0 -1
  28. package/lib/commands/migrate.js +0 -1
  29. package/lib/commands/native-add.js +0 -5
  30. package/lib/commands/platform-clean.js +0 -1
  31. package/lib/commands/plugin/add-plugin.js +0 -1
  32. package/lib/commands/plugin/build-plugin.js +0 -1
  33. package/lib/commands/plugin/create-plugin.js +0 -5
  34. package/lib/commands/plugin/list-plugins.js +0 -1
  35. package/lib/commands/plugin/remove-plugin.js +0 -2
  36. package/lib/commands/plugin/update-plugin.js +0 -1
  37. package/lib/commands/post-install.js +0 -6
  38. package/lib/commands/prepare.js +3 -4
  39. package/lib/commands/preview.js +0 -2
  40. package/lib/commands/remove-platform.js +0 -1
  41. package/lib/commands/resources/resources-update.js +0 -2
  42. package/lib/commands/run.js +0 -1
  43. package/lib/commands/setup.js +0 -1
  44. package/lib/commands/start.js +0 -1
  45. package/lib/commands/test-init.js +0 -4
  46. package/lib/commands/test.js +2 -9
  47. package/lib/commands/typings.js +1 -2
  48. package/lib/commands/update-platform.js +0 -5
  49. package/lib/commands/update.js +0 -2
  50. package/lib/commands/widget.js +1 -20
  51. package/lib/common/bootstrap.js +0 -1
  52. package/lib/common/child-process.js +0 -3
  53. package/lib/common/codeGeneration/code-entity.js +0 -1
  54. package/lib/common/codeGeneration/code-printer.js +0 -1
  55. package/lib/common/command-params.js +0 -1
  56. package/lib/common/commands/analytics.js +0 -3
  57. package/lib/common/commands/autocompletion.js +0 -3
  58. package/lib/common/commands/device/device-log-stream.js +0 -1
  59. package/lib/common/commands/device/get-file.js +0 -2
  60. package/lib/common/commands/device/list-applications.js +0 -1
  61. package/lib/common/commands/device/list-devices.js +0 -3
  62. package/lib/common/commands/device/list-files.js +0 -2
  63. package/lib/common/commands/device/put-file.js +0 -2
  64. package/lib/common/commands/device/run-application.js +0 -1
  65. package/lib/common/commands/device/stop-application.js +0 -1
  66. package/lib/common/commands/device/uninstall-application.js +0 -1
  67. package/lib/common/commands/doctor.js +2 -3
  68. package/lib/common/commands/generate-messages.js +0 -1
  69. package/lib/common/commands/help.js +0 -1
  70. package/lib/common/commands/package-manager-get.js +0 -1
  71. package/lib/common/commands/package-manager-set.js +0 -1
  72. package/lib/common/commands/post-install.js +0 -1
  73. package/lib/common/commands/preuninstall.js +2 -11
  74. package/lib/common/commands/proxy/proxy-base.js +0 -4
  75. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  76. package/lib/common/commands/proxy/proxy-get.js +0 -1
  77. package/lib/common/commands/proxy/proxy-set.js +0 -1
  78. package/lib/common/common-lib.js +0 -1
  79. package/lib/common/constants.js +0 -11
  80. package/lib/common/decorators.js +0 -48
  81. package/lib/common/dispatchers.js +1 -10
  82. package/lib/common/errors.js +3 -13
  83. package/lib/common/file-system.js +2 -13
  84. package/lib/common/header.js +0 -3
  85. package/lib/common/helpers.js +3 -89
  86. package/lib/common/host-info.js +0 -4
  87. package/lib/common/http-client.js +0 -20
  88. package/lib/common/logger/appenders/cli-appender.js +0 -4
  89. package/lib/common/logger/appenders/emit-appender.js +0 -4
  90. package/lib/common/logger/layouts/cli-layout.js +0 -1
  91. package/lib/common/logger/logger.js +0 -5
  92. package/lib/common/messages/messages.js +0 -6
  93. package/lib/common/mobile/android/android-application-manager.js +1 -20
  94. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  95. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  96. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  97. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  98. package/lib/common/mobile/android/android-device.js +0 -8
  99. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  100. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  101. package/lib/common/mobile/android/android-log-filter.js +0 -4
  102. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  103. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  104. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  105. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  106. package/lib/common/mobile/android/logcat-helper.js +0 -13
  107. package/lib/common/mobile/application-manager-base.js +0 -6
  108. package/lib/common/mobile/device-emitter.js +0 -4
  109. package/lib/common/mobile/device-log-emitter.js +0 -1
  110. package/lib/common/mobile/device-log-provider-base.js +0 -1
  111. package/lib/common/mobile/device-log-provider.js +0 -23
  112. package/lib/common/mobile/device-platforms-constants.js +0 -1
  113. package/lib/common/mobile/emulator-helper.js +0 -3
  114. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  115. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  116. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  117. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  118. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  119. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  120. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  121. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  122. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  123. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  124. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  125. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  126. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  127. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  128. package/lib/common/mobile/log-filter.js +0 -2
  129. package/lib/common/mobile/logging-levels.js +0 -1
  130. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  131. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  132. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  133. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  134. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  135. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  136. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  137. package/lib/common/mobile/mobile-helper.js +0 -1
  138. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  139. package/lib/common/opener.js +0 -1
  140. package/lib/common/os-info.js +0 -1
  141. package/lib/common/plist-parser.js +0 -1
  142. package/lib/common/project-helper.js +0 -1
  143. package/lib/common/prompter.js +1 -9
  144. package/lib/common/queue.js +0 -1
  145. package/lib/common/resource-loader.js +0 -1
  146. package/lib/common/services/auto-completion-service.js +1 -13
  147. package/lib/common/services/cancellation.js +1 -2
  148. package/lib/common/services/commands-service.js +6 -17
  149. package/lib/common/services/help-service.js +3 -11
  150. package/lib/common/services/hooks-service.js +0 -13
  151. package/lib/common/services/ios-notification-service.js +0 -1
  152. package/lib/common/services/json-file-settings-service.js +0 -6
  153. package/lib/common/services/lock-service.js +0 -6
  154. package/lib/common/services/message-contract-generator.js +0 -1
  155. package/lib/common/services/messages-service.js +0 -1
  156. package/lib/common/services/micro-templating-service.js +0 -6
  157. package/lib/common/services/net-service.js +0 -3
  158. package/lib/common/services/project-files-manager.js +0 -5
  159. package/lib/common/services/project-files-provider-base.js +0 -1
  160. package/lib/common/services/proxy-service.js +0 -1
  161. package/lib/common/services/qr.js +0 -1
  162. package/lib/common/services/settings-service.js +0 -1
  163. package/lib/common/services/xcode-select-service.js +0 -1
  164. package/lib/common/utils.js +0 -1
  165. package/lib/common/validators/project-name-validator.js +0 -1
  166. package/lib/common/validators/validation-result.js +0 -1
  167. package/lib/common/verify-node-version.js +1 -8
  168. package/lib/common/yok.js +11 -32
  169. package/lib/config.js +1 -22
  170. package/lib/constants-provider.js +0 -1
  171. package/lib/constants.js +0 -53
  172. package/lib/controllers/build-controller.js +3 -4
  173. package/lib/controllers/debug-controller.js +3 -8
  174. package/lib/controllers/deploy-controller.js +0 -1
  175. package/lib/controllers/migrate-controller.js +4 -90
  176. package/lib/controllers/platform-controller.js +1 -9
  177. package/lib/controllers/prepare-controller.js +4 -17
  178. package/lib/controllers/run-controller.js +1 -17
  179. package/lib/controllers/update-controller-base.js +0 -1
  180. package/lib/controllers/update-controller.js +0 -11
  181. package/lib/data/build-data.js +0 -1
  182. package/lib/data/controller-data-base.js +0 -1
  183. package/lib/data/debug-data.js +0 -1
  184. package/lib/data/platform-data.js +0 -1
  185. package/lib/data/prepare-data.js +0 -1
  186. package/lib/data/run-data.js +0 -1
  187. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  188. package/lib/detached-processes/cleanup-process.js +14 -18
  189. package/lib/detached-processes/file-log-service.js +1 -2
  190. package/lib/device-path-provider.js +0 -1
  191. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  192. package/lib/device-sockets/ios/notification.js +0 -3
  193. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  194. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  195. package/lib/helpers/deploy-command-helper.js +0 -1
  196. package/lib/helpers/key-command-helper.js +2 -4
  197. package/lib/helpers/livesync-command-helper.js +1 -4
  198. package/lib/helpers/network-connectivity-validator.js +0 -1
  199. package/lib/helpers/options-track-helper.js +2 -3
  200. package/lib/helpers/package-path-helper.js +0 -1
  201. package/lib/helpers/platform-command-helper.js +2 -7
  202. package/lib/helpers/version-validator-helper.js +0 -1
  203. package/lib/key-commands/bootstrap.js +2 -3
  204. package/lib/key-commands/index.js +4 -5
  205. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  206. package/lib/nativescript-cli-lib.js +0 -1
  207. package/lib/nativescript-cli.js +1 -10
  208. package/lib/node/pbxproj-dom-xcode.js +0 -1
  209. package/lib/node/xcode.js +0 -1
  210. package/lib/node-package-manager.js +1 -11
  211. package/lib/options.js +119 -144
  212. package/lib/package-installation-manager.js +1 -8
  213. package/lib/package-manager.js +0 -2
  214. package/lib/platform-command-param.js +0 -1
  215. package/lib/pnpm-package-manager.js +1 -4
  216. package/lib/project-data.js +0 -12
  217. package/lib/providers/project-files-provider.js +0 -1
  218. package/lib/resolvers/livesync-service-resolver.js +0 -1
  219. package/lib/services/analytics/analytics-broker-process.js +6 -10
  220. package/lib/services/analytics/analytics-broker.js +1 -2
  221. package/lib/services/analytics/analytics-service.js +25 -29
  222. package/lib/services/analytics/google-analytics-provider.js +12 -13
  223. package/lib/services/analytics-settings-service.js +0 -5
  224. package/lib/services/android/android-bundle-tool-service.js +0 -1
  225. package/lib/services/android/gradle-build-args-service.js +0 -3
  226. package/lib/services/android/gradle-build-service.js +0 -1
  227. package/lib/services/android/gradle-command-service.js +0 -1
  228. package/lib/services/android-device-debug-service.js +0 -6
  229. package/lib/services/android-plugin-build-service.js +2 -31
  230. package/lib/services/android-project-service.js +4 -71
  231. package/lib/services/android-resources-migration-service.js +0 -7
  232. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  233. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  234. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  235. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  236. package/lib/services/assets-generation/assets-generation-service.js +5 -10
  237. package/lib/services/build-artifacts-service.js +1 -2
  238. package/lib/services/build-data-service.js +0 -1
  239. package/lib/services/build-info-file-service.js +0 -1
  240. package/lib/services/bundler/bundler-compiler-service.js +35 -75
  241. package/lib/services/bundler/bundler.js +0 -1
  242. package/lib/services/cleanup-service.js +9 -13
  243. package/lib/services/cocoapods-platform-manager.js +0 -9
  244. package/lib/services/cocoapods-service.js +1 -21
  245. package/lib/services/debug-data-service.js +0 -1
  246. package/lib/services/debug-service-base.js +0 -7
  247. package/lib/services/device/device-install-app-service.js +1 -2
  248. package/lib/services/doctor-service.js +6 -21
  249. package/lib/services/extensibility-service.js +0 -8
  250. package/lib/services/files-hash-service.js +0 -1
  251. package/lib/services/hmr-status-service.js +0 -2
  252. package/lib/services/info-service.js +0 -1
  253. package/lib/services/initialize-service.js +1 -5
  254. package/lib/services/ios/export-options-plist-service.js +0 -4
  255. package/lib/services/ios/ios-signing-service.js +0 -4
  256. package/lib/services/ios/spm-service.js +0 -11
  257. package/lib/services/ios/xcodebuild-args-service.js +0 -9
  258. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  259. package/lib/services/ios/xcodebuild-service.js +1 -2
  260. package/lib/services/ios-debugger-port-service.js +0 -1
  261. package/lib/services/ios-device-debug-service.js +0 -1
  262. package/lib/services/ios-entitlements-service.js +0 -1
  263. package/lib/services/ios-extensions-service.js +0 -1
  264. package/lib/services/ios-log-filter.js +0 -20
  265. package/lib/services/ios-native-target-service.js +4 -6
  266. package/lib/services/ios-project-service.js +1 -91
  267. package/lib/services/ios-provision-service.js +0 -3
  268. package/lib/services/ios-watch-app-service.js +0 -1
  269. package/lib/services/ip-service.js +0 -2
  270. package/lib/services/itmstransporter-service.js +0 -1
  271. package/lib/services/karma-execution.js +0 -2
  272. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  273. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  274. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  275. package/lib/services/livesync/android-livesync-service.js +0 -1
  276. package/lib/services/livesync/android-livesync-tool.js +3 -5
  277. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  278. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  279. package/lib/services/livesync/ios-livesync-service.js +0 -2
  280. package/lib/services/livesync/livesync-socket.js +0 -1
  281. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  282. package/lib/services/livesync-process-data-service.js +0 -1
  283. package/lib/services/log-parser-service.js +0 -1
  284. package/lib/services/log-source-map-service.js +0 -15
  285. package/lib/services/marking-mode-service.js +5 -8
  286. package/lib/services/metadata-filtering-service.js +0 -1
  287. package/lib/services/npm-config-service.js +0 -4
  288. package/lib/services/pacote-service.js +0 -7
  289. package/lib/services/performance-service.js +1 -3
  290. package/lib/services/platform/add-platform-service.js +2 -49
  291. package/lib/services/platform/platform-validation-service.js +0 -1
  292. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  293. package/lib/services/platform-environment-requirements.js +3 -8
  294. package/lib/services/platform-project-service-base.js +0 -1
  295. package/lib/services/platforms-data-service.js +0 -1
  296. package/lib/services/plugins-service.js +2 -20
  297. package/lib/services/prepare-data-service.js +0 -1
  298. package/lib/services/project-backup-service.js +0 -4
  299. package/lib/services/project-changes-service.js +3 -14
  300. package/lib/services/project-cleanup-service.js +0 -2
  301. package/lib/services/project-config-service.js +2 -21
  302. package/lib/services/project-data-service.js +7 -36
  303. package/lib/services/project-name-service.js +0 -1
  304. package/lib/services/project-service.js +0 -10
  305. package/lib/services/project-templates-service.js +2 -3
  306. package/lib/services/qr-code-terminal-service.js +0 -1
  307. package/lib/services/require-service.js +0 -1
  308. package/lib/services/start-service.js +0 -1
  309. package/lib/services/temp-service.js +0 -3
  310. package/lib/services/terminal-spinner-service.js +0 -2
  311. package/lib/services/test-execution-service.js +2 -9
  312. package/lib/services/test-initialization-service.js +0 -4
  313. package/lib/services/timeline-profiler-service.js +0 -1
  314. package/lib/services/user-settings-service.js +0 -1
  315. package/lib/services/versions-service.js +4 -6
  316. package/lib/services/watch-ignore-list-service.js +0 -1
  317. package/lib/services/xcconfig-service.js +0 -2
  318. package/lib/services/xcproj-service.js +0 -1
  319. package/lib/shared-event-bus.js +0 -6
  320. package/lib/sys-info.js +1 -2
  321. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  322. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  323. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  324. package/lib/yarn-package-manager.js +0 -1
  325. package/lib/yarn2-package-manager.js +0 -3
  326. package/package.json +15 -15
@@ -16,8 +16,7 @@ const constants_1 = require("../../constants");
16
16
  const yok_1 = require("../../common/yok");
17
17
  const package_path_helper_1 = require("../../helpers/package-path-helper");
18
18
  class BundlerCompilerService extends events_1.EventEmitter {
19
- constructor($options, $errors, $childProcess, $fs, $hooksService, $hostInfo, $logger, $mobileHelper, $cleanupService, $packageManager, $packageInstallationManager, // private $sharedEventBus: ISharedEventBus
20
- $projectConfigService) {
19
+ constructor($options, $errors, $childProcess, $fs, $hooksService, $hostInfo, $logger, $mobileHelper, $cleanupService, $packageManager, $packageInstallationManager, $projectConfigService) {
21
20
  super();
22
21
  this.$options = $options;
23
22
  this.$errors = $errors;
@@ -44,7 +43,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
44
43
  prepareData.watch = true;
45
44
  try {
46
45
  const childProcess = await this.startBundleProcess(platformData, projectData, prepareData);
47
- // Handle Vite differently from webpack
48
46
  const isVite = this.getBundler() === "vite";
49
47
  childProcess.stdout.on("data", function (data) {
50
48
  process.stdout.write(data);
@@ -52,31 +50,21 @@ class BundlerCompilerService extends events_1.EventEmitter {
52
50
  childProcess.stderr.on("data", function (data) {
53
51
  process.stderr.write(data);
54
52
  });
55
- // For both Vite and webpack, we wait for the first build to complete
56
- // Don't resolve immediately for Vite - wait for first IPC message
57
53
  childProcess.on("message", (message) => {
58
54
  this.$logger.trace(`Message from ${projectData.bundler}`, message);
59
- // Handle Vite messages
60
55
  if (isVite &&
61
56
  message &&
62
57
  message.emittedFiles) {
63
58
  message = message;
64
59
  console.log("Received Vite IPC message:", message);
65
- // Copy Vite output files directly to platform destination
66
60
  const distOutput = path.join(projectData.projectDir, "dist");
67
61
  const destDir = path.join(platformData.appDestinationDirectoryPath, this.$options.hostProjectModuleName);
68
62
  console.log(`🔥 Copying from ${distOutput} to ${destDir}`);
69
- // For HMR updates, only copy changed files; for full builds, copy everything
70
- if (message.isHMR &&
71
- message.changedFiles &&
72
- message.changedFiles.length > 0) {
63
+ if (message.isHMR) {
73
64
  console.log("🔥 HMR update - copying only changed files for:", message.changedFiles);
74
- // For HTML template changes, we need to copy the component files that were rebuilt
75
65
  let filesToCopy = message.emittedFiles;
76
- // If we have HTML changes, identify which component files need copying
77
66
  const hasHTMLChanges = message.changedFiles.some((f) => f.endsWith(".html"));
78
67
  if (hasHTMLChanges) {
79
- // Copy component-related files (the ones that would have been rebuilt due to template changes)
80
68
  filesToCopy = message.emittedFiles.filter((f) => f.includes(".component") ||
81
69
  f === "bundle.mjs" ||
82
70
  f === "bundle.mjs.map");
@@ -84,17 +72,23 @@ class BundlerCompilerService extends events_1.EventEmitter {
84
72
  }
85
73
  this.copyViteBundleToNative(distOutput, destDir, filesToCopy);
86
74
  }
75
+ else if (message.buildType === "incremental" &&
76
+ message.changedFiles &&
77
+ message.changedFiles.length > 0) {
78
+ console.log("🔥 Incremental build - copying only relevant files for:", message.changedFiles);
79
+ const filesToCopy = this.getIncrementalFilesToCopy(message.emittedFiles, message.changedFiles);
80
+ console.log("🔥 Incremental build - files to copy:", filesToCopy);
81
+ this.copyViteBundleToNative(distOutput, destDir, filesToCopy);
82
+ }
87
83
  else {
88
84
  console.log("🔥 Full build - copying all files");
89
85
  this.copyViteBundleToNative(distOutput, destDir);
90
86
  }
91
- // Resolve the promise on first build completion
92
87
  if (isFirstBundlerWatchCompilation) {
93
88
  isFirstBundlerWatchCompilation = false;
94
89
  console.log("Vite first build completed, resolving compileWithWatch");
95
90
  resolve(childProcess);
96
91
  }
97
- // Transform Vite message to match webpack format
98
92
  const files = message.emittedFiles.map((file) => path.join(platformData.appDestinationDirectoryPath, this.$options.hostProjectModuleName, file));
99
93
  const data = {
100
94
  files,
@@ -106,7 +100,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
106
100
  platform: platformData.platformNameLowerCase,
107
101
  };
108
102
  this.$logger.info(`Vite build completed! Files copied to native platform.`);
109
- // Send HMR notification to connected WebSocket clients first
110
103
  this.notifyHMRClients({
111
104
  type: message.isHMR ? "js-update" : "build-complete",
112
105
  timestamp: Date.now(),
@@ -118,30 +111,19 @@ class BundlerCompilerService extends events_1.EventEmitter {
118
111
  console.log("🔥 Skipping BUNDLER_COMPILATION_COMPLETE for HMR update - app will not restart");
119
112
  }
120
113
  else {
121
- // Only emit BUNDLER_COMPILATION_COMPLETE for non-HMR builds
122
- // This prevents the CLI from restarting the app during HMR updates
123
114
  console.log("🔥 Emitting BUNDLER_COMPILATION_COMPLETE for full build");
124
115
  this.emit(constants_1.BUNDLER_COMPILATION_COMPLETE, data);
125
116
  }
126
117
  return;
127
118
  }
128
- // if we are on webpack5 - we handle HMR in a slightly different way
129
119
  if (typeof message === "object" &&
130
120
  "version" in message &&
131
121
  "type" in message) {
132
- // first compilation can be ignored because it will be synced regardless
133
- // handling it here would trigger 2 syncs
134
122
  if (isFirstBundlerWatchCompilation) {
135
123
  isFirstBundlerWatchCompilation = false;
136
124
  resolve(childProcess);
137
125
  return;
138
126
  }
139
- // if ((message as IWebpackMessage).type === "hmr-status") {
140
- // // we pass message through our event-bus to be handled wherever needed
141
- // // in this case webpack-hmr-status-service listens for this event
142
- // this.$sharedEventBus.emit("webpack:hmr-status", message);
143
- // return;
144
- // }
145
127
  return this.handleHMRMessage(message, platformData, projectData, prepareData);
146
128
  }
147
129
  if (message ===
@@ -157,7 +139,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
157
139
  prepareData.hmr ? message.hash : "";
158
140
  return;
159
141
  }
160
- // Persist the previousHash value before calling `this.getUpdatedEmittedFiles` as it will modify the expectedHashes object with the current hash
161
142
  const previousHash = this.expectedHashes[platformData.platformNameLowerCase];
162
143
  let result;
163
144
  if (prepareData.hmr) {
@@ -182,7 +163,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
182
163
  platform: platformData.platformNameLowerCase,
183
164
  };
184
165
  this.$logger.trace(`Generated data from ${projectData.bundler} message:`, data);
185
- // the hash of the compilation is the same as the previous one and there are only hot updates produced
186
166
  if (data.hasOnlyHotUpdateFiles && previousHash === message.hash) {
187
167
  return;
188
168
  }
@@ -255,9 +235,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
255
235
  }
256
236
  }
257
237
  async shouldUsePreserveSymlinksOption() {
258
- // pnpm does not require symlink (https://github.com/nodejs/node-eps/issues/46#issuecomment-277373566)
259
- // and it also does not work in some cases.
260
- // Check https://github.com/NativeScript/nativescript-cli/issues/5259 for more information
261
238
  const currentPackageManager = await this.$packageManager.getPackageManagerName();
262
239
  const res = currentPackageManager !== constants_1.PackageManagers.pnpm;
263
240
  return res;
@@ -276,7 +253,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
276
253
  const envData = this.buildEnvData(platformData.platformNameLowerCase, projectData, prepareData);
277
254
  const isVite = this.getBundler() === "vite";
278
255
  const cliArgs = await this.buildEnvCommandLineParams(envData, platformData, projectData, prepareData);
279
- // Note: With Vite, we need `--` to prevent vite cli from erroring on unknown options.
280
256
  const envParams = isVite
281
257
  ? [
282
258
  `--mode=${platformData.platformNameLowerCase}`,
@@ -342,28 +318,16 @@ class BundlerCompilerService extends events_1.EventEmitter {
342
318
  });
343
319
  envData.verbose = envData.verbose || this.$logger.isVerbose();
344
320
  envData.production = envData.production || prepareData.release;
345
- // add the config file name to the env data so the webpack process can read the
346
- // correct config file when resolving the CLI lib and the config service
347
- // we are explicitly setting it to false to force using the defaults
348
321
  envData.config =
349
322
  (_b = (_a = process.env.NATIVESCRIPT_CONFIG_NAME) !== null && _a !== void 0 ? _a : this.$options.config) !== null && _b !== void 0 ? _b : "false";
350
- // explicitly set the env variable
351
323
  process.env.NATIVESCRIPT_CONFIG_NAME = envData.config;
352
- // The snapshot generation is wrongly located in the Webpack plugin.
353
- // It should be moved in the Native Prepare of the CLI or a Gradle task in the Runtime.
354
- // As a workaround, we skip the mksnapshot, xxd and android-ndk calls based on skipNativePrepare.
355
- // In this way the plugin will prepare only the snapshot JS entry without any native prepare and
356
- // we will able to execute cloud builds with snapshot without having any local snapshot or Docker setup.
357
- // TODO: Remove this flag when we remove the native part from the plugin.
358
324
  envData.skipSnapshotTools =
359
325
  prepareData.nativePrepare && prepareData.nativePrepare.skipNativePrepare;
360
- // only set sourceMap if not explicitly set through a flag
361
326
  if (typeof ((_c = prepareData === null || prepareData === void 0 ? void 0 : prepareData.env) === null || _c === void 0 ? void 0 : _c.sourceMap) === "undefined") {
362
327
  if (!prepareData.release) {
363
328
  envData.sourceMap = true;
364
329
  }
365
330
  }
366
- // convert string to boolean
367
331
  if (envData.sourceMap === "true" || envData.sourceMap === "false") {
368
332
  envData.sourceMap = envData.sourceMap === "true";
369
333
  }
@@ -384,7 +348,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
384
348
  }
385
349
  else if (this.$hostInfo.isWindows) {
386
350
  if (projectData.bundler === "webpack") {
387
- //TODO: check this use case for webpack5 WEBPACK_PLUGIN_NAME
388
351
  const minWebpackPluginWithWinSnapshotsVersion = "1.3.0";
389
352
  const installedWebpackPluginVersion = await this.$packageInstallationManager.getInstalledDependencyVersion(constants_1.WEBPACK_PLUGIN_NAME, projectData.projectDir);
390
353
  const hasWebpackPluginWithWinSnapshotsSupport = !!installedWebpackPluginVersion
@@ -418,15 +381,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
418
381
  }
419
382
  getUpdatedEmittedFiles(allEmittedFiles, chunkFiles, nextHash, platform) {
420
383
  const currentHash = this.getCurrentHotUpdateHash(allEmittedFiles);
421
- // This logic is needed as there are already cases when webpack doesn't emit any files physically.
422
- // We've set noEmitOnErrors in webpack.config.js based on noEmitOnError from tsconfig.json,
423
- // so webpack doesn't emit any files when noEmitOnErrors: true is set in webpack.config.js and
424
- // there is a compilation error in the source code. On the other side, hmr generates new hot-update files
425
- // on every change and the hash of the next hmr update is written inside hot-update.json file.
426
- // Although webpack doesn't emit any files, hmr hash is still generated. The hash is generated per compilation no matter
427
- // if files will be emitted or not. This way, the first successful compilation after fixing the compilation error generates
428
- // a hash that is not the same as the one expected in the latest emitted hot-update.json file.
429
- // As a result, the hmr chain is broken and the changes are not applied.
430
384
  const isHashValid = nextHash
431
385
  ? this.expectedHashes[platform] === currentHash
432
386
  : true;
@@ -445,7 +399,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
445
399
  let hotHash;
446
400
  const hotUpdateScripts = emittedFiles.filter((x) => x.endsWith(".hot-update.js"));
447
401
  if (hotUpdateScripts && hotUpdateScripts.length) {
448
- // the hash is the same for each hot update in the current compilation
449
402
  const hotUpdateName = hotUpdateScripts[0];
450
403
  const matcher = /^(.+)\.(.+)\.hot-update/gm;
451
404
  const matches = matcher.exec(hotUpdateName);
@@ -463,7 +416,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
463
416
  }
464
417
  }
465
418
  handleHMRMessage(message, platformData, projectData, prepareData) {
466
- // handle new bundler hmr packets
467
419
  this.$logger.trace(`Received message from ${projectData.bundler} process:`, message);
468
420
  if (message.type !== "compilation") {
469
421
  return;
@@ -471,7 +423,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
471
423
  this.$logger.trace(`${capitalizeFirstLetter(projectData.bundler)} build done!`);
472
424
  const files = message.data.emittedAssets.map((asset) => path.join(platformData.appDestinationDirectoryPath, this.$options.hostProjectModuleName, asset));
473
425
  const staleFiles = message.data.staleAssets.map((asset) => path.join(platformData.appDestinationDirectoryPath, this.$options.hostProjectModuleName, asset));
474
- // extract last hash from emitted filenames
475
426
  const lastHash = (() => {
476
427
  const absoluteFileNameWithLastHash = files.find((fileName) => fileName.endsWith("hot-update.js"));
477
428
  if (!absoluteFileNameWithLastHash) {
@@ -484,7 +435,6 @@ class BundlerCompilerService extends events_1.EventEmitter {
484
435
  }
485
436
  })();
486
437
  if (!files.length) {
487
- // ignore compilations if no new files are emitted
488
438
  return;
489
439
  }
490
440
  this.emit(constants_1.BUNDLER_COMPILATION_COMPLETE, {
@@ -548,36 +498,28 @@ class BundlerCompilerService extends events_1.EventEmitter {
548
498
  return this.$projectConfigService.getValue(`bundler`, "webpack");
549
499
  }
550
500
  copyViteBundleToNative(distOutput, destDir, specificFiles = null) {
551
- // Clean and copy Vite output to native platform folder
552
501
  console.log(`Copying Vite bundle from "${distOutput}" to "${destDir}"`);
553
502
  const fs = require("fs");
554
503
  try {
555
504
  if (specificFiles) {
556
- // HMR mode: only copy specific files
557
- console.log("🔥 HMR: Copying specific files:", specificFiles);
558
- // Ensure destination directory exists
505
+ console.log("🔥 Selective copy - copying specific files:", specificFiles);
559
506
  fs.mkdirSync(destDir, { recursive: true });
560
- // Copy only the specified files
561
507
  for (const file of specificFiles) {
562
508
  const srcPath = path.join(distOutput, file);
563
509
  const destPath = path.join(destDir, file);
564
510
  if (!fs.existsSync(srcPath))
565
511
  continue;
566
- // create parent dirs
567
512
  fs.mkdirSync(path.dirname(destPath), { recursive: true });
568
513
  fs.copyFileSync(srcPath, destPath);
569
- console.log(`🔥 HMR: Copied ${file}`);
514
+ console.log(`🔥 Copied ${file}`);
570
515
  }
571
516
  }
572
517
  else {
573
- // Full build mode: clean and copy everything
574
518
  console.log("🔥 Full build: Copying all files");
575
- // Clean destination directory
576
519
  if (fs.existsSync(destDir)) {
577
520
  fs.rmSync(destDir, { recursive: true, force: true });
578
521
  }
579
522
  fs.mkdirSync(destDir, { recursive: true });
580
- // Copy all files from dist to platform destination
581
523
  if (fs.existsSync(distOutput)) {
582
524
  this.copyRecursiveSync(distOutput, destDir, fs);
583
525
  }
@@ -590,11 +532,32 @@ class BundlerCompilerService extends events_1.EventEmitter {
590
532
  this.$logger.warn(`Failed to copy Vite bundle: ${error.message}`);
591
533
  }
592
534
  }
535
+ getIncrementalFilesToCopy(emittedFiles, changedFiles) {
536
+ const filesToCopy = [];
537
+ const bundleFiles = emittedFiles.filter((file) => !file.includes("vendor") &&
538
+ (file.includes("bundle") ||
539
+ file.includes("main") ||
540
+ file.includes("app") ||
541
+ file.endsWith(".mjs") ||
542
+ file.endsWith(".js")));
543
+ filesToCopy.push(...bundleFiles);
544
+ const sourceMapFiles = emittedFiles.filter((file) => !file.includes("vendor") && file.endsWith(".map"));
545
+ filesToCopy.push(...sourceMapFiles);
546
+ const hasAssetChanges = changedFiles.some((file) => file.includes("/assets/") ||
547
+ file.includes("/static/") ||
548
+ file.includes("/public/"));
549
+ if (hasAssetChanges) {
550
+ const assetFiles = emittedFiles.filter((file) => file.includes("assets/") ||
551
+ file.includes("static/") ||
552
+ file.includes("fonts/") ||
553
+ file.includes("images/"));
554
+ filesToCopy.push(...assetFiles);
555
+ }
556
+ return [...new Set(filesToCopy)];
557
+ }
593
558
  notifyHMRClients(message) {
594
- // Send WebSocket notification to HMR clients
595
559
  try {
596
560
  const WebSocket = require("ws");
597
- // Try to connect to HMR bridge and send notification
598
561
  const ws = new WebSocket("ws://localhost:24678");
599
562
  ws.on("open", () => {
600
563
  console.log("🔥 Sending HMR notification to bridge:", message.type);
@@ -602,12 +565,10 @@ class BundlerCompilerService extends events_1.EventEmitter {
602
565
  ws.close();
603
566
  });
604
567
  ws.on("error", () => {
605
- // HMR bridge not available, which is fine
606
568
  console.log("🔥 HMR bridge not available (this is normal without HMR)");
607
569
  });
608
570
  }
609
571
  catch (error) {
610
- // WebSocket not available, which is fine
611
572
  console.log("🔥 WebSocket not available for HMR notifications");
612
573
  }
613
574
  }
@@ -633,4 +594,3 @@ function capitalizeFirstLetter(val) {
633
594
  return String(val).charAt(0).toUpperCase() + String(val).slice(1);
634
595
  }
635
596
  yok_1.injector.register("bundlerCompilerService", BundlerCompilerService);
636
- //# sourceMappingURL=bundler-compiler-service.js.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=bundler.js.map
@@ -20,56 +20,56 @@ class CleanupService {
20
20
  async addCleanupCommand(commandInfo) {
21
21
  const cleanupProcess = await this.getCleanupProcess();
22
22
  cleanupProcess.send({
23
- messageType: "AddCleanCommand" /* CleanupProcessMessage.AddCleanCommand */,
23
+ messageType: "AddCleanCommand",
24
24
  commandInfo,
25
25
  });
26
26
  }
27
27
  async removeCleanupCommand(commandInfo) {
28
28
  const cleanupProcess = await this.getCleanupProcess();
29
29
  cleanupProcess.send({
30
- messageType: "RemoveCleanCommand" /* CleanupProcessMessage.RemoveCleanCommand */,
30
+ messageType: "RemoveCleanCommand",
31
31
  commandInfo,
32
32
  });
33
33
  }
34
34
  async addRequest(requestInfo) {
35
35
  const cleanupProcess = await this.getCleanupProcess();
36
36
  cleanupProcess.send({
37
- messageType: "AddRequest" /* CleanupProcessMessage.AddRequest */,
37
+ messageType: "AddRequest",
38
38
  requestInfo,
39
39
  });
40
40
  }
41
41
  async removeRequest(requestInfo) {
42
42
  const cleanupProcess = await this.getCleanupProcess();
43
43
  cleanupProcess.send({
44
- messageType: "RemoveRequest" /* CleanupProcessMessage.RemoveRequest */,
44
+ messageType: "RemoveRequest",
45
45
  requestInfo,
46
46
  });
47
47
  }
48
48
  async addCleanupDeleteAction(filePath) {
49
49
  const cleanupProcess = await this.getCleanupProcess();
50
50
  cleanupProcess.send({
51
- messageType: "AddDeleteFileAction" /* CleanupProcessMessage.AddDeleteFileAction */,
51
+ messageType: "AddDeleteFileAction",
52
52
  filePath,
53
53
  });
54
54
  }
55
55
  async removeCleanupDeleteAction(filePath) {
56
56
  const cleanupProcess = await this.getCleanupProcess();
57
57
  cleanupProcess.send({
58
- messageType: "RemoveDeleteFileAction" /* CleanupProcessMessage.RemoveDeleteFileAction */,
58
+ messageType: "RemoveDeleteFileAction",
59
59
  filePath,
60
60
  });
61
61
  }
62
62
  async addCleanupJS(jsCommand) {
63
63
  const cleanupProcess = await this.getCleanupProcess();
64
64
  cleanupProcess.send({
65
- messageType: "AddJSFileToRequire" /* CleanupProcessMessage.AddJSFileToRequire */,
65
+ messageType: "AddJSFileToRequire",
66
66
  jsCommand,
67
67
  });
68
68
  }
69
69
  async removeCleanupJS(jsCommand) {
70
70
  const cleanupProcess = await this.getCleanupProcess();
71
71
  cleanupProcess.send({
72
- messageType: "RemoveJSFileToRequire" /* CleanupProcessMessage.RemoveJSFileToRequire */,
72
+ messageType: "RemoveJSFileToRequire",
73
73
  jsCommand,
74
74
  });
75
75
  }
@@ -92,8 +92,6 @@ class CleanupService {
92
92
  setShouldDispose(shouldDispose) {
93
93
  this.shouldDispose = shouldDispose;
94
94
  }
95
- // TODO: Consider extracting this method to a separate service
96
- // as it has the same logic as the one used in analytics-service
97
95
  getCleanupProcess() {
98
96
  return new Promise((resolve, reject) => {
99
97
  const cleanupProcessArgs = this.getCleanupProcessArgs();
@@ -112,12 +110,11 @@ class CleanupService {
112
110
  clearTimeout(timeoutId);
113
111
  if (!isSettled) {
114
112
  isSettled = true;
115
- // In case we throw error here, CLI will break its execution.
116
113
  reject(err);
117
114
  }
118
115
  });
119
116
  cleanupProcess.on("message", (data) => {
120
- if (data === "ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */) {
117
+ if (data === "ProcessReadyToReceive") {
121
118
  clearTimeout(timeoutId);
122
119
  if (!isSettled) {
123
120
  isSettled = true;
@@ -166,4 +163,3 @@ __decorate([
166
163
  (0, decorators_1.cache)()
167
164
  ], CleanupService.prototype, "getCleanupProcess", null);
168
165
  yok_1.injector.register("cleanupService", CleanupService);
169
- //# sourceMappingURL=cleanup-service.js.map
@@ -82,7 +82,6 @@ class CocoaPodsPlatformManager {
82
82
  _.each(allPodfiles, (podfileContent) => {
83
83
  const platformMatch = platformRowRegExp.exec(podfileContent);
84
84
  const podfilePathMatch = podfilePathRegExp.exec(podfileContent) || [];
85
- // platform without version -> select it with highest priority
86
85
  if (platformMatch && platformMatch[0] && !platformMatch[2]) {
87
86
  selectedPlatformData = {
88
87
  version: null,
@@ -91,7 +90,6 @@ class CocoaPodsPlatformManager {
91
90
  };
92
91
  return false;
93
92
  }
94
- // platform with version
95
93
  if (platformMatch && platformMatch[0] && platformMatch[2]) {
96
94
  if (!selectedPlatformData ||
97
95
  semver.gt(semver.coerce(platformMatch[2]), semver.coerce(selectedPlatformData.version))) {
@@ -106,12 +104,6 @@ class CocoaPodsPlatformManager {
106
104
  return selectedPlatformData;
107
105
  }
108
106
  shouldReplacePlatformSection(projectData, oldPodfilePlatformData, currentPodfilePlatformData) {
109
- // The selected platform should be replaced in the following cases:
110
- // 1. When the pod file is from App_Resources and the selected platform is not from App_Resources
111
- // 2. When the pod file is from App_Resources, the selected platform is also from App_Resources
112
- // and the pod's version is greater than the selected one
113
- // 3. When the pod file doesn't have platform's version -> `platform :ios`
114
- // 4. When the pod file has a version greater than the selected platform's version
115
107
  const appResourcesPodfilePath = path.join(projectData.getAppResourcesDirectoryPath(), "iOS", constants_1.PODFILE_NAME);
116
108
  const isFromAppResources = oldPodfilePlatformData.path !== appResourcesPodfilePath &&
117
109
  currentPodfilePlatformData.path === appResourcesPodfilePath;
@@ -143,4 +135,3 @@ class CocoaPodsPlatformManager {
143
135
  }
144
136
  exports.CocoaPodsPlatformManager = CocoaPodsPlatformManager;
145
137
  yok_1.injector.register("cocoaPodsPlatformManager", CocoaPodsPlatformManager);
146
- //# sourceMappingURL=cocoapods-platform-manager.js.map
@@ -34,12 +34,6 @@ class CocoaPodsService {
34
34
  let podTool = this.$config.USE_POD_SANDBOX ? "sandbox-pod" : "pod";
35
35
  const args = ["install"];
36
36
  if (process.platform === "darwin" && process.arch === "arm64") {
37
- // check if pod is installed as an x86_64 binary or a native arm64 one
38
- // we run the following:
39
- // arch -x86_64 pod --version
40
- // if it's an arm64 binary, we'll get something like this as a result:
41
- // arch: posix_spawnp: pod: Bad CPU type in executable
42
- // in which case, we should run it natively.
43
37
  const res = await this.$childProcess
44
38
  .exec("arch -x86_64 pod --version", null, {
45
39
  showStderr: true,
@@ -53,11 +47,8 @@ class CocoaPodsService {
53
47
  podTool = "arch";
54
48
  }
55
49
  }
56
- // cocoapods print a lot of non-error information on stderr. Pipe the `stderr` to `stdout`, so we won't polute CLI's stderr output.
57
50
  const podInstallResult = await this.$childProcess.spawnFromEvent(podTool, args, "close", { cwd: projectRoot, stdio: ["pipe", process.stdout, process.stdout] }, { throwError: false });
58
51
  if (podInstallResult.exitCode !== 0) {
59
- // https://github.com/CocoaPods/CocoaPods/blob/92aaf0f1120d32f3487960b485fb69fcaf61486c/lib/cocoapods/resolver.rb#L498
60
- // TODO add article
61
52
  const versionResolutionHint = podInstallResult.exitCode === 31
62
53
  ? `For more information on resolving CocoaPod issues in NativeScript read.`
63
54
  : "";
@@ -89,7 +80,6 @@ ${versionResolutionHint}`);
89
80
  }
90
81
  async applyPodfileArchExclusions(projectData, platformData) {
91
82
  const xcodeVersionData = await this.$xcodeSelectService.getXcodeVersion();
92
- // only apply EXCLUDED_ARCHS workaround on XCode 12
93
83
  if (+xcodeVersionData.major !== 12) {
94
84
  return;
95
85
  }
@@ -108,7 +98,6 @@ end`.trim();
108
98
  this.$fs.writeFile(exclusionsPodfile, exclusions);
109
99
  }
110
100
  await this.applyPodfileToProject("NativeScript-CLI-Architecture-Exclusions", exclusionsPodfile, projectData, platformData);
111
- // clean up
112
101
  this.$fs.deleteFile(exclusionsPodfile);
113
102
  }
114
103
  async applyPodfileFromExtensions(projectData, platformData) {
@@ -131,7 +120,6 @@ end`.trim();
131
120
  podfilePath: path.join(extensionFolderPath, name, constants.PODFILE_NAME),
132
121
  }));
133
122
  extensionsPodfile.forEach(({ targetName, podfilePath }) => {
134
- // Remove the data between #Begin Podfile and #EndPodfile
135
123
  const regExpToRemove = new RegExp(`${this.getExtensionPodfileHeader(podfilePath, targetName)}[\\s\\S]*?${this.getExtensionPodfileEnd()}`, "mg");
136
124
  projectPodFileContent = projectPodFileContent.replace(regExpToRemove, "");
137
125
  if (this.$fs.exists(podfilePath)) {
@@ -158,7 +146,6 @@ end`.trim();
158
146
  ? this.$fs.readText(pathToProjectPodfile).trim()
159
147
  : "";
160
148
  if (projectPodfileContent.indexOf(podfileContent) === -1) {
161
- // Remove old occurences of the plugin from the project's Podfile.
162
149
  this.removePodfileFromProject(moduleName, podfilePath, projectData, nativeProjectPath);
163
150
  let finalPodfileContent = this.$fs.exists(pathToProjectPodfile)
164
151
  ? this.getPodfileContentWithoutTarget(projectData, this.$fs.readText(pathToProjectPodfile))
@@ -176,7 +163,6 @@ end`.trim();
176
163
  removePodfileFromProject(moduleName, podfilePath, projectData, projectRoot) {
177
164
  if (this.$fs.exists(this.getProjectPodfilePath(projectRoot))) {
178
165
  let projectPodFileContent = this.$fs.readText(this.getProjectPodfilePath(projectRoot));
179
- // Remove the data between #Begin Podfile and #EndPodfile
180
166
  const regExpToRemove = new RegExp(`${this.getPluginPodfileHeader(podfilePath)}[\\s\\S]*?${this.getPluginPodfileEnd()}`, "mg");
181
167
  projectPodFileContent = projectPodFileContent.replace(regExpToRemove, "");
182
168
  projectPodFileContent = this.removePostInstallHook(moduleName, projectPodFileContent);
@@ -197,7 +183,7 @@ end`.trim();
197
183
  }
198
184
  }
199
185
  getPluginPodfilePath(pluginData) {
200
- const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath("ios" /* PlatformTypes.ios */);
186
+ const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath("ios");
201
187
  const pluginPodFilePath = path.join(pluginPlatformsFolderPath, constants_1.PODFILE_NAME);
202
188
  return pluginPodFilePath;
203
189
  }
@@ -233,7 +219,6 @@ end`.trim();
233
219
  if (_.startsWith(projectPodfileContent, podFileHeader)) {
234
220
  projectPodfileContent = projectPodfileContent.substr(podFileHeader.length);
235
221
  const podFileFooter = this.getPodfileFooter();
236
- // Only remove the final end in case the file starts with the podFileHeader
237
222
  if (_.endsWith(projectPodfileContent, podFileFooter)) {
238
223
  projectPodfileContent = projectPodfileContent.substr(0, projectPodfileContent.length - podFileFooter.length);
239
224
  }
@@ -254,8 +239,6 @@ end`.trim();
254
239
  return projectPodFileContent;
255
240
  }
256
241
  getHookBasicFuncNameForPlugin(hookName, pluginName) {
257
- // nativescript-hook and nativescript_hook should have different names, so replace all _ with ___ first and then replace all special symbols with _
258
- // This will lead to a clash in case plugins are called nativescript-hook and nativescript___hook
259
242
  const replacedPluginName = pluginName
260
243
  .replace(/_/g, "___")
261
244
  .replace(/[^A-Za-z0-9_]/g, "_");
@@ -269,7 +252,6 @@ end`.trim();
269
252
  const newFunctionName = `${this.getHookBasicFuncNameForPlugin(hookName, pluginName)}_${newFunctions.length}`;
270
253
  let newDefinition = `def ${newFunctionName}`;
271
254
  const rubyFunction = { functionName: newFunctionName };
272
- // firstGroup is the block parameter, secondGroup is the block parameter name.
273
255
  if (firstGroup && secondGroup) {
274
256
  newDefinition = `${newDefinition} (${secondGroup})`;
275
257
  rubyFunction.functionParameters = secondGroup;
@@ -280,7 +262,6 @@ end`.trim();
280
262
  return { replacedContent, newFunctions };
281
263
  }
282
264
  getPluginPodfileHeader(pluginPodFilePath) {
283
- // escape special + from the podfile path (pnpm)
284
265
  pluginPodFilePath = pluginPodFilePath.replace(/\+/g, "\\+");
285
266
  return `# Begin Podfile - ${pluginPodFilePath}`;
286
267
  }
@@ -350,4 +331,3 @@ exports.CocoaPodsService = CocoaPodsService;
350
331
  CocoaPodsService.PODFILE_POST_INSTALL_SECTION_NAME = "post_install";
351
332
  CocoaPodsService.INSTALLER_BLOCK_PARAMETER_NAME = "installer";
352
333
  yok_1.injector.register("cocoapodsService", CocoaPodsService);
353
- //# sourceMappingURL=cocoapods-service.js.map
@@ -19,4 +19,3 @@ class DebugDataService {
19
19
  }
20
20
  exports.DebugDataService = DebugDataService;
21
21
  yok_1.injector.register("debugDataService", DebugDataService);
22
- //# sourceMappingURL=debug-data-service.js.map
@@ -27,12 +27,6 @@ class DebugServiceBase extends events_1.EventEmitter {
27
27
  };
28
28
  }
29
29
  getChromeDebugUrl(debugOptions, port) {
30
- // corresponds to 55.0.2883 Chrome version
31
- // SHA is taken from https://chromium.googlesource.com/chromium/src/+/55.0.2883.100
32
- // This SHA is old and does not support debugging with HMR.
33
- // In case we want to stick with concrete SHA, get it from one of the tags https://chromium.googlesource.com/chromium/src/
34
- // IMPORTANT: When you get the SHA, ensure you are using the `parent` commit, not the actual one.
35
- // Using the actual commit will result in 404 error in the remote serve.
36
30
  const commitSHA = debugOptions.devToolsCommit || "02e6bde1bbe34e43b309d4ef774b1168d25fd024";
37
31
  const devToolsProtocol = `devtools`;
38
32
  let chromeDevToolsPrefix = `${devToolsProtocol}://devtools/remote/serve_file/@${commitSHA}`;
@@ -48,4 +42,3 @@ class DebugServiceBase extends events_1.EventEmitter {
48
42
  }
49
43
  }
50
44
  exports.DebugServiceBase = DebugServiceBase;
51
- //# sourceMappingURL=debug-service-base.js.map
@@ -21,7 +21,7 @@ class DeviceInstallAppService {
21
21
  const projectData = this.$projectDataService.getProjectData(buildData.projectDir);
22
22
  const platformData = this.$platformsDataService.getPlatformData(platform, projectData);
23
23
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
24
- action: "Deploy" /* TrackActionNames.Deploy */,
24
+ action: "Deploy",
25
25
  device,
26
26
  projectDir: projectData.projectDir,
27
27
  });
@@ -77,4 +77,3 @@ class DeviceInstallAppService {
77
77
  }
78
78
  exports.DeviceInstallAppService = DeviceInstallAppService;
79
79
  yok_1.injector.register("deviceInstallAppService", DeviceInstallAppService);
80
- //# sourceMappingURL=device-install-app-service.js.map