nativescript 8.8.3 → 8.9.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/lib/.d.ts +1 -0
  2. package/lib/android-tools-info.js +0 -12
  3. package/lib/base-package-manager.js +0 -7
  4. package/lib/bootstrap.js +1 -5
  5. package/lib/bun-package-manager.js +1 -17
  6. package/lib/color.js +0 -3
  7. package/lib/commands/add-platform.js +0 -1
  8. package/lib/commands/apple-login.js +0 -1
  9. package/lib/commands/appstore-list.js +0 -1
  10. package/lib/commands/appstore-upload.js +3 -10
  11. package/lib/commands/build.js +2 -3
  12. package/lib/commands/clean.js +1 -22
  13. package/lib/commands/command-base.js +0 -1
  14. package/lib/commands/config.js +0 -3
  15. package/lib/commands/create-project.js +0 -6
  16. package/lib/commands/debug.js +1 -6
  17. package/lib/commands/deploy.js +2 -3
  18. package/lib/commands/embedding/embed.js +0 -7
  19. package/lib/commands/extensibility/install-extension.js +0 -1
  20. package/lib/commands/extensibility/list-extensions.js +0 -1
  21. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  22. package/lib/commands/fonts.js +0 -1
  23. package/lib/commands/generate-assets.js +0 -1
  24. package/lib/commands/generate-help.js +0 -1
  25. package/lib/commands/generate.js +2 -12
  26. package/lib/commands/info.js +0 -1
  27. package/lib/commands/install.js +0 -1
  28. package/lib/commands/list-platforms.js +0 -1
  29. package/lib/commands/migrate.js +0 -1
  30. package/lib/commands/native-add.js +0 -5
  31. package/lib/commands/platform-clean.js +0 -1
  32. package/lib/commands/plugin/add-plugin.js +0 -1
  33. package/lib/commands/plugin/build-plugin.js +0 -1
  34. package/lib/commands/plugin/create-plugin.js +0 -5
  35. package/lib/commands/plugin/list-plugins.js +0 -1
  36. package/lib/commands/plugin/remove-plugin.js +0 -2
  37. package/lib/commands/plugin/update-plugin.js +0 -1
  38. package/lib/commands/post-install.js +0 -6
  39. package/lib/commands/prepare.js +3 -4
  40. package/lib/commands/preview.js +0 -2
  41. package/lib/commands/remove-platform.js +0 -1
  42. package/lib/commands/resources/resources-update.js +0 -2
  43. package/lib/commands/run.js +0 -1
  44. package/lib/commands/setup.js +0 -1
  45. package/lib/commands/start.js +0 -1
  46. package/lib/commands/test-init.js +0 -4
  47. package/lib/commands/test.js +2 -9
  48. package/lib/commands/typings.js +1 -2
  49. package/lib/commands/update-platform.js +0 -5
  50. package/lib/commands/update.js +0 -2
  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 +0 -5
  105. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  106. package/lib/common/mobile/android/logcat-helper.js +1 -14
  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 +3 -91
  176. package/lib/controllers/platform-controller.js +1 -9
  177. package/lib/controllers/prepare-controller.js +9 -19
  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 +1 -1
  186. package/lib/data/run-data.js +0 -1
  187. package/lib/declarations.d.ts +1 -1
  188. package/lib/definitions/prepare.d.ts +2 -0
  189. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  190. package/lib/detached-processes/cleanup-process.js +14 -18
  191. package/lib/detached-processes/file-log-service.js +1 -2
  192. package/lib/device-path-provider.js +0 -1
  193. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  194. package/lib/device-sockets/ios/notification.js +0 -3
  195. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  196. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  197. package/lib/helpers/deploy-command-helper.js +0 -1
  198. package/lib/helpers/key-command-helper.js +2 -4
  199. package/lib/helpers/livesync-command-helper.js +1 -4
  200. package/lib/helpers/network-connectivity-validator.js +0 -1
  201. package/lib/helpers/options-track-helper.js +2 -3
  202. package/lib/helpers/package-path-helper.js +0 -1
  203. package/lib/helpers/platform-command-helper.js +2 -7
  204. package/lib/helpers/version-validator-helper.js +0 -1
  205. package/lib/key-commands/bootstrap.js +2 -3
  206. package/lib/key-commands/index.js +32 -26
  207. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  208. package/lib/nativescript-cli-lib.js +0 -1
  209. package/lib/nativescript-cli.js +1 -10
  210. package/lib/node/pbxproj-dom-xcode.js +0 -1
  211. package/lib/node/xcode.js +0 -1
  212. package/lib/node-package-manager.js +1 -11
  213. package/lib/options.js +119 -143
  214. package/lib/package-installation-manager.js +1 -8
  215. package/lib/package-manager.js +0 -2
  216. package/lib/platform-command-param.js +0 -1
  217. package/lib/pnpm-package-manager.js +1 -4
  218. package/lib/project-data.js +0 -12
  219. package/lib/providers/project-files-provider.js +0 -1
  220. package/lib/resolvers/livesync-service-resolver.js +0 -1
  221. package/lib/services/analytics/analytics-broker-process.js +6 -10
  222. package/lib/services/analytics/analytics-broker.js +1 -2
  223. package/lib/services/analytics/analytics-service.js +25 -29
  224. package/lib/services/analytics/google-analytics-provider.js +12 -13
  225. package/lib/services/analytics-settings-service.js +0 -5
  226. package/lib/services/android/android-bundle-tool-service.js +0 -1
  227. package/lib/services/android/gradle-build-args-service.js +0 -3
  228. package/lib/services/android/gradle-build-service.js +0 -1
  229. package/lib/services/android/gradle-command-service.js +0 -1
  230. package/lib/services/android-device-debug-service.js +0 -6
  231. package/lib/services/android-plugin-build-service.js +0 -29
  232. package/lib/services/android-project-service.js +4 -71
  233. package/lib/services/android-resources-migration-service.js +0 -7
  234. package/lib/services/apple-portal/apple-portal-application-service.js +1 -2
  235. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  236. package/lib/services/apple-portal/apple-portal-session-service.js +42 -15
  237. package/lib/services/apple-portal/srp/srp-wrapper.js +76 -0
  238. package/lib/services/assets-generation/assets-generation-service.js +5 -16
  239. package/lib/services/build-artifacts-service.js +1 -2
  240. package/lib/services/build-data-service.js +0 -1
  241. package/lib/services/build-info-file-service.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 +4 -6
  255. package/lib/services/ios/ios-signing-service.js +45 -27
  256. package/lib/services/ios/spm-service.js +0 -9
  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 +2 -1
  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 +2 -94
  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 +0 -4
  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 -22
  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 -1
  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/webpack/webpack-compiler-service.js +9 -44
  318. package/lib/services/xcconfig-service.js +0 -2
  319. package/lib/services/xcproj-service.js +0 -1
  320. package/lib/shared-event-bus.js +0 -6
  321. package/lib/sys-info.js +1 -2
  322. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  323. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  324. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  325. package/lib/yarn-package-manager.js +0 -1
  326. package/lib/yarn2-package-manager.js +0 -3
  327. package/package.json +4 -3
