nativescript 8.8.0 → 8.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/config/test-deps-versions-generated.json +1 -1
  2. package/lib/android-tools-info.js +12 -0
  3. package/lib/base-package-manager.js +11 -1
  4. package/lib/bootstrap.js +5 -1
  5. package/lib/bun-package-manager.js +17 -1
  6. package/lib/color.js +3 -0
  7. package/lib/commands/add-platform.js +1 -0
  8. package/lib/commands/apple-login.js +1 -0
  9. package/lib/commands/appstore-list.js +1 -0
  10. package/lib/commands/appstore-upload.js +4 -0
  11. package/lib/commands/build.js +3 -2
  12. package/lib/commands/clean.js +22 -1
  13. package/lib/commands/command-base.js +1 -0
  14. package/lib/commands/config.js +3 -0
  15. package/lib/commands/create-project.js +6 -0
  16. package/lib/commands/debug.js +6 -1
  17. package/lib/commands/deploy.js +3 -2
  18. package/lib/commands/embedding/embed.js +7 -0
  19. package/lib/commands/extensibility/install-extension.js +1 -0
  20. package/lib/commands/extensibility/list-extensions.js +1 -0
  21. package/lib/commands/extensibility/uninstall-extension.js +1 -0
  22. package/lib/commands/fonts.js +1 -0
  23. package/lib/commands/generate-assets.js +1 -0
  24. package/lib/commands/generate-help.js +1 -0
  25. package/lib/commands/generate.js +12 -2
  26. package/lib/commands/info.js +1 -0
  27. package/lib/commands/install.js +1 -0
  28. package/lib/commands/list-platforms.js +1 -0
  29. package/lib/commands/migrate.js +1 -0
  30. package/lib/commands/native-add.js +5 -0
  31. package/lib/commands/platform-clean.js +1 -0
  32. package/lib/commands/plugin/add-plugin.js +1 -0
  33. package/lib/commands/plugin/build-plugin.js +1 -0
  34. package/lib/commands/plugin/create-plugin.js +5 -0
  35. package/lib/commands/plugin/list-plugins.js +1 -0
  36. package/lib/commands/plugin/remove-plugin.js +2 -0
  37. package/lib/commands/plugin/update-plugin.js +1 -0
  38. package/lib/commands/post-install.js +6 -0
  39. package/lib/commands/prepare.js +4 -3
  40. package/lib/commands/preview.js +2 -0
  41. package/lib/commands/remove-platform.js +1 -0
  42. package/lib/commands/resources/resources-update.js +2 -0
  43. package/lib/commands/run.js +1 -0
  44. package/lib/commands/setup.js +1 -0
  45. package/lib/commands/start.js +1 -0
  46. package/lib/commands/test-init.js +4 -0
  47. package/lib/commands/test.js +9 -2
  48. package/lib/commands/typings.js +2 -1
  49. package/lib/commands/update-platform.js +5 -0
  50. package/lib/commands/update.js +2 -0
  51. package/lib/common/bootstrap.js +1 -0
  52. package/lib/common/child-process.js +3 -0
  53. package/lib/common/codeGeneration/code-entity.js +1 -0
  54. package/lib/common/codeGeneration/code-printer.js +1 -0
  55. package/lib/common/command-params.js +1 -0
  56. package/lib/common/commands/analytics.js +3 -0
  57. package/lib/common/commands/autocompletion.js +3 -0
  58. package/lib/common/commands/device/device-log-stream.js +1 -0
  59. package/lib/common/commands/device/get-file.js +2 -0
  60. package/lib/common/commands/device/list-applications.js +1 -0
  61. package/lib/common/commands/device/list-devices.js +3 -0
  62. package/lib/common/commands/device/list-files.js +2 -0
  63. package/lib/common/commands/device/put-file.js +2 -0
  64. package/lib/common/commands/device/run-application.js +1 -0
  65. package/lib/common/commands/device/stop-application.js +1 -0
  66. package/lib/common/commands/device/uninstall-application.js +1 -0
  67. package/lib/common/commands/doctor.js +3 -2
  68. package/lib/common/commands/generate-messages.js +1 -0
  69. package/lib/common/commands/help.js +1 -0
  70. package/lib/common/commands/package-manager-get.js +1 -0
  71. package/lib/common/commands/package-manager-set.js +1 -0
  72. package/lib/common/commands/post-install.js +1 -0
  73. package/lib/common/commands/preuninstall.js +11 -2
  74. package/lib/common/commands/proxy/proxy-base.js +4 -0
  75. package/lib/common/commands/proxy/proxy-clear.js +1 -0
  76. package/lib/common/commands/proxy/proxy-get.js +1 -0
  77. package/lib/common/commands/proxy/proxy-set.js +1 -0
  78. package/lib/common/common-lib.js +1 -0
  79. package/lib/common/constants.js +11 -0
  80. package/lib/common/decorators.js +48 -0
  81. package/lib/common/dispatchers.js +10 -1
  82. package/lib/common/errors.js +13 -3
  83. package/lib/common/file-system.js +13 -2
  84. package/lib/common/header.js +3 -0
  85. package/lib/common/helpers.js +89 -3
  86. package/lib/common/host-info.js +4 -0
  87. package/lib/common/http-client.js +20 -0
  88. package/lib/common/logger/appenders/cli-appender.js +4 -0
  89. package/lib/common/logger/appenders/emit-appender.js +4 -0
  90. package/lib/common/logger/layouts/cli-layout.js +1 -0
  91. package/lib/common/logger/logger.js +5 -0
  92. package/lib/common/messages/messages.js +6 -0
  93. package/lib/common/mobile/android/android-application-manager.js +20 -1
  94. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
  95. package/lib/common/mobile/android/android-debug-bridge.js +6 -0
  96. package/lib/common/mobile/android/android-device-file-system.js +4 -0
  97. package/lib/common/mobile/android/android-device-hash-service.js +3 -0
  98. package/lib/common/mobile/android/android-device.js +8 -0
  99. package/lib/common/mobile/android/android-emulator-services.js +2 -1
  100. package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
  101. package/lib/common/mobile/android/android-log-filter.js +4 -0
  102. package/lib/common/mobile/android/android-virtual-device-service.js +30 -1
  103. package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
  104. package/lib/common/mobile/android/genymotion/genymotion-service.js +5 -0
  105. package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
  106. package/lib/common/mobile/android/logcat-helper.js +13 -0
  107. package/lib/common/mobile/application-manager-base.js +6 -0
  108. package/lib/common/mobile/device-emitter.js +4 -0
  109. package/lib/common/mobile/device-log-emitter.js +1 -0
  110. package/lib/common/mobile/device-log-provider-base.js +1 -0
  111. package/lib/common/mobile/device-log-provider.js +23 -0
  112. package/lib/common/mobile/device-platforms-constants.js +1 -0
  113. package/lib/common/mobile/emulator-helper.js +4 -0
  114. package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
  115. package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
  116. package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
  117. package/lib/common/mobile/ios/device/ios-device.js +4 -0
  118. package/lib/common/mobile/ios/ios-device-base.js +1 -0
  119. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
  120. package/lib/common/mobile/ios/ios-log-filter.js +1 -0
  121. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
  122. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
  123. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
  124. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
  125. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
  126. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
  127. package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
  128. package/lib/common/mobile/log-filter.js +2 -0
  129. package/lib/common/mobile/logging-levels.js +1 -0
  130. package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
  131. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
  132. package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
  133. package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
  134. package/lib/common/mobile/mobile-core/devices-service.js +69 -0
  135. package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
  136. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
  137. package/lib/common/mobile/mobile-helper.js +1 -0
  138. package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
  139. package/lib/common/opener.js +1 -0
  140. package/lib/common/os-info.js +1 -0
  141. package/lib/common/plist-parser.js +1 -0
  142. package/lib/common/project-helper.js +1 -0
  143. package/lib/common/prompter.js +9 -1
  144. package/lib/common/queue.js +1 -0
  145. package/lib/common/resource-loader.js +1 -0
  146. package/lib/common/services/auto-completion-service.js +13 -1
  147. package/lib/common/services/cancellation.js +2 -1
  148. package/lib/common/services/commands-service.js +17 -6
  149. package/lib/common/services/help-service.js +11 -3
  150. package/lib/common/services/hooks-service.js +13 -0
  151. package/lib/common/services/ios-notification-service.js +1 -0
  152. package/lib/common/services/json-file-settings-service.js +6 -0
  153. package/lib/common/services/lock-service.js +6 -0
  154. package/lib/common/services/message-contract-generator.js +1 -0
  155. package/lib/common/services/messages-service.js +1 -0
  156. package/lib/common/services/micro-templating-service.js +6 -0
  157. package/lib/common/services/net-service.js +3 -0
  158. package/lib/common/services/project-files-manager.js +5 -0
  159. package/lib/common/services/project-files-provider-base.js +1 -0
  160. package/lib/common/services/proxy-service.js +1 -0
  161. package/lib/common/services/qr.js +1 -0
  162. package/lib/common/services/settings-service.js +1 -0
  163. package/lib/common/services/xcode-select-service.js +1 -0
  164. package/lib/common/utils.js +1 -0
  165. package/lib/common/validators/project-name-validator.js +1 -0
  166. package/lib/common/validators/validation-result.js +1 -0
  167. package/lib/common/verify-node-version.js +8 -1
  168. package/lib/common/yok.js +32 -11
  169. package/lib/config.js +22 -1
  170. package/lib/constants-provider.js +1 -0
  171. package/lib/constants.js +53 -0
  172. package/lib/controllers/build-controller.js +4 -3
  173. package/lib/controllers/debug-controller.js +8 -3
  174. package/lib/controllers/deploy-controller.js +1 -0
  175. package/lib/controllers/migrate-controller.js +91 -3
  176. package/lib/controllers/platform-controller.js +9 -1
  177. package/lib/controllers/prepare-controller.js +17 -4
  178. package/lib/controllers/run-controller.js +17 -1
  179. package/lib/controllers/update-controller-base.js +1 -0
  180. package/lib/controllers/update-controller.js +11 -0
  181. package/lib/data/build-data.js +1 -0
  182. package/lib/data/controller-data-base.js +1 -0
  183. package/lib/data/debug-data.js +1 -0
  184. package/lib/data/platform-data.js +1 -0
  185. package/lib/data/prepare-data.js +1 -0
  186. package/lib/data/run-data.js +1 -0
  187. package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
  188. package/lib/detached-processes/cleanup-process.js +18 -14
  189. package/lib/detached-processes/file-log-service.js +2 -1
  190. package/lib/device-path-provider.js +1 -0
  191. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
  192. package/lib/device-sockets/ios/notification.js +3 -0
  193. package/lib/device-sockets/ios/socket-request-executor.js +3 -0
  194. package/lib/helpers/android-bundle-validator-helper.js +2 -1
  195. package/lib/helpers/deploy-command-helper.js +1 -0
  196. package/lib/helpers/key-command-helper.js +4 -2
  197. package/lib/helpers/livesync-command-helper.js +4 -1
  198. package/lib/helpers/network-connectivity-validator.js +1 -0
  199. package/lib/helpers/options-track-helper.js +3 -2
  200. package/lib/helpers/package-path-helper.js +1 -0
  201. package/lib/helpers/platform-command-helper.js +7 -2
  202. package/lib/helpers/version-validator-helper.js +1 -0
  203. package/lib/key-commands/bootstrap.js +3 -2
  204. package/lib/key-commands/index.js +5 -4
  205. package/lib/nativescript-cli-lib-bootstrap.js +4 -0
  206. package/lib/nativescript-cli-lib.js +1 -0
  207. package/lib/nativescript-cli.js +10 -1
  208. package/lib/node/pbxproj-dom-xcode.js +1 -0
  209. package/lib/node/xcode.js +1 -0
  210. package/lib/node-package-manager.js +11 -1
  211. package/lib/options.js +143 -118
  212. package/lib/package-installation-manager.js +8 -1
  213. package/lib/package-manager.js +2 -0
  214. package/lib/platform-command-param.js +1 -0
  215. package/lib/pnpm-package-manager.js +4 -1
  216. package/lib/project-data.js +12 -0
  217. package/lib/providers/project-files-provider.js +1 -0
  218. package/lib/resolvers/livesync-service-resolver.js +1 -0
  219. package/lib/services/analytics/analytics-broker-process.js +10 -6
  220. package/lib/services/analytics/analytics-broker.js +2 -1
  221. package/lib/services/analytics/analytics-service.js +29 -25
  222. package/lib/services/analytics/google-analytics-provider.js +13 -12
  223. package/lib/services/analytics-settings-service.js +5 -0
  224. package/lib/services/android/android-bundle-tool-service.js +1 -0
  225. package/lib/services/android/gradle-build-args-service.js +3 -0
  226. package/lib/services/android/gradle-build-service.js +1 -0
  227. package/lib/services/android/gradle-command-service.js +6 -1
  228. package/lib/services/android-device-debug-service.js +6 -0
  229. package/lib/services/android-plugin-build-service.js +33 -1
  230. package/lib/services/android-project-service.js +71 -4
  231. package/lib/services/android-resources-migration-service.js +7 -0
  232. package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
  233. package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
  234. package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
  235. package/lib/services/assets-generation/assets-generation-service.js +16 -5
  236. package/lib/services/build-artifacts-service.js +2 -1
  237. package/lib/services/build-data-service.js +1 -0
  238. package/lib/services/build-info-file-service.js +1 -0
  239. package/lib/services/cleanup-service.js +13 -9
  240. package/lib/services/cocoapods-platform-manager.js +9 -0
  241. package/lib/services/cocoapods-service.js +21 -1
  242. package/lib/services/debug-data-service.js +1 -0
  243. package/lib/services/debug-service-base.js +7 -0
  244. package/lib/services/device/device-install-app-service.js +2 -1
  245. package/lib/services/doctor-service.js +21 -6
  246. package/lib/services/extensibility-service.js +8 -0
  247. package/lib/services/files-hash-service.js +1 -0
  248. package/lib/services/hmr-status-service.js +2 -0
  249. package/lib/services/info-service.js +1 -0
  250. package/lib/services/initialize-service.js +5 -1
  251. package/lib/services/ios/export-options-plist-service.js +4 -0
  252. package/lib/services/ios/ios-signing-service.js +4 -0
  253. package/lib/services/ios/spm-service.js +9 -0
  254. package/lib/services/ios/xcodebuild-args-service.js +9 -0
  255. package/lib/services/ios/xcodebuild-command-service.js +1 -0
  256. package/lib/services/ios/xcodebuild-service.js +1 -0
  257. package/lib/services/ios-debugger-port-service.js +1 -0
  258. package/lib/services/ios-device-debug-service.js +1 -0
  259. package/lib/services/ios-entitlements-service.js +1 -0
  260. package/lib/services/ios-extensions-service.js +1 -0
  261. package/lib/services/ios-log-filter.js +20 -0
  262. package/lib/services/ios-native-target-service.js +6 -4
  263. package/lib/services/ios-project-service.js +94 -2
  264. package/lib/services/ios-provision-service.js +3 -0
  265. package/lib/services/ios-watch-app-service.js +1 -0
  266. package/lib/services/ip-service.js +2 -0
  267. package/lib/services/itmstransporter-service.js +1 -0
  268. package/lib/services/karma-execution.js +2 -0
  269. package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
  270. package/lib/services/livesync/android-device-livesync-service.js +2 -0
  271. package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
  272. package/lib/services/livesync/android-livesync-service.js +1 -0
  273. package/lib/services/livesync/android-livesync-tool.js +4 -0
  274. package/lib/services/livesync/device-livesync-service-base.js +2 -0
  275. package/lib/services/livesync/ios-device-livesync-service.js +7 -0
  276. package/lib/services/livesync/ios-livesync-service.js +2 -0
  277. package/lib/services/livesync/livesync-socket.js +1 -0
  278. package/lib/services/livesync/platform-livesync-service-base.js +5 -0
  279. package/lib/services/livesync-process-data-service.js +1 -0
  280. package/lib/services/log-parser-service.js +1 -0
  281. package/lib/services/log-source-map-service.js +15 -0
  282. package/lib/services/marking-mode-service.js +8 -5
  283. package/lib/services/metadata-filtering-service.js +1 -0
  284. package/lib/services/npm-config-service.js +4 -0
  285. package/lib/services/pacote-service.js +7 -0
  286. package/lib/services/performance-service.js +3 -1
  287. package/lib/services/platform/add-platform-service.js +49 -2
  288. package/lib/services/platform/platform-validation-service.js +1 -0
  289. package/lib/services/platform/prepare-native-platform-service.js +5 -2
  290. package/lib/services/platform-environment-requirements.js +8 -3
  291. package/lib/services/platform-project-service-base.js +1 -0
  292. package/lib/services/platforms-data-service.js +1 -0
  293. package/lib/services/plugins-service.js +20 -2
  294. package/lib/services/prepare-data-service.js +1 -0
  295. package/lib/services/project-backup-service.js +4 -0
  296. package/lib/services/project-changes-service.js +14 -3
  297. package/lib/services/project-cleanup-service.js +2 -0
  298. package/lib/services/project-config-service.js +22 -2
  299. package/lib/services/project-data-service.js +36 -7
  300. package/lib/services/project-name-service.js +1 -0
  301. package/lib/services/project-service.js +10 -0
  302. package/lib/services/project-templates-service.js +3 -2
  303. package/lib/services/qr-code-terminal-service.js +1 -0
  304. package/lib/services/require-service.js +1 -0
  305. package/lib/services/start-service.js +1 -0
  306. package/lib/services/temp-service.js +1 -0
  307. package/lib/services/terminal-spinner-service.js +2 -0
  308. package/lib/services/test-execution-service.js +9 -2
  309. package/lib/services/test-initialization-service.js +4 -0
  310. package/lib/services/timeline-profiler-service.js +1 -0
  311. package/lib/services/user-settings-service.js +1 -0
  312. package/lib/services/versions-service.js +6 -4
  313. package/lib/services/watch-ignore-list-service.js +1 -0
  314. package/lib/services/webpack/webpack-compiler-service.js +42 -1
  315. package/lib/services/xcconfig-service.js +2 -0
  316. package/lib/services/xcproj-service.js +1 -0
  317. package/lib/shared-event-bus.js +6 -0
  318. package/lib/sys-info.js +2 -1
  319. package/lib/tools/config-manipulation/config-transformer.js +12 -0
  320. package/lib/tools/node-modules/node-modules-builder.js +1 -0
  321. package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
  322. package/lib/yarn-package-manager.js +1 -0
  323. package/lib/yarn2-package-manager.js +3 -0
  324. package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
  325. package/node_modules/rimraf/CHANGELOG.md +65 -0
  326. package/node_modules/stringify-package/CHANGELOG.md +16 -0
  327. package/package.json +2 -2
