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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/lib/android-tools-info.js +0 -12
  2. package/lib/base-package-manager.js +0 -7
  3. package/lib/bootstrap.js +1 -5
  4. package/lib/bun-package-manager.js +1 -14
  5. package/lib/color.js +0 -4
  6. package/lib/commands/add-platform.js +0 -1
  7. package/lib/commands/apple-login.js +0 -1
  8. package/lib/commands/appstore-list.js +0 -1
  9. package/lib/commands/appstore-upload.js +0 -3
  10. package/lib/commands/build.js +2 -3
  11. package/lib/commands/clean.js +1 -22
  12. package/lib/commands/command-base.js +0 -1
  13. package/lib/commands/config.js +0 -4
  14. package/lib/commands/create-project.js +0 -6
  15. package/lib/commands/debug.js +1 -6
  16. package/lib/commands/deploy.js +2 -3
  17. package/lib/commands/embedding/embed.js +0 -7
  18. package/lib/commands/extensibility/install-extension.js +0 -1
  19. package/lib/commands/extensibility/list-extensions.js +0 -1
  20. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  21. package/lib/commands/fonts.js +0 -1
  22. package/lib/commands/generate-assets.js +0 -1
  23. package/lib/commands/generate-help.js +0 -1
  24. package/lib/commands/generate.js +1 -48
  25. package/lib/commands/info.js +0 -1
  26. package/lib/commands/install.js +0 -1
  27. package/lib/commands/list-platforms.js +0 -1
  28. package/lib/commands/migrate.js +0 -1
  29. package/lib/commands/native-add.js +0 -5
  30. package/lib/commands/platform-clean.js +0 -1
  31. package/lib/commands/plugin/add-plugin.js +0 -1
  32. package/lib/commands/plugin/build-plugin.js +0 -1
  33. package/lib/commands/plugin/create-plugin.js +0 -5
  34. package/lib/commands/plugin/list-plugins.js +0 -1
  35. package/lib/commands/plugin/remove-plugin.js +0 -2
  36. package/lib/commands/plugin/update-plugin.js +0 -1
  37. package/lib/commands/post-install.js +0 -6
  38. package/lib/commands/prepare.js +3 -4
  39. package/lib/commands/preview.js +0 -2
  40. package/lib/commands/remove-platform.js +0 -1
  41. package/lib/commands/resources/resources-update.js +0 -2
  42. package/lib/commands/run.js +0 -1
  43. package/lib/commands/setup.js +0 -1
  44. package/lib/commands/start.js +0 -1
  45. package/lib/commands/test-init.js +0 -4
  46. package/lib/commands/test.js +2 -9
  47. package/lib/commands/typings.js +1 -2
  48. package/lib/commands/update-platform.js +0 -5
  49. package/lib/commands/update.js +0 -2
  50. package/lib/commands/widget.js +1 -20
  51. package/lib/common/bootstrap.js +0 -1
  52. package/lib/common/child-process.js +0 -3
  53. package/lib/common/codeGeneration/code-entity.js +0 -1
  54. package/lib/common/codeGeneration/code-printer.js +0 -1
  55. package/lib/common/command-params.js +0 -1
  56. package/lib/common/commands/analytics.js +0 -3
  57. package/lib/common/commands/autocompletion.js +0 -3
  58. package/lib/common/commands/device/device-log-stream.js +0 -1
  59. package/lib/common/commands/device/get-file.js +0 -2
  60. package/lib/common/commands/device/list-applications.js +0 -1
  61. package/lib/common/commands/device/list-devices.js +0 -3
  62. package/lib/common/commands/device/list-files.js +0 -2
  63. package/lib/common/commands/device/put-file.js +0 -2
  64. package/lib/common/commands/device/run-application.js +0 -1
  65. package/lib/common/commands/device/stop-application.js +0 -1
  66. package/lib/common/commands/device/uninstall-application.js +0 -1
  67. package/lib/common/commands/doctor.js +2 -3
  68. package/lib/common/commands/generate-messages.js +0 -1
  69. package/lib/common/commands/help.js +0 -1
  70. package/lib/common/commands/package-manager-get.js +0 -1
  71. package/lib/common/commands/package-manager-set.js +0 -1
  72. package/lib/common/commands/post-install.js +0 -1
  73. package/lib/common/commands/preuninstall.js +2 -11
  74. package/lib/common/commands/proxy/proxy-base.js +0 -4
  75. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  76. package/lib/common/commands/proxy/proxy-get.js +0 -1
  77. package/lib/common/commands/proxy/proxy-set.js +0 -1
  78. package/lib/common/common-lib.js +0 -1
  79. package/lib/common/constants.js +0 -11
  80. package/lib/common/decorators.js +0 -48
  81. package/lib/common/dispatchers.js +1 -10
  82. package/lib/common/errors.js +3 -13
  83. package/lib/common/file-system.js +2 -13
  84. package/lib/common/header.js +0 -3
  85. package/lib/common/helpers.js +3 -89
  86. package/lib/common/host-info.js +0 -4
  87. package/lib/common/http-client.js +0 -20
  88. package/lib/common/logger/appenders/cli-appender.js +0 -4
  89. package/lib/common/logger/appenders/emit-appender.js +0 -4
  90. package/lib/common/logger/layouts/cli-layout.js +0 -1
  91. package/lib/common/logger/logger.js +0 -5
  92. package/lib/common/messages/messages.js +0 -6
  93. package/lib/common/mobile/android/android-application-manager.js +1 -20
  94. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  95. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  96. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  97. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  98. package/lib/common/mobile/android/android-device.js +0 -8
  99. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  100. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  101. package/lib/common/mobile/android/android-log-filter.js +0 -4
  102. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  103. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  104. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  105. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  106. package/lib/common/mobile/android/logcat-helper.js +0 -13
  107. package/lib/common/mobile/application-manager-base.js +0 -6
  108. package/lib/common/mobile/device-emitter.js +0 -4
  109. package/lib/common/mobile/device-log-emitter.js +0 -1
  110. package/lib/common/mobile/device-log-provider-base.js +0 -1
  111. package/lib/common/mobile/device-log-provider.js +0 -23
  112. package/lib/common/mobile/device-platforms-constants.js +0 -1
  113. package/lib/common/mobile/emulator-helper.js +0 -3
  114. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  115. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  116. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  117. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  118. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  119. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  120. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  121. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  122. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  123. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  124. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  125. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  126. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  127. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  128. package/lib/common/mobile/log-filter.js +0 -2
  129. package/lib/common/mobile/logging-levels.js +0 -1
  130. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  131. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  132. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  133. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  134. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  135. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  136. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  137. package/lib/common/mobile/mobile-helper.js +0 -1
  138. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  139. package/lib/common/opener.js +0 -1
  140. package/lib/common/os-info.js +0 -1
  141. package/lib/common/plist-parser.js +0 -1
  142. package/lib/common/project-helper.js +0 -1
  143. package/lib/common/prompter.js +1 -9
  144. package/lib/common/queue.js +0 -1
  145. package/lib/common/resource-loader.js +0 -1
  146. package/lib/common/services/auto-completion-service.js +1 -13
  147. package/lib/common/services/cancellation.js +1 -2
  148. package/lib/common/services/commands-service.js +6 -17
  149. package/lib/common/services/help-service.js +3 -11
  150. package/lib/common/services/hooks-service.js +0 -13
  151. package/lib/common/services/ios-notification-service.js +0 -1
  152. package/lib/common/services/json-file-settings-service.js +0 -6
  153. package/lib/common/services/lock-service.js +0 -6
  154. package/lib/common/services/message-contract-generator.js +0 -1
  155. package/lib/common/services/messages-service.js +0 -1
  156. package/lib/common/services/micro-templating-service.js +0 -6
  157. package/lib/common/services/net-service.js +0 -3
  158. package/lib/common/services/project-files-manager.js +0 -5
  159. package/lib/common/services/project-files-provider-base.js +0 -1
  160. package/lib/common/services/proxy-service.js +0 -1
  161. package/lib/common/services/qr.js +0 -1
  162. package/lib/common/services/settings-service.js +0 -1
  163. package/lib/common/services/xcode-select-service.js +0 -1
  164. package/lib/common/utils.js +0 -1
  165. package/lib/common/validators/project-name-validator.js +0 -1
  166. package/lib/common/validators/validation-result.js +0 -1
  167. package/lib/common/verify-node-version.js +1 -8
  168. package/lib/common/yok.js +11 -32
  169. package/lib/config.js +1 -22
  170. package/lib/constants-provider.js +0 -1
  171. package/lib/constants.js +0 -53
  172. package/lib/controllers/build-controller.js +3 -4
  173. package/lib/controllers/debug-controller.js +3 -8
  174. package/lib/controllers/deploy-controller.js +0 -1
  175. package/lib/controllers/migrate-controller.js +4 -90
  176. package/lib/controllers/platform-controller.js +1 -9
  177. package/lib/controllers/prepare-controller.js +4 -17
  178. package/lib/controllers/run-controller.js +1 -17
  179. package/lib/controllers/update-controller-base.js +0 -1
  180. package/lib/controllers/update-controller.js +0 -11
  181. package/lib/data/build-data.js +0 -1
  182. package/lib/data/controller-data-base.js +0 -1
  183. package/lib/data/debug-data.js +0 -1
  184. package/lib/data/platform-data.js +0 -1
  185. package/lib/data/prepare-data.js +0 -1
  186. package/lib/data/run-data.js +0 -1
  187. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  188. package/lib/detached-processes/cleanup-process.js +14 -18
  189. package/lib/detached-processes/file-log-service.js +1 -2
  190. package/lib/device-path-provider.js +0 -1
  191. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  192. package/lib/device-sockets/ios/notification.js +0 -3
  193. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  194. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  195. package/lib/helpers/deploy-command-helper.js +0 -1
  196. package/lib/helpers/key-command-helper.js +2 -4
  197. package/lib/helpers/livesync-command-helper.js +1 -4
  198. package/lib/helpers/network-connectivity-validator.js +0 -1
  199. package/lib/helpers/options-track-helper.js +2 -3
  200. package/lib/helpers/package-path-helper.js +0 -1
  201. package/lib/helpers/platform-command-helper.js +2 -7
  202. package/lib/helpers/version-validator-helper.js +0 -1
  203. package/lib/key-commands/bootstrap.js +2 -3
  204. package/lib/key-commands/index.js +4 -5
  205. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  206. package/lib/nativescript-cli-lib.js +0 -1
  207. package/lib/nativescript-cli.js +1 -10
  208. package/lib/node/pbxproj-dom-xcode.js +0 -1
  209. package/lib/node/xcode.js +0 -1
  210. package/lib/node-package-manager.js +1 -11
  211. package/lib/options.js +119 -144
  212. package/lib/package-installation-manager.js +1 -8
  213. package/lib/package-manager.js +0 -2
  214. package/lib/platform-command-param.js +0 -1
  215. package/lib/pnpm-package-manager.js +1 -4
  216. package/lib/project-data.js +0 -12
  217. package/lib/providers/project-files-provider.js +0 -1
  218. package/lib/resolvers/livesync-service-resolver.js +0 -1
  219. package/lib/services/analytics/analytics-broker-process.js +6 -10
  220. package/lib/services/analytics/analytics-broker.js +1 -2
  221. package/lib/services/analytics/analytics-service.js +25 -29
  222. package/lib/services/analytics/google-analytics-provider.js +12 -13
  223. package/lib/services/analytics-settings-service.js +0 -5
  224. package/lib/services/android/android-bundle-tool-service.js +0 -1
  225. package/lib/services/android/gradle-build-args-service.js +0 -3
  226. package/lib/services/android/gradle-build-service.js +0 -1
  227. package/lib/services/android/gradle-command-service.js +0 -1
  228. package/lib/services/android-device-debug-service.js +0 -6
  229. package/lib/services/android-plugin-build-service.js +2 -31
  230. package/lib/services/android-project-service.js +4 -71
  231. package/lib/services/android-resources-migration-service.js +0 -7
  232. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  233. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  234. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  235. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  236. package/lib/services/assets-generation/assets-generation-service.js +5 -10
  237. package/lib/services/build-artifacts-service.js +1 -2
  238. package/lib/services/build-data-service.js +0 -1
  239. package/lib/services/build-info-file-service.js +0 -1
  240. package/lib/services/bundler/bundler-compiler-service.js +35 -75
  241. package/lib/services/bundler/bundler.js +0 -1
  242. package/lib/services/cleanup-service.js +9 -13
  243. package/lib/services/cocoapods-platform-manager.js +0 -9
  244. package/lib/services/cocoapods-service.js +1 -21
  245. package/lib/services/debug-data-service.js +0 -1
  246. package/lib/services/debug-service-base.js +0 -7
  247. package/lib/services/device/device-install-app-service.js +1 -2
  248. package/lib/services/doctor-service.js +6 -21
  249. package/lib/services/extensibility-service.js +0 -8
  250. package/lib/services/files-hash-service.js +0 -1
  251. package/lib/services/hmr-status-service.js +0 -2
  252. package/lib/services/info-service.js +0 -1
  253. package/lib/services/initialize-service.js +1 -5
  254. package/lib/services/ios/export-options-plist-service.js +0 -4
  255. package/lib/services/ios/ios-signing-service.js +0 -4
  256. package/lib/services/ios/spm-service.js +0 -11
  257. package/lib/services/ios/xcodebuild-args-service.js +0 -9
  258. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  259. package/lib/services/ios/xcodebuild-service.js +1 -2
  260. package/lib/services/ios-debugger-port-service.js +0 -1
  261. package/lib/services/ios-device-debug-service.js +0 -1
  262. package/lib/services/ios-entitlements-service.js +0 -1
  263. package/lib/services/ios-extensions-service.js +0 -1
  264. package/lib/services/ios-log-filter.js +0 -20
  265. package/lib/services/ios-native-target-service.js +4 -6
  266. package/lib/services/ios-project-service.js +1 -91
  267. package/lib/services/ios-provision-service.js +0 -3
  268. package/lib/services/ios-watch-app-service.js +0 -1
  269. package/lib/services/ip-service.js +0 -2
  270. package/lib/services/itmstransporter-service.js +0 -1
  271. package/lib/services/karma-execution.js +0 -2
  272. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  273. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  274. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  275. package/lib/services/livesync/android-livesync-service.js +0 -1
  276. package/lib/services/livesync/android-livesync-tool.js +3 -5
  277. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  278. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  279. package/lib/services/livesync/ios-livesync-service.js +0 -2
  280. package/lib/services/livesync/livesync-socket.js +0 -1
  281. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  282. package/lib/services/livesync-process-data-service.js +0 -1
  283. package/lib/services/log-parser-service.js +0 -1
  284. package/lib/services/log-source-map-service.js +0 -15
  285. package/lib/services/marking-mode-service.js +5 -8
  286. package/lib/services/metadata-filtering-service.js +0 -1
  287. package/lib/services/npm-config-service.js +0 -4
  288. package/lib/services/pacote-service.js +0 -7
  289. package/lib/services/performance-service.js +1 -3
  290. package/lib/services/platform/add-platform-service.js +2 -49
  291. package/lib/services/platform/platform-validation-service.js +0 -1
  292. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  293. package/lib/services/platform-environment-requirements.js +3 -8
  294. package/lib/services/platform-project-service-base.js +0 -1
  295. package/lib/services/platforms-data-service.js +0 -1
  296. package/lib/services/plugins-service.js +2 -20
  297. package/lib/services/prepare-data-service.js +0 -1
  298. package/lib/services/project-backup-service.js +0 -4
  299. package/lib/services/project-changes-service.js +3 -14
  300. package/lib/services/project-cleanup-service.js +0 -2
  301. package/lib/services/project-config-service.js +2 -21
  302. package/lib/services/project-data-service.js +7 -36
  303. package/lib/services/project-name-service.js +0 -1
  304. package/lib/services/project-service.js +0 -10
  305. package/lib/services/project-templates-service.js +2 -3
  306. package/lib/services/qr-code-terminal-service.js +0 -1
  307. package/lib/services/require-service.js +0 -1
  308. package/lib/services/start-service.js +0 -1
  309. package/lib/services/temp-service.js +0 -3
  310. package/lib/services/terminal-spinner-service.js +0 -2
  311. package/lib/services/test-execution-service.js +2 -9
  312. package/lib/services/test-initialization-service.js +0 -4
  313. package/lib/services/timeline-profiler-service.js +0 -1
  314. package/lib/services/user-settings-service.js +0 -1
  315. package/lib/services/versions-service.js +4 -6
  316. package/lib/services/watch-ignore-list-service.js +0 -1
  317. package/lib/services/xcconfig-service.js +0 -2
  318. package/lib/services/xcproj-service.js +0 -1
  319. package/lib/shared-event-bus.js +0 -6
  320. package/lib/sys-info.js +1 -2
  321. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  322. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  323. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  324. package/lib/yarn-package-manager.js +0 -1
  325. package/lib/yarn2-package-manager.js +0 -3
  326. package/package.json +15 -15
