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
package/lib/.d.ts CHANGED
@@ -338,6 +338,7 @@
338
338
  /// <reference path="services/apple-portal/apple-portal-cookie-service.ts" />
339
339
  /// <reference path="services/apple-portal/apple-portal-session-service.ts" />
340
340
  /// <reference path="services/apple-portal/definitions.d.ts" />
341
+ /// <reference path="services/apple-portal/srp/srp-wrapper.ts" />
341
342
  /// <reference path="services/assets-generation/assets-generation-service.ts" />
342
343
  /// <reference path="services/build-artifacts-service.ts" />
343
344
  /// <reference path="services/build-data-service.ts" />
@@ -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");
@@ -100,8 +99,6 @@ yok_1.injector.requireCommand("dev-test|android", "./commands/test");
100
99
  yok_1.injector.requireCommand("dev-test|ios", "./commands/test");
101
100
  yok_1.injector.requireCommand("test|android", "./commands/test");
102
101
  yok_1.injector.requireCommand("test|ios", "./commands/test");
103
- // injector.requireCommand("test|vision", "./commands/test");
104
- // injector.requireCommand("test|visionos", "./commands/test");
105
102
  yok_1.injector.requireCommand("test|init", "./commands/test-init");
106
103
  yok_1.injector.requireCommand("dev-generate-help", "./commands/generate-help");
107
104
  yok_1.injector.requireCommand("appstore|*list", "./commands/appstore-list");
@@ -152,7 +149,7 @@ yok_1.injector.require("LiveSyncSocket", "./services/livesync/livesync-socket");
152
149
  yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/android-livesync-tool");
153
150
  yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
154
151
  yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
155
- yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service"); // The name is used in https://github.com/NativeScript/nativescript-dev-typescript
152
+ yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
156
153
  yok_1.injector.requirePublic("sysInfo", "./sys-info");
157
154
  yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
158
155
  yok_1.injector.require("appDebugSocketProxyFactory", "./device-sockets/ios/app-debug-socket-proxy-factory");
@@ -212,4 +209,3 @@ yok_1.injector.requireCommand([
212
209
  "native|add|objective-c",
213
210
  ], "./commands/native-add");
214
211
  require("./key-commands/bootstrap");
