nativescript 9.0.3 → 9.0.4-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/lib/android-tools-info.js +0 -12
  2. package/lib/base-package-manager.js +0 -7
  3. package/lib/bootstrap.js +1 -5
  4. package/lib/bun-package-manager.js +1 -14
  5. package/lib/color.js +0 -4
  6. package/lib/commands/add-platform.js +0 -1
  7. package/lib/commands/apple-login.js +0 -1
  8. package/lib/commands/appstore-list.js +0 -1
  9. package/lib/commands/appstore-upload.js +0 -3
  10. package/lib/commands/build.js +2 -3
  11. package/lib/commands/clean.js +1 -22
  12. package/lib/commands/command-base.js +0 -1
  13. package/lib/commands/config.js +0 -5
  14. package/lib/commands/create-project.js +0 -6
  15. package/lib/commands/debug.js +1 -6
  16. package/lib/commands/deploy.js +2 -3
  17. package/lib/commands/embedding/embed.js +0 -7
  18. package/lib/commands/extensibility/install-extension.js +0 -1
  19. package/lib/commands/extensibility/list-extensions.js +0 -1
  20. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  21. package/lib/commands/fonts.js +0 -1
  22. package/lib/commands/generate-assets.js +0 -1
  23. package/lib/commands/generate-help.js +0 -1
  24. package/lib/commands/generate.js +1 -48
  25. package/lib/commands/hooks/common.js +1 -2
  26. package/lib/commands/hooks/hooks-lock.js +0 -1
  27. package/lib/commands/hooks/hooks.js +0 -1
  28. package/lib/commands/info.js +0 -1
  29. package/lib/commands/install.js +0 -1
  30. package/lib/commands/list-platforms.js +0 -1
  31. package/lib/commands/migrate.js +0 -1
  32. package/lib/commands/native-add.js +0 -5
  33. package/lib/commands/platform-clean.js +0 -1
  34. package/lib/commands/plugin/add-plugin.js +0 -1
  35. package/lib/commands/plugin/build-plugin.js +0 -1
  36. package/lib/commands/plugin/create-plugin.js +0 -5
  37. package/lib/commands/plugin/list-plugins.js +0 -1
  38. package/lib/commands/plugin/remove-plugin.js +0 -2
  39. package/lib/commands/plugin/update-plugin.js +0 -1
  40. package/lib/commands/post-install.js +0 -6
  41. package/lib/commands/prepare.js +3 -4
  42. package/lib/commands/preview.js +0 -2
  43. package/lib/commands/remove-platform.js +0 -1
  44. package/lib/commands/resources/resources-update.js +0 -2
  45. package/lib/commands/run.js +0 -1
  46. package/lib/commands/setup.js +0 -1
  47. package/lib/commands/start.js +0 -1
  48. package/lib/commands/test-init.js +0 -4
  49. package/lib/commands/test.js +2 -9
  50. package/lib/commands/typings.js +1 -2
  51. package/lib/commands/update-platform.js +0 -5
  52. package/lib/commands/update.js +0 -2
  53. package/lib/commands/widget.js +1 -20
  54. package/lib/common/bootstrap.js +0 -1
  55. package/lib/common/child-process.js +0 -3
  56. package/lib/common/codeGeneration/code-entity.js +0 -1
  57. package/lib/common/codeGeneration/code-printer.js +0 -1
  58. package/lib/common/command-params.js +0 -1
  59. package/lib/common/commands/analytics.js +0 -3
  60. package/lib/common/commands/autocompletion.js +0 -3
  61. package/lib/common/commands/device/device-log-stream.js +0 -1
  62. package/lib/common/commands/device/get-file.js +0 -2
  63. package/lib/common/commands/device/list-applications.js +0 -1
  64. package/lib/common/commands/device/list-devices.js +0 -3
  65. package/lib/common/commands/device/list-files.js +0 -2
  66. package/lib/common/commands/device/put-file.js +0 -2
  67. package/lib/common/commands/device/run-application.js +0 -1
  68. package/lib/common/commands/device/stop-application.js +0 -1
  69. package/lib/common/commands/device/uninstall-application.js +0 -1
  70. package/lib/common/commands/doctor.js +2 -3
  71. package/lib/common/commands/generate-messages.js +0 -1
  72. package/lib/common/commands/help.js +0 -1
  73. package/lib/common/commands/package-manager-get.js +0 -1
  74. package/lib/common/commands/package-manager-set.js +0 -1
  75. package/lib/common/commands/post-install.js +0 -1
  76. package/lib/common/commands/preuninstall.js +2 -11
  77. package/lib/common/commands/proxy/proxy-base.js +0 -4
  78. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  79. package/lib/common/commands/proxy/proxy-get.js +0 -1
  80. package/lib/common/commands/proxy/proxy-set.js +0 -1
  81. package/lib/common/common-lib.js +0 -1
  82. package/lib/common/constants.js +0 -11
  83. package/lib/common/decorators.js +0 -48
  84. package/lib/common/dispatchers.js +1 -10
  85. package/lib/common/errors.js +3 -13
  86. package/lib/common/file-system.js +2 -13
  87. package/lib/common/header.js +0 -3
  88. package/lib/common/helpers.js +3 -89
  89. package/lib/common/host-info.js +0 -4
  90. package/lib/common/http-client.js +0 -20
  91. package/lib/common/logger/appenders/cli-appender.js +0 -4
  92. package/lib/common/logger/appenders/emit-appender.js +0 -4
  93. package/lib/common/logger/layouts/cli-layout.js +0 -1
  94. package/lib/common/logger/logger.js +0 -5
  95. package/lib/common/messages/messages.js +0 -6
  96. package/lib/common/mobile/android/android-application-manager.js +1 -20
  97. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  98. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  99. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  100. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  101. package/lib/common/mobile/android/android-device.js +0 -8
  102. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  103. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  104. package/lib/common/mobile/android/android-log-filter.js +0 -4
  105. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  106. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  107. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  108. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  109. package/lib/common/mobile/android/logcat-helper.js +0 -13
  110. package/lib/common/mobile/application-manager-base.js +0 -6
  111. package/lib/common/mobile/device-emitter.js +0 -4
  112. package/lib/common/mobile/device-log-emitter.js +0 -1
  113. package/lib/common/mobile/device-log-provider-base.js +0 -1
  114. package/lib/common/mobile/device-log-provider.js +0 -23
  115. package/lib/common/mobile/device-platforms-constants.js +0 -1
  116. package/lib/common/mobile/emulator-helper.js +0 -3
  117. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  118. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  119. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  120. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  121. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  122. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  123. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  124. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  125. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  126. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  127. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  128. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  129. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  130. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  131. package/lib/common/mobile/log-filter.js +0 -2
  132. package/lib/common/mobile/logging-levels.js +0 -1
  133. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  134. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  135. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  136. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  137. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  138. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  139. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  140. package/lib/common/mobile/mobile-helper.js +0 -1
  141. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  142. package/lib/common/opener.js +0 -1
  143. package/lib/common/os-info.js +0 -1
  144. package/lib/common/plist-parser.js +0 -1
  145. package/lib/common/project-helper.js +0 -1
  146. package/lib/common/prompter.js +1 -9
  147. package/lib/common/queue.js +0 -1
  148. package/lib/common/resource-loader.js +0 -1
  149. package/lib/common/services/auto-completion-service.js +1 -13
  150. package/lib/common/services/cancellation.js +1 -2
  151. package/lib/common/services/commands-service.js +6 -17
  152. package/lib/common/services/help-service.js +3 -11
  153. package/lib/common/services/hooks-service.js +0 -13
  154. package/lib/common/services/ios-notification-service.js +0 -1
  155. package/lib/common/services/json-file-settings-service.js +0 -6
  156. package/lib/common/services/lock-service.js +0 -6
  157. package/lib/common/services/message-contract-generator.js +0 -1
  158. package/lib/common/services/messages-service.js +0 -1
  159. package/lib/common/services/micro-templating-service.js +0 -6
  160. package/lib/common/services/net-service.js +0 -3
  161. package/lib/common/services/project-files-manager.js +0 -5
  162. package/lib/common/services/project-files-provider-base.js +0 -1
  163. package/lib/common/services/proxy-service.js +0 -1
  164. package/lib/common/services/qr.js +0 -1
  165. package/lib/common/services/settings-service.js +0 -1
  166. package/lib/common/services/xcode-select-service.js +0 -1
  167. package/lib/common/utils.js +0 -1
  168. package/lib/common/validators/project-name-validator.js +0 -1
  169. package/lib/common/validators/validation-result.js +0 -1
  170. package/lib/common/verify-node-version.js +1 -8
  171. package/lib/common/yok.js +11 -32
  172. package/lib/config.js +1 -22
  173. package/lib/constants-provider.js +0 -1
  174. package/lib/constants.js +0 -53
  175. package/lib/controllers/build-controller.js +3 -4
  176. package/lib/controllers/debug-controller.js +3 -8
  177. package/lib/controllers/deploy-controller.js +0 -1
  178. package/lib/controllers/migrate-controller.js +4 -90
  179. package/lib/controllers/platform-controller.js +1 -9
  180. package/lib/controllers/prepare-controller.js +4 -17
  181. package/lib/controllers/run-controller.js +1 -17
  182. package/lib/controllers/update-controller-base.js +0 -1
  183. package/lib/controllers/update-controller.js +0 -11
  184. package/lib/data/build-data.js +0 -1
  185. package/lib/data/controller-data-base.js +0 -1
  186. package/lib/data/debug-data.js +0 -1
  187. package/lib/data/platform-data.js +0 -1
  188. package/lib/data/prepare-data.js +0 -1
  189. package/lib/data/run-data.js +0 -1
  190. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  191. package/lib/detached-processes/cleanup-process.js +14 -18
  192. package/lib/detached-processes/file-log-service.js +1 -2
  193. package/lib/device-path-provider.js +0 -1
  194. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  195. package/lib/device-sockets/ios/notification.js +0 -3
  196. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  197. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  198. package/lib/helpers/deploy-command-helper.js +0 -1
  199. package/lib/helpers/key-command-helper.js +2 -4
  200. package/lib/helpers/livesync-command-helper.js +1 -4
  201. package/lib/helpers/network-connectivity-validator.js +0 -1
  202. package/lib/helpers/options-track-helper.js +2 -3
  203. package/lib/helpers/package-path-helper.js +0 -1
  204. package/lib/helpers/platform-command-helper.js +2 -7
  205. package/lib/helpers/version-validator-helper.js +0 -1
  206. package/lib/key-commands/bootstrap.js +2 -3
  207. package/lib/key-commands/index.js +4 -5
  208. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  209. package/lib/nativescript-cli-lib.js +0 -1
  210. package/lib/nativescript-cli.js +1 -11
  211. package/lib/node/pbxproj-dom-xcode.js +0 -1
  212. package/lib/node/xcode.js +0 -1
  213. package/lib/node-package-manager.js +1 -11
  214. package/lib/options.js +119 -144
  215. package/lib/package-installation-manager.js +1 -8
  216. package/lib/package-manager.js +0 -2
  217. package/lib/platform-command-param.js +0 -1
  218. package/lib/pnpm-package-manager.js +1 -4
  219. package/lib/project-data.js +0 -12
  220. package/lib/providers/project-files-provider.js +0 -1
  221. package/lib/resolvers/livesync-service-resolver.js +0 -1
  222. package/lib/services/analytics/analytics-broker-process.js +6 -10
  223. package/lib/services/analytics/analytics-broker.js +1 -2
  224. package/lib/services/analytics/analytics-service.js +25 -29
  225. package/lib/services/analytics/google-analytics-provider.js +12 -13
  226. package/lib/services/analytics-settings-service.js +0 -5
  227. package/lib/services/android/android-bundle-tool-service.js +0 -1
  228. package/lib/services/android/gradle-build-args-service.js +0 -3
  229. package/lib/services/android/gradle-build-service.js +0 -1
  230. package/lib/services/android/gradle-command-service.js +0 -1
  231. package/lib/services/android-device-debug-service.js +0 -6
  232. package/lib/services/android-plugin-build-service.js +2 -31
  233. package/lib/services/android-project-service.js +4 -71
  234. package/lib/services/android-resources-migration-service.js +0 -7
  235. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  236. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  237. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  238. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  239. package/lib/services/assets-generation/assets-generation-service.js +5 -10
  240. package/lib/services/build-artifacts-service.js +1 -2
  241. package/lib/services/build-data-service.js +0 -1
  242. package/lib/services/build-info-file-service.js +0 -1
  243. package/lib/services/bundler/bundler-compiler-service.js +1 -68
  244. package/lib/services/bundler/bundler.js +0 -1
  245. package/lib/services/cleanup-service.js +9 -13
  246. package/lib/services/cocoapods-platform-manager.js +0 -9
  247. package/lib/services/cocoapods-service.js +1 -21
  248. package/lib/services/debug-data-service.js +0 -1
  249. package/lib/services/debug-service-base.js +0 -7
  250. package/lib/services/device/device-install-app-service.js +1 -2
  251. package/lib/services/doctor-service.js +6 -21
  252. package/lib/services/extensibility-service.js +0 -8
  253. package/lib/services/files-hash-service.js +0 -1
  254. package/lib/services/hmr-status-service.js +0 -2
  255. package/lib/services/info-service.js +0 -1
  256. package/lib/services/initialize-service.js +1 -5
  257. package/lib/services/ios/export-options-plist-service.js +0 -4
  258. package/lib/services/ios/ios-signing-service.js +10 -7
  259. package/lib/services/ios/spm-service.js +0 -18
  260. package/lib/services/ios/xcodebuild-args-service.js +0 -11
  261. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  262. package/lib/services/ios/xcodebuild-service.js +1 -2
  263. package/lib/services/ios-debugger-port-service.js +0 -1
  264. package/lib/services/ios-device-debug-service.js +0 -1
  265. package/lib/services/ios-entitlements-service.js +3 -2
  266. package/lib/services/ios-extensions-service.js +0 -1
  267. package/lib/services/ios-log-filter.js +0 -20
  268. package/lib/services/ios-native-target-service.js +4 -6
  269. package/lib/services/ios-project-service.js +11 -105
  270. package/lib/services/ios-provision-service.js +0 -3
  271. package/lib/services/ios-watch-app-service.js +0 -1
  272. package/lib/services/ip-service.js +0 -2
  273. package/lib/services/itmstransporter-service.js +0 -1
  274. package/lib/services/karma-execution.js +0 -2
  275. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  276. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  277. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  278. package/lib/services/livesync/android-livesync-service.js +0 -1
  279. package/lib/services/livesync/android-livesync-tool.js +0 -4
  280. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  281. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  282. package/lib/services/livesync/ios-livesync-service.js +0 -2
  283. package/lib/services/livesync/livesync-socket.js +0 -1
  284. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  285. package/lib/services/livesync-process-data-service.js +0 -1
  286. package/lib/services/log-parser-service.js +0 -1
  287. package/lib/services/log-source-map-service.js +0 -15
  288. package/lib/services/marking-mode-service.js +5 -8
  289. package/lib/services/metadata-filtering-service.js +0 -1
  290. package/lib/services/npm-config-service.js +0 -4
  291. package/lib/services/pacote-service.js +0 -7
  292. package/lib/services/performance-service.js +1 -3
  293. package/lib/services/platform/add-platform-service.js +2 -49
  294. package/lib/services/platform/platform-validation-service.js +0 -1
  295. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  296. package/lib/services/platform-environment-requirements.js +3 -8
  297. package/lib/services/platform-project-service-base.js +0 -1
  298. package/lib/services/platforms-data-service.js +0 -1
  299. package/lib/services/plugins-service.js +2 -20
  300. package/lib/services/prepare-data-service.js +0 -1
  301. package/lib/services/project-backup-service.js +0 -4
  302. package/lib/services/project-changes-service.js +3 -14
  303. package/lib/services/project-cleanup-service.js +0 -2
  304. package/lib/services/project-config-service.js +2 -21
  305. package/lib/services/project-data-service.js +7 -36
  306. package/lib/services/project-name-service.js +0 -1
  307. package/lib/services/project-service.js +0 -10
  308. package/lib/services/project-templates-service.js +2 -3
  309. package/lib/services/qr-code-terminal-service.js +0 -1
  310. package/lib/services/require-service.js +0 -1
  311. package/lib/services/start-service.js +0 -1
  312. package/lib/services/temp-service.js +0 -3
  313. package/lib/services/terminal-spinner-service.js +0 -2
  314. package/lib/services/test-execution-service.js +2 -9
  315. package/lib/services/test-initialization-service.js +0 -4
  316. package/lib/services/timeline-profiler-service.js +0 -1
  317. package/lib/services/user-settings-service.js +0 -1
  318. package/lib/services/versions-service.js +4 -6
  319. package/lib/services/watch-ignore-list-service.js +0 -1
  320. package/lib/services/xcconfig-service.js +0 -2
  321. package/lib/services/xcproj-service.js +0 -1
  322. package/lib/shared-event-bus.js +0 -6
  323. package/lib/sys-info.js +1 -2
  324. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  325. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  326. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  327. package/lib/yarn-package-manager.js +0 -1
  328. package/lib/yarn2-package-manager.js +0 -3
  329. package/package.json +1 -1