@@ -1,8 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- // NOTE: This file is used to call JS functions when cleaning resources used by CLI, after the CLI is killed.
5
- // The instances here are not shared with the ones in main CLI process.
6
4
  const fs = require("fs");
7
5
  const uuid_1 = require("uuid");
8
6
  const file_log_service_1 = require("./file-log-service");
@@ -11,7 +9,6 @@ const pathToBootstrap = process.argv[2];
11
9
  if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
12
10
  throw new Error("Invalid path to bootstrap.");
13
11
  }
14
- // After requiring the bootstrap we can use $injector
15
12
  require(pathToBootstrap);
16
13
  const logFile = process.argv[3];
17
14
  const jsFilePath = process.argv[4];
@@ -35,7 +32,6 @@ catch (err) {
35
32
  const logMessage = (msg, type) => {
36
33
  fileLogService.logData({ message: `[${uniqueId}] ${msg}`, type });
37
34
  };
38
- /* tslint:disable:no-floating-promises */
39
35
  (async () => {
40
36
  try {
41
37
  logMessage(`Requiring file ${jsFilePath}`);
@@ -47,13 +43,11 @@ const logMessage = (msg, type) => {
47
43
  logMessage(`Finished execution with data: ${JSON.stringify(data)} to the default function exported by currently required file ${jsFilePath}`);
48
44
  }
49
45
  catch (err) {
50
- logMessage(`Unable to execute action of file ${jsFilePath} when passed data is ${JSON.stringify(data)}. Error is: ${err}.`, "Error" /* FileLogMessageType.Error */);
46
+ logMessage(`Unable to execute action of file ${jsFilePath} when passed data is ${JSON.stringify(data)}. Error is: ${err}.`, "Error");
51
47
  }
52
48
  }
53
49
  }
54
50
  catch (err) {
55
- logMessage(`Unable to require file: ${jsFilePath}. Error is: ${err}.`, "Error" /* FileLogMessageType.Error */);
51
+ logMessage(`Unable to require file: ${jsFilePath}. Error is: ${err}.`, "Error");
56
52
  }
57
53
  })();