@@ -145,7 +145,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
145
145
  ".ico",
146
146
  ".cur",
147
147
  ".xbm",
148
- ],
148
+ ], // https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/
149
149
  };
150
150
  }
151
151
  return this._platformData;
@@ -198,9 +198,12 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
198
198
  shell.cp("-R", path.join(frameworkDir, "*"), this.getPlatformData(projectData).projectRoot);
199
199
  });
200
200
  }
201
+ //TODO: plamen5kov: revisit this method, might have unnecessary/obsolete logic
201
202
  interpolateData(projectData) {
202
203
  return __awaiter(this, void 0, void 0, function* () {
203
204
  const projectRootFilePath = path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER);
205
+ // Starting with NativeScript for iOS 1.6.0, the project Info.plist file resides not in the platform project,
206
+ // but in the hello-world app template as a platform specific resource.
204
207
  if (this.$fs.exists(path.join(projectRootFilePath, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER + "-Info.plist"))) {
205
208
  this.replaceFileName("-Info.plist", projectRootFilePath, projectData);
206
209
  }
@@ -311,18 +314,34 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
311
314
  frameworkAddOptions["sign"] = true;
312
315
  }
313
316
  if (this.$options.hostProjectPath) {
317
+ // always mark xcframeworks for embedding
314
318
  frameworkAddOptions["embed"] = true;
315
319
  frameworkAddOptions["sign"] = false;
316
320
  }
321
+ // Note: we used to prepend "$(SRCROOT)/" to the framework path, but seems like it's not needed anymore
322
+ // "$(SRCROOT)/" +
317
323
  const frameworkRelativePath = this.getLibSubpathRelativeToProjectPath(frameworkPath, projectData);
318
324
  project.addFramework(frameworkRelativePath, frameworkAddOptions);
325
+ // filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
326
+ // project.addBuildPhase(
327
+ // [],
328
+ // "PBXShellScriptBuildPhase",
329
+ // "Debug SRCROOT",
330
+ // undefined,
331
+ // {
332
+ // shellPath: "/bin/sh",
333
+ // shellScript: `echo "SRCROOT: $SRCROOT"`,
334
+ // }
335
+ // );
319
336
  this.savePbxProj(project, projectData);
320
337
  });
