nativescript 8.7.2 → 8.8.0-embed.0

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 (328) 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 -17
  5. package/lib/color.js +0 -3
  6. package/lib/commands/add-platform.js +1 -2
  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 -4
  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 -3
  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/extensibility/install-extension.js +0 -1
  18. package/lib/commands/extensibility/list-extensions.js +0 -1
  19. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  20. package/lib/commands/fonts.js +0 -1
  21. package/lib/commands/generate-assets.js +0 -1
  22. package/lib/commands/generate-help.js +0 -1
  23. package/lib/commands/generate.js +2 -12
  24. package/lib/commands/info.js +0 -1
  25. package/lib/commands/install.js +0 -1
  26. package/lib/commands/list-platforms.js +0 -1
  27. package/lib/commands/migrate.js +0 -1
  28. package/lib/commands/platform-clean.js +0 -1
  29. package/lib/commands/plugin/add-plugin.js +0 -1
  30. package/lib/commands/plugin/build-plugin.js +0 -1
  31. package/lib/commands/plugin/create-plugin.js +0 -5
  32. package/lib/commands/plugin/list-plugins.js +0 -1
  33. package/lib/commands/plugin/remove-plugin.js +0 -2
  34. package/lib/commands/plugin/update-plugin.js +0 -1
  35. package/lib/commands/post-install.js +0 -6
  36. package/lib/commands/prepare.js +2 -3
  37. package/lib/commands/preview.js +0 -2
  38. package/lib/commands/remove-platform.js +0 -1
  39. package/lib/commands/resources/resources-update.js +0 -2
  40. package/lib/commands/run.js +0 -1
  41. package/lib/commands/setup.js +0 -1
  42. package/lib/commands/start.js +0 -1
  43. package/lib/commands/test-init.js +0 -4
  44. package/lib/commands/test.js +2 -9
  45. package/lib/commands/typings.js +1 -2
  46. package/lib/commands/update-platform.js +0 -5
  47. package/lib/commands/update.js +0 -2
  48. package/lib/common/bootstrap.js +0 -1
  49. package/lib/common/child-process.js +0 -3
  50. package/lib/common/codeGeneration/code-entity.js +0 -1
  51. package/lib/common/codeGeneration/code-printer.js +0 -1
  52. package/lib/common/command-params.js +0 -1
  53. package/lib/common/commands/analytics.js +0 -3
  54. package/lib/common/commands/autocompletion.js +0 -3
  55. package/lib/common/commands/device/device-log-stream.js +0 -1
  56. package/lib/common/commands/device/get-file.js +0 -2
  57. package/lib/common/commands/device/list-applications.js +0 -1
  58. package/lib/common/commands/device/list-devices.js +0 -3
  59. package/lib/common/commands/device/list-files.js +0 -2
  60. package/lib/common/commands/device/put-file.js +0 -2
  61. package/lib/common/commands/device/run-application.js +0 -1
  62. package/lib/common/commands/device/stop-application.js +0 -1
  63. package/lib/common/commands/device/uninstall-application.js +0 -1
  64. package/lib/common/commands/doctor.js +2 -3
  65. package/lib/common/commands/generate-messages.js +0 -1
  66. package/lib/common/commands/help.js +0 -1
  67. package/lib/common/commands/package-manager-get.js +0 -1
  68. package/lib/common/commands/package-manager-set.js +0 -1
  69. package/lib/common/commands/post-install.js +0 -1
  70. package/lib/common/commands/preuninstall.js +2 -11
  71. package/lib/common/commands/proxy/proxy-base.js +0 -4
  72. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  73. package/lib/common/commands/proxy/proxy-get.js +0 -1
  74. package/lib/common/commands/proxy/proxy-set.js +0 -1
  75. package/lib/common/common-lib.js +0 -1
  76. package/lib/common/constants.js +0 -11
  77. package/lib/common/decorators.js +0 -48
  78. package/lib/common/dispatchers.js +1 -10
  79. package/lib/common/errors.js +3 -13
  80. package/lib/common/file-system.js +2 -13
  81. package/lib/common/header.js +0 -3
  82. package/lib/common/helpers.js +3 -89
  83. package/lib/common/host-info.js +0 -4
  84. package/lib/common/http-client.js +0 -20
  85. package/lib/common/logger/appenders/cli-appender.js +0 -4
  86. package/lib/common/logger/appenders/emit-appender.js +0 -4
  87. package/lib/common/logger/layouts/cli-layout.js +0 -1
  88. package/lib/common/logger/logger.js +0 -5
  89. package/lib/common/messages/messages.js +0 -6
  90. package/lib/common/mobile/android/android-application-manager.js +1 -20
  91. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  92. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  93. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  94. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  95. package/lib/common/mobile/android/android-device.js +0 -8
  96. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  97. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  98. package/lib/common/mobile/android/android-log-filter.js +0 -4
  99. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  100. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  101. package/lib/common/mobile/android/genymotion/genymotion-service.js +0 -5
  102. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  103. package/lib/common/mobile/android/logcat-helper.js +1 -20
  104. package/lib/common/mobile/application-manager-base.js +0 -6
  105. package/lib/common/mobile/device-emitter.js +0 -4
  106. package/lib/common/mobile/device-log-emitter.js +0 -1
  107. package/lib/common/mobile/device-log-provider-base.js +0 -1
  108. package/lib/common/mobile/device-log-provider.js +0 -23
  109. package/lib/common/mobile/device-platforms-constants.js +0 -1
  110. package/lib/common/mobile/emulator-helper.js +0 -3
  111. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  112. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  113. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  114. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  115. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  116. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  117. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  118. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  119. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  120. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  121. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  122. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  123. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  124. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  125. package/lib/common/mobile/log-filter.js +0 -2
  126. package/lib/common/mobile/logging-levels.js +0 -1
  127. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  128. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  129. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  130. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  131. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  132. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  133. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  134. package/lib/common/mobile/mobile-helper.js +0 -1
  135. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  136. package/lib/common/opener.js +0 -1
  137. package/lib/common/os-info.js +0 -1
  138. package/lib/common/plist-parser.js +0 -1
  139. package/lib/common/project-helper.js +0 -1
  140. package/lib/common/prompter.js +1 -9
  141. package/lib/common/queue.js +0 -1
  142. package/lib/common/resource-loader.js +0 -1
  143. package/lib/common/services/auto-completion-service.js +1 -13
  144. package/lib/common/services/cancellation.js +1 -2
  145. package/lib/common/services/commands-service.js +6 -17
  146. package/lib/common/services/help-service.js +3 -11
  147. package/lib/common/services/hooks-service.js +0 -13
  148. package/lib/common/services/ios-notification-service.js +0 -1
  149. package/lib/common/services/json-file-settings-service.js +0 -6
  150. package/lib/common/services/lock-service.js +0 -6
  151. package/lib/common/services/message-contract-generator.js +0 -1
  152. package/lib/common/services/messages-service.js +0 -1
  153. package/lib/common/services/micro-templating-service.js +0 -6
  154. package/lib/common/services/net-service.js +0 -3
  155. package/lib/common/services/project-files-manager.js +0 -5
  156. package/lib/common/services/project-files-provider-base.js +0 -1
  157. package/lib/common/services/proxy-service.js +0 -1
  158. package/lib/common/services/qr.js +0 -1
  159. package/lib/common/services/settings-service.js +0 -1
  160. package/lib/common/services/xcode-select-service.js +0 -1
  161. package/lib/common/utils.js +0 -1
  162. package/lib/common/validators/project-name-validator.js +0 -1
  163. package/lib/common/validators/validation-result.js +0 -1
  164. package/lib/common/verify-node-version.js +1 -8
  165. package/lib/common/yok.js +11 -32
  166. package/lib/config.js +1 -22
  167. package/lib/constants-provider.js +0 -1
  168. package/lib/constants.js +0 -53
  169. package/lib/controllers/build-controller.js +3 -4
  170. package/lib/controllers/debug-controller.js +3 -8
  171. package/lib/controllers/deploy-controller.js +0 -1
  172. package/lib/controllers/migrate-controller.js +3 -91
  173. package/lib/controllers/platform-controller.js +1 -9
  174. package/lib/controllers/prepare-controller.js +10 -17
  175. package/lib/controllers/run-controller.js +1 -17
  176. package/lib/controllers/update-controller-base.js +0 -1
  177. package/lib/controllers/update-controller.js +0 -11
  178. package/lib/data/build-data.js +2 -1
  179. package/lib/data/controller-data-base.js +0 -1
  180. package/lib/data/debug-data.js +0 -1
  181. package/lib/data/platform-data.js +0 -1
  182. package/lib/data/prepare-data.js +1 -1
  183. package/lib/data/run-data.js +0 -1
  184. package/lib/declarations.d.ts +12 -2
  185. package/lib/definitions/platform.d.ts +1 -0
  186. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  187. package/lib/detached-processes/cleanup-process.js +14 -18
  188. package/lib/detached-processes/file-log-service.js +1 -2
  189. package/lib/device-path-provider.js +0 -1
  190. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  191. package/lib/device-sockets/ios/notification.js +0 -3
  192. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  193. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  194. package/lib/helpers/deploy-command-helper.js +0 -1
  195. package/lib/helpers/key-command-helper.js +2 -4
  196. package/lib/helpers/livesync-command-helper.js +1 -4
  197. package/lib/helpers/network-connectivity-validator.js +0 -1
  198. package/lib/helpers/options-track-helper.js +2 -3
  199. package/lib/helpers/package-path-helper.js +0 -1
  200. package/lib/helpers/platform-command-helper.js +17 -10
  201. package/lib/helpers/version-validator-helper.js +0 -1
  202. package/lib/key-commands/bootstrap.js +2 -3
  203. package/lib/key-commands/index.js +4 -5
  204. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  205. package/lib/nativescript-cli-lib.js +0 -1
  206. package/lib/nativescript-cli.js +1 -10
  207. package/lib/node/pbxproj-dom-xcode.js +0 -1
  208. package/lib/node/xcode.js +0 -1
  209. package/lib/node-package-manager.js +1 -11
  210. package/lib/options.js +123 -141
  211. package/lib/package-installation-manager.js +1 -8
  212. package/lib/package-manager.js +0 -2
  213. package/lib/platform-command-param.js +0 -1
  214. package/lib/pnpm-package-manager.js +1 -4
  215. package/lib/project-data.js +0 -12
  216. package/lib/providers/project-files-provider.js +1 -2
  217. package/lib/resolvers/livesync-service-resolver.js +0 -1
  218. package/lib/services/analytics/analytics-broker-process.js +6 -10
  219. package/lib/services/analytics/analytics-broker.js +1 -2
  220. package/lib/services/analytics/analytics-service.js +25 -29
  221. package/lib/services/analytics/google-analytics-provider.js +12 -13
  222. package/lib/services/analytics-settings-service.js +0 -5
  223. package/lib/services/android/android-bundle-tool-service.js +0 -1
  224. package/lib/services/android/gradle-build-args-service.js +0 -3
  225. package/lib/services/android/gradle-build-service.js +0 -1
  226. package/lib/services/android/gradle-command-service.js +0 -1
  227. package/lib/services/android-device-debug-service.js +0 -6
  228. package/lib/services/android-plugin-build-service.js +12 -34
  229. package/lib/services/android-project-service.js +22 -86
  230. package/lib/services/android-resources-migration-service.js +0 -7
  231. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  232. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  233. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  234. package/lib/services/assets-generation/assets-generation-service.js +13 -17
  235. package/lib/services/build-artifacts-service.js +1 -2
  236. package/lib/services/build-data-service.js +0 -1
  237. package/lib/services/build-info-file-service.js +0 -1
  238. package/lib/services/cleanup-service.js +9 -13
  239. package/lib/services/cocoapods-platform-manager.js +0 -9
  240. package/lib/services/cocoapods-service.js +1 -21
  241. package/lib/services/debug-data-service.js +0 -1
  242. package/lib/services/debug-service-base.js +0 -7
  243. package/lib/services/device/device-install-app-service.js +1 -2
  244. package/lib/services/doctor-service.js +6 -21
  245. package/lib/services/extensibility-service.js +0 -8
  246. package/lib/services/files-hash-service.js +3 -3
  247. package/lib/services/hmr-status-service.js +0 -2
  248. package/lib/services/info-service.js +0 -1
  249. package/lib/services/initialize-service.js +1 -5
  250. package/lib/services/ios/export-options-plist-service.js +0 -4
  251. package/lib/services/ios/ios-signing-service.js +0 -4
  252. package/lib/services/ios/spm-service.js +0 -9
  253. package/lib/services/ios/xcodebuild-args-service.js +0 -9
  254. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  255. package/lib/services/ios/xcodebuild-service.js +0 -1
  256. package/lib/services/ios-debugger-port-service.js +0 -1
  257. package/lib/services/ios-device-debug-service.js +0 -1
  258. package/lib/services/ios-entitlements-service.js +0 -1
  259. package/lib/services/ios-extensions-service.js +0 -1
  260. package/lib/services/ios-log-filter.js +0 -20
  261. package/lib/services/ios-native-target-service.js +4 -6
  262. package/lib/services/ios-project-service.js +24 -26
  263. package/lib/services/ios-provision-service.js +0 -3
  264. package/lib/services/ios-watch-app-service.js +0 -1
  265. package/lib/services/ip-service.js +0 -2
  266. package/lib/services/itmstransporter-service.js +0 -1
  267. package/lib/services/karma-execution.js +0 -2
  268. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  269. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  270. package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -7
  271. package/lib/services/livesync/android-livesync-service.js +2 -3
  272. package/lib/services/livesync/android-livesync-tool.js +0 -4
  273. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  274. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  275. package/lib/services/livesync/ios-livesync-service.js +2 -4
  276. package/lib/services/livesync/livesync-socket.js +0 -1
  277. package/lib/services/livesync/platform-livesync-service-base.js +4 -8
  278. package/lib/services/livesync-process-data-service.js +0 -1
  279. package/lib/services/log-parser-service.js +0 -1
  280. package/lib/services/log-source-map-service.js +3 -17
  281. package/lib/services/marking-mode-service.js +5 -8
  282. package/lib/services/metadata-filtering-service.js +0 -1
  283. package/lib/services/npm-config-service.js +0 -4
  284. package/lib/services/pacote-service.js +0 -7
  285. package/lib/services/performance-service.js +1 -3
  286. package/lib/services/platform/add-platform-service.js +9 -48
  287. package/lib/services/platform/platform-validation-service.js +0 -1
  288. package/lib/services/platform/prepare-native-platform-service.js +8 -8
  289. package/lib/services/platform-environment-requirements.js +6 -9
  290. package/lib/services/platform-project-service-base.js +0 -1
  291. package/lib/services/platforms-data-service.js +0 -1
  292. package/lib/services/plugins-service.js +9 -19
  293. package/lib/services/prepare-data-service.js +0 -1
  294. package/lib/services/project-backup-service.js +0 -4
  295. package/lib/services/project-changes-service.js +11 -13
  296. package/lib/services/project-cleanup-service.js +0 -2
  297. package/lib/services/project-config-service.js +1 -18
  298. package/lib/services/project-data-service.js +7 -36
  299. package/lib/services/project-name-service.js +0 -1
  300. package/lib/services/project-service.js +0 -10
  301. package/lib/services/project-templates-service.js +2 -3
  302. package/lib/services/qr-code-terminal-service.js +0 -1
  303. package/lib/services/require-service.js +0 -1
  304. package/lib/services/start-service.js +0 -1
  305. package/lib/services/temp-service.js +0 -1
  306. package/lib/services/terminal-spinner-service.js +0 -2
  307. package/lib/services/test-execution-service.js +2 -9
  308. package/lib/services/test-initialization-service.js +0 -4
  309. package/lib/services/timeline-profiler-service.js +0 -1
  310. package/lib/services/user-settings-service.js +0 -1
  311. package/lib/services/versions-service.js +4 -6
  312. package/lib/services/watch-ignore-list-service.js +0 -1
  313. package/lib/services/webpack/webpack-compiler-service.js +15 -48
  314. package/lib/services/xcconfig-service.js +0 -2
  315. package/lib/services/xcproj-service.js +12 -1
  316. package/lib/shared-event-bus.js +0 -6
  317. package/lib/sys-info.js +1 -2
  318. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  319. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  320. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  321. package/lib/yarn-package-manager.js +0 -1
  322. package/lib/yarn2-package-manager.js +0 -3
  323. package/package.json +2 -2
  324. package/vendor/gradle-plugin/build.gradle +21 -6
  325. package/vendor/gradle-plugin/settings.gradle +13 -3
  326. package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +0 -15
  327. package/node_modules/rimraf/CHANGELOG.md +0 -65
  328. package/node_modules/stringify-package/CHANGELOG.md +0 -16