58
- /* tslint:enable:no-floating-promises */
59
- //# sourceMappingURL=cleanup-js-subprocess.js.map
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // NOTE: This file is used to clean up resources used by CLI, when the CLI is killed.
4
- // The instances here are not shared with the ones in main CLI process.
5
3
  const fs = require("fs");
6
4
  const path = require("path");
7
5
  const shelljs = require("shelljs");
@@ -13,7 +11,6 @@ if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
13
11
  throw new Error("Invalid path to bootstrap.");
14
12
  }
15
13
  const logFile = process.argv[3];
16
- // After requiring the bootstrap we can use $injector
17
14
  require(pathToBootstrap);
18
15
  const fileLogService = yok_1.injector.resolve(file_log_service_1.FileLogService, {
19
16
  logFile,
@@ -66,7 +63,7 @@ const executeJSCleanup = async (jsCommand) => {
66
63
  catch (err) {
67
64
  fileLogService.logData({
68
65
  message: `Unable to execute action for file ${jsCommand.filePath} with data ${JSON.stringify(jsCommand.data)}. Error is: ${err}.`,
69
- type: "Error" /* FileLogMessageType.Error */,
66
+ type: "Error",
70
67
  });
71
68
  }
72
69
  };
@@ -91,7 +88,7 @@ const executeCleanup = async () => {
91
88
  catch (err) {
92
89
  fileLogService.logData({
93
90
  message: `Unable to execute command: ${JSON.stringify(commandInfo)}. Error is: ${err}.`,
94
- type: "Error" /* FileLogMessageType.Error */,
91
+ type: "Error",
95
92
  });
96
93
  }
97
94
  }
@@ -105,7 +102,7 @@ const executeCleanup = async () => {
105
102
  catch (err) {
106
103
  fileLogService.logData({
107
104
  message: `Unable to delete files: ${JSON.stringify(filesToDelete)}. Error is: ${err}.`,
108
- type: "Error" /* FileLogMessageType.Error */,
105
+ type: "Error",
109
106
  });
110
107
  }
111
108
  }
@@ -227,36 +224,36 @@ process.on("message", async (cleanupProcessMessage) => {
227
224
  message: `cleanup-process received message of type: ${JSON.stringify(cleanupProcessMessage)}`,
228
225
  });
229
226
  switch (cleanupProcessMessage.messageType) {
230
- case "AddCleanCommand" /* CleanupProcessMessage.AddCleanCommand */:
227
+ case "AddCleanCommand":
231
228
  addCleanupAction(cleanupProcessMessage.commandInfo);
232
229
  break;
233
- case "RemoveCleanCommand" /* CleanupProcessMessage.RemoveCleanCommand */:
230
+ case "RemoveCleanCommand":
234
231
  removeCleanupAction(cleanupProcessMessage.commandInfo);
235
232
  break;
236
- case "AddRequest" /* CleanupProcessMessage.AddRequest */:
233
+ case "AddRequest":
237
234
  addRequest(cleanupProcessMessage.requestInfo);
238
235
  break;
239
- case "RemoveRequest" /* CleanupProcessMessage.RemoveRequest */:
236
+ case "RemoveRequest":
240
237
  removeRequest(cleanupProcessMessage.requestInfo);
241
238
  break;
242
- case "AddDeleteFileAction" /* CleanupProcessMessage.AddDeleteFileAction */:
239
+ case "AddDeleteFileAction":
243
240
  addDeleteAction(cleanupProcessMessage.filePath);
244
241
  break;
245
- case "RemoveDeleteFileAction" /* CleanupProcessMessage.RemoveDeleteFileAction */:
242
+ case "RemoveDeleteFileAction":
246
243
  removeDeleteAction(cleanupProcessMessage.filePath);
247
244
  break;
248
- case "AddJSFileToRequire" /* CleanupProcessMessage.AddJSFileToRequire */:
245
+ case "AddJSFileToRequire":
249
246
  const jsCleanupMessage = cleanupProcessMessage;
250
247
  addJSFile(jsCleanupMessage.jsCommand);
251
248
  break;
252
- case "RemoveJSFileToRequire" /* CleanupProcessMessage.RemoveJSFileToRequire */:
249
+ case "RemoveJSFileToRequire":
253
250
  const msgToRemove = cleanupProcessMessage;
254
251
  removeJSFile(msgToRemove.jsCommand);
255
252
  break;
256
253
  default:
257
254
  fileLogService.logData({
258
255
  message: `Unable to handle message of type ${cleanupProcessMessage.messageType}. Full message is ${JSON.stringify(cleanupProcessMessage)}`,
259
- type: "Error" /* FileLogMessageType.Error */,
256
+ type: "Error",
260
257
  });
261
258
  break;
262
259
  }
@@ -270,7 +267,6 @@ process.on("disconnect", async () => {
270
267
  process.exit();
271
268
  });
272
269
  fileLogService.logData({
273
- message: `cleanup-process will send ${"ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */} message`,
270
+ message: `cleanup-process will send ${"ProcessReadyToReceive"} message`,
274
271
  });
275
- process.send("ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */);
276
- //# sourceMappingURL=cleanup-process.js.map
272
+ process.send("ProcessReadyToReceive");
@@ -11,11 +11,10 @@ class FileLogService {
11
11
  logData(fileLoggingMessage) {
12
12
  if (this.logFile && fileLoggingMessage && fileLoggingMessage.message) {
13
13
  fileLoggingMessage.type =
14
- fileLoggingMessage.type || "Info" /* FileLogMessageType.Info */;
14
+ fileLoggingMessage.type || "Info";
15
15
  const formattedDate = (0, helpers_1.getFixedLengthDateString)();
16
16
  this.$fs.appendFile(this.logFile, `[${formattedDate}] [${fileLoggingMessage.type}] ${fileLoggingMessage.message}${os_1.EOL}`);
17
17
  }
18
18
  }
19
19
  }
20
20
  exports.FileLogService = FileLogService;
21
- //# sourceMappingURL=file-log-service.js.map
@@ -47,4 +47,3 @@ class DevicePathProvider {
47
47
  }
48
48
  exports.DevicePathProvider = DevicePathProvider;
49
49
  yok_1.injector.register("devicePathProvider", DevicePathProvider);
50
- //# sourceMappingURL=device-path-provider.js.map
@@ -76,7 +76,6 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
76
76
  const existingWebProxy = this.deviceWebServers[`${device.deviceInfo.identifier}-${appId}`];
77
77
  const result = existingWebProxy ||
78
78
  (await this.addWebSocketProxy(device, appId, projectName, projectDir));
79
- // TODO: do not remove till VSCode waits for this message in order to reattach
80
79
  this.$logger.info("Opened localhost " + result.options.port);
81
80
  return result;
82
81
  }
@@ -87,13 +86,8 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
87
86
  if (existingServer) {
88
87
  this.$errors.fail(`Web socket proxy is already running for device '${device.deviceInfo.identifier}' and app '${appId}'`);
89
88
  }
90
- // NOTE: We will try to provide command line options to select ports, at least on the localhost.
91
89
  const localPort = await this.$net.getAvailablePortInRange(41000);
92
90
  this.$logger.info("\nSetting up debugger proxy...\nPress Ctrl + C to terminate, or disconnect.\n");
93
- // NB: When the inspector frontend connects we might not have connected to the inspector backend yet.
94
- // That's why we use the verifyClient callback of the websocket server to stall the upgrade request until we connect.
95
- // We store the socket that connects us to the device in the upgrade request object itself and later on retrieve it
96
- // in the connection callback.
97
91
  let currentAppSocket = null;
98
92
  let currentWebSocket = null;
99
93
  const server = new ws.Server({
@@ -206,4 +200,3 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
206
200
  }
207
201
  exports.AppDebugSocketProxyFactory = AppDebugSocketProxyFactory;
208
202
  yok_1.injector.register("appDebugSocketProxyFactory", AppDebugSocketProxyFactory);
209
- //# sourceMappingURL=app-debug-socket-proxy-factory.js.map
@@ -6,8 +6,6 @@ const constants_1 = require("../../common/constants");
6
6
  const yok_1 = require("../../common/yok");
7
7
  class IOSNotification extends events_1.EventEmitter {
8
8
  getAttachRequest(appId, deviceId) {
9
- // It could be too early to emit this event, but we rely that if you construct attach request,
10
- // you will execute it immediately.
11
9
  this.emit(constants_1.ATTACH_REQUEST_EVENT_NAME, { deviceId, appId });
12
10
  return this.formatNotification(IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME, appId);
13
11
  }
@@ -30,4 +28,3 @@ IOSNotification.APP_REFRESH_STARTED_NOTIFICATION_NAME = "AppRefreshStarted";
30
28
  IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME = "AttachRequest";
31
29
  IOSNotification.READY_FOR_ATTACH_NOTIFICATION_NAME = "ReadyForAttach";
32
30
  yok_1.injector.register("iOSNotification", IOSNotification);
33
- //# sourceMappingURL=notification.js.map
@@ -25,8 +25,6 @@ class IOSSocketRequestExecutor {
25
25
  async executeRequest(mainRequestName, successfulyExecutedNotificationName, appId, deviceId, timeout) {
26
26
  let isSuccessful = false;
27
27
  try {
28
- // We should create this promise here because we need to send the ObserveNotification on the device
29
- // before we send the PostNotification.
30
28
  const socket = await this.$iOSNotificationService.postNotification(deviceId, successfulyExecutedNotificationName, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
31
29
  const notificationPromise = this.$iOSNotificationService.awaitNotification(deviceId, +socket, timeout);
32
30
  await this.$iOSNotificationService.postNotification(deviceId, mainRequestName);
@@ -41,4 +39,3 @@ class IOSSocketRequestExecutor {
41
39
  }
42
40
  exports.IOSSocketRequestExecutor = IOSSocketRequestExecutor;
43
41
  yok_1.injector.register("iOSSocketRequestExecutor", IOSSocketRequestExecutor);
44
- //# sourceMappingURL=socket-request-executor.js.map
@@ -22,7 +22,7 @@ class AndroidBundleValidatorHelper extends version_validator_helper_1.VersionVal
22
22
  }
23
23
  validateRuntimeVersion(projectData) {
24
24
  if (this.$options.aab) {
25
- const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android" /* PlatformTypes.android */);
25
+ const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android");
26
26
  const androidRuntimeVersion = runtimePackage
27
27
  ? runtimePackage.version
28
28
  : "";
@@ -50,4 +50,3 @@ exports.AndroidBundleValidatorHelper = AndroidBundleValidatorHelper;
50
50
  AndroidBundleValidatorHelper.MIN_RUNTIME_VERSION = "5.0.0";
51
51
  AndroidBundleValidatorHelper.MIN_ANDROID_WITH_AAB_SUPPORT = "4.4.0";
52
52
  yok_1.injector.register("androidBundleValidatorHelper", AndroidBundleValidatorHelper);
53
- //# sourceMappingURL=android-bundle-validator-helper.js.map
@@ -63,4 +63,3 @@ class DeployCommandHelper {
63
63
  }
64
64
  exports.DeployCommandHelper = DeployCommandHelper;
65
65
  yok_1.injector.register("deployCommandHelper", DeployCommandHelper);
66
- //# sourceMappingURL=deploy-command-helper.js.map
@@ -9,8 +9,7 @@ class KeyCommandHelper {
9
9
  this.overrides = {};
10
10
  this.onKeyPressed = async (data) => {
11
11
  const key = data.toString();
12
- // Allow Ctrl + C always.
13
- if (this.keyCommandExecutionBlocked && key !== "\u0003" /* SpecialKeys.CtrlC */)
12
+ if (this.keyCommandExecutionBlocked && key !== "\u0003")
14
13
  return;
15
14
  try {
16
15
  const exists = yok_1.injector.getRegisteredKeyCommandsNames().includes(key);
@@ -33,7 +32,7 @@ class KeyCommandHelper {
33
32
  return;
34
33
  }
35
34
  }
36
- if (keyCommand.key !== "\u0003" /* SpecialKeys.CtrlC */) {
35
+ if (keyCommand.key !== "\u0003") {
37
36
  const line = ` ${color_1.color.dim("→")} ${color_1.color.bold(keyCommand.key)} — ${keyCommand.description}`;
38
37
  const lineLength = (0, node_util_1.stripVTControlCharacters)(line).length - 1;
39
38
  console.log(color_1.color.dim(` ┌${"─".repeat(lineLength)}┐`));
@@ -115,4 +114,3 @@ class KeyCommandHelper {
115
114
  }
116
115
  exports.default = KeyCommandHelper;
117
116
  yok_1.injector.register("keyCommandHelper", KeyCommandHelper);
118
- //# sourceMappingURL=key-command-helper.js.map
@@ -25,7 +25,6 @@ class LiveSyncCommandHelper {
25
25
  get $platformsDataService() {
26
26
  return this.$injector.resolve("platformsDataService");
27
27
  }
28
- // TODO: Remove this and replace it with buildData
29
28
  getLiveSyncData(projectDir) {
30
29
  const liveSyncInfo = {
31
30
  projectDir,
@@ -55,7 +54,6 @@ class LiveSyncCommandHelper {
55
54
  return devices;
56
55
  }
57
56
  async createDeviceDescriptors(devices, platform, additionalOptions) {
58
- // Now let's take data for each device:
59
57
  const deviceDescriptors = devices.map((d) => {
60
58
  const outputPath = additionalOptions &&
61
59
  additionalOptions.getOutputDirectory &&
@@ -135,7 +133,7 @@ class LiveSyncCommandHelper {
135
133
  const remainingDevicesToSync = devices.map((d) => d.deviceInfo.identifier);
136
134
  _.remove(remainingDevicesToSync, (d) => d === data.deviceIdentifier);
137
135
  if (remainingDevicesToSync.length === 0 && !data.keepProcessAlive) {
138
- process.exit(134 /* ErrorCodes.ALL_DEVICES_DISCONNECTED */);
136
+ process.exit(134);
139
137
  }
140
138
  });
141
139
  }
@@ -205,4 +203,3 @@ class LiveSyncCommandHelper {
205
203
  }
206
204
  exports.LiveSyncCommandHelper = LiveSyncCommandHelper;
207
205
  yok_1.injector.register("liveSyncCommandHelper", LiveSyncCommandHelper);
208
- //# sourceMappingURL=livesync-command-helper.js.map
@@ -34,4 +34,3 @@ NetworkConnectivityValidator.DNS_LOOKUP_URL = "play.nativescript.org";
34
34
  NetworkConnectivityValidator.NO_INTERNET_ERROR_CODE = "ENOTFOUND";
35
35
  NetworkConnectivityValidator.NO_INTERNET_ERROR_MESSAGE = "No internet connection. Check your internet settings and try again.";
36
36
  yok_1.injector.register("networkConnectivityValidator", NetworkConnectivityValidator);
37
- //# sourceMappingURL=network-connectivity-validator.js.map
@@ -11,7 +11,7 @@ class OptionsTracker {
11
11
  async trackOptions(options) {
12
12
  const trackObject = this.getTrackObject(options);
13
13
  await this.$analyticsService.trackEventActionInGoogleAnalytics({
14
- action: "Options" /* TrackActionNames.Options */,
14
+ action: "Options",
15
15
  additionalData: JSON.stringify(trackObject),
16
16
  });
17
17
  }
@@ -58,7 +58,7 @@ class OptionsTracker {
58
58
  return true;
59
59
  }
60
60
  const optionDef = options[key];
61
- if (optionDef && optionDef.type === "boolean" /* OptionType.Boolean */) {
61
+ if (optionDef && optionDef.type === "boolean") {
62
62
  if ((optionDef.default !== true && value === false) ||
63
63
  (optionDef.default === true && value === true)) {
64
64
  return true;
@@ -75,4 +75,3 @@ OptionsTracker.PRIVATE_REPLACE_VALUE = "private";
75
75
  OptionsTracker.PATH_REPLACE_VALUE = "_localpath";
76
76
  OptionsTracker.SIZE_EXEEDED_REPLACE_VALUE = "sizeExceeded";
77
77
  yok_1.injector.register("optionsTracker", OptionsTracker);
78
- //# sourceMappingURL=options-track-helper.js.map
@@ -4,4 +4,3 @@ exports.resolvePackageJSONPath = exports.resolvePackagePath = void 0;
4
4
  const resolve_package_path_1 = require("@rigor789/resolve-package-path");
5
5
  Object.defineProperty(exports, "resolvePackagePath", { enumerable: true, get: function () { return resolve_package_path_1.resolvePackagePath; } });
6
6
  Object.defineProperty(exports, "resolvePackageJSONPath", { enumerable: true, get: function () { return resolve_package_path_1.resolvePackageJSONPath; } });
7
- //# sourceMappingURL=package-path-helper.js.map
@@ -70,10 +70,6 @@ class PlatformCommandHelper {
70
70
  const platformDir = path.join(projectData.platformsDir, platform.toLowerCase());
71
71
  this.$fs.deleteDirectory(platformDir);
72
72
  await this.$packageInstallationManager.uninstall(platformData.frameworkPackageName, projectData.projectDir);
73
- // this.$projectDataService.removeNSProperty(
74
- // projectData.projectDir,
75
- // platformData.frameworkPackageName
76
- // );
77
73
  this.$logger.info(`Platform ${platform} successfully removed.`);
78
74
  }
79
75
  catch (err) {
@@ -112,7 +108,7 @@ class PlatformCommandHelper {
112
108
  const installedPlatforms = this.getInstalledPlatforms(projectData);
113
109
  return _.filter(this.$mobileHelper.platformNames, (p) => {
114
110
  return (installedPlatforms.indexOf(p) < 0 &&
115
- this.$platformValidationService.isPlatformSupportedForOS(p, projectData)); // Only those not already installed
111
+ this.$platformValidationService.isPlatformSupportedForOS(p, projectData));
116
112
  });
117
113
  }
118
114
  getPreparedPlatforms(projectData) {
@@ -136,7 +132,7 @@ class PlatformCommandHelper {
136
132
  return true;
137
133
  }
138
134
  return (prepareInfo.nativePlatformStatus !==
139
- "1" /* constants.NativePlatformStatus.requiresPlatformAdd */);
135
+ "1");
140
136
  }
141
137
  async updatePlatform(platform, version, projectData) {
142
138
  const platformData = this.$platformsDataService.getPlatformData(platform, projectData);
@@ -182,4 +178,3 @@ class PlatformCommandHelper {
182
178
  }
183
179
  exports.PlatformCommandHelper = PlatformCommandHelper;
184
180
  yok_1.injector.register("platformCommandHelper", PlatformCommandHelper);
185
- //# sourceMappingURL=platform-command-helper.js.map
@@ -23,4 +23,3 @@ class VersionValidatorHelper {
23
23
  }
24
24
  }
25
25
  exports.VersionValidatorHelper = VersionValidatorHelper;
26
- //# sourceMappingURL=version-validator-helper.js.map
@@ -13,10 +13,9 @@ yok_1.injector.requireKeyCommand("R", path);
13
13
  yok_1.injector.requireKeyCommand("w", path);
14
14
  yok_1.injector.requireKeyCommand("c", path);
15
15
  yok_1.injector.requireKeyCommand("n", path);
16
- yok_1.injector.requireKeyCommand("?" /* SpecialKeys.QuestionMark */, path);
17
- yok_1.injector.requireKeyCommand("\u0003" /* SpecialKeys.CtrlC */, path);
16
+ yok_1.injector.requireKeyCommand("?", path);
17
+ yok_1.injector.requireKeyCommand("\u0003", path);
18
18
  yok_1.injector.requireCommand("open|ios", path);
19
19
  yok_1.injector.requireCommand("open|android", path);
20
20
  yok_1.injector.requireCommand("open|visionos", path);
21
21
  yok_1.injector.requireCommand("open|vision", path);
22
- //# sourceMappingURL=bootstrap.js.map
@@ -294,7 +294,7 @@ class ShiftR {
294
294
  exports.ShiftR = ShiftR;
295
295
  class CtrlC {
296
296
  constructor() {
297
- this.key = "\u0003" /* SpecialKeys.CtrlC */;
297
+ this.key = "\u0003";
298
298
  this.platform = "all";
299
299
  this.group = "Development Workflow";
300
300
  this.willBlockKeyCommandExecution = false;
@@ -365,7 +365,7 @@ exports.N = N;
365
365
  class QuestionMark {
366
366
  constructor($keyCommandHelper) {
367
367
  this.$keyCommandHelper = $keyCommandHelper;
368
- this.key = "?" /* SpecialKeys.QuestionMark */;
368
+ this.key = "?";
369
369
  this.platform = "all";
370
370
  this.description = "Show this help";
371
371
  this.group = "Development Workflow";
@@ -405,10 +405,9 @@ yok_1.injector.registerKeyCommand("w", W);
405
405
  yok_1.injector.registerKeyCommand("c", C);
406
406
  yok_1.injector.registerKeyCommand("A", ShiftA);
407
407
  yok_1.injector.registerKeyCommand("n", N);
408
- yok_1.injector.registerKeyCommand("?" /* SpecialKeys.QuestionMark */, QuestionMark);
409
- yok_1.injector.registerKeyCommand("\u0003" /* SpecialKeys.CtrlC */, CtrlC);
408
+ yok_1.injector.registerKeyCommand("?", QuestionMark);
409
+ yok_1.injector.registerKeyCommand("\u0003", CtrlC);
410
410
  yok_1.injector.registerCommand("open|ios", OpenIOSCommand);
411
411
  yok_1.injector.registerCommand("open|visionos", OpenVisionOSCommand);
412
412
  yok_1.injector.registerCommand("open|vision", OpenVisionOSCommand);
413
413
  yok_1.injector.registerCommand("open|android", OpenAndroidCommand);
414
- //# sourceMappingURL=index.js.map
@@ -3,10 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const yok_1 = require("./common/yok");
4
4
  require("./bootstrap");
5
5
  yok_1.injector.overrideAlreadyRequiredModule = true;
6
- // Temporary!!! Should not require appbuilder's entry point of mobile-cli-lib,
7
- // but once we separate logics in mobile-cli-lib, we should be able to require only specific bootstrap.
8
- // Use this hack for now, as this will allow requiring {N} CLI as library directly and executing some device specific operations.
9
6
  yok_1.injector.requirePublicClass("deviceEmitter", "./common/mobile/device-emitter");
10
7
  yok_1.injector.requirePublicClass("deviceLogProvider", "./common/mobile/device-log-emitter");
11
8
  yok_1.injector.resolve("staticConfig").disableAnalytics = true;
12
- //# sourceMappingURL=nativescript-cli-lib-bootstrap.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const yok_1 = require("./common/yok");
4
4
  require("./nativescript-cli-lib-bootstrap");
5
5
  module.exports = yok_1.injector.publicApi;
6
- //# sourceMappingURL=nativescript-cli-lib.js.map
@@ -9,7 +9,7 @@ const errors_1 = require("./common/errors");
9
9
  const helpers_1 = require("./common/helpers");
10
10
  const yok_1 = require("./common/yok");
11
11
  const color_1 = require("./color");
12
- (0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120 /* ErrorCodes.UNCAUGHT */));
12
+ (0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120));
13
13
  const logger = yok_1.injector.resolve("logger");
14
14
  exports.originalProcessOn = process.on.bind(process);
15
15
  process.on = (event, listener) => {
@@ -23,10 +23,8 @@ process.on = (event, listener) => {
23
23
  return (0, exports.originalProcessOn)(event, listener);
24
24
  }
25
25
  };
26
- /* tslint:disable:no-floating-promises */
27
26
  (async () => {
28
27
  if (process.argv.includes("--get-yargs-completions")) {
29
- // This is a special case when we want to get the yargs completions as fast as possible...
30
28
  yok_1.injector.resolve("$options");
31
29
  return;
32
30
  }
@@ -43,13 +41,6 @@ process.on = (event, listener) => {
43
41
  logger.trace("Unable to load extensions. Error is: ", err);
44
42
  }
45
43
  const commandDispatcher = yok_1.injector.resolve("commandDispatcher");
46
- // unused...
47
- // const messages: IMessagesService = injector.resolve("$messagesService");
48
- // messages.pathsToMessageJsonFiles = [
49
- // /* Place client-specific json message file paths here */
50
- // ];
51
44
  await commandDispatcher.dispatchCommand();
52
45
  yok_1.injector.dispose();
53
46
  })();
54
- /* tslint:enable:no-floating-promises */
55
- //# sourceMappingURL=nativescript-cli.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const pbxprojDomXcodeModule = require("pbxproj-dom/xcode");
4
4
  const yok_1 = require("../common/yok");
5
5
  yok_1.injector.register("pbxprojDomXcode", pbxprojDomXcodeModule);
6
- //# sourceMappingURL=pbxproj-dom-xcode.js.map
package/lib/node/xcode.js CHANGED
@@ -5,4 +5,3 @@ const xcode = require("nativescript-dev-xcode");
5
5
  exports.xcode = xcode;
6
6
  const yok_1 = require("../common/yok");
7
7
  yok_1.injector.register("xcode", xcode);
8
- //# sourceMappingURL=xcode.js.map
@@ -37,12 +37,8 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
37
37
  }
38
38
  params = params.concat(flags);
39
39
  const cwd = pathToSave;
40
- // Npm creates `etc` directory in installation dir when --prefix is passed
41
- // https://github.com/npm/npm/issues/11486
42
- // we should delete it if it was created because of us
43
40
  const etcDirectoryLocation = (0, path_1.join)(cwd, "etc");
44
41
  const etcExistsPriorToInstallation = this.$fs.exists(etcDirectoryLocation);
45
- //TODO: plamen5kov: workaround is here for a reason (remove whole file later)
46
42
  if (config.path) {
47
43
  let relativePathFromCwdToSource = "";
48
44
  if (config.frameworkPath) {
@@ -58,13 +54,9 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
58
54
  }
59
55
  catch (err) {
60
56
  if (err.message && err.message.indexOf("EPEERINVALID") !== -1) {
61
- // Not installed peer dependencies are treated by npm 2 as errors, but npm 3 treats them as warnings.
62
- // We'll show them as warnings and let the user install them in case they are needed.
63
57
  this.$logger.warn(err.message);
64
58
  }
65
59
  else {
66
- // All other errors should be handled by the caller code.
67
- // Revert package.json contents to preserve valid state
68
60
  this.$fs.writeJson(packageJsonPath, jsonContentBefore);
69
61
  throw err;
70
62
  }
@@ -86,7 +78,7 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
86
78
  return this.$childProcess.exec(`npm search ${filter.join(" ")} ${flags}`);
87
79
  }
88
80
  async view(packageName, config) {
89
- const wrappedConfig = _.extend({}, config, { json: true }); // always require view response as JSON
81
+ const wrappedConfig = _.extend({}, config, { json: true });
90
82
  const flags = this.getFlagsString(wrappedConfig, false);
91
83
  let viewResult;
92
84
  try {
@@ -103,7 +95,6 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
103
95
  }
104
96
  }
105
97
  async searchNpms(keyword) {
106
- // TODO: Fix the generation of url - in case it contains @ or / , the call may fail.
107
98
  const httpRequestResult = await this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
108
99
  const result = JSON.parse(httpRequestResult.body);
109
100
  return result;
@@ -140,4 +131,3 @@ __decorate([
140
131
  (0, decorators_1.cache)()
141
132
  ], NodePackageManager.prototype, "getCachePath", null);
142
133
  yok_1.injector.register("npm", NodePackageManager);
143
- //# sourceMappingURL=node-package-manager.js.map