321
338
  }
322
339
  addStaticLibrary(staticLibPath, projectData) {
323
340
  return __awaiter(this, void 0, void 0, function* () {
341
+ // Copy files to lib folder.
324
342
  const libraryName = path.basename(staticLibPath, ".a");
325
343
  const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName);
344
+ // Add static library to project file and setup header search paths
326
345
  const project = this.createPbxProj(projectData);
327
346
  const relativeStaticLibPath = this.getLibSubpathRelativeToProjectPath(staticLibPath, projectData);
328
347
  project.addFramework(relativeStaticLibPath);
@@ -359,10 +378,60 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
359
378
  filesRelativeToProject: true,
360
379
  uuid: "NATIVESCRIPTNATIVESCRIPT",
361
380
  });
362
- const buildFolderPath = path.join(this.$options.hostProjectPath, projectData.projectName);
381
+ /**
382
+ * 1. Add platforms/ios/{projectname}/app build to the host app
383
+ */
384
+ // Note: allow customization of this targetFolderName
385
+ // const targetFolderName = "app";
386
+ const buildFolderPath = path.join(this.$options.hostProjectPath, projectData.projectName
387
+ // targetFolderName
388
+ );
363
389
  project.addResourceFile(buildFolderPath, {}, "NATIVESCRIPTNATIVESCRIPT");