215
- //# 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
@@ -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
@@ -44,8 +44,7 @@ class PublishIOS {
44
44
  (yield this.$prompter.getString("Apple ID", { allowEmpty: false }));
45
45
  const password = args[1] || (yield this.$prompter.getPassword("Apple ID password"));
46
46
  const user = yield this.$applePortalSessionService.createUserSession({ username, password }, {
47
- applicationSpecificPassword: this.$options
48
- .appleApplicationSpecificPassword,
47
+ applicationSpecificPassword: this.$options.appleApplicationSpecificPassword,
49
48
  sessionBase64: this.$options.appleSessionBase64,
50
49
  requireInteractiveConsole: true,
51
50
  requireApplicationSpecificPassword: true,
@@ -63,15 +62,11 @@ class PublishIOS {
63
62
  this.$options.release = true;
64
63
  if (!ipaFilePath) {
65
64
  const platform = this.$devicePlatformsConstants.iOS.toLowerCase();
66
- // No .ipa path provided, build .ipa on out own.
67
65
  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
66
  this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
70
67
  mobileProvisionIdentifier);
71
- // As we need to build the package for device
72
- this.$options.forDevice = true;
73
68
  this.$options.provision = mobileProvisionIdentifier;
74
- const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, Object.assign(Object.assign({}, this.$options.argv), { watch: false }));
69
+ const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, Object.assign(Object.assign({}, this.$options.argv), { buildForAppStore: true, watch: false }));
75
70
  ipaFilePath = yield this.$buildController.prepareAndBuild(buildData);
76
71
  }
77
72
  else {
@@ -84,8 +79,7 @@ class PublishIOS {
84
79
  yield this.$itmsTransporterService.upload({
85
80
  credentials: { username, password },
86
81
  user,
87
- applicationSpecificPassword: this.$options
88
- .appleApplicationSpecificPassword,
82
+ applicationSpecificPassword: this.$options.appleApplicationSpecificPassword,
89
83
  ipaFilePath,
90
84
  shouldExtractIpa: !!this.$options.ipa,
91
85
  verboseLogging: this.$logger.getLevel() === "TRACE",
@@ -107,4 +101,3 @@ class PublishIOS {
107
101
  }
108
102
  exports.PublishIOS = PublishIOS;
109
103
  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,7 +31,6 @@ class EmbedCommand extends prepare_1.PrepareCommand {
31
31
  }
32
32
  resolveHostProjectPath(hostProjectPath) {
33
33
  if (hostProjectPath.charAt(0) === ".") {
34
- // resolve relative to the project dir
35
34
  const projectDir = this.$projectData.projectDir;
36
35
  return (0, path_1.resolve)(projectDir, hostProjectPath);
37
36
  }
@@ -64,11 +63,7 @@ class EmbedCommand extends prepare_1.PrepareCommand {
64
63
  if (!canSuperExecute) {
65
64
  return false;
66
65
  }
67
- // args[0] is the platform
68
- // args[1] is the path to the host project
69
- // args[2] is the host project module name
70
66
  const platform = args[0].toLowerCase();
71
- // also allow these to be set in the nativescript.config.ts
72
67
  if (!args[1]) {
73
68
  const hostProjectPath = this.getEmbedConfigForKey("hostProjectPath", platform);
74
69
  if (hostProjectPath) {
@@ -89,10 +84,8 @@ class EmbedCommand extends prepare_1.PrepareCommand {
89
84
  });
90
85
  }
91
86
  getEmbedConfigForKey(key, platform) {
92
- // get the embed.<platform>.<key> value, or fallback to embed.<key> value
93
87
  return this.$projectConfigService.getValue(`embed.${platform}.${key}`, this.$projectConfigService.getValue(`embed.${key}`));
94
88
  }
95
89
  }
96
90
  exports.EmbedCommand = EmbedCommand;
97
91
  yok_1.injector.registerCommand("embed", EmbedCommand);
98
- //# sourceMappingURL=embed.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
@@ -194,7 +194,6 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
194
194
  const classFilePath = path.join(iosSourceBase, `${className}.m`);
195
195
  const headerFilePath = path.join(iosSourceBase, `${className}.h`);
196
196
  if (this.generateObjectiveCFiles(className, classFilePath, headerFilePath)) {
197
- // Modify/Generate moduleMap
198
197
  this.generateOrUpdateModuleMap(`${className}.h`, path.join(iosSourceBase, "module.modulemap"));
199
198
  }
200
199
  }
@@ -207,9 +206,7 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
207
206
  }
208
207
  const headerDeclaration = `header "${headerPath}"`;
209
208
  if (moduleMapContent.includes(`module ${moduleName}`)) {
210
- // Module declaration already exists in the module map
211
209
  if (moduleMapContent.includes(headerDeclaration)) {
212
- // Header is already present in the module map
213
210
  this.$logger.warn(`Header '${headerFileName}' is already added to the module map.`);
214
211
  return;
215
212
  }
@@ -217,7 +214,6 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
217
214
  fs.writeFileSync(moduleMapPath, updatedModuleMapContent);
218
215
  }
219
216
  else {
220
- // Module declaration does not exist in the module map
221
217
  const moduleDeclaration = `module ${moduleName} {${os_1.EOL} ${headerDeclaration}${os_1.EOL} export *${os_1.EOL}}`;
222
218
  moduleMapContent += `${os_1.EOL}${os_1.EOL}${moduleDeclaration}`;
223
219
  fs.writeFileSync(moduleMapPath, moduleMapContent);
@@ -302,4 +298,3 @@ yok_1.injector.registerCommand(["native|add|java"], NativeAddJavaCommand);
302
298
  yok_1.injector.registerCommand(["native|add|kotlin"], NativeAddKotlinCommand);
303
299
  yok_1.injector.registerCommand(["native|add|swift"], NativeAddSwiftCommand);
304
300
  yok_1.injector.registerCommand(["native|add|objective-c"], NativeAddObjectiveCCommand);
305
- //# sourceMappingURL=native-add.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