@@ -24,4 +24,3 @@ class PackageManagerCommand {
24
24
  }
25
25
  exports.PackageManagerCommand = PackageManagerCommand;
26
26
  yok_1.injector.registerCommand("package-manager|set", PackageManagerCommand);
27
- //# sourceMappingURL=package-manager-set.js.map
@@ -14,4 +14,3 @@ class PostInstallCommand {
14
14
  }
15
15
  exports.PostInstallCommand = PostInstallCommand;
16
16
  yok_1.injector.registerCommand("dev-post-install", PostInstallCommand);
17
- //# sourceMappingURL=post-install.js.map
@@ -6,16 +6,12 @@ const helpers_1 = require("../helpers");
6
6
  const constants_1 = require("../../constants");
7
7
  const yok_1 = require("../yok");
8
8
  class PreUninstallCommand {
9
- constructor($analyticsService, $extensibilityService, $fs,
10
- // private $opener: IOpener,
11
- $packageInstallationManager, $settingsService) {
9
+ constructor($analyticsService, $extensibilityService, $fs, $packageInstallationManager, $settingsService) {
12
10
  this.$analyticsService = $analyticsService;
13
11
  this.$extensibilityService = $extensibilityService;
14
12
  this.$fs = $fs;
15
13
  this.$packageInstallationManager = $packageInstallationManager;
16
14
  this.$settingsService = $settingsService;
17
- // disabled for now (6/24/2020)
18
- // private static FEEDBACK_FORM_URL = "https://www.nativescript.org/uninstall-feedback";
19
15
  this.allowedParameters = [];
20
16
  }
21
17
  async execute(args) {
@@ -28,7 +24,7 @@ class PreUninstallCommand {
28
24
  /^unlink$/,
29
25
  ]);
30
26
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
31
- action: "Uninstall CLI" /* TrackActionNames.UninstallCLI */,
27
+ action: "Uninstall CLI",
32
28
  additionalData: `isIntentionalUninstall${constants_1.AnalyticsEventLabelDelimiter}${isIntentionalUninstall}${constants_1.AnalyticsEventLabelDelimiter}isInteractive${constants_1.AnalyticsEventLabelDelimiter}${!!(0, helpers_1.isInteractive)()}`,
33
29
  });