390
+ // filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
391
+ // project.addBuildPhase(
392
+ // [],
393
+ // "PBXShellScriptBuildPhase",
394
+ // "Copy Metadata (DEBUG)",
395
+ // undefined,
396
+ // {
397
+ // shellPath: "/bin/sh",
398
+ // shellScript: `cp ./platforms/ios/build/Debug-iphonesimulator/metadata-arm64.bin $CONFIGURATION_BUILD_DIR`,
399
+ // outputPaths: [
400
+ // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64.bin"),
401
+ // // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64e.bin"),
402
+ // // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-i386.bin"),
403
+ // // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-x86_64.bin"),
404
+ // ],
405
+ // }
406
+ // );
364
407
  const metadataPath = path.relative(this.$options.hostProjectPath, buildFolderPath);
365
408
  project.addToOtherLinkerFlags(JSON.stringify(`-sectcreate __DATA __TNSMetadata "${metadataPath}/metadata-arm64.bin"`));
409
+ // // no shorthand way to get UUID of build phase that i can tell
410
+ // // methods return the phase as an object but ommitted the actual key (uuid we need)
411
+ // // this does it same way nativescript-dev-xcode does but gets the uuid we need
412
+ // const resourcesBuildPhaseKeys = Object.keys(
413
+ // project.hash.project.objects["PBXResourcesBuildPhase"]
414
+ // );
415
+ // // console.log('resourcesBuildPhaseKeys:', resourcesBuildPhaseKeys);
416
+ // const buildPhaseUUID = resourcesBuildPhaseKeys[0];
417
+ // const comment = `${targetFolderName} in Resources`;
418
+ // project.hash.project.objects["PBXResourcesBuildPhase"][
419
+ // buildPhaseUUID
420
+ // ].files.forEach((f: any) => {
421
+ // console.log(f);
422
+ // });
423
+ // if (
424
+ // !project.hash.project.objects["PBXResourcesBuildPhase"][
425
+ // buildPhaseUUID
426
+ // ].files.find((f: any) => f.comment === comment)
427
+ // ) {
428
+ // project.addResourceFile(buildFolderPath, {}, buildPhaseUUID);
429
+ // }
430
+ /**
431
+ * 2. Ensure metadata is copied as a file
432
+ * The apps metadata-{arch}.bin should be added as a file reference.
433
+ */
434
+ // TODO
366
435
  this.savePbxProj(project, projectData);
367
436
  }
368
437
  catch (err) {
@@ -410,10 +479,12 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
410
479
  this.$fs.deleteDirectory(platformsAppResourcesPath);
411
480
  this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
412
481
  const platformAppResourcesPath = path.join(projectAppResourcesPath, platformData.normalizedPlatformName);
482
+ // this allows App_Resources/visionOS
413
483
  if (this.$fs.exists(platformAppResourcesPath)) {
414
484
  this.$fs.copyFile(path.join(platformAppResourcesPath, "*"), platformsAppResourcesPath);
415
485
  }
416
486
  else {
487
+ // otherwise falls back to App_Resources/iOS
417
488
  this.$fs.copyFile(path.join(projectAppResourcesPath, this.$devicePlatformsConstants.iOS, "*"), platformsAppResourcesPath);
418
489
  }
419
490
  this.$fs.deleteFile(path.join(platformsAppResourcesPath, platformData.configurationFileName));
@@ -516,6 +587,12 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
516
587
  getLibSubpathRelativeToProjectPath(targetPath, projectData) {
517
588
  const projectRoot = this.getPlatformData(projectData).projectRoot;
518
589
  const frameworkPath = path.relative(projectRoot, targetPath);
590
+ // console.log({
591
+ // targetPath,
592
+ // projectRoot,
593
+ // frameworkPath,
594
+ // resolved: path.resolve(projectRoot, frameworkPath),
595
+ // });
519
596
  return frameworkPath;
520
597
  }
521
598
  getPbxProjPath(projectData) {
@@ -568,6 +645,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
568
645
  const projectPodfilePath = this.$cocoapodsService.getProjectPodfilePath(platformData.projectRoot);
569
646
  if (this.$fs.exists(projectPodfilePath)) {
570
647
  yield this.$cocoapodsService.executePodInstall(platformData.projectRoot, this.$xcprojService.getXcodeprojPath(projectData, platformData.projectRoot));
648
+ // The `pod install` command adds a new target to the .pbxproject. This target adds additional build phases to Xcode project.
649
+ // Some of these phases relies on env variables (like PODS_PODFILE_DIR_PATH or PODS_ROOT).
650
+ // These variables are produced from merge of pod's xcconfig file and project's xcconfig file.
651
+ // So the correct order is `pod install` to be executed before merging pod's xcconfig file.
571
652
  yield this.$cocoapodsService.mergePodXcconfigFile(projectData, platformData, opts);
572
653
  }
573
654
  yield this.$spmService.applySPMPackages(platformData, projectData);
@@ -582,6 +663,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
582
663
  const hasProvision = provision !== undefined;
583
664
  const hasTeamId = teamId !== undefined;
584
665
  if (hasProvision || hasTeamId) {
666
+ // Check if the native project's signing is set to the provided provision...
585
667
  const pbxprojPath = this.getPbxProjPath(projectData);
586
668
  if (this.$fs.exists(pbxprojPath)) {
587
669
  const xcode = this.$pbxprojDomXcode.Xcode.open(pbxprojPath);
@@ -597,6 +679,9 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
597
679
  }
598
680
  }
599
681
  else {
682
+ // Specifying provisioning profile requires "Manual" signing style.
683
+ // If the current signing style was not "Manual" it was probably "Automatic" or,
684
+ // it was not uniform for the debug and release build configurations.
600
685
  changesInfo.signingChanged = true;
601
686
  }
602
687
  }
@@ -610,6 +695,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
610
695
  }
