nativescript 9.0.4-dev.0 → 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 +0 -1
  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 +1 -100
  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
@@ -6,7 +6,6 @@ const shelljs = require("shelljs");
6
6
  shelljs.config.silent = true;
7
7
  shelljs.config.fatal = true;
8
8
  if (process.platform === "win32") {
9
- // Later versions of shelljs do not process globs with \ path delimiters correctly, for windows change to /
10
9
  const realcp = shelljs.cp;
11
10
  shelljs.cp = (...args) => {
12
11
  if (args.length === 3) {
@@ -38,7 +37,7 @@ const errors_1 = require("./common/errors");
38
37
  const helpers_1 = require("./common/helpers");
39
38
  const yok_1 = require("./common/yok");
40
39
  const color_1 = require("./color");
41
- (0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120 /* ErrorCodes.UNCAUGHT */));
40
+ (0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120));
42
41
  const logger = yok_1.injector.resolve("logger");
43
42
  exports.originalProcessOn = process.on.bind(process);
44
43
  process.on = (event, listener) => {
@@ -52,10 +51,8 @@ process.on = (event, listener) => {
52
51
  return (0, exports.originalProcessOn)(event, listener);
53
52
  }
54
53
  };
55
- /* tslint:disable:no-floating-promises */
56
54
  (async () => {
57
55
  if (process.argv.includes("--get-yargs-completions")) {
58
- // This is a special case when we want to get the yargs completions as fast as possible...
59
56
  yok_1.injector.resolve("$options");
60
57
  return;
61
58
  }
@@ -72,13 +69,6 @@ process.on = (event, listener) => {
72
69
  logger.trace("Unable to load extensions. Error is: ", err);
73
70
  }
74
71
  const commandDispatcher = yok_1.injector.resolve("commandDispatcher");
75
- // unused...
76
- // const messages: IMessagesService = injector.resolve("$messagesService");
77
- // messages.pathsToMessageJsonFiles = [
78
- // /* Place client-specific json message file paths here */
79
- // ];
80
72
  await commandDispatcher.dispatchCommand();
81
73
  yok_1.injector.dispose();
82
74
  })();
83
- /* tslint:enable:no-floating-promises */
84
- //# 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
package/lib/options.js CHANGED
@@ -14,7 +14,6 @@ class Options {
14
14
  this.setArgv();
15
15
  }
16
16
  this.argv.bundle = "webpack";
17
- // Check if the user has explicitly provide --hmr and --release options from command line
18
17
  if (this.initialArgv.release && this.initialArgv.hmr) {
19
18
  this.$errors.fail("The options --release and --hmr cannot be used simultaneously.");
20
19
  }
@@ -22,8 +21,6 @@ class Options {
22
21
  this.argv.hmr = !this.argv.release;
23
22
  }
24
23
  if (this.argv.debugBrk) {
25
- // we cannot use HMR along with debug-brk because we have to restart the app
26
- // on each livesync in order to stop and allow debugging on app start
27
24
  this.argv.hmr = false;
28
25
  }
29
26
  if (this.argv.justlaunch) {
@@ -41,18 +38,17 @@ class Options {
41
38
  "timeout",
42
39
  "_",
43
40
  "$0",
44
- ]; // These options shouldn't be validated
41
+ ];
45
42
  this.globalOptions = {
46
- log: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
47
- verbose: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
48
- version: { type: "boolean" /* OptionType.Boolean */, alias: "v", hasSensitiveValue: false },
49
- help: { type: "boolean" /* OptionType.Boolean */, alias: "h", hasSensitiveValue: false },
50
- profileDir: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
51
- analyticsClient: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
52
- path: { type: "string" /* OptionType.String */, alias: "p", hasSensitiveValue: true },
53
- config: { type: "string" /* OptionType.String */, alias: "c", hasSensitiveValue: true },
54
- // This will parse all non-hyphenated values as strings.
55
- _: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
43
+ log: { type: "string", hasSensitiveValue: false },
44
+ verbose: { type: "boolean", hasSensitiveValue: false },
45
+ version: { type: "boolean", alias: "v", hasSensitiveValue: false },
46
+ help: { type: "boolean", alias: "h", hasSensitiveValue: false },
47
+ profileDir: { type: "string", hasSensitiveValue: true },
48
+ analyticsClient: { type: "string", hasSensitiveValue: false },
49
+ path: { type: "string", alias: "p", hasSensitiveValue: true },
50
+ config: { type: "string", alias: "c", hasSensitiveValue: true },
51
+ _: { type: "string", hasSensitiveValue: false },
56
52
  };
57
53
  this.options = _.extend({}, this.commonOptions, this.globalOptions);
58
54
  this.setArgv();
@@ -68,164 +64,163 @@ class Options {
68
64
  }
69
65
  get commonOptions() {
70
66
  return {
71
- ipa: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
72
- frameworkPath: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
73
- frameworkName: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
74
- framework: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
75
- frameworkVersion: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
76
- forDevice: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
67
+ ipa: { type: "string", hasSensitiveValue: true },
68
+ frameworkPath: { type: "string", hasSensitiveValue: true },
69
+ frameworkName: { type: "string", hasSensitiveValue: false },
70
+ framework: { type: "string", hasSensitiveValue: false },
71
+ frameworkVersion: { type: "string", hasSensitiveValue: false },
72
+ forDevice: { type: "boolean", hasSensitiveValue: false },
77
73
  iCloudContainerEnvironment: {
78
- type: "string" /* OptionType.String */,
74
+ type: "string",
79
75
  hasSensitiveValue: false,
80
76
  },
81
- provision: { type: "object" /* OptionType.Object */, hasSensitiveValue: true },
77
+ provision: { type: "object", hasSensitiveValue: true },
82
78
  client: {
83
- type: "boolean" /* OptionType.Boolean */,
79
+ type: "boolean",
84
80
  default: true,
85
81
  hasSensitiveValue: false,
86
82
  },
87
- env: { type: "object" /* OptionType.Object */, hasSensitiveValue: false },
88
- production: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
89
- debugTransport: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
90
- keyStorePath: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
91
- keyStorePassword: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
92
- keyStoreAlias: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
83
+ env: { type: "object", hasSensitiveValue: false },
84
+ production: { type: "boolean", hasSensitiveValue: false },
85
+ debugTransport: { type: "boolean", hasSensitiveValue: false },
86
+ keyStorePath: { type: "string", hasSensitiveValue: true },
87
+ keyStorePassword: { type: "string", hasSensitiveValue: true },
88
+ keyStoreAlias: { type: "string", hasSensitiveValue: true },
93
89
  keyStoreAliasPassword: {
94
- type: "string" /* OptionType.String */,
90
+ type: "string",
95
91
  hasSensitiveValue: true,
96
92
  },
97
- ignoreScripts: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
98
- disableNpmInstall: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
99
- compileSdk: { type: "number" /* OptionType.Number */, hasSensitiveValue: false },
100
- port: { type: "number" /* OptionType.Number */, hasSensitiveValue: false },
101
- copyTo: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
102
- js: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
103
- javascript: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
104
- ng: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
105
- angular: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
106
- react: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
107
- reactjs: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
108
- vue: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
109
- vuejs: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
110
- svelte: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
111
- vision: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
112
- "vision-ng": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
113
- "vision-react": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
114
- "vision-solid": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
115
- "vision-svelte": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
116
- "vision-vue": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
117
- tsc: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
118
- ts: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
119
- typescript: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
120
- yarn: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
121
- yarn2: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
122
- pnpm: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
123
- androidTypings: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
124
- bundle: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
125
- all: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
126
- teamId: { type: "object" /* OptionType.Object */, hasSensitiveValue: true },
127
- chrome: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
128
- inspector: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
129
- clean: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
93
+ ignoreScripts: { type: "boolean", hasSensitiveValue: false },
94
+ disableNpmInstall: { type: "boolean", hasSensitiveValue: false },
95
+ compileSdk: { type: "number", hasSensitiveValue: false },
96
+ port: { type: "number", hasSensitiveValue: false },
97
+ copyTo: { type: "string", hasSensitiveValue: true },
98
+ js: { type: "boolean", hasSensitiveValue: false },
99
+ javascript: { type: "boolean", hasSensitiveValue: false },
100
+ ng: { type: "boolean", hasSensitiveValue: false },
101
+ angular: { type: "boolean", hasSensitiveValue: false },
102
+ react: { type: "boolean", hasSensitiveValue: false },
103
+ reactjs: { type: "boolean", hasSensitiveValue: false },
104
+ vue: { type: "boolean", hasSensitiveValue: false },
105
+ vuejs: { type: "boolean", hasSensitiveValue: false },
106
+ svelte: { type: "boolean", hasSensitiveValue: false },
107
+ vision: { type: "boolean", hasSensitiveValue: false },
108
+ "vision-ng": { type: "boolean", hasSensitiveValue: false },
109
+ "vision-react": { type: "boolean", hasSensitiveValue: false },
110
+ "vision-solid": { type: "boolean", hasSensitiveValue: false },
111
+ "vision-svelte": { type: "boolean", hasSensitiveValue: false },
112
+ "vision-vue": { type: "boolean", hasSensitiveValue: false },
113
+ tsc: { type: "boolean", hasSensitiveValue: false },
114
+ ts: { type: "boolean", hasSensitiveValue: false },
115
+ typescript: { type: "boolean", hasSensitiveValue: false },
116
+ yarn: { type: "boolean", hasSensitiveValue: false },
117
+ yarn2: { type: "boolean", hasSensitiveValue: false },
118
+ pnpm: { type: "boolean", hasSensitiveValue: false },
119
+ androidTypings: { type: "boolean", hasSensitiveValue: false },
120
+ bundle: { type: "string", hasSensitiveValue: false },
121
+ all: { type: "boolean", hasSensitiveValue: false },
122
+ teamId: { type: "object", hasSensitiveValue: true },
123
+ chrome: { type: "boolean", hasSensitiveValue: false },
124
+ inspector: { type: "boolean", hasSensitiveValue: false },
125
+ clean: { type: "boolean", hasSensitiveValue: false },
130
126
  watch: {
131
- type: "boolean" /* OptionType.Boolean */,
127
+ type: "boolean",
132
128
  default: true,
133
129
  hasSensitiveValue: false,
134
130
  },
135
- background: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
136
- username: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
137
- pluginName: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
131
+ background: { type: "string", hasSensitiveValue: false },
132
+ username: { type: "string", hasSensitiveValue: true },
133
+ pluginName: { type: "string", hasSensitiveValue: false },
138
134
  includeTypeScriptDemo: {
139
- type: "string" /* OptionType.String */,
135
+ type: "string",
140
136
  hasSensitiveValue: false,
141
137
  },
142
- includeAngularDemo: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
138
+ includeAngularDemo: { type: "string", hasSensitiveValue: false },
143
139
  hmr: {
144
- type: "boolean" /* OptionType.Boolean */,
140
+ type: "boolean",
145
141
  hasSensitiveValue: false,
146
142
  default: true,
147
143
  },
148
144
  collection: {
149
- type: "string" /* OptionType.String */,
145
+ type: "string",
150
146
  alias: "c",
151
147
  hasSensitiveValue: false,
152
148
  },
153
- json: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
154
- avd: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
155
- // check not used
156
- config: { type: "array" /* OptionType.Array */, hasSensitiveValue: false },
149
+ json: { type: "boolean", hasSensitiveValue: false },
150
+ avd: { type: "string", hasSensitiveValue: true },
151
+ config: { type: "array", hasSensitiveValue: false },
157
152
  insecure: {
158
- type: "boolean" /* OptionType.Boolean */,
153
+ type: "boolean",
159
154
  alias: "k",
160
155
  hasSensitiveValue: false,
161
156
  },
162
- debug: { type: "boolean" /* OptionType.Boolean */, alias: "d", hasSensitiveValue: false },
163
- timeout: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
164
- device: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
165
- availableDevices: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
166
- appid: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
167
- geny: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
168
- debugBrk: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
169
- debugPort: { type: "number" /* OptionType.Number */, hasSensitiveValue: false },
170
- start: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
171
- stop: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
172
- ddi: { type: "string" /* OptionType.String */, hasSensitiveValue: true }, // the path to developer disk image
173
- justlaunch: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
174
- file: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
175
- force: { type: "boolean" /* OptionType.Boolean */, alias: "f", hasSensitiveValue: false },
176
- emulator: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
177
- simulator: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
178
- sdk: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
179
- template: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
180
- certificate: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
181
- certificatePassword: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
157
+ debug: { type: "boolean", alias: "d", hasSensitiveValue: false },
158
+ timeout: { type: "string", hasSensitiveValue: false },
159
+ device: { type: "string", hasSensitiveValue: true },
160
+ availableDevices: { type: "boolean", hasSensitiveValue: false },
161
+ appid: { type: "string", hasSensitiveValue: true },
162
+ geny: { type: "string", hasSensitiveValue: true },
163
+ debugBrk: { type: "boolean", hasSensitiveValue: false },
164
+ debugPort: { type: "number", hasSensitiveValue: false },
165
+ start: { type: "boolean", hasSensitiveValue: false },
166
+ stop: { type: "boolean", hasSensitiveValue: false },
167
+ ddi: { type: "string", hasSensitiveValue: true },
168
+ justlaunch: { type: "boolean", hasSensitiveValue: false },
169
+ file: { type: "string", hasSensitiveValue: true },
170
+ force: { type: "boolean", alias: "f", hasSensitiveValue: false },
171
+ emulator: { type: "boolean", hasSensitiveValue: false },
172
+ simulator: { type: "boolean", hasSensitiveValue: false },
173
+ sdk: { type: "string", hasSensitiveValue: false },
174
+ template: { type: "string", hasSensitiveValue: true },
175
+ certificate: { type: "string", hasSensitiveValue: true },
176
+ certificatePassword: { type: "string", hasSensitiveValue: true },
182
177
  release: {
183
- type: "boolean" /* OptionType.Boolean */,
178
+ type: "boolean",
184
179
  alias: "r",
185
180
  hasSensitiveValue: false,
186
181
  },
187
- markingMode: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
188
- var: { type: "object" /* OptionType.Object */, hasSensitiveValue: true },
189
- default: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
190
- count: { type: "number" /* OptionType.Number */, hasSensitiveValue: false },
191
- analyticsLogFile: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
192
- disableAnalytics: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
193
- cleanupLogFile: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
182
+ markingMode: { type: "boolean", hasSensitiveValue: false },
183
+ var: { type: "object", hasSensitiveValue: true },
184
+ default: { type: "boolean", hasSensitiveValue: false },
185
+ count: { type: "number", hasSensitiveValue: false },
186
+ analyticsLogFile: { type: "string", hasSensitiveValue: true },
187
+ disableAnalytics: { type: "boolean", hasSensitiveValue: false },
188
+ cleanupLogFile: { type: "string", hasSensitiveValue: true },
194
189
  hooks: {
195
- type: "boolean" /* OptionType.Boolean */,
190
+ type: "boolean",
196
191
  default: true,
197
192
  hasSensitiveValue: false,
198
193
  },
199
194
  link: {
200
- type: "boolean" /* OptionType.Boolean */,
195
+ type: "boolean",
201
196
  default: false,
202
197
  hasSensitiveValue: false,
203
198
  },
204
- gradlePath: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
205
- gradleArgs: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
206
- hostProjectPath: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
199
+ gradlePath: { type: "string", hasSensitiveValue: false },
200
+ gradleArgs: { type: "string", hasSensitiveValue: false },
201
+ hostProjectPath: { type: "string", hasSensitiveValue: false },
207
202
  hostProjectModuleName: {
208
- type: "string" /* OptionType.String */,
203
+ type: "string",
209
204
  hasSensitiveValue: false,
210
205
  default: constants_1.APP_FOLDER_NAME,
211
206
  },
212
- aab: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
213
- performance: { type: "object" /* OptionType.Object */, hasSensitiveValue: true },
207
+ aab: { type: "boolean", hasSensitiveValue: false },
208
+ performance: { type: "object", hasSensitiveValue: true },
214
209
  appleApplicationSpecificPassword: {
215
- type: "string" /* OptionType.String */,
210
+ type: "string",
216
211
  hasSensitiveValue: true,
217
212
  },
218
- appleSessionBase64: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
219
- jar: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
220
- aar: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
221
- filter: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
213
+ appleSessionBase64: { type: "string", hasSensitiveValue: true },
214
+ jar: { type: "string", hasSensitiveValue: true },
215
+ aar: { type: "string", hasSensitiveValue: true },
216
+ filter: { type: "string", hasSensitiveValue: true },
222
217
  git: {
223
- type: "boolean" /* OptionType.Boolean */,
218
+ type: "boolean",
224
219
  hasSensitiveValue: false,
225
220
  default: true,
226
221
  },
227
- dryRun: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
228
- uniqueBundle: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
222
+ dryRun: { type: "boolean", hasSensitiveValue: false },
223
+ uniqueBundle: { type: "boolean", hasSensitiveValue: false },
229
224
  };
230
225
  }
231
226
  get optionNames() {
@@ -243,7 +238,6 @@ class Options {
243
238
  parsed[optionName] = this.getOptionValue(optionName);
244
239
  }
245
240
  _.each(parsed, (value, originalOptionName) => {
246
- // when this.options are passed to yargs, it returns all of them and the ones that are not part of process.argv are set to undefined.
247
241
  if (value === undefined) {
248
242
  return;
249
243
  }
@@ -253,14 +247,14 @@ class Options {
253
247
  this.$errors.failWithHelp(`The option '${originalOptionName}' is not supported.`);
254
248
  }
255
249
  const optionType = this.getOptionType(optionName), optionValue = parsed[optionName];
256
- if (_.isArray(optionValue) && optionType !== "array" /* OptionType.Array */) {
250
+ if (_.isArray(optionValue) && optionType !== "array") {
257
251
  this.$errors.failWithHelp("The '%s' option requires a single value.", originalOptionName);
258
252
  }
259
- else if (optionType === "string" /* OptionType.String */ &&
253
+ else if (optionType === "string" &&
260
254
  helpers.isNullOrWhitespace(optionValue)) {
261
255
  this.$errors.failWithHelp("The option '%s' requires non-empty value.", originalOptionName);
262
256
  }
263
- else if (optionType === "array" /* OptionType.Array */ &&
257
+ else if (optionType === "array" &&
264
258
  optionValue.length === 0) {
265
259
  this.$errors.failWithHelp(`The option '${originalOptionName}' requires one or more values, separated by a space.`);
266
260
  }
@@ -288,16 +282,9 @@ class Options {
288
282
  }
289
283
  return true;
290
284
  }
291
- // If you pass value with dash, yargs adds it to yargs.argv in two ways:
292
- // with dash and without dash, replacing first symbol after it with its toUpper equivalent
293
- // ex, "$ <cli name> emulate android --profile-dir" will add profile-dir to yargs.argv as profile-dir and profileDir
294
- // IMPORTANT: In your code, it is better to use the value without dashes (profileDir in the example).
295
- // This way your code will work in case "$ <cli name> emulate android --profile-dir" or "$ <cli name> emulate android --profileDir" is used by user.
296
285
  getNonDashedOptionName(optionName) {
297
286
  const matchUpperCaseLetters = optionName.match(Options.NONDASHED_OPTION_REGEX);
298
287
  if (matchUpperCaseLetters) {
299
- // get here if option with upperCase letter is specified, for example profileDir
300
- // check if in knownOptions we have its kebabCase presentation
301
288
  const secondaryOptionName = matchUpperCaseLetters[1] +
302
289
  matchUpperCaseLetters[2].toUpperCase() +
303
290
  matchUpperCaseLetters[3] || "";
@@ -326,18 +313,15 @@ class Options {
326
313
  const args = argv._.slice(1);
327
314
  const commands = yok_1.injector
328
315
  .getRegisteredCommandsNames(false)
329
- .filter((c) => c != "/?"); // remove the /? command, looks weird... :D
316
+ .filter((c) => c != "/?");
330
317
  const currentDepth = args.length > 0 ? args.length - 1 : 0;
331
318
  const current = (_a = current_ !== null && current_ !== void 0 ? current_ : args[currentDepth]) !== null && _a !== void 0 ? _a : "";
332
- // split all commands into their components ie. "device|list" => ["device", "list"]
333
319
  const matchGroups = commands.map((c) => c.split("|"));
334
- // find all commands that match the current depth and all the previous args
335
320
  const possibleMatches = matchGroups.filter((group) => {
336
321
  return group.slice(0, currentDepth).every((g, i) => {
337
322
  return g === args[i] || args[i].at(0) === "-";
338
323
  });
339
324
  });
340
- // filter out duplicates
341
325
  const completions = [
342
326
  ...new Set(possibleMatches
343
327
  .map((match) => {
@@ -345,28 +329,21 @@ class Options {
345
329
  })
346
330
  .filter(Boolean)),
347
331
  ];
348
- // autocomplete long -- options
349
332
  if (current.startsWith("--")) {
350
333
  return this.optionNames.filter((o) => o !== "_").map((o) => `--${o}`);
351
334
  }
352
- // autocomple short - options
353
335
  if (current.startsWith("-")) {
354
336
  return this.shorthands.map((o) => `-${o}`);
355
337
  }
356
- // autocomplete matched completions
357
338
  return completions;
358
339
  });
359
340
  this.initialArgv = parsed.argv;
360
341
  this.argv = parsed.options(opts).argv;
361
- // For backwards compatibility
362
- // Previously profileDir had a default option and calling `this.$options.profileDir` always returned valid result.
363
- // Now the profileDir should be used from $settingsService, but ensure the `this.$options.profileDir` returns the same value.
364
342
  this.$settingsService.setSettings({
365
343
  profileDir: this.argv.profileDir,
366
344
  });
367
345
  this.argv.profileDir = this.argv["profile-dir"] =
368
346
  this.$settingsService.getProfileDir();
369
- // if justlaunch is set, it takes precedence over the --watch flag and the default true value
370
347
  if (this.argv.justlaunch) {
371
348
  this.argv.watch = false;
372
349
  }
@@ -382,7 +359,6 @@ class Options {
382
359
  if (this.argv.javascript) {
383
360
  this.argv.js = true;
384
361
  }
385
- // alias --simulator to --emulator
386
362
  if (this.argv.simulator) {
387
363
  this.argv.emulator = this.argv.simulator;
388
364
  }
@@ -407,4 +383,3 @@ exports.Options = Options;
407
383
  Options.DASHED_OPTION_REGEX = /(.+?)([A-Z])(.*)/;
408
384
  Options.NONDASHED_OPTION_REGEX = /(.+?)[-]([a-zA-Z])(.*)/;
409
385
  yok_1.injector.register("options", Options);
410
- //# sourceMappingURL=options.js.map
@@ -24,7 +24,6 @@ class PackageInstallationManager {
24
24
  async getLatestCompatibleVersion(packageName, referenceVersion) {
25
25
  referenceVersion = referenceVersion || this.$staticConfig.version;
26
26
  const isPreReleaseVersion = semver.prerelease(referenceVersion) !== null;
27
- // if the user has some v.v.v-prerelease-xx.xx pre-release version, include pre-release versions in the search query.
28
27
  const compatibleVersionRange = isPreReleaseVersion
29
28
  ? `~${referenceVersion}`
30
29
  : `~${semver.major(referenceVersion)}.${semver.minor(referenceVersion)}.0`;
@@ -106,14 +105,13 @@ class PackageInstallationManager {
106
105
  }
107
106
  async getInspectorFromCache(inspectorNpmPackageName, projectDir) {
108
107
  const inspectorPath = path.join(projectDir, constants.NODE_MODULES_FOLDER_NAME, inspectorNpmPackageName);
109
- // local installation takes precedence over cache
110
108
  if (this.inspectorAlreadyInstalled(inspectorPath)) {
111
109
  return inspectorPath;
112
110
  }
113
111
  const cachePath = this.getInspectorCachePath();
114
112
  this.prepareCacheDir(cachePath);
115
113
  const pathToPackageInCache = path.join(cachePath, constants.NODE_MODULES_FOLDER_NAME, inspectorNpmPackageName);
116
- const iOSFrameworkNSValue = this.$projectDataService.getRuntimePackage(projectDir, "ios" /* constants.PlatformTypes.ios */);
114
+ const iOSFrameworkNSValue = this.$projectDataService.getRuntimePackage(projectDir, "ios");
117
115
  const version = await this.getLatestCompatibleVersion(inspectorNpmPackageName, iOSFrameworkNSValue.version);
118
116
  let shouldInstall = !this.$fs.exists(pathToPackageInCache);
119
117
  if (!shouldInstall) {
@@ -174,10 +172,6 @@ class PackageInstallationManager {
174
172
  }
175
173
  return await this.$packageManager.install(packageName, pathToSave, npmOptions);
176
174
  }
177
- /**
178
- * This function must not be used with packageName being a URL or local file,
179
- * because npm view doens't work with those
180
- */
181
175
  async getVersion(packageName, version) {
182
176
  var _a;
183
177
  let data = await this.$packageManager.view(packageName, {
@@ -190,4 +184,3 @@ class PackageInstallationManager {
190
184
  }
191
185
  exports.PackageInstallationManager = PackageInstallationManager;
192
186
  yok_1.injector.register("packageInstallationManager", PackageInstallationManager);
193
- //# sourceMappingURL=package-installation-manager.js.map
@@ -92,7 +92,6 @@ class PackageManager {
92
92
  }
93
93
  }
94
94
  catch (err) {
95
- // ignore error, but log info
96
95
  this.$logger.trace("Tried to read cli.packageManager from project config and failed. Error is: ", err);
97
96
  }
98
97
  if (pm === constants_1.PackageManagers.yarn || this.$options.yarn) {
@@ -160,4 +159,3 @@ __decorate([
160
159
  (0, decorators_1.invokeInit)()
161
160
  ], PackageManager.prototype, "getCachePath", null);
162
161
  yok_1.injector.register("packageManager", PackageManager);
163
- //# sourceMappingURL=package-manager.js.map
@@ -16,4 +16,3 @@ class PlatformCommandParameter {
16
16
  }
17
17
  exports.PlatformCommandParameter = PlatformCommandParameter;
18
18
  yok_1.injector.register("platformCommandParameter", PlatformCommandParameter);
19
- //# sourceMappingURL=platform-command-param.js.map
@@ -24,14 +24,13 @@ class PnpmPackageManager extends base_package_manager_1.BasePackageManager {
24
24
  if (config.disableNpmInstall) {
25
25
  return;
26
26
  }
27
- delete config.dev; // temporary fix for unsupported yarn flag
27
+ delete config.dev;
28
28
  if (config.ignoreScripts) {
29
29
  config["ignore-scripts"] = true;
30
30
  }
31
31
  const packageJsonPath = path.join(pathToSave, "package.json");
32
32
  const jsonContentBefore = this.$fs.readJson(packageJsonPath);
33
33
  const flags = this.getFlagsString(config, true);
34
- // With pnpm we need to install as "flat" or some imports wont be found
35
34
  let params = ["i", "--shamefully-hoist"];
36
35
  const isInstallingAllDependencies = packageName === pathToSave;
37
36
  if (!isInstallingAllDependencies) {
@@ -49,7 +48,6 @@ class PnpmPackageManager extends base_package_manager_1.BasePackageManager {
49
48
  }
50
49
  }
51
50
  uninstall(packageName, config, cwd) {
52
- // pnpm does not want save option in remove. It saves it by default
53
51
  delete config["save"];
54
52
  const flags = this.getFlagsString(config, false);
55
53
  return this.$childProcess.exec(`pnpm remove ${packageName} ${flags}`, {
@@ -117,4 +115,3 @@ __decorate([
117
115
  (0, decorators_1.exported)("pnpm")
118
116
  ], PnpmPackageManager.prototype, "getCachePath", null);
119
117
  yok_1.injector.register("pnpm", PnpmPackageManager);
120
- //# sourceMappingURL=pnpm-package-manager.js.map