@@ -84,8 +84,6 @@ class AndroidToolsInfo {
84
84
  return doctor_1.androidToolsInfo.getPathToAdbFromAndroidHome();
85
85
  }
86
86
  catch (err) {
87
- // adb does not exist, so ANDROID_HOME is not set correctly
88
- // try getting default adb path (included in CLI package)
89
87
  this.$logger.trace(`Error while executing '${path.join(doctor_1.androidToolsInfo.androidHome, "platform-tools", "adb")} help'. Error is: ${err.message}`);
90
88
  }
91
89
  return null;
@@ -100,14 +98,6 @@ class AndroidToolsInfo {
100
98
  shouldGenerateTypings() {
101
99
  return this.$options.androidTypings;
102
100
  }
103
- /**
104
- * Prints messages on the screen. In case the showWarningsAsErrors flag is set to true, warnings are shown, else - errors.
105
- * Uses logger.warn for warnings and errors.failWithoutHelp when erros must be shown.
106
- * In case additional details must be shown as info message, use the second parameter.
107
- * NOTE: The additional information will not be printed when showWarningsAsErrors flag is set.
108
- * @param {string} msg The message that will be shown as warning or error.
109
- * @return {void}
110
- */
111
101
  printMessage(msg, showWarningsAsErrors) {
112
102
  if (showWarningsAsErrors) {
113
103
  this.$errors.fail(msg);
@@ -127,7 +117,6 @@ class AndroidToolsInfo {
127
117
  }
128
118
  return latestCompileSdk;
129
119
  }
130
- // TODO check if still needed
131
120
  getTargetSdk(compileSdk) {
132
121
  const targetSdk = this.$options.sdk
133
122
  ? parseInt(this.$options.sdk)
@@ -144,4 +133,3 @@ __decorate([
144
133
  ], AndroidToolsInfo.prototype, "validateAndroidHomeEnvVariable", null);
145
134
  exports.AndroidToolsInfo = AndroidToolsInfo;
146
135
  yok_1.injector.register("androidToolsInfo", AndroidToolsInfo);
147
- //# sourceMappingURL=android-tools-info.js.map
@@ -28,8 +28,6 @@ class BasePackageManager {
28
28
  }
29
29
  try {
30
30
  const viewResult = yield this.view(packageName, { name: true });
31
- // `npm view nonExistingPackageName` will return `nativescript`
32
- // if executed in the root dir of the CLI (npm 6.4.1)
33
31
  const packageNameRegex = new RegExp(packageName, "i");
34
32
  const isProperResult = packageNameRegex.test(viewResult);
35
33
  return isProperResult;
@@ -41,8 +39,6 @@ class BasePackageManager {
41
39
  }
42
40
  getPackageNameParts(fullPackageName) {
43
41
  return __awaiter(this, void 0, void 0, function* () {
44
- // support <reserved_name>@<version> syntax, for example typescript@1.0.0
45
- // support <scoped_package_name>@<version> syntax, for example @nativescript/vue-template@1.0.0
46
42
  const lastIndexOfAtSign = fullPackageName.lastIndexOf("@");
47
43
  let version = "";
48
44
  let templateName = "";
@@ -79,8 +75,6 @@ class BasePackageManager {
79
75
  stdio: stdioValue,
80
76
  shell: this.$hostInfo.isWindows,
81
77
  });
82
- // Whenever calling "npm install" or "yarn add" without any arguments (hence installing all dependencies) no output is emitted on stdout
83
- // Luckily, whenever you call "npm install" or "yarn add" to install all dependencies chances are you won't need the name/version of the package you're installing because there is none.
84
78
  const { isInstallingAllDependencies } = opts;
85
79
  if (isInstallingAllDependencies) {
86
80
  return null;
@@ -133,4 +127,3 @@ class BasePackageManager {
133
127
  }
134
128
  }
135
129
  exports.BasePackageManager = BasePackageManager;
136
- //# sourceMappingURL=base-package-manager.js.map
package/lib/bootstrap.js CHANGED
@@ -5,7 +5,6 @@ require("./common/bootstrap");
5
5
  yok_1.injector.requirePublicClass("logger", "./common/logger/logger");
6
6
  yok_1.injector.require("config", "./config");
7
7
  yok_1.injector.require("options", "./options");
8
- // note: order above is important!
9
8
  yok_1.injector.requirePublicClass("constants", "./constants-provider");
10
9
  yok_1.injector.require("projectData", "./project-data");
11
10
  yok_1.injector.requirePublic("projectDataService", "./services/project-data-service");
@@ -99,8 +98,6 @@ yok_1.injector.requireCommand("dev-test|android", "./commands/test");
99
98
  yok_1.injector.requireCommand("dev-test|ios", "./commands/test");
100
99
  yok_1.injector.requireCommand("test|android", "./commands/test");
101
100
  yok_1.injector.requireCommand("test|ios", "./commands/test");
102
- // injector.requireCommand("test|vision", "./commands/test");
103
- // injector.requireCommand("test|visionos", "./commands/test");
104
101
  yok_1.injector.requireCommand("test|init", "./commands/test-init");
105
102
  yok_1.injector.requireCommand("dev-generate-help", "./commands/generate-help");
106
103
  yok_1.injector.requireCommand("appstore|*list", "./commands/appstore-list");
@@ -151,7 +148,7 @@ yok_1.injector.require("LiveSyncSocket", "./services/livesync/livesync-socket");
151
148
  yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/android-livesync-tool");
152
149
  yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
153
150
  yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
154
- yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service"); // The name is used in https://github.com/NativeScript/nativescript-dev-typescript
151
+ yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
155
152
  yok_1.injector.requirePublic("sysInfo", "./sys-info");
156
153
  yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
157
154
  yok_1.injector.require("appDebugSocketProxyFactory", "./device-sockets/ios/app-debug-socket-proxy-factory");
@@ -204,4 +201,3 @@ yok_1.injector.require("keyCommandHelper", "./helpers/key-command-helper");
204
201
  yok_1.injector.requireCommand("start", "./commands/start");
205
202
  yok_1.injector.require("startService", "./services/start-service");
206
203
  require("./key-commands/bootstrap");
207
- //# sourceMappingURL=bootstrap.js.map
@@ -40,9 +40,6 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
40
40
  const packageJsonPath = path.join(pathToSave, "package.json");
41
41
  const jsonContentBefore = this.$fs.readJson(packageJsonPath);
42
42
  const flags = this.getFlagsString(config, true);
43
- // TODO: Confirm desired behavior. The npm version uses --legacy-peer-deps
44
- // by default, we could use `--no-peer` for Bun if similar is needed; the
45
- // pnpm version uses `--shamefully-hoist`, but Bun has no similar flag.
46
43
  let params = ["install", "--legacy-peer-deps"];
47
44
  const isInstallingAllDependencies = packageName === pathToSave;
48
45
  if (!isInstallingAllDependencies) {
@@ -55,7 +52,6 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
55
52
  return result;
56
53
  }
57
54
  catch (err) {
58
- // Revert package.json contents to preserve valid state
59
55
  this.$fs.writeJson(packageJsonPath, jsonContentBefore);
60
56
  throw err;
61
57
  }
@@ -69,10 +65,9 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
69
65
  });
70
66
  });
71
67
  }
72
- // Bun does not have a `view` command; use npm.
73
68
  view(packageName, config) {
74
69
  return __awaiter(this, void 0, void 0, function* () {
75
- const wrappedConfig = _.extend({}, config, { json: true }); // always require view response as JSON
70
+ const wrappedConfig = _.extend({}, config, { json: true });
76
71
  const flags = this.getFlagsString(wrappedConfig, false);
77
72
  let viewResult;
78
73
  try {
@@ -89,7 +84,6 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
89
84
  }
90
85
  });
91
86
  }
92
- // Bun does not have a `search` command; use npm.
93
87
  search(filter, config) {
94
88
  return __awaiter(this, void 0, void 0, function* () {
95
89
  const flags = this.getFlagsString(config, false);
@@ -98,20 +92,11 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
98
92
  }
99
93
  searchNpms(keyword) {
100
94
  return __awaiter(this, void 0, void 0, function* () {
101
- // Bugs with npms.io:
102
- // 1. API returns no results when a valid package name contains @ or /
103
- // even if using encodeURIComponent().
104
- // 2. npms.io's API no longer returns updated results; see
105
- // https://github.com/npms-io/npms-api/issues/112. Better to switch to
106
- // https://registry.npmjs.org/<query>
107
95
  const httpRequestResult = yield this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
108
96
  const result = JSON.parse(httpRequestResult.body);
109
97
  return result;
110
98
  });
111
99
  }
112
- // Bun does not have a command analogous to `npm config get registry`; Bun
113
- // uses `bunfig.toml` to define custom registries.
114
- // - TODO: read `bunfig.toml`, if it exists, and return the registry URL.
115
100
  getRegistryPackageData(packageName) {
116
101
  return __awaiter(this, void 0, void 0, function* () {
117
102
  const registry = yield this.$childProcess.exec(`npm config get registry`);
@@ -148,4 +133,3 @@ __decorate([
148
133
  ], BunPackageManager.prototype, "getCachePath", null);
149
134
  exports.BunPackageManager = BunPackageManager;
150
135
  yok_1.injector.register("bun", BunPackageManager);
151
- //# sourceMappingURL=bun-package-manager.js.map
package/lib/color.js CHANGED
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.color = exports.stripColors = void 0;
4
- // using chalk as some of our other dependencies are already using it...
5
- // exporting from here so we can easily refactor to a different color library if needed
6
4
  const ansi = require("ansi-colors");
7
5
  const chalk = require("chalk");
8
6
  function stripColors(formatStr) {
@@ -10,4 +8,3 @@ function stripColors(formatStr) {
10
8
  }
11
9
  exports.stripColors = stripColors;
12
10
  exports.color = chalk;
13
- //# sourceMappingURL=color.js.map
@@ -22,7 +22,7 @@ class AddPlatformCommand extends command_base_1.ValidatePlatformCommandBase {
22
22
  }
23
23
  execute(args) {
24
24
  return __awaiter(this, void 0, void 0, function* () {
25
- yield this.$platformCommandHelper.addPlatforms(args, this.$projectData, this.$options.frameworkPath);
25
+ yield this.$platformCommandHelper.addPlatforms(args, this.$projectData, this.$options.frameworkPath, this.$options.nativeHost);
26
26
  });
27
27
  }
28
28
  canExecute(args) {
@@ -47,4 +47,3 @@ class AddPlatformCommand extends command_base_1.ValidatePlatformCommandBase {
47
47
  }
48
48
  exports.AddPlatformCommand = AddPlatformCommand;
49
49
  yok_1.injector.registerCommand("platform|add", AddPlatformCommand);
50
- //# sourceMappingURL=add-platform.js.map
@@ -50,4 +50,3 @@ class AppleLogin {
50
50
  }
51
51
  exports.AppleLogin = AppleLogin;
52
52
  yok_1.injector.registerCommand("apple-login", AppleLogin);
53
- //# sourceMappingURL=apple-login.js.map
@@ -73,4 +73,3 @@ class ListiOSApps {
73
73
  }
74
74
  exports.ListiOSApps = ListiOSApps;
75
75
  yok_1.injector.registerCommand("appstore|*list", ListiOSApps);
76
- //# sourceMappingURL=appstore-list.js.map
@@ -63,12 +63,9 @@ class PublishIOS {
63
63
  this.$options.release = true;
64
64
  if (!ipaFilePath) {
65
65
  const platform = this.$devicePlatformsConstants.iOS.toLowerCase();
66
- // No .ipa path provided, build .ipa on out own.
67
66
  if (mobileProvisionIdentifier) {
68
- // This is not very correct as if we build multiple targets we will try to sign all of them using the signing identity here.
69
67
  this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
70
68
  mobileProvisionIdentifier);
71
- // As we need to build the package for device
72
69
  this.$options.forDevice = true;
73
70
  this.$options.provision = mobileProvisionIdentifier;
74
71
  const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, Object.assign(Object.assign({}, this.$options.argv), { watch: false }));
@@ -107,4 +104,3 @@ class PublishIOS {
107
104
  }
108
105
  exports.PublishIOS = PublishIOS;
109
106
  yok_1.injector.registerCommand(["publish|ios", "appstore|upload"], PublishIOS);
110
- //# sourceMappingURL=appstore-upload.js.map
@@ -24,11 +24,11 @@ class BuildCommandBase extends command_base_1.ValidatePlatformCommandBase {
24
24
  this.$logger = $logger;
25
25
  this.dashedOptions = {
26
26
  watch: {
27
- type: "boolean" /* OptionType.Boolean */,
27
+ type: "boolean",
28
28
  default: false,
29
29
  hasSensitiveValue: false,
30
30
  },
31
- hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
31
+ hmr: { type: "boolean", default: false, hasSensitiveValue: false },
32
32
  };
33
33
  this.$projectData.initializeProjectData();
34
34
  }
@@ -159,4 +159,3 @@ class BuildVisionOsCommand extends BuildIosCommand {
159
159
  exports.BuildVisionOsCommand = BuildVisionOsCommand;
160
160
  yok_1.injector.registerCommand("build|vision", BuildVisionOsCommand);
161
161
  yok_1.injector.registerCommand("build|visionos", BuildVisionOsCommand);
162
- //# sourceMappingURL=build.js.map
@@ -26,18 +26,6 @@ function bytesToHumanReadable(bytes) {
26
26
  }
27
27
  return `${bytes.toFixed(2)} ${units[unit]}`;
28
28
  }
29
- /**
30
- * A helper function to map an array of values to promises with a concurrency limit.
31
- * The mapper function should return a promise. It will be called for each value in the values array.
32
- * The concurrency limit is the number of promises that can be running at the same time.
33
- *
34
- * This function will return a promise that resolves when all values have been mapped.
35
- *
36
- * @param values A static array of values to map to promises
37
- * @param mapper A function that maps a value to a promise
38
- * @param concurrency The number of promises that can be running at the same time
39
- * @returns Promise<void>
40
- */
41
29
  function promiseMap(values, mapper, concurrency = 10) {
42
30
  let index = 0;
43
31
  let pending = 0;
@@ -96,7 +84,6 @@ class CleanCommand {
96
84
  try {
97
85
  const overridePathsToClean = this.$projectConfigService.getValue("cli.pathsToClean");
98
86
  const additionalPaths = this.$projectConfigService.getValue("cli.additionalPathsToClean");
99
- // allow overriding default paths to clean
100
87
  if (Array.isArray(overridePathsToClean)) {
101
88
  pathsToClean = overridePathsToClean;
102
89
  }
@@ -105,7 +92,6 @@ class CleanCommand {
105
92
  }
106
93
  }
107
94
  catch (err) {
108
- // ignore
109
95
  }
110
96
  const res = yield this.$projectCleanupService.clean(pathsToClean, {
111
97
  dryRun: isDryRun,
@@ -131,7 +117,6 @@ class CleanCommand {
131
117
  cleanMultipleProjects(spinner) {
132
118
  return __awaiter(this, void 0, void 0, function* () {
133
119
  if (!(0, helpers_1.isInteractive)() || this.$options.json) {
134
- // interactive terminal is required, and we can't output json in an interactive command.
135
120
  this.$logger.warn("No project found in the current directory.");
136
121
  return;
137
122
  }
@@ -147,7 +132,6 @@ class CleanCommand {
147
132
  const current = color_1.color.grey(`${computed}/${paths.length}`);
148
133
  spinner.start(`Gathering cleanable sizes. This may take a while... ${current}`);
149
134
  };
150
- // update the progress initially
151
135
  updateProgress();
152
136
  const projects = new Map();
153
137
  yield promiseMap(paths, (p) => {
@@ -165,10 +149,8 @@ class CleanCommand {
165
149
  })
166
150
  .then((size) => {
167
151
  if (size > 0 || size === -1) {
168
- // only store size if it's larger than 0 or -1 (error while getting size)
169
152
  projects.set(p, size);
170
153
  }
171
- // update the progress after each processed project
172
154
  computed++;
173
155
  updateProgress();
174
156
  });
@@ -193,7 +175,7 @@ class CleanCommand {
193
175
  value: p,
194
176
  };
195
177
  }), true, {
196
- optionsPerPage: process.stdout.rows - 6, // 6 lines are taken up by the instructions
178
+ optionsPerPage: process.stdout.rows - 6,
197
179
  });
198
180
  this.$logger.clearScreen();
199
181
  spinner.warn(`This will run "${color_1.color.yellow(`ns clean`)}" in all the selected projects and ${color_1.color.red.bold("delete files from your system")}!`);
@@ -242,7 +224,6 @@ class CleanCommand {
242
224
  let nsDirs = [];
243
225
  const getFiles = (dir) => __awaiter(this, void 0, void 0, function* () {
244
226
  if (dir.includes("node_modules")) {
245
- // skip traversing node_modules
246
227
  return;
247
228
  }
248
229
  const dirents = yield (0, promises_1.readdir)(dir, { withFileTypes: true }).catch((err) => {
@@ -253,7 +234,6 @@ class CleanCommand {
253
234
  ent.name.includes("nativescript.config.js"));
254
235
  if (hasNSConfig) {
255
236
  nsDirs.push(dir);
256
- // found a NativeScript project, stop traversing
257
237
  return;
258
238
  }
259
239
  yield Promise.all(dirents.map((dirent) => {
@@ -270,4 +250,3 @@ class CleanCommand {
270
250
  }
271
251
  exports.CleanCommand = CleanCommand;
272
252
  yok_1.injector.registerCommand("clean", CleanCommand);
273
- //# sourceMappingURL=clean.js.map
@@ -44,4 +44,3 @@ class ValidatePlatformCommandBase {
44
44
  }
45
45
  }
46
46
  exports.ValidatePlatformCommandBase = ValidatePlatformCommandBase;
47
- //# sourceMappingURL=command-base.js.map
@@ -61,7 +61,6 @@ class ConfigGetCommand {
61
61
  this.$logger.info(current);
62
62
  }
63
63
  catch (err) {
64
- // ignore
65
64
  }
66
65
  });
67
66
  }
@@ -120,7 +119,6 @@ class ConfigSetCommand {
120
119
  return JSON.parse(v);
121
120
  }
122
121
  catch (e) {
123
- // just treat it as a string
124
122
  return `${v}`;
125
123
  }
126
124
  }
@@ -129,4 +127,3 @@ exports.ConfigSetCommand = ConfigSetCommand;
129
127
  yok_1.injector.registerCommand("config|*list", ConfigListCommand);
130
128
  yok_1.injector.registerCommand("config|get", ConfigGetCommand);
131
129
  yok_1.injector.registerCommand("config|set", ConfigSetCommand);
132
- //# sourceMappingURL=config.js.map
@@ -115,7 +115,6 @@ class CreateProjectCommand {
115
115
  template: selectedTemplate,
116
116
  appId: this.$options.appid,
117
117
  pathToProject: this.$options.path,
118
- // its already validated above
119
118
  force: true,
120
119
  ignoreScripts: this.$options.ignoreScripts,
121
120
  });
@@ -413,10 +412,6 @@ can skip this prompt next time using the --template option, or the --ng, --react
413
412
  `For more options consult the docs or run ${color_1.color.green("ns --help")}`,
414
413
  "",
415
414
  ].join("\n"));
416
- // todo: add back ns preview
417
- // this.$logger.printMarkdown(
418
- // `After that you can preview it on device by executing \`$ ns preview\``
419
- // );
420
415
  });
421
416
  }
422
417
  }
@@ -434,4 +429,3 @@ CreateProjectCommand.TabsTemplateKey = "Tabs";
434
429
  CreateProjectCommand.TabsTemplateDescription = "An app with pre-built pages that uses tabs for navigation";
435
430
  exports.CreateProjectCommand = CreateProjectCommand;
436
431
  yok_1.injector.registerCommand("create", CreateProjectCommand);
437
- //# sourceMappingURL=create-project.js.map
@@ -106,10 +106,6 @@ class DebugIOSCommand {
106
106
  this.allowedParameters = [];
107
107
  this.platform = this.$devicePlatformsConstants.iOS;
108
108
  this.$projectData.initializeProjectData();
109
- // Do not dispose ios-device-lib, so the process will remain alive and the debug application (NativeScript Inspector or Chrome DevTools) will be able to connect to the socket.
110
- // In case we dispose ios-device-lib, the socket will be closed and the code will fail when the debug application tries to read/send data to device socket.
111
- // That's why the `$ tns debug ios --justlaunch` command will not release the terminal.
112
- // In case we do not set it to false, the dispose will be called once the command finishes its execution, which will prevent the debugging.
113
109
  $iosDeviceOperations.setShouldDispose(false);
114
110
  $iOSSimulatorLogProvider.setShouldDispose(false);
115
111
  }
@@ -128,7 +124,7 @@ class DebugIOSCommand {
128
124
  if (this.$options.inspector) {
129
125
  const macOSWarning = yield this.$sysInfo.getMacOSWarningMessage();
130
126
  if (macOSWarning &&
131
- macOSWarning.severity === "high" /* SystemWarningsSeverity.high */) {
127
+ macOSWarning.severity === "high") {
132
128
  this.$errors.fail(`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`);
133
129
  }
134
130
  }
@@ -193,4 +189,3 @@ __decorate([
193
189
  ], DebugAndroidCommand.prototype, "debugPlatformCommand", null);
194
190
  exports.DebugAndroidCommand = DebugAndroidCommand;
195
191
  yok_1.injector.registerCommand("debug|android", DebugAndroidCommand);
196
- //# sourceMappingURL=debug.js.map
@@ -25,11 +25,11 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
25
25
  this.allowedParameters = [];
26
26
  this.dashedOptions = {
27
27
  watch: {
28
- type: "boolean" /* OptionType.Boolean */,
28
+ type: "boolean",
29
29
  default: false,
30
30
  hasSensitiveValue: false,
31
31
  },
32
- hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
32
+ hmr: { type: "boolean", default: false, hasSensitiveValue: false },
33
33
  };
34
34
  this.$projectData.initializeProjectData();
35
35
  }
@@ -76,4 +76,3 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
76
76
  }
77
77
  exports.DeployOnDeviceCommand = DeployOnDeviceCommand;
78
78
  yok_1.injector.registerCommand("deploy", DeployOnDeviceCommand);
79
- //# sourceMappingURL=deploy.js.map
@@ -31,4 +31,3 @@ class InstallExtensionCommand {
31
31
  }
32
32
  exports.InstallExtensionCommand = InstallExtensionCommand;
33
33
  yok_1.injector.registerCommand("extension|install", InstallExtensionCommand);
34
- //# sourceMappingURL=install-extension.js.map
@@ -38,4 +38,3 @@ class ListExtensionsCommand {
38
38
  }
39
39
  exports.ListExtensionsCommand = ListExtensionsCommand;
40
40
  yok_1.injector.registerCommand("extension|*list", ListExtensionsCommand);
41
- //# sourceMappingURL=list-extensions.js.map
@@ -30,4 +30,3 @@ class UninstallExtensionCommand {
30
30
  }
31
31
  exports.UninstallExtensionCommand = UninstallExtensionCommand;
32
32
  yok_1.injector.registerCommand("extension|uninstall", UninstallExtensionCommand);
33
- //# sourceMappingURL=uninstall-extension.js.map
@@ -62,4 +62,3 @@ class FontsCommand {
62
62
  }
63
63
  exports.FontsCommand = FontsCommand;
64
64
  yok_1.injector.registerCommand("fonts", FontsCommand);
65
- //# sourceMappingURL=fonts.js.map
@@ -69,4 +69,3 @@ class GenerateSplashScreensCommand extends GenerateCommandBase {
69
69
  }
70
70
  exports.GenerateSplashScreensCommand = GenerateSplashScreensCommand;
71
71
  yok_1.injector.registerCommand("resources|generate|splashes", GenerateSplashScreensCommand);
72
- //# sourceMappingURL=generate-assets.js.map
@@ -24,4 +24,3 @@ class GenerateHelpCommand {
24
24
  }
25
25
  exports.GenerateHelpCommand = GenerateHelpCommand;
26
26
  yok_1.injector.registerCommand("dev-generate-help", GenerateHelpCommand);
27
- //# sourceMappingURL=generate-help.js.map
@@ -58,25 +58,16 @@ class GenerateCommand {
58
58
  }
59
59
  }
60
60
  exports.GenerateCommand = GenerateCommand;
61
- /**
62
- * Converts an array of command line arguments to options for the executed schematic.
63
- * @param rawArgs The command line arguments. They should be in the format 'key=value' for strings or 'key' for booleans.
64
- */
65
61
  function parseSchematicSettings(rawArgs) {
66
62
  const [optionStrings, args] = partition(rawArgs, (item) => item.includes("="));
67
63
  const options = optionStrings
68
- .map((o) => o.split("=")) // split to key and value pairs
69
- .map(([key, ...value]) => [key, value.join("=")]) // concat the value arrays if there are multiple = signs
64
+ .map((o) => o.split("="))
65
+ .map(([key, ...value]) => [key, value.join("=")])
70
66
  .reduce((obj, [key, value]) => {
71
67
  return Object.assign(Object.assign({}, obj), { [key]: value });
72
68
  }, {});
73
69
  return { options, args };
74
70
  }
75
- /**
76
- * Splits an array into two groups based on a predicate.
77
- * @param array The array to split.
78
- * @param predicate The condition to be used for splitting.
79
- */
80
71
  function partition(array, predicate) {
81
72
  return array.reduce(([pass, fail], item) => {
82
73
  return predicate(item)
@@ -85,4 +76,3 @@ function partition(array, predicate) {
85
76
  }, [[], []]);
86
77
  }
87
78
  yok_1.injector.registerCommand("generate", GenerateCommand);
88
- //# sourceMappingURL=generate.js.map
@@ -24,4 +24,3 @@ class InfoCommand {
24
24
  }
25
25
  exports.InfoCommand = InfoCommand;
26
26
  yok_1.injector.registerCommand("info", InfoCommand);
27
- //# sourceMappingURL=info.js.map
@@ -78,4 +78,3 @@ class InstallCommand {
78
78
  }
79
79
  exports.InstallCommand = InstallCommand;
80
80
  yok_1.injector.registerCommand("install", InstallCommand);
81
- //# sourceMappingURL=install.js.map
@@ -43,4 +43,3 @@ class ListPlatformsCommand {
43
43
  }
44
44
  exports.ListPlatformsCommand = ListPlatformsCommand;
45
45
  yok_1.injector.registerCommand("platform|*list", ListPlatformsCommand);
46
- //# sourceMappingURL=list-platforms.js.map
@@ -42,4 +42,3 @@ class MigrateCommand {
42
42
  }
43
43
  exports.MigrateCommand = MigrateCommand;
44
44
  yok_1.injector.registerCommand("migrate", MigrateCommand);
45
- //# sourceMappingURL=migrate.js.map
@@ -52,4 +52,3 @@ class CleanCommand {
52
52
  }
53
53
  exports.CleanCommand = CleanCommand;
54
54
  yok_1.injector.registerCommand("platform|clean", CleanCommand);
55
- //# sourceMappingURL=platform-clean.js.map
@@ -41,4 +41,3 @@ class AddPluginCommand {
41
41
  }
42
42
  exports.AddPluginCommand = AddPluginCommand;
43
43
  yok_1.injector.registerCommand(["plugin|add", "plugin|install"], AddPluginCommand);
44
- //# sourceMappingURL=add-plugin.js.map
@@ -66,4 +66,3 @@ class BuildPluginCommand {
66
66
  }
67
67
  exports.BuildPluginCommand = BuildPluginCommand;
68
68
  yok_1.injector.registerCommand("plugin|build", BuildPluginCommand);
69
- //# sourceMappingURL=build-plugin.js.map
@@ -38,14 +38,12 @@ class CreatePluginCommand {
38
38
  const selectedTemplate = this.$options.template;
39
39
  const selectedPath = path.resolve(pathToProject || ".");
40
40
  const projectDir = path.join(selectedPath, pluginRepoName);
41
- // Must be out of try catch block, because will throw error if folder alredy exists and we don't want to delete it.
42
41
  this.ensurePackageDir(projectDir);
43
42
  try {
44
43
  yield this.downloadPackage(selectedTemplate, projectDir);
45
44
  yield this.setupSeed(projectDir, pluginRepoName);
46
45
  }
47
46
  catch (err) {
48
- // The call to this.ensurePackageDir() above will throw error if folder alredy exists, so it is safe to delete here.
49
47
  this.$fs.deleteDirectory(projectDir);
50
48
  throw err;
51
49
  }
@@ -85,7 +83,6 @@ class CreatePluginCommand {
85
83
  !config.includeTypeScriptDemo)) {
86
84
  this.$logger.printMarkdown("Using default values for plugin creation options since your shell is not interactive.");
87
85
  }
88
- // run postclone script manually and kill it if it takes more than 10 sec
89
86
  const pathToPostCloneScript = path.join("scripts", "postclone");
90
87
  const params = [
91
88
  pathToPostCloneScript,
@@ -146,7 +143,6 @@ class CreatePluginCommand {
146
143
  getPluginNameSource(pluginNameSource, pluginRepoName) {
147
144
  return __awaiter(this, void 0, void 0, function* () {
148
145
  if (!pluginNameSource) {
149
- // remove nativescript- prefix for naming plugin files
150
146
  const prefix = "nativescript-";
151
147
  pluginNameSource = pluginRepoName.toLowerCase().startsWith(prefix)
152
148
  ? pluginRepoName.slice(prefix.length, pluginRepoName.length)
@@ -177,4 +173,3 @@ class CreatePluginCommand {
177
173
  }
178
174
  exports.CreatePluginCommand = CreatePluginCommand;
179
175
  yok_1.injector.registerCommand(["plugin|create"], CreatePluginCommand);
180
- //# sourceMappingURL=create-plugin.js.map
@@ -52,4 +52,3 @@ class ListPluginsCommand {
52
52
  }
53
53
  exports.ListPluginsCommand = ListPluginsCommand;
54
54
  yok_1.injector.registerCommand("plugin|*list", ListPluginsCommand);
55
- //# sourceMappingURL=list-plugins.js.map
@@ -33,7 +33,6 @@ class RemovePluginCommand {
33
33
  }
34
34
  let pluginNames = [];
35
35
  try {
36
- // try installing the plugins, so we can get information from node_modules about their native code, libs, etc.
37
36
  const installedPlugins = yield this.$pluginsService.getAllInstalledPlugins(this.$projectData);
38
37
  pluginNames = installedPlugins.map((pl) => pl.name);
39
38
  }
@@ -51,4 +50,3 @@ class RemovePluginCommand {
51
50
  }
52
51
  exports.RemovePluginCommand = RemovePluginCommand;
53
52
  yok_1.injector.registerCommand("plugin|remove", RemovePluginCommand);
54
- //# sourceMappingURL=remove-plugin.js.map
@@ -50,4 +50,3 @@ class UpdatePluginCommand {
50
50
  }
51
51
  exports.UpdatePluginCommand = UpdatePluginCommand;
52
52
  yok_1.injector.registerCommand("plugin|update", UpdatePluginCommand);
53
- //# sourceMappingURL=update-plugin.js.map
@@ -29,18 +29,13 @@ class PostInstallCliCommand {
29
29
  return __awaiter(this, void 0, void 0, function* () {
30
30
  const isRunningWithSudoUser = !!process.env.SUDO_USER;
31
31
  if (!this.$hostInfo.isWindows) {
32
- // when running under 'sudo' we create a working dir with wrong owner (root) and
33
- // it is no longer accessible for the user initiating the installation
34
- // patch the owner here
35
32
  if (isRunningWithSudoUser) {
36
- // TODO: Check if this is the correct place, probably we should set this at the end of the command.
37
33
  yield this.$fs.setCurrentUserAsOwner(this.$settingsService.getProfileDir(), process.env.SUDO_USER);
38
34
  }
39
35
  }
40
36
  const canExecutePostInstallTask = !isRunningWithSudoUser || (0, helpers_1.doesCurrentNpmCommandMatch)([/^--unsafe-perm$/]);
41
37
  if (canExecutePostInstallTask) {
42
38
  yield this.$helpService.generateHtmlPages();
43
- // Explicitly ask for confirmation of usage-reporting:
44
39
  yield this.$analyticsService.checkConsent();
45
40
  yield this.$commandsService.tryExecuteCommand("autocomplete", []);
46
41
  }
@@ -60,4 +55,3 @@ class PostInstallCliCommand {
60
55
  }
61
56
  exports.PostInstallCliCommand = PostInstallCliCommand;
62
57
  yok_1.injector.registerCommand("post-install-cli", PostInstallCliCommand);
63
- //# sourceMappingURL=post-install.js.map