611
696
  }
612
697
  else {
698
+ // Specifying team id or name requires "Automatic" signing style.
699
+ // If the current signing style was not "Automatic" it was probably "Manual".
613
700
  changesInfo.signingChanged = true;
614
701
  }
615
702
  }
@@ -828,10 +915,14 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
828
915
  }
829
916
  for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
830
917
  if (!this.$fs.exists(pluginsXcconfigFilePath)) {
918
+ // We need the pluginsXcconfig file to exist in platforms dir as it is required in the native template:
919
+ // https://github.com/NativeScript/ios-runtime/blob/9c2b7b5f70b9bee8452b7a24aa6b646214c7d2be/build/project-template/__PROJECT_NAME__/build-debug.xcconfig#L3
920
+ // From Xcode 10 in case the file is missing, this include fails and the build itself fails (was a warning in previous Xcode versions).
831
921
  this.$fs.writeFile(pluginsXcconfigFilePath, "");
832
922
  }
833
923
  }
834
924
  for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
925
+ // Set Entitlements Property to point to default file if not set explicitly by the user.
835
926
  const entitlementsPropertyValue = this.$xcconfigService.readPropertyValue(pluginsXcconfigFilePath, constants.CODE_SIGN_ENTITLEMENTS);
836
927
  if (entitlementsPropertyValue === null &&
837
928
  this.$fs.exists(this.$iOSEntitlementsService.getPlatformsEntitlementsPath(projectData))) {
@@ -879,3 +970,4 @@ __decorate([
879
970
  ], IOSProjectService.prototype, "buildProject", null);
880
971
  exports.IOSProjectService = IOSProjectService;
881
972
  yok_1.injector.register("iOSProjectService", IOSProjectService);
973
+ //# sourceMappingURL=ios-project-service.js.map
@@ -145,6 +145,8 @@ class IOSProvisionService {
145
145
  getDevelopmentTeams() {
146
146
  return __awaiter(this, void 0, void 0, function* () {
147
147
  const teams = {};
148
+ // NOTE: We are reading all provisioning profiles and collect team information from them.
149
+ // It would be better if we can check the Apple ID registered in Xcode and read the teams associated with it.
148
150
  mobileprovision.provision.read().forEach((provision) => provision.TeamIdentifier &&
149
151
  provision.TeamIdentifier.forEach((id) => {
150
152
  if (!teams[provision.TeamName]) {
@@ -171,3 +173,4 @@ class IOSProvisionService {
171
173
  }
172
174
  exports.IOSProvisionService = IOSProvisionService;
173
175
  yok_1.injector.register("iOSProvisionService", IOSProvisionService);
176
+ //# sourceMappingURL=ios-provision-service.js.map
@@ -74,3 +74,4 @@ IOSWatchAppService.WATCH_APP_IDENTIFIER = "watchkitapp";
74
74
  IOSWatchAppService.WACTCH_EXTENSION_IDENTIFIER = "watchkitextension";
75
75
  exports.IOSWatchAppService = IOSWatchAppService;
76
76
  yok_1.injector.register("iOSWatchAppService", IOSWatchAppService);
77
+ //# sourceMappingURL=ios-watch-app-service.js.map
@@ -52,6 +52,7 @@ class IPService {
52
52
  }
53
53
  getIPAddressFromIpifyOrgAPI() {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ // https://www.ipify.org/
55
56
  const ipifyOrgAPIEndpoint = "https://api.ipify.org";
56
57
  let ipAddress = null;
57
58
  try {
@@ -76,3 +77,4 @@ __decorate([
76
77
  ], IPService.prototype, "getCurrentIPv4Address", null);
77
78
  exports.IPService = IPService;
78
79
  yok_1.injector.register("ipService", IPService);
80
+ //# sourceMappingURL=ip-service.js.map
@@ -214,3 +214,4 @@ __decorate([
214
214
  ], ITMSTransporterService.prototype, "getITMSTransporterPath", null);
215
215
  exports.ITMSTransporterService = ITMSTransporterService;
216
216
  yok_1.injector.register("itmsTransporterService", ITMSTransporterService);
217
+ //# sourceMappingURL=itmstransporter-service.js.map
@@ -9,8 +9,10 @@ process.on("message", (data) => {
9
9
  });
10
10
  const KarmaServer = require(path.join(pathToKarma, "lib/server"));
11
11
  const karma = new KarmaServer(data.karmaConfig, (exitCode) => {
12
+ // Exit with the correct exit code and signal the manager process.
12
13
  process.exit(exitCode);
13
14
  });
14
15
  karma.start();
15
16
  }
16
17
  });
18
+ //# sourceMappingURL=karma-execution.js.map
@@ -66,3 +66,4 @@ class AndroidDeviceLiveSyncServiceBase extends device_livesync_service_base_1.De
66
66
  }
67
67
  }
68
68
  exports.AndroidDeviceLiveSyncServiceBase = AndroidDeviceLiveSyncServiceBase;
69
+ //# sourceMappingURL=android-device-livesync-service-base.js.map
@@ -119,6 +119,7 @@ class AndroidDeviceLiveSyncService extends android_device_livesync_service_base_
119
119
  ]);
120
120
  const regex = new RegExp(`^-.*${deviceRootBasename}$`, "m");
121
121
  const matchingFile = (listResult || "").match(regex);
122
+ // Check if there is already a file with deviceRootBasename. If so, delete it as it breaks LiveSyncing.
122
123
  if (matchingFile && matchingFile[0] && _.startsWith(matchingFile[0], "-")) {
123
124
  yield this.device.adb.executeShellCommand(["rm", "-f", deviceRootPath]);
124
125
  }
@@ -201,3 +202,4 @@ __decorate([
201
202
  (0, decorators_1.performanceLog)()
202
203
  ], AndroidDeviceLiveSyncService.prototype, "removeFiles", null);
203
204
  exports.AndroidDeviceLiveSyncService = AndroidDeviceLiveSyncService;
205
+ //# sourceMappingURL=android-device-livesync-service.js.map
@@ -111,6 +111,8 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
111
111
  yield this.$cleanupService.removeCleanupCommand(cleanupCommand);
112
112
  });
113
113
  yield this.$cleanupService.addCleanupCommand(cleanupCommand);
114
+ // We need to clear resources when the action fails
115
+ // But we also need the real result of the action.
114
116
  yield doSyncPromise.then(actionOnEnd.bind(this), actionOnEnd.bind(this));
115
117
  result = yield doSyncPromise;
116
118
  }
@@ -195,3 +197,4 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
195
197
  AndroidDeviceSocketsLiveSyncService.STATUS_UPDATE_INTERVAL = 10000;
196
198
  AndroidDeviceSocketsLiveSyncService.MINIMAL_VERSION_LONG_LIVING_CONNECTION = "0.2.0";
197
199
  exports.AndroidDeviceSocketsLiveSyncService = AndroidDeviceSocketsLiveSyncService;
200
+ //# sourceMappingURL=android-device-livesync-sockets-service.js.map
@@ -74,3 +74,4 @@ __decorate([
74
74
  ], AndroidLiveSyncService.prototype, "fullSync", null);
75
75
  exports.AndroidLiveSyncService = AndroidLiveSyncService;
76
76
  yok_1.injector.register("androidLiveSyncService", AndroidLiveSyncService);
77
+ //# sourceMappingURL=android-livesync-service.js.map
@@ -159,9 +159,12 @@ class AndroidLivesyncTool {
159
159
  error =
160
160
  error ||
161
161
  this.getErrorWithMessage("Socket connection ended before sync operation is complete.");
162
+ //remove listeners and delete this.socketConnection
162
163
  this.cleanState(socketUid);
164
+ //call end of the connection (close and error callbacks won't be called - listeners removed)
163
165
  socket.end();
164
166
  socket.destroy();
167
+ //reject all pending sync requests and clear timeouts
165
168
  this.rejectPendingSyncOperations(socketUid, error);
166
169
  }
167
170
  }