@@ -47,12 +47,8 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
47
47
  }
48
48
  params = params.concat(flags);
49
49
  const cwd = pathToSave;
50
- // Npm creates `etc` directory in installation dir when --prefix is passed
51
- // https://github.com/npm/npm/issues/11486
52
- // we should delete it if it was created because of us
53
50
  const etcDirectoryLocation = (0, path_1.join)(cwd, "etc");
54
51
  const etcExistsPriorToInstallation = this.$fs.exists(etcDirectoryLocation);
55
- //TODO: plamen5kov: workaround is here for a reason (remove whole file later)
56
52
  if (config.path) {
57
53
  let relativePathFromCwdToSource = "";
58
54
  if (config.frameworkPath) {
@@ -68,13 +64,9 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
68
64
  }
69
65
  catch (err) {
70
66
  if (err.message && err.message.indexOf("EPEERINVALID") !== -1) {
71
- // Not installed peer dependencies are treated by npm 2 as errors, but npm 3 treats them as warnings.
72
- // We'll show them as warnings and let the user install them in case they are needed.
73
67
  this.$logger.warn(err.message);
74
68
  }
75
69
  else {
76
- // All other errors should be handled by the caller code.
77
- // Revert package.json contents to preserve valid state
78
70
  this.$fs.writeJson(packageJsonPath, jsonContentBefore);
79
71
  throw err;
80
72
  }
@@ -102,7 +94,7 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
102
94
  }
103
95
  view(packageName, config) {
104
96
  return __awaiter(this, void 0, void 0, function* () {
105
- const wrappedConfig = _.extend({}, config, { json: true }); // always require view response as JSON
97
+ const wrappedConfig = _.extend({}, config, { json: true });
106
98
  const flags = this.getFlagsString(wrappedConfig, false);
107
99
  let viewResult;
108
100
  try {
@@ -121,7 +113,6 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
121
113
  }
122
114
  searchNpms(keyword) {
123
115
  return __awaiter(this, void 0, void 0, function* () {
124
- // TODO: Fix the generation of url - in case it contains @ or / , the call may fail.
125
116
  const httpRequestResult = yield this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
126
117
  const result = JSON.parse(httpRequestResult.body);
127
118
  return result;
@@ -163,4 +154,3 @@ __decorate([
163
154
  ], NodePackageManager.prototype, "getCachePath", null);
164
155
  exports.NodePackageManager = NodePackageManager;
165
156
  yok_1.injector.register("npm", NodePackageManager);
166
- //# sourceMappingURL=node-package-manager.js.map
package/lib/options.js CHANGED
@@ -23,7 +23,6 @@ class Options {
23
23
  this.setArgv();
24
24
  }
25
25
  this.argv.bundle = "webpack";
26
- // Check if the user has explicitly provide --hmr and --release options from command line
27
26
  if (this.initialArgv.release && this.initialArgv.hmr) {
28
27
  this.$errors.fail("The options --release and --hmr cannot be used simultaneously.");
29
28
  }
@@ -31,8 +30,6 @@ class Options {
31
30
  this.argv.hmr = !this.argv.release;
32
31
  }
33
32
  if (this.argv.debugBrk) {
34
- // we cannot use HMR along with debug-brk because we have to restart the app
35
- // on each livesync in order to stop and allow debugging on app start
36
33
  this.argv.hmr = false;
37
34
  }
38
35
  if (this.argv.justlaunch) {
@@ -50,18 +47,17 @@ class Options {
50
47
  "timeout",
51
48
  "_",
52
49
  "$0",
53
- ]; // These options shouldn't be validated
50
+ ];
54
51
  this.globalOptions = {
55
- log: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
56
- verbose: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
57
- version: { type: "boolean" /* OptionType.Boolean */, alias: "v", hasSensitiveValue: false },
58
- help: { type: "boolean" /* OptionType.Boolean */, alias: "h", hasSensitiveValue: false },
59
- profileDir: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
60
- analyticsClient: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
61
- path: { type: "string" /* OptionType.String */, alias: "p", hasSensitiveValue: true },
62
- config: { type: "string" /* OptionType.String */, alias: "c", hasSensitiveValue: true },
63
- // This will parse all non-hyphenated values as strings.
64
- _: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
52
+ log: { type: "string", hasSensitiveValue: false },
53
+ verbose: { type: "boolean", hasSensitiveValue: false },
54
+ version: { type: "boolean", alias: "v", hasSensitiveValue: false },
55
+ help: { type: "boolean", alias: "h", hasSensitiveValue: false },
56
+ profileDir: { type: "string", hasSensitiveValue: true },
57
+ analyticsClient: { type: "string", hasSensitiveValue: false },
58
+ path: { type: "string", alias: "p", hasSensitiveValue: true },
59
+ config: { type: "string", alias: "c", hasSensitiveValue: true },
60
+ _: { type: "string", hasSensitiveValue: false },
65
61
  };
66
62
  this.options = _.extend({}, this.commonOptions, this.globalOptions);
67
63
  this.setArgv();
@@ -77,163 +73,163 @@ class Options {
77
73
  }
78
74
  get commonOptions() {
79
75
  return {
80
- ipa: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
81
- frameworkPath: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
82
- frameworkName: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
83
- framework: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
84
- frameworkVersion: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
85
- forDevice: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
76
+ ipa: { type: "string", hasSensitiveValue: true },
77
+ frameworkPath: { type: "string", hasSensitiveValue: true },
78
+ frameworkName: { type: "string", hasSensitiveValue: false },
79
+ framework: { type: "string", hasSensitiveValue: false },
80
+ frameworkVersion: { type: "string", hasSensitiveValue: false },
81
+ forDevice: { type: "boolean", hasSensitiveValue: false },
86
82
  iCloudContainerEnvironment: {
87
- type: "string" /* OptionType.String */,
83
+ type: "string",
88
84
  hasSensitiveValue: false,
89
85
  },
90
- provision: { type: "object" /* OptionType.Object */, hasSensitiveValue: true },
86
+ provision: { type: "object", hasSensitiveValue: true },
91
87
  client: {
92
- type: "boolean" /* OptionType.Boolean */,
88
+ type: "boolean",
93
89
  default: true,
94
90
  hasSensitiveValue: false,
95
91
  },
96
- env: { type: "object" /* OptionType.Object */, hasSensitiveValue: false },
97
- production: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
98
- debugTransport: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
99
- keyStorePath: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
100
- keyStorePassword: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
101
- keyStoreAlias: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
92
+ env: { type: "object", hasSensitiveValue: false },
93
+ production: { type: "boolean", hasSensitiveValue: false },
94
+ debugTransport: { type: "boolean", hasSensitiveValue: false },
95
+ keyStorePath: { type: "string", hasSensitiveValue: true },
96
+ keyStorePassword: { type: "string", hasSensitiveValue: true },
97
+ keyStoreAlias: { type: "string", hasSensitiveValue: true },
102
98
  keyStoreAliasPassword: {
103
- type: "string" /* OptionType.String */,
99
+ type: "string",
104
100
  hasSensitiveValue: true,
105
101
  },
106
- ignoreScripts: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
107
- disableNpmInstall: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
108
- compileSdk: { type: "number" /* OptionType.Number */, hasSensitiveValue: false },
109
- port: { type: "number" /* OptionType.Number */, hasSensitiveValue: false },
110
- copyTo: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
111
- js: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
112
- javascript: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
113
- ng: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
114
- angular: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
115
- react: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
116
- reactjs: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
117
- vue: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
118
- vuejs: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
119
- svelte: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
120
- vision: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
121
- "vision-ng": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
122
- "vision-react": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
123
- "vision-solid": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
124
- "vision-svelte": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
125
- "vision-vue": { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
126
- tsc: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
127
- ts: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
128
- typescript: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
129
- yarn: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
130
- yarn2: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
131
- pnpm: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
132
- androidTypings: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
133
- bundle: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
134
- all: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
135
- teamId: { type: "object" /* OptionType.Object */, hasSensitiveValue: true },
136
- chrome: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
137
- inspector: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
138
- clean: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
102
+ ignoreScripts: { type: "boolean", hasSensitiveValue: false },
103
+ disableNpmInstall: { type: "boolean", hasSensitiveValue: false },
104
+ compileSdk: { type: "number", hasSensitiveValue: false },
105
+ port: { type: "number", hasSensitiveValue: false },
106
+ copyTo: { type: "string", hasSensitiveValue: true },
107
+ js: { type: "boolean", hasSensitiveValue: false },
108
+ javascript: { type: "boolean", hasSensitiveValue: false },
109
+ ng: { type: "boolean", hasSensitiveValue: false },
110
+ angular: { type: "boolean", hasSensitiveValue: false },
111
+ react: { type: "boolean", hasSensitiveValue: false },
112
+ reactjs: { type: "boolean", hasSensitiveValue: false },
113
+ vue: { type: "boolean", hasSensitiveValue: false },
114
+ vuejs: { type: "boolean", hasSensitiveValue: false },
115
+ svelte: { type: "boolean", hasSensitiveValue: false },
116
+ vision: { type: "boolean", hasSensitiveValue: false },
117
+ "vision-ng": { type: "boolean", hasSensitiveValue: false },
118
+ "vision-react": { type: "boolean", hasSensitiveValue: false },
119
+ "vision-solid": { type: "boolean", hasSensitiveValue: false },
120
+ "vision-svelte": { type: "boolean", hasSensitiveValue: false },
121
+ "vision-vue": { type: "boolean", hasSensitiveValue: false },
122
+ tsc: { type: "boolean", hasSensitiveValue: false },
123
+ ts: { type: "boolean", hasSensitiveValue: false },
124
+ typescript: { type: "boolean", hasSensitiveValue: false },
125
+ yarn: { type: "boolean", hasSensitiveValue: false },
126
+ yarn2: { type: "boolean", hasSensitiveValue: false },
127
+ pnpm: { type: "boolean", hasSensitiveValue: false },
128
+ androidTypings: { type: "boolean", hasSensitiveValue: false },
129
+ bundle: { type: "string", hasSensitiveValue: false },
130
+ all: { type: "boolean", hasSensitiveValue: false },
131
+ teamId: { type: "object", hasSensitiveValue: true },
132
+ chrome: { type: "boolean", hasSensitiveValue: false },
133
+ inspector: { type: "boolean", hasSensitiveValue: false },
134
+ clean: { type: "boolean", hasSensitiveValue: false },
139
135
  watch: {
140
- type: "boolean" /* OptionType.Boolean */,
136
+ type: "boolean",
141
137
  default: true,
142
138
  hasSensitiveValue: false,
143
139
  },
144
- background: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
145
- username: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
146
- pluginName: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
140
+ background: { type: "string", hasSensitiveValue: false },
141
+ username: { type: "string", hasSensitiveValue: true },
142
+ pluginName: { type: "string", hasSensitiveValue: false },
147
143
  includeTypeScriptDemo: {
148
- type: "string" /* OptionType.String */,
144
+ type: "string",
149
145
  hasSensitiveValue: false,
150
146
  },
151
- includeAngularDemo: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
147
+ includeAngularDemo: { type: "string", hasSensitiveValue: false },
152
148
  hmr: {
153
- type: "boolean" /* OptionType.Boolean */,
149
+ type: "boolean",
154
150
  hasSensitiveValue: false,
155
151
  default: true,
156
152
  },
157
153
  collection: {
158
- type: "string" /* OptionType.String */,
154
+ type: "string",
159
155
  alias: "c",
160
156
  hasSensitiveValue: false,
161
157
  },
162
- json: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
163
- avd: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
164
- // check not used
165
- config: { type: "array" /* OptionType.Array */, hasSensitiveValue: false },
158
+ json: { type: "boolean", hasSensitiveValue: false },
159
+ avd: { type: "string", hasSensitiveValue: true },
160
+ config: { type: "array", hasSensitiveValue: false },
166
161
  insecure: {
167
- type: "boolean" /* OptionType.Boolean */,
162
+ type: "boolean",
168
163
  alias: "k",
169
164
  hasSensitiveValue: false,
170
165
  },
171
- debug: { type: "boolean" /* OptionType.Boolean */, alias: "d", hasSensitiveValue: false },
172
- timeout: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
173
- device: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
174
- availableDevices: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
175
- appid: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
176
- geny: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
177
- debugBrk: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
178
- debugPort: { type: "number" /* OptionType.Number */, hasSensitiveValue: false },
179
- start: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
180
- stop: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
181
- ddi: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
182
- justlaunch: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
183
- file: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
184
- force: { type: "boolean" /* OptionType.Boolean */, alias: "f", hasSensitiveValue: false },
185
- emulator: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
186
- simulator: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
187
- sdk: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
188
- template: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
189
- certificate: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
190
- certificatePassword: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
166
+ debug: { type: "boolean", alias: "d", hasSensitiveValue: false },
167
+ timeout: { type: "string", hasSensitiveValue: false },
168
+ device: { type: "string", hasSensitiveValue: true },
169
+ availableDevices: { type: "boolean", hasSensitiveValue: false },
170
+ appid: { type: "string", hasSensitiveValue: true },
171
+ geny: { type: "string", hasSensitiveValue: true },
172
+ debugBrk: { type: "boolean", hasSensitiveValue: false },
173
+ debugPort: { type: "number", hasSensitiveValue: false },
174
+ start: { type: "boolean", hasSensitiveValue: false },
175
+ stop: { type: "boolean", hasSensitiveValue: false },
176
+ ddi: { type: "string", hasSensitiveValue: true },
177
+ justlaunch: { type: "boolean", hasSensitiveValue: false },
178
+ file: { type: "string", hasSensitiveValue: true },
179
+ force: { type: "boolean", alias: "f", hasSensitiveValue: false },
180
+ emulator: { type: "boolean", hasSensitiveValue: false },
181
+ simulator: { type: "boolean", hasSensitiveValue: false },
182
+ sdk: { type: "string", hasSensitiveValue: false },
183
+ template: { type: "string", hasSensitiveValue: true },
184
+ certificate: { type: "string", hasSensitiveValue: true },
185
+ certificatePassword: { type: "string", hasSensitiveValue: true },
191
186
  release: {
192
- type: "boolean" /* OptionType.Boolean */,
187
+ type: "boolean",
193
188
  alias: "r",
194
189
  hasSensitiveValue: false,
195
190
  },
196
- markingMode: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
197
- var: { type: "object" /* OptionType.Object */, hasSensitiveValue: true },
198
- default: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
199
- count: { type: "number" /* OptionType.Number */, hasSensitiveValue: false },
200
- analyticsLogFile: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
201
- disableAnalytics: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
202
- cleanupLogFile: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
191
+ markingMode: { type: "boolean", hasSensitiveValue: false },
192
+ var: { type: "object", hasSensitiveValue: true },
193
+ default: { type: "boolean", hasSensitiveValue: false },
194
+ count: { type: "number", hasSensitiveValue: false },
195
+ analyticsLogFile: { type: "string", hasSensitiveValue: true },
196
+ disableAnalytics: { type: "boolean", hasSensitiveValue: false },
197
+ cleanupLogFile: { type: "string", hasSensitiveValue: true },
203
198
  hooks: {
204
- type: "boolean" /* OptionType.Boolean */,
199
+ type: "boolean",
205
200
  default: true,
206
201
  hasSensitiveValue: false,
207
202
  },
208
203
  link: {
209
- type: "boolean" /* OptionType.Boolean */,
204
+ type: "boolean",
210
205
  default: false,
211
206
  hasSensitiveValue: false,
212
207
  },
213
- gradlePath: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
214
- gradleArgs: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
215
- hostProjectPath: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
208
+ gradlePath: { type: "string", hasSensitiveValue: false },
209
+ gradleArgs: { type: "string", hasSensitiveValue: false },
210
+ hostProjectPath: { type: "string", hasSensitiveValue: false },
216
211
  hostProjectModuleName: {
217
- type: "string" /* OptionType.String */,
212
+ type: "string",
218
213
  hasSensitiveValue: false,
219
214
  default: constants_1.APP_FOLDER_NAME,
220
215
  },
221
- aab: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
222
- performance: { type: "object" /* OptionType.Object */, hasSensitiveValue: true },
216
+ aab: { type: "boolean", hasSensitiveValue: false },
217
+ performance: { type: "object", hasSensitiveValue: true },
223
218
  appleApplicationSpecificPassword: {
224
- type: "string" /* OptionType.String */,
219
+ type: "string",
225
220
  hasSensitiveValue: true,
226
221
  },
227
- appleSessionBase64: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
228
- jar: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
229
- aar: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
230
- filter: { type: "string" /* OptionType.String */, hasSensitiveValue: true },
222
+ appleSessionBase64: { type: "string", hasSensitiveValue: true },
223
+ jar: { type: "string", hasSensitiveValue: true },
224
+ aar: { type: "string", hasSensitiveValue: true },
225
+ filter: { type: "string", hasSensitiveValue: true },
231
226
  git: {
232
- type: "boolean" /* OptionType.Boolean */,
227
+ type: "boolean",
233
228
  hasSensitiveValue: false,
234
229
  default: true,
235
230
  },
236
- dryRun: { type: "boolean" /* OptionType.Boolean */, hasSensitiveValue: false },
231
+ dryRun: { type: "boolean", hasSensitiveValue: false },
232
+ uniqueBundle: { type: "boolean", hasSensitiveValue: false },
237
233
  };
238
234
  }
239
235
  get optionNames() {
@@ -251,7 +247,6 @@ class Options {
251
247
  parsed[optionName] = this.getOptionValue(optionName);
252
248
  }
253
249
  _.each(parsed, (value, originalOptionName) => {
254
- // 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.
255
250
  if (value === undefined) {
256
251
  return;
257
252
  }
@@ -261,14 +256,14 @@ class Options {
261
256
  this.$errors.failWithHelp(`The option '${originalOptionName}' is not supported.`);
262
257
  }
263
258
  const optionType = this.getOptionType(optionName), optionValue = parsed[optionName];
264
- if (_.isArray(optionValue) && optionType !== "array" /* OptionType.Array */) {
259
+ if (_.isArray(optionValue) && optionType !== "array") {
265
260
  this.$errors.failWithHelp("The '%s' option requires a single value.", originalOptionName);
266
261
  }
267
- else if (optionType === "string" /* OptionType.String */ &&
262
+ else if (optionType === "string" &&
268
263
  helpers.isNullOrWhitespace(optionValue)) {
269
264
  this.$errors.failWithHelp("The option '%s' requires non-empty value.", originalOptionName);
270
265
  }
271
- else if (optionType === "array" /* OptionType.Array */ &&
266
+ else if (optionType === "array" &&
272
267
  optionValue.length === 0) {
273
268
  this.$errors.failWithHelp(`The option '${originalOptionName}' requires one or more values, separated by a space.`);
274
269
  }
@@ -296,16 +291,9 @@ class Options {
296
291
  }
297
292
  return true;
298
293
  }
299
- // If you pass value with dash, yargs adds it to yargs.argv in two ways:
300
- // with dash and without dash, replacing first symbol after it with its toUpper equivalent
301
- // ex, "$ <cli name> emulate android --profile-dir" will add profile-dir to yargs.argv as profile-dir and profileDir
302
- // IMPORTANT: In your code, it is better to use the value without dashes (profileDir in the example).
303
- // This way your code will work in case "$ <cli name> emulate android --profile-dir" or "$ <cli name> emulate android --profileDir" is used by user.
304
294
  getNonDashedOptionName(optionName) {
305
295
  const matchUpperCaseLetters = optionName.match(Options.NONDASHED_OPTION_REGEX);
306
296
  if (matchUpperCaseLetters) {
307
- // get here if option with upperCase letter is specified, for example profileDir
308
- // check if in knownOptions we have its kebabCase presentation
309
297
  const secondaryOptionName = matchUpperCaseLetters[1] +
310
298
  matchUpperCaseLetters[2].toUpperCase() +
311
299
  matchUpperCaseLetters[3] || "";
@@ -334,18 +322,15 @@ class Options {
334
322
  const args = argv._.slice(1);
335
323
  const commands = yok_1.injector
336
324
  .getRegisteredCommandsNames(false)
337
- .filter((c) => c != "/?"); // remove the /? command, looks weird... :D
325
+ .filter((c) => c != "/?");
338
326
  const currentDepth = args.length > 0 ? args.length - 1 : 0;
339
327
  const current = (_a = current_ !== null && current_ !== void 0 ? current_ : args[currentDepth]) !== null && _a !== void 0 ? _a : "";
340
- // split all commands into their components ie. "device|list" => ["device", "list"]
341
328
  const matchGroups = commands.map((c) => c.split("|"));
342
- // find all commands that match the current depth and all the previous args
343
329
  const possibleMatches = matchGroups.filter((group) => {
344
330
  return group.slice(0, currentDepth).every((g, i) => {
345
331
  return g === args[i] || args[i].at(0) === "-";
346
332
  });
347
333
  });
348
- // filter out duplicates
349
334
  const completions = [
350
335
  ...new Set(possibleMatches
351
336
  .map((match) => {
@@ -353,28 +338,21 @@ class Options {
353
338
  })
354
339
  .filter(Boolean)),
355
340
  ];
356
- // autocomplete long -- options
357
341
  if (current.startsWith("--")) {
358
342
  return this.optionNames.filter((o) => o !== "_").map((o) => `--${o}`);
359
343
  }
360
- // autocomple short - options
361
344
  if (current.startsWith("-")) {
362
345
  return this.shorthands.map((o) => `-${o}`);
363
346
  }
364
- // autocomplete matched completions
365
347
  return completions;
366
348
  }));
367
349
  this.initialArgv = parsed.argv;
368
350
  this.argv = parsed.options(opts).argv;
369
- // For backwards compatibility
370
- // Previously profileDir had a default option and calling `this.$options.profileDir` always returned valid result.
371
- // Now the profileDir should be used from $settingsService, but ensure the `this.$options.profileDir` returns the same value.
372
351
  this.$settingsService.setSettings({
373
352
  profileDir: this.argv.profileDir,
374
353
  });
375
354
  this.argv.profileDir = this.argv["profile-dir"] =
376
355
  this.$settingsService.getProfileDir();
377
- // if justlaunch is set, it takes precedence over the --watch flag and the default true value
378
356
  if (this.argv.justlaunch) {
379
357
  this.argv.watch = false;
380
358
  }
@@ -390,7 +368,6 @@ class Options {
390
368
  if (this.argv.javascript) {
391
369
  this.argv.js = true;
392
370
  }
393
- // alias --simulator to --emulator
394
371
  if (this.argv.simulator) {
395
372
  this.argv.emulator = this.argv.simulator;
396
373
  }
@@ -415,4 +392,3 @@ Options.DASHED_OPTION_REGEX = /(.+?)([A-Z])(.*)/;
415
392
  Options.NONDASHED_OPTION_REGEX = /(.+?)[-]([a-zA-Z])(.*)/;
416
393
  exports.Options = Options;
417
394
  yok_1.injector.register("options", Options);
418
- //# sourceMappingURL=options.js.map
@@ -38,7 +38,6 @@ class PackageInstallationManager {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
39
  referenceVersion = referenceVersion || this.$staticConfig.version;
40
40
  const isPreReleaseVersion = semver.prerelease(referenceVersion) !== null;
41
- // if the user has some v.v.v-prerelease-xx.xx pre-release version, include pre-release versions in the search query.
42
41
  const compatibleVersionRange = isPreReleaseVersion
43
42
  ? `~${referenceVersion}`
44
43
  : `~${semver.major(referenceVersion)}.${semver.minor(referenceVersion)}.0`;
@@ -134,14 +133,13 @@ class PackageInstallationManager {
134
133
  getInspectorFromCache(inspectorNpmPackageName, projectDir) {
135
134
  return __awaiter(this, void 0, void 0, function* () {
136
135
  const inspectorPath = path.join(projectDir, constants.NODE_MODULES_FOLDER_NAME, inspectorNpmPackageName);
137
- // local installation takes precedence over cache
138
136
  if (this.inspectorAlreadyInstalled(inspectorPath)) {
139
137
  return inspectorPath;
140
138
  }
141
139
  const cachePath = this.getInspectorCachePath();
142
140
  this.prepareCacheDir(cachePath);
143
141
  const pathToPackageInCache = path.join(cachePath, constants.NODE_MODULES_FOLDER_NAME, inspectorNpmPackageName);
144
- const iOSFrameworkNSValue = this.$projectDataService.getRuntimePackage(projectDir, "ios" /* constants.PlatformTypes.ios */);
142
+ const iOSFrameworkNSValue = this.$projectDataService.getRuntimePackage(projectDir, "ios");
145
143
  const version = yield this.getLatestCompatibleVersion(inspectorNpmPackageName, iOSFrameworkNSValue.version);
146
144
  let shouldInstall = !this.$fs.exists(pathToPackageInCache);
147
145
  if (!shouldInstall) {
@@ -207,10 +205,6 @@ class PackageInstallationManager {
207
205
  return yield this.$packageManager.install(packageName, pathToSave, npmOptions);
208
206
  });
209
207
  }
210
- /**
211
- * This function must not be used with packageName being a URL or local file,
212
- * because npm view doens't work with those
213
- */
214
208
  getVersion(packageName, version) {
215
209
  var _a;
216
210
  return __awaiter(this, void 0, void 0, function* () {
@@ -225,4 +219,3 @@ class PackageInstallationManager {
225
219
  }
226
220
  exports.PackageInstallationManager = PackageInstallationManager;
227
221
  yok_1.injector.register("packageInstallationManager", PackageInstallationManager);
228
- //# sourceMappingURL=package-installation-manager.js.map
@@ -114,7 +114,6 @@ class PackageManager {
114
114
  }
115
115
  }
116
116
  catch (err) {
117
- // ignore error, but log info
118
117
  this.$logger.trace("Tried to read cli.packageManager from project config and failed. Error is: ", err);
119
118
  }
120
119
  if (pm === constants_1.PackageManagers.yarn || this.$options.yarn) {
@@ -183,4 +182,3 @@ __decorate([
183
182
  ], PackageManager.prototype, "getCachePath", null);
184
183
  exports.PackageManager = PackageManager;
185
184
  yok_1.injector.register("packageManager", PackageManager);
186
- //# sourceMappingURL=package-manager.js.map
@@ -27,4 +27,3 @@ class PlatformCommandParameter {
27
27
  }
28
28
  exports.PlatformCommandParameter = PlatformCommandParameter;
29
29
  yok_1.injector.register("platformCommandParameter", PlatformCommandParameter);
30
- //# sourceMappingURL=platform-command-param.js.map
@@ -34,14 +34,13 @@ class PnpmPackageManager extends base_package_manager_1.BasePackageManager {
34
34
  if (config.disableNpmInstall) {
35
35
  return;
36
36
  }
37
- delete config.dev; // temporary fix for unsupported yarn flag
37
+ delete config.dev;
38
38
  if (config.ignoreScripts) {
39
39
  config["ignore-scripts"] = true;
40
40
  }
41
41
  const packageJsonPath = path.join(pathToSave, "package.json");
42
42
  const jsonContentBefore = this.$fs.readJson(packageJsonPath);
43
43
  const flags = this.getFlagsString(config, true);
44
- // With pnpm we need to install as "flat" or some imports wont be found
45
44
  let params = ["i", "--shamefully-hoist"];
46
45
  const isInstallingAllDependencies = packageName === pathToSave;
47
46
  if (!isInstallingAllDependencies) {
@@ -60,7 +59,6 @@ class PnpmPackageManager extends base_package_manager_1.BasePackageManager {
60
59
  });
61
60
  }
62
61
  uninstall(packageName, config, cwd) {
63
- // pnpm does not want save option in remove. It saves it by default
64
62
  delete config["save"];
65
63
  const flags = this.getFlagsString(config, false);
66
64
  return this.$childProcess.exec(`pnpm remove ${packageName} ${flags}`, {
@@ -136,4 +134,3 @@ __decorate([
136
134
  ], PnpmPackageManager.prototype, "getCachePath", null);
137
135
  exports.PnpmPackageManager = PnpmPackageManager;
138
136
  yok_1.injector.register("pnpm", PnpmPackageManager);
139
- //# sourceMappingURL=pnpm-package-manager.js.map
@@ -19,7 +19,6 @@ class ProjectData {
19
19
  this.warnProjectId();
20
20
  return this.projectIdentifiers.ios;
21
21
  }
22
- //just in case hook/extension modifies it.
23
22
  set projectId(identifier) {
24
23
  this.warnProjectId();
25
24
  this.projectIdentifiers.ios = identifier;
@@ -45,7 +44,6 @@ class ProjectData {
45
44
  return;
46
45
  }
47
46
  projectDir = projectDir || this.$projectHelper.projectDir;
48
- // If no project found, projectDir should be null
49
47
  if (projectDir) {
50
48
  const projectFilePath = this.getProjectFilePath(projectDir);
51
49
  if (this.$fs.exists(projectFilePath)) {
@@ -112,7 +110,6 @@ class ProjectData {
112
110
  errorInvalidProject(projectDir) {
113
111
  const currentDir = path.resolve(".");
114
112
  this.$logger.trace(`Unable to find project. projectDir: ${projectDir}, options.path: ${this.$options.path}, ${currentDir}`);
115
- // This is the case when no project file found
116
113
  this.$errors.fail("No project found at or above '%s' and neither was a --path specified.", projectDir || this.$options.path || currentDir);
117
114
  }
118
115
  getProjectFilePath(projectDir) {
@@ -128,10 +125,6 @@ class ProjectData {
128
125
  return this.nsConfig[constants.CONFIG_NS_APP_RESOURCES_ENTRY];
129
126
  }
130
127
  return constants.APP_RESOURCES_FOLDER_NAME;
131
- // return path.join(
132
- // this.getAppDirectoryRelativePath(),
133
- // constants.APP_RESOURCES_FOLDER_NAME
134
- // );
135
128
  }
136
129
  getAppDirectoryPath(projectDir) {
137
130
  const appRelativePath = this.getAppDirectoryRelativePath();
@@ -145,7 +138,6 @@ class ProjectData {
145
138
  return constants.SRC_DIR;
146
139
  }
147
140
  else {
148
- // legacy project setup often uses app folder
149
141
  return constants.APP_FOLDER_NAME;
150
142
  }
151
143
  }
@@ -202,9 +194,6 @@ class ProjectData {
202
194
  this.$logger.warn("[WARNING]: IProjectData.projectId is deprecated. Please use IProjectData.projectIdentifiers[platform].");
203
195
  }
204
196
  }
205
- /**
206
- * NOTE: Order of the elements is important as the TypeScript dependencies are commonly included in Angular project as well.
207
- */
208
197
  ProjectData.PROJECT_TYPES = [
209
198
  {
210
199
  type: constants.ProjectTypes.JsFlavorName,
@@ -243,4 +232,3 @@ __decorate([
243
232
  ], ProjectData.prototype, "warnProjectId", null);
244
233
  exports.ProjectData = ProjectData;
245
234
  yok_1.injector.register("projectData", ProjectData, true);
246
- //# sourceMappingURL=project-data.js.map
@@ -44,4 +44,3 @@ class ProjectFilesProvider extends project_files_provider_base_1.ProjectFilesPro
44
44
  ProjectFilesProvider.INTERNAL_NONPROJECT_FILES = ["**/*.ts"];
45
45
  exports.ProjectFilesProvider = ProjectFilesProvider;
46
46
  yok_1.injector.register("projectFilesProvider", ProjectFilesProvider);
47
- //# sourceMappingURL=project-files-provider.js.map
@@ -20,4 +20,3 @@ class LiveSyncServiceResolver {
20
20
  }
21
21
  exports.LiveSyncServiceResolver = LiveSyncServiceResolver;
22
22
  yok_1.injector.register("liveSyncServiceResolver", LiveSyncServiceResolver);
23
- //# sourceMappingURL=livesync-service-resolver.js.map