34
30
  if (isIntentionalUninstall) {
@@ -43,13 +39,8 @@ class PreUninstallCommand {
43
39
  await this.handleFeedbackForm();
44
40
  }
45
41
  async handleFeedbackForm() {
46
- // disabled for now (6/24/2020)
47
- // if (isInteractive()) {
48
- // this.$opener.open(PreUninstallCommand.FEEDBACK_FORM_URL);
49
- // }
50
42
  return Promise.resolve();
51
43
  }
52
44
  }
53
45
  exports.PreUninstallCommand = PreUninstallCommand;
54
46
  yok_1.injector.registerCommand("dev-preuninstall", PreUninstallCommand);
55
- //# sourceMappingURL=preuninstall.js.map
@@ -12,10 +12,7 @@ class ProxyCommandBase {
12
12
  }
13
13
  async tryTrackUsage() {
14
14
  try {
15
- // TODO(Analytics): Check why we have set the `disableAnalytics` to true and we track the command as separate one
16
- // instead of tracking it through the commandsService.
17
15
  this.$logger.trace(this.commandName);
18
- // await this.$analyticsService.trackFeature(this.commandName);
19
16
  }
20
17
  catch (ex) {
21
18
  this.$logger.trace("Error in trying to track proxy command usage:");
@@ -24,4 +21,3 @@ class ProxyCommandBase {
24
21
  }
25
22
  }
26
23
  exports.ProxyCommandBase = ProxyCommandBase;
27
- //# sourceMappingURL=proxy-base.js.map
@@ -19,4 +19,3 @@ class ProxyClearCommand extends proxy_base_1.ProxyCommandBase {
19
19
  }
20
20
  exports.ProxyClearCommand = ProxyClearCommand;
21
21
  yok_1.injector.registerCommand(proxyClearCommandName, ProxyClearCommand);
22
- //# sourceMappingURL=proxy-clear.js.map
@@ -18,4 +18,3 @@ class ProxyGetCommand extends proxy_base_1.ProxyCommandBase {
18
18
  }
19
19
  exports.ProxyGetCommand = ProxyGetCommand;
20
20
  yok_1.injector.registerCommand(proxyGetCommandName, ProxyGetCommand);
21
- //# sourceMappingURL=proxy-get.js.map
@@ -135,4 +135,3 @@ class ProxySetCommand extends proxy_base_1.ProxyCommandBase {
135
135
  }
136
136
  exports.ProxySetCommand = ProxySetCommand;
137
137
  yok_1.injector.registerCommand(proxySetCommandName, ProxySetCommand);
138
- //# sourceMappingURL=proxy-set.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const yok_1 = require("./yok");
4
4
  require("./appbuilder/proton-bootstrap");
5
5
  module.exports = yok_1.injector.publicApi;
6
- //# sourceMappingURL=common-lib.js.map
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SOCKET_CONNECTION_TIMEOUT_MS = exports.AndroidVirtualDevice = exports.ATTACH_REQUEST_EVENT_NAME = exports.DEBUGGER_PORT_FOUND_EVENT_NAME = exports.DEFAULT_CHUNK_SIZE = exports.HttpProtocolToPort = exports.HttpStatusCodes = exports.Proxy = exports.IOS_RELAY_NOTIFICATION_COMMAND_TYPE = exports.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE = exports.IOS_POST_NOTIFICATION_COMMAND_TYPE = exports.FileExtensions = exports.TNS_CORE_MODULES = exports.NODE_MODULES_DIR_NAME = exports.Configurations = exports.TARGET_FRAMEWORK_IDENTIFIERS = exports.FAIL_LIVESYNC_LOG_REGEX = exports.IOS_APP_CRASH_LOG_REG_EXP = exports.IOS_LOG_PREDICATE = exports.DEVICE_LOG_EVENT_NAME = exports.EmulatorDiscoveryNames = exports.DeviceDiscoveryEventNames = exports.HmrConstants = exports.LiveSyncPaths = exports.APPLE_VENDOR_NAME = exports.NOT_RUNNING_EMULATOR_STATUS = exports.RUNNING_EMULATOR_STATUS = exports.CONNECTED_STATUS = exports.UNREACHABLE_STATUS = exports.ERROR_NO_VALID_SUBCOMMAND_FORMAT = exports.ERROR_CANNOT_RESOLVE_DEVICE = exports.ERROR_NO_DEVICES_CANT_USE_IOS_SIMULATOR = exports.ERROR_CANT_USE_SIMULATOR = exports.ERROR_NO_DEVICES = exports.APP_RESOURCES_FOLDER_NAME = exports.DeviceTypes = exports.ProvisionType = void 0;
4
- // enumeration taken from ProvisionType.cs
5
4
  class ProvisionType {
6
5
  }
7
6
  exports.ProvisionType = ProvisionType;
@@ -83,9 +82,6 @@ Proxy.CACHE_FILE_NAME = "proxy-cache.json";
83
82
  Proxy.USE_PROXY = "USE_PROXY";
84
83
  Proxy.PROXY_PORT = "PROXY_PORT";
85
84
  Proxy.PROXY_HOSTNAME = "PROXY_HOSTNAME";
86
- /**
87
- * Http status codes available from `require("http").STATUS_CODES`.
88
- */
89
85
  class HttpStatusCodes {
90
86
  }
91
87
  exports.HttpStatusCodes = HttpStatusCodes;
@@ -111,13 +107,7 @@ AndroidVirtualDevice.INI_FILES_MASK = /^(.*)\.ini$/i;
111
107
  AndroidVirtualDevice.AVD_FILES_MASK = /^(.*)\.avd$/i;
112
108
  AndroidVirtualDevice.MIN_ANDROID_APILEVEL = 17;
113
109
  AndroidVirtualDevice.MIN_ANDROID_VERSION = "4.2";
114
- /**
115
- * The message that is printed from `avdmanager list avds`
116
- */
117
110
  AndroidVirtualDevice.AVAILABLE_AVDS_MESSAGE = "Available Android Virtual Devices:";
118
- /**
119
- * The delimiter between devices that is used from `avdmanager list avds`
120
- */
121
111
  AndroidVirtualDevice.AVD_LIST_DELIMITER = "---------";
122
112
  AndroidVirtualDevice.CONFIG_INI_FILE_NAME = "config.ini";
123
113
  AndroidVirtualDevice.INI_FILE_EXTENSION = ".ini";
@@ -130,4 +120,3 @@ AndroidVirtualDevice.TIMEOUT_SECONDS = 120;
130
120
  AndroidVirtualDevice.GENYMOTION_DEFAULT_STDERR_STRING = "Logging activities to file";
131
121
  AndroidVirtualDevice.UNABLE_TO_START_EMULATOR_MESSAGE = "Cannot run the app in the selected native emulator. Try to restart the adb server by running the `adb kill-server` command in the Command Prompt, or increase the allocated RAM of the virtual device through the Android Virtual Device manager. NativeScript CLI users can try to increase the timeout of the operation by adding the `--timeout` flag.";
132
122
  exports.SOCKET_CONNECTION_TIMEOUT_MS = 30000;
133
- //# sourceMappingURL=constants.js.map
@@ -9,32 +9,6 @@ exports.performanceLog = performanceLog;
9
9
  exports.deprecated = deprecated;
10
10
  const constants_1 = require("../constants");
11
11
  const yok_1 = require("./yok");
12
- /**
13
- * Caches the result of the first execution of the method and returns it whenever it is called instead of executing it again.
14
- * Works with methods and getters.
15
- * @example
16
- * ```
17
- * class CacheDecoratorsTest {
18
- *
19
- * @cache()
20
- * public method(num: number): number {
21
- * return num;
22
- * }
23
- *
24
- * @cache()
25
- * public get property(): any {
26
- * // execute some heavy operation.
27
- * return result;
28
- * }
29
- * }
30
- *
31
- * const instance = new CacheDecoratorsTest();
32
- * const result = instance.method(1); // returns 1;
33
- *
34
- * // all consecutive calls to instance.method will return 1.
35
- * const result2 = instance.method(2); // returns 1;
36
- * ```
37
- */
38
12
  function cache() {
39
13
  return (target, propertyKey, descriptor) => {
40
14
  let result;
@@ -54,7 +28,6 @@ function cache() {
54
28
  let memoizeIDCounter = 0;
55
29
  function memoize(options) {
56
30
  return (target, propertyKey, descriptor) => {
57
- // todo: remove once surely working as intended.
58
31
  const DEBUG = false;
59
32
  const memoizeID = memoizeIDCounter++;
60
33
  const valueOrGet = descriptor.value ? "value" : "get";
@@ -75,7 +48,6 @@ function memoize(options) {
75
48
  cacheMapName,
76
49
  hashKey,
77
50
  });
78
- // initialize cache map if not exists
79
51
  if (!this.hasOwnProperty(cacheMapName)) {
80
52
  DEBUG && console.log("NO CACHE MAP YET, CREATING ONE NOW");
81
53
  Object.defineProperty(this, cacheMapName, {
@@ -90,16 +62,12 @@ function memoize(options) {
90
62
  console.log({
91
63
  cacheMap,
92
64
  });
93
- // check if has memoized value based on hashFn
94
65
  if (cacheMap.has(hashKey)) {
95
66
  DEBUG && console.log("CACHE HIT");
96
- // if yes, return cached value
97
67
  return cacheMap.get(hashKey);
98
68
  }
99
69
  DEBUG && console.log("CACHE MISS");
100
- // if not call original and get result
101
70
  const result = originalMethod.apply(this, args);
102
- // call shouldCache (if passed) with the result or default to true
103
71
  let shouldCache = true;
104
72
  if (options.shouldCache) {
105
73
  shouldCache = options.shouldCache.call(this, result);
@@ -109,21 +77,12 @@ function memoize(options) {
109
77
  DEBUG && console.log("CACHING NOW");
110
78
  cacheMap.set(hashKey, result);
111
79
  }
112
- // if shouldCache: save result
113
80
  DEBUG && console.log("RETURNING", result);
114
81
  return result;
115
82
  };
116
83
  return descriptor;
117
84
  };
118
85
  }
119
- /**
120
- * Calls specific method of the instance before executing the decorated method.
121
- * This is usable when some of your methods depend on initialize async method, that cannot be invoked in constructor of the class.
122
- * IMPORTANT: The decorated method must be async.
123
- * @param {string} methodName The name of the method that will be invoked before calling the decorated method.
124
- * @param {any[]} methodArgs Args that will be passed to the method that will be invoked before calling the decorated one.
125
- * @return {any} Result of the decorated method.
126
- */
127
86
  function invokeBefore(methodName, methodArgs) {
128
87
  return (target, propertyKey, descriptor) => {
129
88
  const originalValue = descriptor.value;
@@ -155,7 +114,6 @@ function performanceLog(localInjector) {
155
114
  const className = target.constructor.name;
156
115
  const trackName = `${className}${constants_1.AnalyticsEventLabelDelimiter}${propertyKey}`;
157
116
  const performanceService = localInjector.resolve("performanceService");
158
- //needed for the returned function to have the same name as the original - used in hooks decorator
159
117
  const functionWrapper = {
160
118
  [originalMethod.name]: function (...args) {
161
119
  const start = performanceService.now();
@@ -181,14 +139,12 @@ function performanceLog(localInjector) {
181
139
  },
182
140
  };
183
141
  descriptor.value = functionWrapper[originalMethod.name];
184
- // used to get parameter names in hooks decorator
185
142
  descriptor.value.toString = () => {
186
143
  return originalMethod.toString();
187
144
  };
188
145
  return descriptor;
189
146
  };
190
147
  }
191
- // inspired by https://github.com/NativeScript/NativeScript/blob/55dfe25938569edbec89255008e5ad9804901305/tns-core-modules/globals/globals.ts#L121-L137
192
148
  function deprecated(additionalInfo, localInjector) {
193
149
  const isDeprecatedMessage = " is deprecated.";
194
150
  return (target, key, descriptor) => {
@@ -197,7 +153,6 @@ function deprecated(additionalInfo, localInjector) {
197
153
  const $logger = localInjector.resolve("logger");
198
154
  if (descriptor) {
199
155
  if (descriptor.value) {
200
- // method
201
156
  const originalMethod = descriptor.value;
202
157
  descriptor.value = function (...args) {
203
158
  $logger.warn(`${key.toString()}${isDeprecatedMessage} ${additionalInfo}`);
@@ -206,7 +161,6 @@ function deprecated(additionalInfo, localInjector) {
206
161
  return descriptor;
207
162
  }
208
163
  else {
209
- // property
210
164
  if (descriptor.set) {
211
165
  const originalSetter = descriptor.set;
212
166
  descriptor.set = function (...args) {
@@ -225,7 +179,6 @@ function deprecated(additionalInfo, localInjector) {
225
179
  }
226
180
  }
227
181
  else {
228
- // class
229
182
  $logger.warn(`${(target &&
230
183
  (target.name ||
231
184
  (target.constructor && target.constructor.name))) ||
@@ -234,4 +187,3 @@ function deprecated(additionalInfo, localInjector) {
234
187
  }
235
188
  };
236
189
  }
237
- //# sourceMappingURL=decorators.js.map
@@ -15,9 +15,7 @@ const yok_1 = require("./yok");
15
15
  const constants_1 = require("../constants");
16
16
  const semver = require("semver");
17
17
  class CommandDispatcher {
18
- constructor($logger,
19
- // required by the hooksService
20
- $injector, $cancellation, $commandsService, $staticConfig, $sysInfo, $options, $versionsService, $packageManager, $terminalSpinnerService) {
18
+ constructor($logger, $injector, $cancellation, $commandsService, $staticConfig, $sysInfo, $options, $versionsService, $packageManager, $terminalSpinnerService) {
21
19
  this.$logger = $logger;
22
20
  this.$injector = $injector;
23
21
  this.$cancellation = $cancellation;
@@ -34,7 +32,6 @@ class CommandDispatcher {
34
32
  return this.printVersion();
35
33
  }
36
34
  if (this.$logger.getLevel() === "TRACE" && !this.$options.json) {
37
- // CommandDispatcher is called from external CLI's only, so pass the path to their package.json
38
35
  this.$logger.trace("Collecting system information...");
39
36
  const sysInfo = await this.$sysInfo.getSysInfo({
40
37
  pathToNativeScriptCliPackageJson: path.join(__dirname, "..", "..", "package.json"),
@@ -64,7 +61,6 @@ class CommandDispatcher {
64
61
  await this.$commandsService.tryExecuteCommand(commandName, commandArguments);
65
62
  }
66
63
  async resolveCommand(commandName, commandArguments, argv) {
67
- // just a hook point
68
64
  return { commandName, commandArguments, argv };
69
65
  }
70
66
  getCommandName() {
@@ -72,15 +68,12 @@ class CommandDispatcher {
72
68
  if (remaining.length > 0) {
73
69
  return remaining[0].toString().toLowerCase();
74
70
  }
75
- // if only <CLI_NAME> is specified on console, show console help
76
71
  this.$options.help = true;
77
72
  return "";
78
73
  }
79
74
  async printVersion() {
80
75
  this.$logger.info(this.$staticConfig.version);
81
76
  if (this.$options.json) {
82
- // we don't check for updates when --json is passed
83
- // useful for tools that rely on the output of the command
84
77
  return;
85
78
  }
86
79
  const spinner = this.$terminalSpinnerService.createSpinner();
@@ -108,7 +101,6 @@ class CommandDispatcher {
108
101
  if (semver.gte(nativescriptCliVersion.currentVersion, nativescriptCliVersion.latestVersion, {
109
102
  loose: true,
110
103
  })) {
111
- // up-to-date
112
104
  spinner.succeed("Up to date.");
113
105
  }
114
106
  else {
@@ -140,4 +132,3 @@ class FutureDispatcher {
140
132
  }
141
133
  }
142
134
  yok_1.injector.register("dispatcher", FutureDispatcher, false);
143
- //# sourceMappingURL=dispatchers.js.map
@@ -15,9 +15,7 @@ const source_map_1 = require("source-map");
15
15
  const helpers_1 = require("./helpers");
16
16
  const decorators_1 = require("./decorators");
17
17
  const yok_1 = require("./yok");
18
- // we need this to overwrite .stack property (read-only in Error)
19
18
  function Exception() {
20
- /* intentionally left blank */
21
19
  }
22
20
  Exception.prototype = new Error();
23
21
  async function resolveCallStack(error) {
@@ -62,7 +60,6 @@ async function resolveCallStack(error) {
62
60
  }));
63
61
  let outputMessage = remapped.join("\n");
64
62
  if (outputMessage.indexOf(error.message) === -1) {
65
- // when fibers throw error in node 0.12.x, the stack does NOT contain the message
66
63
  outputMessage = outputMessage.replace(/Error/, "Error: " + error.message);
67
64
  }
68
65
  return outputMessage;
@@ -86,9 +83,7 @@ function installUncaughtExceptionListener(actionOnException) {
86
83
  }
87
84
  }
88
85
  catch (err) {
89
- // In case the handler throws error and we do not catch it, we'll go in infinite loop of unhandled rejections.
90
- // We cannot do anything here as even `console.error` may fail. So just exit the process.
91
- process.exit(131 /* ErrorCodes.UNHANDLED_REJECTION_FAILURE */);
86
+ process.exit(131);
92
87
  }
93
88
  };
94
89
  process.on("uncaughtException", handler);
@@ -100,7 +95,6 @@ async function tryTrackException(error, localInjector) {
100
95
  disableAnalytics = localInjector.resolve("staticConfig").disableAnalytics;
101
96
  }
102
97
  catch (err) {
103
- // We should get here only in our unit tests.
104
98
  disableAnalytics = true;
105
99
  }
106
100
  if (!disableAnalytics) {
@@ -109,7 +103,6 @@ async function tryTrackException(error, localInjector) {
109
103
  await analyticsService.trackException(error, error.message);
110
104
  }
111
105
  catch (e) {
112
- // Do not replace with logger due to cyclic dependency
113
106
  console.error("Error while reporting exception: " + e);
114
107
  }
115
108
  }
@@ -147,10 +140,9 @@ class Errors {
147
140
  exception.message = $messagesService.getMessage.apply($messagesService, [opts.formatStr].concat(argsArray));
148
141
  }
149
142
  catch (err) {
150
- // Ignore
151
143
  }
152
144
  exception.stack = new Error(exception.message).stack;
153
- exception.errorCode = opts.errorCode || 127 /* ErrorCodes.UNKNOWN */;
145
+ exception.errorCode = opts.errorCode || 127;
154
146
  exception.suggestCommandHelp = suggestCommandHelp;
155
147
  exception.proxyAuthenticationRequired = !!opts.proxyAuthenticationRequired;
156
148
  exception.printOnStdout = opts.printOnStdout;
@@ -182,10 +174,9 @@ class Errors {
182
174
  await printCommandHelpSuggestion();
183
175
  }
184
176
  await tryTrackException(ex, this.$injector);
185
- process.exit(_.isNumber(ex.errorCode) ? ex.errorCode : 127 /* ErrorCodes.UNKNOWN */);
177
+ process.exit(_.isNumber(ex.errorCode) ? ex.errorCode : 127);
186
178
  }
187
179
  }
188
- // If you want to activate this function, start Node with flags --nouse_idle_notification and --expose_gc
189
180
  verifyHeap(message) {
190
181
  if (global.gc) {
191
182
  console.log("verifyHeap: '%s'", message);
@@ -198,4 +189,3 @@ __decorate([
198
189
  (0, decorators_1.deprecated)("Use `fail` instead.")
199
190
  ], Errors.prototype, "failWithoutHelp", null);
200
191
  yok_1.injector.register("errors", Errors);
201
- //# sourceMappingURL=errors.js.map
@@ -20,14 +20,12 @@ const constants_1 = require("../constants");
20
20
  const os_1 = require("os");
21
21
  const detectNewline = require("detect-newline");
22
22
  const archiver_1 = require("archiver");
23
- // TODO: Add .d.ts for mkdirp module (or use it from @types repo).
24
23
  const mkdirp = require("mkdirp");
25
24
  let FileSystem = FileSystem_1 = class FileSystem {
26
25
  constructor($injector) {
27
26
  this.$injector = $injector;
28
27
  }
29
28
  async zipFiles(zipFile, files, zipPathCallback) {
30
- //we are resolving it here instead of in the constructor, because config has dependency on file system and config shouldn't require logger
31
29
  const $logger = this.$injector.resolve("logger");
32
30
  const zip = (0, archiver_1.create)("zip", {
33
31
  zlib: {
@@ -64,10 +62,10 @@ let FileSystem = FileSystem_1 = class FileSystem {
64
62
  proc = (0, path_1.join)(__dirname, "resources/platform-tools/unzip/win32/unzip");
65
63
  }
66
64
  else if ($hostInfo.isDarwin) {
67
- proc = "unzip"; // darwin unzip is info-zip
65
+ proc = "unzip";
68
66
  }
69
67
  else if ($hostInfo.isLinux) {
70
- proc = "unzip"; // linux unzip is info-zip
68
+ proc = "unzip";
71
69
  }
72
70
  if (!isCaseSensitive) {
73
71
  zipFile = this.findFileCaseInsensitive(zipFile);
@@ -108,7 +106,6 @@ let FileSystem = FileSystem_1 = class FileSystem {
108
106
  }
109
107
  catch (err) {
110
108
  if (err && err.code !== "ENOENT") {
111
- // ignore "file doesn't exist" error
112
109
  throw err;
113
110
  }
114
111
  }
@@ -147,7 +144,6 @@ let FileSystem = FileSystem_1 = class FileSystem {
147
144
  }
148
145
  });
149
146
  if (root) {
150
- // console.log("root", paths);
151
147
  return Array.from(paths.values()).reduce((sum, current) => sum + current, 0);
152
148
  }
153
149
  };
@@ -220,8 +216,6 @@ let FileSystem = FileSystem_1 = class FileSystem {
220
216
  writeFile(filename, data, encoding) {
221
217
  this.createDirectory((0, path_1.dirname)(filename));
222
218
  if (!data) {
223
- // node 14 will no longer coerce unsupported input to strings anymore.
224
- // clean any null or undefined data
225
219
  data = "";
226
220
  }
227
221
  fs.writeFileSync(filename, data, { encoding: encoding });
@@ -252,8 +246,6 @@ let FileSystem = FileSystem_1 = class FileSystem {
252
246
  return;
253
247
  }
254
248
  this.createDirectory((0, path_1.dirname)(destinationFileName));
255
- // MobileApplication.app is resolved as a directory on Mac,
256
- // therefore we need to copy it recursively as it's not a single file.
257
249
  shelljs.cp("-rf", sourceFileName, destinationFileName);
258
250
  const err = shelljs.error();
259
251
  if (err) {
@@ -329,9 +321,7 @@ let FileSystem = FileSystem_1 = class FileSystem {
329
321
  });
330
322
  await this.futureFromEvent(chown, "close");
331
323
  }
332
- // nothing to do on Windows, as chown does not work on this platform
333
324
  }
334
- // filterCallback: function(path: String, stat: fs.Stats): Boolean
335
325
  enumerateFilesInDirectorySync(directoryPath, filterCallback, opts, foundFiles) {
336
326
  foundFiles = foundFiles || [];
337
327
  if (!this.exists(directoryPath)) {
@@ -427,4 +417,3 @@ FileSystem.JSON_OBJECT_REGEXP = new RegExp(`{\\r*\\n*(\\W*)"`, "m");
427
417
  exports.FileSystem = FileSystem = FileSystem_1 = __decorate([
428
418
  injector.register("fs")
429
419
  ], FileSystem);
430
- //# sourceMappingURL=file-system.js.map
@@ -13,13 +13,11 @@ function printHeader() {
13
13
  color_1.color.styleText(["cyanBright", "bold"], "{N} NativeScript "),
14
14
  color_1.color.styleText(["whiteBright", "bold"], "CLI"),
15
15
  color_1.color.dim(` [v${version}] `),
16
- // color.dim(" │"),
17
16
  ].join("");
18
17
  const tagLine = [
19
18
  color_1.color.dim("│ "),
20
19
  color_1.color.dim(" → "),
21
20
  color_1.color.styleText(["whiteBright", "bold"], "Empower JavaScript with native APIs "),
22
- // color.dim(" │"),
23
21
  ].join("");
24
22
  const headerLength = (0, color_1.stripColors)(header).length;
25
23
  const tagLineLength = (0, color_1.stripColors)(tagLine).length;
@@ -29,4 +27,3 @@ function printHeader() {
29
27
  console.info(" " + tagLine + " ".repeat(width - tagLineLength) + color_1.color.dim("│"));
30
28
  console.info(" " + color_1.color.dim("└" + "─".repeat(width - 1) + "┘"));
31
29
  }
32
- //# sourceMappingURL=header.js.map