@@ -425,3 +428,4 @@ AndroidLivesyncTool.SOCKET_CONNECTION_TIMED_OUT_ERROR = "Socket connection timed
425
428
  AndroidLivesyncTool.NO_SOCKET_CONNECTION_AVAILABLE_ERROR = "No socket connection available.";
426
429
  exports.AndroidLivesyncTool = AndroidLivesyncTool;
427
430
  yok_1.injector.register("androidLivesyncTool", AndroidLivesyncTool);
431
+ //# sourceMappingURL=android-livesync-tool.js.map
@@ -52,6 +52,7 @@ class DeviceLiveSyncServiceBase {
52
52
  }
53
53
  finalizeSync(liveSyncInfo, projectData) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ //implement in case a sync point for all remove/create operation is needed
55
56
  return {
56
57
  didRefresh: true,
57
58
  operationId: "",
@@ -67,3 +68,4 @@ __decorate([
67
68
  (0, decorators_2.performanceLog)()
68
69
  ], DeviceLiveSyncServiceBase.prototype, "transferFiles", null);
69
70
  exports.DeviceLiveSyncServiceBase = DeviceLiveSyncServiceBase;
71
+ //# sourceMappingURL=device-livesync-service-base.js.map
@@ -47,11 +47,13 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
47
47
  }
48
48
  setupSocketIfNeeded(projectData) {
49
49
  return __awaiter(this, void 0, void 0, function* () {
50
+ // TODO: persist the sockets per app in order to support LiveSync on multiple apps on the same device
50
51
  if (this.socket) {
51
52
  return true;
52
53
  }
53
54
  const appId = projectData.projectIdentifiers.ios;
54
55
  try {
56
+ // TODO: temp workaround till we setup the sockets along with the app start
55
57
  const ensureAppStarted = true;
56
58
  this.socket = yield this.device.getDebugSocket(appId, projectData.projectName, projectData.projectDir, ensureAppStarted);
57
59
  }
@@ -143,6 +145,7 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
143
145
  projectDir: projectData.projectDir,
144
146
  });
145
147
  if (liveSyncInfo.useHotModuleReload) {
148
+ // enable HOT updates
146
149
  yield this.setupSocketIfNeeded(projectData);
147
150
  }
148
151
  });
@@ -205,6 +208,9 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
205
208
  destroySocket() {
206
209
  return __awaiter(this, void 0, void 0, function* () {
207
210
  if (this.socket) {
211
+ // we do not support LiveSync on multiple apps on the same device
212
+ // in order to do that, we should cache the socket per app
213
+ // and destroy just the current app socket when possible
208
214
  yield this.device.destroyAllSockets();
209
215
  this.socket = null;
210
216
  }
@@ -216,3 +222,4 @@ __decorate([
216
222
  (0, decorators_1.performanceLog)()
217
223
  ], IOSDeviceLiveSyncService.prototype, "removeFiles", null);
218
224
  exports.IOSDeviceLiveSyncService = IOSDeviceLiveSyncService;
225
+ //# sourceMappingURL=ios-device-livesync-service.js.map
@@ -73,6 +73,7 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
73
73
  syncAfterInstall(device, liveSyncInfo) {
74
74
  return __awaiter(this, void 0, void 0, function* () {
75
75
  if (!device.isEmulator) {
76
+ // In this case we should execute fullsync because iOS Runtime requires the full content of app dir to be extracted in the root of sync dir.
76
77
  yield this.fullSync({
77
78
  projectData: liveSyncInfo.projectData,
78
79
  device,
@@ -93,3 +94,4 @@ __decorate([
93
94
  ], IOSLiveSyncService.prototype, "fullSync", null);
94
95
  exports.IOSLiveSyncService = IOSLiveSyncService;
95
96
  yok_1.injector.register("iOSLiveSyncService", IOSLiveSyncService);
97
+ //# sourceMappingURL=ios-livesync-service.js.map
@@ -12,3 +12,4 @@ class LiveSyncSocket extends net.Socket {
12
12
  }
13
13
  exports.LiveSyncSocket = LiveSyncSocket;
14
14
  yok_1.injector.register("LiveSyncSocket", LiveSyncSocket, false);
15
+ //# sourceMappingURL=livesync-socket.js.map
@@ -52,6 +52,7 @@ class PlatformLiveSyncServiceBase {
52
52
  }
53
53
  syncAfterInstall(device, liveSyncInfo) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ /* intentionally left blank */
55
56
  });
56
57
  }
57
58
  restartApplication(projectData, liveSyncInfo) {
@@ -105,6 +106,8 @@ class PlatformLiveSyncServiceBase {
105
106
  let modifiedLocalToDevicePaths = [];
106
107
  if (liveSyncInfo.filesToSync.length) {
107
108
  const filesToSync = liveSyncInfo.filesToSync;
109
+ // const mappedFiles = _.map(filesToSync, filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData));
110
+ // Some plugins modify platforms dir on afterPrepare (check nativescript-dev-sass) - we want to sync only existing file.
108
111
  const existingFiles = filesToSync.filter((m) => m && this.$fs.exists(m));
109
112
  this.$logger.trace("Will execute livesync for files: ", existingFiles);
110
113
  const skippedFiles = _.difference(filesToSync, existingFiles);
@@ -123,6 +126,7 @@ class PlatformLiveSyncServiceBase {
123
126
  const filePaths = liveSyncInfo.filesToRemove;
124
127
  const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
125
128
  const mappedFiles = _(filePaths)
129
+ // .map(filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData))
126
130
  .filter((filePath) => !!filePath)
127
131
  .value();
128
132
  const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants_1.APP_FOLDER_NAME);
@@ -179,3 +183,4 @@ __decorate([
179
183
  (0, decorators_1.performanceLog)()
180
184
  ], PlatformLiveSyncServiceBase.prototype, "liveSyncWatchAction", null);
181
185
  exports.PlatformLiveSyncServiceBase = PlatformLiveSyncServiceBase;
186
+ //# sourceMappingURL=platform-livesync-service-base.js.map
@@ -41,3 +41,4 @@ class LiveSyncProcessDataService {
41
41
  }
42
42
  exports.LiveSyncProcessDataService = LiveSyncProcessDataService;
43
43
  yok_1.injector.register("liveSyncProcessDataService", LiveSyncProcessDataService);
44
+ //# sourceMappingURL=livesync-process-data-service.js.map
@@ -50,3 +50,4 @@ __decorate([
50
50
  ], LogParserService.prototype, "startParsingLogCore", null);
51
51
  exports.LogParserService = LogParserService;
52
52
  yok_1.injector.register("logParserService", LogParserService);
53
+ //# sourceMappingURL=log-parser-service.js.map
@@ -41,6 +41,7 @@ class LogSourceMapService {
41
41
  if (!this.$fs.getFsStats(filePath).isDirectory()) {
42
42
  const mapFile = filePath + ".map";
43
43
  let sourceMapRaw;
44
+ // Skip files bigger than 50MB
44
45
  if (this.$fs.getFileSize(filePath) > 50 * 1000 * 1000) {
45
46
  this.$logger.trace(`Skipping source map for file ${filePath} because it is too big (> 50MB).`);
46
47
  return;
@@ -166,6 +167,8 @@ class LogSourceMapService {
166
167
  }
167
168
  }
168
169
  parseAndroidLog(projectData, rawMessage) {
170
+ // "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap (file:///data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
171
+ // "System.err: File: "file:///data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
169
172
  const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
170
173
  const deviceProjectPath = util.format(constants_1.ANDROID_DEVICE_APP_ROOT_TEMPLATE, projectData.projectIdentifiers.android);
171
174
  let separator = ",";
@@ -173,18 +176,25 @@ class LogSourceMapService {
173
176
  let parts, filePath, line, column, messagePrefix;
174
177
  if (fileIndex >= 0) {
175
178
  const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
179
+ //"data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
176
180
  parts = fileSubstring.split(separator);
177
181
  if (parts.length >= 3) {
182
+ // "data/data/org.nativescript.sourceMap/files/app/bundle.js"
178
183
  parts[0] = parts[0].replace("'", "");
184
+ // " line: 304"
179
185
  parts[1] = parts[1].replace(" line: ", "");
186
+ // " column: 8"
180
187
  parts[2] = parts[2].replace(" column: ", "");
181
188
  }
182
189
  else {
190
+ // "data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
183
191
  separator = ":";
184
192
  parts = fileSubstring.split(separator);
185
193
  }
186
194
  if (parts.length >= 3) {
195
+ // "/data/data/org.nativescript.sourceMap/files/app/"
187
196
  const devicePath = `${deviceProjectPath}/${constants_1.APP_FOLDER_NAME}/`;
197
+ // "bundle.js"
188
198
  filePath = path.relative(devicePath, `${"/"}${parts[0]}`);
189
199
  line = parseInt(parts[1]);
190
200
  column = parseInt(parts[2]);
@@ -192,20 +202,24 @@ class LogSourceMapService {
192
202
  for (let i = 3; i < parts.length; i++) {
193
203
  messageSuffix += `${parts[i]}${i === parts.length - 1 ? "" : separator}`;
194
204
  }
205
+ // "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap ("
195
206
  messagePrefix = _.trimEnd(messagePrefix, "(");
196
207
  }
197
208
  }
198
209
  return { filePath, line, column, messagePrefix, messageSuffix };
199
210
  }
200
211
  parseIosLog(rawMessage) {
212
+ // "CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
201
213
  const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
202
214
  let messageSuffix = "";
203
215
  let parts, filePath, line, column, messagePrefix;
204
216
  if (fileIndex >= 0) {
217
+ // "app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
205
218
  const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
206
219
  parts = fileSubstring.split(":");
207
220
  if (parts && parts.length >= 3) {
208
221
  filePath = parts[0];
222
+ // "app/vendor.js"
209
223
  if (_.startsWith(filePath, constants_1.APP_FOLDER_NAME)) {
210
224
  filePath = path.relative(constants_1.APP_FOLDER_NAME, parts[0]);
211
225
  }
@@ -234,3 +248,4 @@ LogSourceMapService.FILE_PREFIX_REPLACEMENT = "file: ";
234
248
  LogSourceMapService.MEMOIZE_FUNCTION_RANDOM_KEY_FOR_JOIN = "__some_random_value__";
235
249
  exports.LogSourceMapService = LogSourceMapService;
236
250
  yok_1.injector.register("logSourceMapService", LogSourceMapService);
251
+ //# sourceMappingURL=log-source-map-service.js.map
@@ -15,7 +15,7 @@ const constants_1 = require("../constants");
15
15
  const yok_1 = require("../common/yok");
16
16
  const semver = require("semver/preload");
17
17
  const MARKING_MODE_PROP = "markingMode";
18
- const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full"}" is no longer supported.`;
18
+ const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full" /* MarkingMode.Full */}" is no longer supported.`;
19
19
  class MarkingModeService {
20
20
  constructor($logger, $projectConfigService, $projectHelper, $projectDataService) {
21
21
  this.$logger = $logger;
@@ -28,11 +28,13 @@ class MarkingModeService {
28
28
  const markingModeValue = this.$projectConfigService.getValue("android.markingMode");
29
29
  const { skipWarnings, forceSwitch } = options;
30
30
  if (forceSwitch) {
31
- yield this.setMarkingMode("none");
31
+ yield this.setMarkingMode("none" /* MarkingMode.None */);
32
32
  return;
33
33
  }
34
- if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none") {
35
- const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android");
34
+ if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none" /* MarkingMode.None */) {
35
+ // only warn if runtime is less than 7.0.0-rc.5 - where the default has been changed to None
36
+ // if version is null - we are about to add the latest runtime, so no need to warn
37
+ const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android" /* PlatformTypes.android */);
36
38
  const isMarkingModeFullDefault = version && semver.lt(semver.coerce(version), "7.0.0-rc.5");
37
39
  if (isMarkingModeFullDefault) {
38
40
  this.showMarkingModeFullWarning();
@@ -46,7 +48,7 @@ class MarkingModeService {
46
48
  });
47
49
  }
48
50
  showMarkingModeFullWarning() {
49
- const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${"full"}".${os_1.EOL}${os_1.EOL}${MARKING_MODE_FULL_DEPRECATION_MSG}${os_1.EOL}${os_1.EOL}You should update your marking mode by executing 'ns update --markingMode'.`;
51
+ const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${"full" /* MarkingMode.Full */}".${os_1.EOL}${os_1.EOL}${MARKING_MODE_FULL_DEPRECATION_MSG}${os_1.EOL}${os_1.EOL}You should update your marking mode by executing 'ns update --markingMode'.`;
50
52
  this.$logger.warn(markingModeFullWarning, {
51
53
  [constants_1.LoggerConfigData.wrapMessageWithBorders]: true,
52
54
  });
@@ -54,3 +56,4 @@ class MarkingModeService {
54
56
  }
55
57
  exports.MarkingModeService = MarkingModeService;
56
58
  yok_1.injector.register("markingModeService", MarkingModeService);
59
+ //# sourceMappingURL=marking-mode-service.js.map
@@ -103,3 +103,4 @@ class MetadataFilteringService {
103
103
  }
104
104
  exports.MetadataFilteringService = MetadataFilteringService;
105
105
  yok_1.injector.register("metadataFilteringService", MetadataFilteringService);
106
+ //# sourceMappingURL=metadata-filtering-service.js.map
@@ -21,8 +21,11 @@ class NpmConfigService {
21
21
  readConfig() {
22
22
  try {
23
23
  const res = (0, child_process_1.execSync)("npm config list --json --global");
24
+ // const data: any = npmconfig.read();
24
25
  const data = JSON.parse(res.toString());
26
+ // todo: remove if not needed with npm config list --json?
25
27
  Object.entries(data).forEach(([key, value]) => {
28
+ // replace env ${VARS} in strings with the process.env value
26
29
  this.config[key] =
27
30
  typeof value !== "string"
28
31
  ? value
@@ -37,3 +40,4 @@ __decorate([
37
40
  ], NpmConfigService.prototype, "readConfig", null);
38
41
  exports.NpmConfigService = NpmConfigService;
39
42
  yok_1.injector.register("npmConfigService", NpmConfigService);
43
+ //# sourceMappingURL=npm-config-service.js.map
@@ -33,6 +33,7 @@ class PacoteService {
33
33
  this.$proxyService = $proxyService;
34
34
  }
35
35
  get $packageManager() {
36
+ // need to be resolved here due to cyclic dependency
36
37
  return this.$injector.resolve("packageManager");
37
38
  }
38
39
  manifest(packageName, options) {
@@ -51,6 +52,8 @@ class PacoteService {
51
52
  }
52
53
  extractPackage(packageName, destinationDirectory, options) {
53
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ // strip: Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. More info: https://github.com/npm/node-tar/blob/e89c4d37519b1c20133a9f49d5f6b85fa34c203b/README.md
56
+ // C: Create an archive
54
57
  this.$logger.trace(`Calling pacoteService.extractPackage for packageName: '${packageName}', destinationDir: '${destinationDirectory}' and options: ${options}`);
55
58
  const extractOptions = { strip: 1, C: destinationDirectory };
56
59
  if (options) {
@@ -68,6 +71,7 @@ class PacoteService {
68
71
  });
69
72
  this.$logger.trace(`Creating extract tar stream with options: ${JSON.stringify(extractOptions, null, 2)}`);
70
73
  const destination = tar.x(extractOptions);
74
+ // Initiate the source
71
75
  const sourceStream = new stream_1.PassThrough();
72
76
  sourceStream.end(source);
73
77
  sourceStream.pipe(destination);
@@ -84,7 +88,9 @@ class PacoteService {
84
88
  }
85
89
  getPacoteBaseOptions() {
86
90
  return __awaiter(this, void 0, void 0, function* () {
91
+ // In case `tns create myapp --template https://github.com/NativeScript/template-hello-world.git` command is executed, pacote module throws an error if cache option is not provided.
87
92
  const cachePath = yield this.$packageManager.getCachePath();
93
+ // Add NPM Configuration to our Manifest options
88
94
  const npmConfig = this.$npmConfigService.getConfig();
89
95
  const pacoteOptions = _.extend(npmConfig, { cache: cachePath, Arborist: arborist_1.Arborist });
90
96
  const proxySettings = yield this.$proxyService.getCache();
@@ -107,3 +113,4 @@ __decorate([
107
113
  ], PacoteService.prototype, "$packageManager", null);
108
114
  exports.PacoteService = PacoteService;
109
115
  yok_1.injector.register("pacoteService", PacoteService);
116
+ //# sourceMappingURL=pacote-service.js.map
@@ -41,7 +41,7 @@ class PerformanceService {
41
41
  trackAnalyticsData(methodInfo, executionTime) {
42
42
  this.$analyticsService
43
43
  .trackEventActionInGoogleAnalytics({
44
- action: "Performance",
44
+ action: "Performance" /* TrackActionNames.Performance */,
45
45
  additionalData: methodInfo,
46
46
  value: executionTime,
47
47
  })
@@ -71,6 +71,7 @@ class PerformanceService {
71
71
  this.$logger.info(PerformanceService.LOG_MESSAGE_TEMPLATE, methodInfo, executionTime);
72
72
  }
73
73
  }
74
+ //removes any injected members of the arguments and excludes the options object even if it was renamed
74
75
  getJsonSanitizer() {
75
76
  const seen = new WeakSet();
76
77
  seen.add(this.$options);
@@ -90,3 +91,4 @@ PerformanceService.FAIL_LOG_MESSAGE_TEMPLATE = `Failed to log pefromance data in
90
91
  PerformanceService.MIN_NODE_PERFORMANCE_MODULE_VERSION = "8.5.0";
91
92
  exports.PerformanceService = PerformanceService;
92
93
  yok_1.injector.register("performanceService", PerformanceService);
94
+ //# sourceMappingURL=performance-service.js.map