nativescript 9.0.0-alpha.7 → 9.0.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/lib/android-tools-info.js +0 -12
  2. package/lib/base-package-manager.js +0 -7
  3. package/lib/bootstrap.js +1 -5
  4. package/lib/bun-package-manager.js +1 -14
  5. package/lib/color.js +0 -4
  6. package/lib/commands/add-platform.js +0 -1
  7. package/lib/commands/apple-login.js +0 -1
  8. package/lib/commands/appstore-list.js +0 -1
  9. package/lib/commands/appstore-upload.js +0 -3
  10. package/lib/commands/build.js +2 -3
  11. package/lib/commands/clean.js +1 -23
  12. package/lib/commands/command-base.js +0 -1
  13. package/lib/commands/config.js +0 -4
  14. package/lib/commands/create-project.js +0 -6
  15. package/lib/commands/debug.js +1 -6
  16. package/lib/commands/deploy.js +2 -3
  17. package/lib/commands/embedding/embed.js +0 -7
  18. package/lib/commands/extensibility/install-extension.js +0 -1
  19. package/lib/commands/extensibility/list-extensions.js +0 -1
  20. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  21. package/lib/commands/fonts.js +0 -1
  22. package/lib/commands/generate-assets.js +0 -1
  23. package/lib/commands/generate-help.js +0 -1
  24. package/lib/commands/generate.js +1 -48
  25. package/lib/commands/info.js +0 -1
  26. package/lib/commands/install.js +0 -1
  27. package/lib/commands/list-platforms.js +0 -1
  28. package/lib/commands/migrate.js +0 -1
  29. package/lib/commands/native-add.js +0 -5
  30. package/lib/commands/platform-clean.js +0 -1
  31. package/lib/commands/plugin/add-plugin.js +0 -1
  32. package/lib/commands/plugin/build-plugin.js +0 -1
  33. package/lib/commands/plugin/create-plugin.js +0 -5
  34. package/lib/commands/plugin/list-plugins.js +0 -1
  35. package/lib/commands/plugin/remove-plugin.js +0 -2
  36. package/lib/commands/plugin/update-plugin.js +0 -1
  37. package/lib/commands/post-install.js +0 -6
  38. package/lib/commands/prepare.js +3 -4
  39. package/lib/commands/preview.js +0 -2
  40. package/lib/commands/remove-platform.js +0 -1
  41. package/lib/commands/resources/resources-update.js +0 -2
  42. package/lib/commands/run.js +0 -1
  43. package/lib/commands/setup.js +0 -1
  44. package/lib/commands/start.js +0 -1
  45. package/lib/commands/test-init.js +0 -4
  46. package/lib/commands/test.js +2 -9
  47. package/lib/commands/typings.js +1 -2
  48. package/lib/commands/update-platform.js +0 -5
  49. package/lib/commands/update.js +0 -2
  50. package/lib/commands/widget.js +1 -20
  51. package/lib/common/bootstrap.js +0 -1
  52. package/lib/common/child-process.js +0 -3
  53. package/lib/common/codeGeneration/code-entity.js +0 -1
  54. package/lib/common/codeGeneration/code-printer.js +0 -1
  55. package/lib/common/command-params.js +0 -1
  56. package/lib/common/commands/analytics.js +0 -3
  57. package/lib/common/commands/autocompletion.js +0 -3
  58. package/lib/common/commands/device/device-log-stream.js +0 -1
  59. package/lib/common/commands/device/get-file.js +0 -2
  60. package/lib/common/commands/device/list-applications.js +0 -1
  61. package/lib/common/commands/device/list-devices.js +0 -3
  62. package/lib/common/commands/device/list-files.js +0 -2
  63. package/lib/common/commands/device/put-file.js +0 -2
  64. package/lib/common/commands/device/run-application.js +0 -1
  65. package/lib/common/commands/device/stop-application.js +0 -1
  66. package/lib/common/commands/device/uninstall-application.js +0 -1
  67. package/lib/common/commands/doctor.js +2 -3
  68. package/lib/common/commands/generate-messages.js +0 -1
  69. package/lib/common/commands/help.js +0 -1
  70. package/lib/common/commands/package-manager-get.js +0 -1
  71. package/lib/common/commands/package-manager-set.js +0 -1
  72. package/lib/common/commands/post-install.js +0 -1
  73. package/lib/common/commands/preuninstall.js +2 -11
  74. package/lib/common/commands/proxy/proxy-base.js +0 -4
  75. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  76. package/lib/common/commands/proxy/proxy-get.js +0 -1
  77. package/lib/common/commands/proxy/proxy-set.js +0 -1
  78. package/lib/common/common-lib.js +0 -1
  79. package/lib/common/constants.js +0 -11
  80. package/lib/common/decorators.js +0 -48
  81. package/lib/common/dispatchers.js +1 -10
  82. package/lib/common/errors.js +3 -13
  83. package/lib/common/file-system.js +2 -13
  84. package/lib/common/header.js +0 -3
  85. package/lib/common/helpers.js +3 -89
  86. package/lib/common/host-info.js +0 -4
  87. package/lib/common/http-client.js +0 -20
  88. package/lib/common/logger/appenders/cli-appender.js +0 -4
  89. package/lib/common/logger/appenders/emit-appender.js +0 -4
  90. package/lib/common/logger/layouts/cli-layout.js +0 -1
  91. package/lib/common/logger/logger.js +0 -5
  92. package/lib/common/messages/messages.js +0 -6
  93. package/lib/common/mobile/android/android-application-manager.js +1 -20
  94. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  95. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  96. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  97. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  98. package/lib/common/mobile/android/android-device.js +0 -8
  99. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  100. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  101. package/lib/common/mobile/android/android-log-filter.js +0 -4
  102. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  103. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  104. package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
  105. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  106. package/lib/common/mobile/android/logcat-helper.js +0 -13
  107. package/lib/common/mobile/application-manager-base.js +0 -6
  108. package/lib/common/mobile/device-emitter.js +0 -4
  109. package/lib/common/mobile/device-log-emitter.js +0 -1
  110. package/lib/common/mobile/device-log-provider-base.js +0 -1
  111. package/lib/common/mobile/device-log-provider.js +0 -23
  112. package/lib/common/mobile/device-platforms-constants.js +0 -1
  113. package/lib/common/mobile/emulator-helper.js +0 -3
  114. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  115. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  116. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  117. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  118. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  119. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  120. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  121. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  122. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  123. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  124. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  125. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  126. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  127. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  128. package/lib/common/mobile/log-filter.js +0 -2
  129. package/lib/common/mobile/logging-levels.js +0 -1
  130. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  131. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  132. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  133. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  134. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  135. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  136. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  137. package/lib/common/mobile/mobile-helper.js +0 -1
  138. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  139. package/lib/common/opener.js +0 -1
  140. package/lib/common/os-info.js +0 -1
  141. package/lib/common/plist-parser.js +0 -1
  142. package/lib/common/project-helper.js +0 -1
  143. package/lib/common/prompter.js +1 -9
  144. package/lib/common/queue.js +0 -1
  145. package/lib/common/resource-loader.js +0 -1
  146. package/lib/common/services/auto-completion-service.js +1 -13
  147. package/lib/common/services/cancellation.js +1 -2
  148. package/lib/common/services/commands-service.js +6 -17
  149. package/lib/common/services/help-service.js +3 -11
  150. package/lib/common/services/hooks-service.js +0 -13
  151. package/lib/common/services/ios-notification-service.js +0 -1
  152. package/lib/common/services/json-file-settings-service.js +0 -6
  153. package/lib/common/services/lock-service.js +0 -6
  154. package/lib/common/services/message-contract-generator.js +0 -1
  155. package/lib/common/services/messages-service.js +0 -1
  156. package/lib/common/services/micro-templating-service.js +0 -6
  157. package/lib/common/services/net-service.js +0 -3
  158. package/lib/common/services/project-files-manager.js +0 -5
  159. package/lib/common/services/project-files-provider-base.js +0 -1
  160. package/lib/common/services/proxy-service.js +0 -1
  161. package/lib/common/services/qr.js +0 -1
  162. package/lib/common/services/settings-service.js +0 -1
  163. package/lib/common/services/xcode-select-service.js +0 -1
  164. package/lib/common/utils.js +0 -1
  165. package/lib/common/validators/project-name-validator.js +0 -1
  166. package/lib/common/validators/validation-result.js +0 -1
  167. package/lib/common/verify-node-version.js +1 -8
  168. package/lib/common/yok.js +11 -32
  169. package/lib/config.js +1 -22
  170. package/lib/constants-provider.js +0 -1
  171. package/lib/constants.js +0 -53
  172. package/lib/controllers/build-controller.js +3 -4
  173. package/lib/controllers/debug-controller.js +3 -8
  174. package/lib/controllers/deploy-controller.js +0 -1
  175. package/lib/controllers/migrate-controller.js +4 -90
  176. package/lib/controllers/platform-controller.js +1 -9
  177. package/lib/controllers/prepare-controller.js +4 -17
  178. package/lib/controllers/run-controller.js +1 -17
  179. package/lib/controllers/update-controller-base.js +0 -1
  180. package/lib/controllers/update-controller.js +0 -11
  181. package/lib/data/build-data.js +0 -1
  182. package/lib/data/controller-data-base.js +0 -1
  183. package/lib/data/debug-data.js +0 -1
  184. package/lib/data/platform-data.js +0 -1
  185. package/lib/data/prepare-data.js +0 -1
  186. package/lib/data/run-data.js +0 -1
  187. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  188. package/lib/detached-processes/cleanup-process.js +14 -18
  189. package/lib/detached-processes/file-log-service.js +1 -2
  190. package/lib/device-path-provider.js +0 -1
  191. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  192. package/lib/device-sockets/ios/notification.js +0 -3
  193. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  194. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  195. package/lib/helpers/deploy-command-helper.js +0 -1
  196. package/lib/helpers/key-command-helper.js +2 -4
  197. package/lib/helpers/livesync-command-helper.js +1 -4
  198. package/lib/helpers/network-connectivity-validator.js +0 -1
  199. package/lib/helpers/options-track-helper.js +2 -3
  200. package/lib/helpers/package-path-helper.js +0 -1
  201. package/lib/helpers/platform-command-helper.js +2 -7
  202. package/lib/helpers/version-validator-helper.js +0 -1
  203. package/lib/key-commands/bootstrap.js +2 -3
  204. package/lib/key-commands/index.js +4 -5
  205. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  206. package/lib/nativescript-cli-lib.js +0 -1
  207. package/lib/nativescript-cli.js +1 -10
  208. package/lib/node/pbxproj-dom-xcode.js +0 -1
  209. package/lib/node/xcode.js +0 -1
  210. package/lib/node-package-manager.js +1 -11
  211. package/lib/options.js +119 -144
  212. package/lib/package-installation-manager.js +1 -8
  213. package/lib/package-manager.js +0 -2
  214. package/lib/platform-command-param.js +0 -1
  215. package/lib/pnpm-package-manager.js +1 -4
  216. package/lib/project-data.js +0 -12
  217. package/lib/providers/project-files-provider.js +0 -1
  218. package/lib/resolvers/livesync-service-resolver.js +0 -1
  219. package/lib/services/analytics/analytics-broker-process.js +6 -10
  220. package/lib/services/analytics/analytics-broker.js +1 -2
  221. package/lib/services/analytics/analytics-service.js +25 -29
  222. package/lib/services/analytics/google-analytics-provider.js +12 -13
  223. package/lib/services/analytics-settings-service.js +0 -5
  224. package/lib/services/android/android-bundle-tool-service.js +0 -1
  225. package/lib/services/android/gradle-build-args-service.js +0 -3
  226. package/lib/services/android/gradle-build-service.js +0 -1
  227. package/lib/services/android/gradle-command-service.js +0 -1
  228. package/lib/services/android-device-debug-service.js +0 -6
  229. package/lib/services/android-plugin-build-service.js +2 -31
  230. package/lib/services/android-project-service.js +4 -71
  231. package/lib/services/android-resources-migration-service.js +0 -7
  232. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  233. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  234. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  235. package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
  236. package/lib/services/assets-generation/assets-generation-service.js +5 -10
  237. package/lib/services/build-artifacts-service.js +1 -2
  238. package/lib/services/build-data-service.js +0 -1
  239. package/lib/services/build-info-file-service.js +0 -1
  240. package/lib/services/bundler/bundler-compiler-service.js +35 -75
  241. package/lib/services/bundler/bundler.js +0 -1
  242. package/lib/services/cleanup-service.js +9 -13
  243. package/lib/services/cocoapods-platform-manager.js +0 -9
  244. package/lib/services/cocoapods-service.js +1 -21
  245. package/lib/services/debug-data-service.js +0 -1
  246. package/lib/services/debug-service-base.js +0 -7
  247. package/lib/services/device/device-install-app-service.js +1 -2
  248. package/lib/services/doctor-service.js +6 -21
  249. package/lib/services/extensibility-service.js +0 -8
  250. package/lib/services/files-hash-service.js +0 -1
  251. package/lib/services/hmr-status-service.js +0 -2
  252. package/lib/services/info-service.js +0 -1
  253. package/lib/services/initialize-service.js +1 -5
  254. package/lib/services/ios/export-options-plist-service.js +0 -4
  255. package/lib/services/ios/ios-signing-service.js +0 -4
  256. package/lib/services/ios/spm-service.js +0 -11
  257. package/lib/services/ios/xcodebuild-args-service.js +0 -9
  258. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  259. package/lib/services/ios/xcodebuild-service.js +1 -2
  260. package/lib/services/ios-debugger-port-service.js +0 -1
  261. package/lib/services/ios-device-debug-service.js +0 -1
  262. package/lib/services/ios-entitlements-service.js +0 -1
  263. package/lib/services/ios-extensions-service.js +0 -1
  264. package/lib/services/ios-log-filter.js +0 -20
  265. package/lib/services/ios-native-target-service.js +4 -6
  266. package/lib/services/ios-project-service.js +1 -91
  267. package/lib/services/ios-provision-service.js +0 -3
  268. package/lib/services/ios-watch-app-service.js +0 -1
  269. package/lib/services/ip-service.js +0 -2
  270. package/lib/services/itmstransporter-service.js +0 -1
  271. package/lib/services/karma-execution.js +0 -2
  272. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  273. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  274. package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
  275. package/lib/services/livesync/android-livesync-service.js +0 -1
  276. package/lib/services/livesync/android-livesync-tool.js +3 -5
  277. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  278. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  279. package/lib/services/livesync/ios-livesync-service.js +0 -2
  280. package/lib/services/livesync/livesync-socket.js +0 -1
  281. package/lib/services/livesync/platform-livesync-service-base.js +0 -5
  282. package/lib/services/livesync-process-data-service.js +0 -1
  283. package/lib/services/log-parser-service.js +0 -1
  284. package/lib/services/log-source-map-service.js +0 -15
  285. package/lib/services/marking-mode-service.js +5 -8
  286. package/lib/services/metadata-filtering-service.js +0 -1
  287. package/lib/services/npm-config-service.js +0 -4
  288. package/lib/services/pacote-service.js +0 -7
  289. package/lib/services/performance-service.js +1 -3
  290. package/lib/services/platform/add-platform-service.js +2 -49
  291. package/lib/services/platform/platform-validation-service.js +0 -1
  292. package/lib/services/platform/prepare-native-platform-service.js +2 -5
  293. package/lib/services/platform-environment-requirements.js +3 -8
  294. package/lib/services/platform-project-service-base.js +0 -1
  295. package/lib/services/platforms-data-service.js +0 -1
  296. package/lib/services/plugins-service.js +2 -20
  297. package/lib/services/prepare-data-service.js +0 -1
  298. package/lib/services/project-backup-service.js +0 -4
  299. package/lib/services/project-changes-service.js +3 -14
  300. package/lib/services/project-cleanup-service.js +0 -2
  301. package/lib/services/project-config-service.js +2 -21
  302. package/lib/services/project-data-service.js +7 -36
  303. package/lib/services/project-name-service.js +0 -1
  304. package/lib/services/project-service.js +0 -10
  305. package/lib/services/project-templates-service.js +2 -3
  306. package/lib/services/qr-code-terminal-service.js +0 -1
  307. package/lib/services/require-service.js +0 -1
  308. package/lib/services/start-service.js +0 -1
  309. package/lib/services/temp-service.js +0 -3
  310. package/lib/services/terminal-spinner-service.js +0 -2
  311. package/lib/services/test-execution-service.js +2 -9
  312. package/lib/services/test-initialization-service.js +0 -4
  313. package/lib/services/timeline-profiler-service.js +0 -1
  314. package/lib/services/user-settings-service.js +0 -1
  315. package/lib/services/versions-service.js +4 -6
  316. package/lib/services/watch-ignore-list-service.js +0 -1
  317. package/lib/services/xcconfig-service.js +0 -2
  318. package/lib/services/xcproj-service.js +0 -1
  319. package/lib/shared-event-bus.js +0 -6
  320. package/lib/sys-info.js +1 -2
  321. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  322. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  323. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  324. package/lib/yarn-package-manager.js +0 -1
  325. package/lib/yarn2-package-manager.js +0 -3
  326. package/package.json +18 -18
@@ -74,8 +74,6 @@ class AndroidToolsInfo {
74
74
  return doctor_1.androidToolsInfo.getPathToAdbFromAndroidHome();
75
75
  }
76
76
  catch (err) {
77
- // adb does not exist, so ANDROID_HOME is not set correctly
78
- // try getting default adb path (included in CLI package)
79
77
  this.$logger.trace(`Error while executing '${path.join(doctor_1.androidToolsInfo.androidHome, "platform-tools", "adb")} help'. Error is: ${err.message}`);
80
78
  }
81
79
  return null;
@@ -89,14 +87,6 @@ class AndroidToolsInfo {
89
87
  shouldGenerateTypings() {
90
88
  return this.$options.androidTypings;
91
89
  }
92
- /**
93
- * Prints messages on the screen. In case the showWarningsAsErrors flag is set to true, warnings are shown, else - errors.
94
- * Uses logger.warn for warnings and errors.failWithoutHelp when erros must be shown.
95
- * In case additional details must be shown as info message, use the second parameter.
96
- * NOTE: The additional information will not be printed when showWarningsAsErrors flag is set.
97
- * @param {string} msg The message that will be shown as warning or error.
98
- * @return {void}
99
- */
100
90
  printMessage(msg, showWarningsAsErrors) {
101
91
  if (showWarningsAsErrors) {
102
92
  this.$errors.fail(msg);
@@ -116,7 +106,6 @@ class AndroidToolsInfo {
116
106
  }
117
107
  return latestCompileSdk;
118
108
  }
119
- // TODO check if still needed
120
109
  getTargetSdk(compileSdk) {
121
110
  const targetSdk = this.$options.sdk
122
111
  ? parseInt(this.$options.sdk)
@@ -133,4 +122,3 @@ __decorate([
133
122
  (0, decorators_1.cache)()
134
123
  ], AndroidToolsInfo.prototype, "validateAndroidHomeEnvVariable", null);
135
124
  yok_1.injector.register("androidToolsInfo", AndroidToolsInfo);
136
- //# sourceMappingURL=android-tools-info.js.map
@@ -18,8 +18,6 @@ class BasePackageManager {
18
18
  }
19
19
  try {
20
20
  const viewResult = await this.view(packageName, { name: true });
21
- // `npm view nonExistingPackageName` will return `nativescript`
22
- // if executed in the root dir of the CLI (npm 6.4.1)
23
21
  const packageNameRegex = new RegExp(packageName, "i");
24
22
  const isProperResult = packageNameRegex.test(viewResult);
25
23
  return isProperResult;
@@ -29,8 +27,6 @@ class BasePackageManager {
29
27
  }
30
28
  }
31
29
  async getPackageNameParts(fullPackageName) {
32
- // support <reserved_name>@<version> syntax, for example typescript@1.0.0
33
- // support <scoped_package_name>@<version> syntax, for example @nativescript/vue-template@1.0.0
34
30
  const lastIndexOfAtSign = fullPackageName.lastIndexOf("@");
35
31
  let version = "";
36
32
  let templateName = "";
@@ -63,8 +59,6 @@ class BasePackageManager {
63
59
  stdio: stdioValue,
64
60
  shell: this.$hostInfo.isWindows,
65
61
  });
66
- // Whenever calling "npm install" or "yarn add" without any arguments (hence installing all dependencies) no output is emitted on stdout
67
- // 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.
68
62
  const { isInstallingAllDependencies } = opts;
69
63
  if (isInstallingAllDependencies) {
70
64
  return null;
@@ -116,4 +110,3 @@ class BasePackageManager {
116
110
  }
117
111
  }
118
112
  exports.BasePackageManager = BasePackageManager;
119
- //# 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");
@@ -213,4 +210,3 @@ yok_1.injector.requireCommand([
213
210
  ], "./commands/native-add");
214
211
  yok_1.injector.requireCommand(["widget", "widget|ios"], "./commands/widget");
215
212
  require("./key-commands/bootstrap");
216
- //# sourceMappingURL=bootstrap.js.map
@@ -42,7 +42,6 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
42
42
  return result;
43
43
  }
44
44
  catch (err) {
45
- // Revert package.json contents to preserve valid state
46
45
  this.$fs.writeJson(packageJsonPath, jsonContentBefore);
47
46
  throw err;
48
47
  }
@@ -53,9 +52,8 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
53
52
  cwd,
54
53
  });
55
54
  }
56
- // Bun does not have a `view` command; use npm.
57
55
  async view(packageName, config) {
58
- const wrappedConfig = _.extend({}, config, { json: true }); // always require view response as JSON
56
+ const wrappedConfig = _.extend({}, config, { json: true });
59
57
  const flags = this.getFlagsString(wrappedConfig, false);
60
58
  let viewResult;
61
59
  try {
@@ -71,25 +69,15 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
71
69
  return null;
72
70
  }
73
71
  }
74
- // Bun does not have a `search` command; use npm.
75
72
  async search(filter, config) {
76
73
  const flags = this.getFlagsString(config, false);
77
74
  return this.$childProcess.exec(`npm search ${filter.join(" ")} ${flags}`);
78
75
  }
79
76
  async searchNpms(keyword) {
80
- // Bugs with npms.io:
81
- // 1. API returns no results when a valid package name contains @ or /
82
- // even if using encodeURIComponent().
83
- // 2. npms.io's API no longer returns updated results; see
84
- // https://github.com/npms-io/npms-api/issues/112. Better to switch to
85
- // https://registry.npmjs.org/<query>
86
77
  const httpRequestResult = await this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
87
78
  const result = JSON.parse(httpRequestResult.body);
88
79
  return result;
89
80
  }
90
- // Bun does not have a command analogous to `npm config get registry`; Bun
91
- // uses `bunfig.toml` to define custom registries.
92
- // - TODO: read `bunfig.toml`, if it exists, and return the registry URL.
93
81
  async getRegistryPackageData(packageName) {
94
82
  const registry = await this.$childProcess.exec(`npm config get registry`);
95
83
  const url = registry.trim() + packageName;
@@ -122,4 +110,3 @@ __decorate([
122
110
  (0, decorators_1.cache)()
123
111
  ], BunPackageManager.prototype, "getCachePath", null);
124
112
  yok_1.injector.register("bun", BunPackageManager);
125
- //# sourceMappingURL=bun-package-manager.js.map
package/lib/color.js CHANGED
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.stripColors = exports.color = void 0;
4
4
  const node_util_1 = require("node:util");
5
- // Create a chalk-like API using the Node.js util.styleText function
6
5
  exports.color = {
7
6
  reset: (text) => (0, node_util_1.styleText)("reset", text),
8
7
  bold: (text) => (0, node_util_1.styleText)("bold", text),
@@ -12,7 +11,6 @@ exports.color = {
12
11
  inverse: (text) => (0, node_util_1.styleText)("inverse", text),
13
12
  hidden: (text) => (0, node_util_1.styleText)("hidden", text),
14
13
  strikethrough: (text) => (0, node_util_1.styleText)("strikethrough", text),
15
- // Text colors
16
14
  black: (text) => (0, node_util_1.styleText)("black", text),
17
15
  red: (text) => (0, node_util_1.styleText)("red", text),
18
16
  blue: (text) => (0, node_util_1.styleText)("blue", text),
@@ -23,7 +21,6 @@ exports.color = {
23
21
  yellow: (text) => (0, node_util_1.styleText)("yellow", text),
24
22
  green: (text) => (0, node_util_1.styleText)("green", text),
25
23
  grey: (text) => (0, node_util_1.styleText)("grey", text),
26
- // Background colors
27
24
  bgBlack: (text) => (0, node_util_1.styleText)("bgBlack", text),
28
25
  bgBlackBright: (text) => (0, node_util_1.styleText)("bgBlackBright", text),
29
26
  bgRed: (text) => (0, node_util_1.styleText)("bgRed", text),
@@ -42,4 +39,3 @@ exports.color = {
42
39
  };
43
40
  const stripColors = (text) => (0, node_util_1.stripVTControlCharacters)(text);
44
41
  exports.stripColors = stripColors;
45
- //# sourceMappingURL=color.js.map
@@ -31,4 +31,3 @@ class AddPlatformCommand extends command_base_1.ValidatePlatformCommandBase {
31
31
  }
32
32
  exports.AddPlatformCommand = AddPlatformCommand;
33
33
  yok_1.injector.registerCommand("platform|add", AddPlatformCommand);
34
- //# sourceMappingURL=add-platform.js.map
@@ -39,4 +39,3 @@ class AppleLogin {
39
39
  }
40
40
  exports.AppleLogin = AppleLogin;
41
41
  yok_1.injector.registerCommand("apple-login", AppleLogin);
42
- //# sourceMappingURL=apple-login.js.map
@@ -62,4 +62,3 @@ class ListiOSApps {
62
62
  }
63
63
  exports.ListiOSApps = ListiOSApps;
64
64
  yok_1.injector.registerCommand("appstore|*list", ListiOSApps);
65
- //# sourceMappingURL=appstore-list.js.map
@@ -52,9 +52,7 @@ class PublishIOS {
52
52
  this.$options.release = true;
53
53
  if (!ipaFilePath) {
54
54
  const platform = this.$devicePlatformsConstants.iOS.toLowerCase();
55
- // No .ipa path provided, build .ipa on out own.
56
55
  if (mobileProvisionIdentifier) {
57
- // This is not very correct as if we build multiple targets we will try to sign all of them using the signing identity here.
58
56
  this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
59
57
  mobileProvisionIdentifier);
60
58
  this.$options.provision = mobileProvisionIdentifier;
@@ -90,4 +88,3 @@ class PublishIOS {
90
88
  }
91
89
  exports.PublishIOS = PublishIOS;
92
90
  yok_1.injector.registerCommand(["publish|ios", "appstore|upload"], PublishIOS);
93
- //# sourceMappingURL=appstore-upload.js.map
@@ -15,11 +15,11 @@ class BuildCommandBase extends command_base_1.ValidatePlatformCommandBase {
15
15
  this.$logger = $logger;
16
16
  this.dashedOptions = {
17
17
  watch: {
18
- type: "boolean" /* OptionType.Boolean */,
18
+ type: "boolean",
19
19
  default: false,
20
20
  hasSensitiveValue: false,
21
21
  },
22
- hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
22
+ hmr: { type: "boolean", default: false, hasSensitiveValue: false },
23
23
  };
24
24
  this.$projectData.initializeProjectData();
25
25
  }
@@ -127,4 +127,3 @@ class BuildVisionOsCommand extends BuildIosCommand {
127
127
  exports.BuildVisionOsCommand = BuildVisionOsCommand;
128
128
  yok_1.injector.registerCommand("build|vision", BuildVisionOsCommand);
129
129
  yok_1.injector.registerCommand("build|visionos", BuildVisionOsCommand);
130
- //# sourceMappingURL=build.js.map
@@ -17,18 +17,6 @@ function bytesToHumanReadable(bytes) {
17
17
  }
18
18
  return `${bytes.toFixed(2)} ${units[unit]}`;
19
19
  }
20
- /**
21
- * A helper function to map an array of values to promises with a concurrency limit.
22
- * The mapper function should return a promise. It will be called for each value in the values array.
23
- * The concurrency limit is the number of promises that can be running at the same time.
24
- *
25
- * This function will return a promise that resolves when all values have been mapped.
26
- *
27
- * @param values A static array of values to map to promises
28
- * @param mapper A function that maps a value to a promise
29
- * @param concurrency The number of promises that can be running at the same time
30
- * @returns Promise<void>
31
- */
32
20
  function promiseMap(values, mapper, concurrency = 10) {
33
21
  let index = 0;
34
22
  let pending = 0;
@@ -81,12 +69,10 @@ class CleanCommand {
81
69
  constants.HOOKS_DIR_NAME,
82
70
  constants.PLATFORMS_DIR_NAME,
83
71
  constants.NODE_MODULES_FOLDER_NAME,
84
- constants.PACKAGE_LOCK_JSON_FILE_NAME,
85
72
  ];
86
73
  try {
87
74
  const overridePathsToClean = this.$projectConfigService.getValue("cli.pathsToClean");
88
75
  const additionalPaths = this.$projectConfigService.getValue("cli.additionalPathsToClean");
89
- // allow overriding default paths to clean
90
76
  if (Array.isArray(overridePathsToClean)) {
91
77
  pathsToClean = overridePathsToClean;
92
78
  }
@@ -95,7 +81,6 @@ class CleanCommand {
95
81
  }
96
82
  }
97
83
  catch (err) {
98
- // ignore
99
84
  }
100
85
  const res = await this.$projectCleanupService.clean(pathsToClean, {
101
86
  dryRun: isDryRun,
@@ -119,7 +104,6 @@ class CleanCommand {
119
104
  }
120
105
  async cleanMultipleProjects(spinner) {
121
106
  if (!(0, helpers_1.isInteractive)() || this.$options.json) {
122
- // interactive terminal is required, and we can't output json in an interactive command.
123
107
  this.$logger.warn("No project found in the current directory.");
124
108
  return;
125
109
  }
@@ -135,7 +119,6 @@ class CleanCommand {
135
119
  const current = color_1.color.grey(`${computed}/${paths.length}`);
136
120
  spinner.start(`Gathering cleanable sizes. This may take a while... ${current}`);
137
121
  };
138
- // update the progress initially
139
122
  updateProgress();
140
123
  const projects = new Map();
141
124
  await promiseMap(paths, (p) => {
@@ -153,10 +136,8 @@ class CleanCommand {
153
136
  })
154
137
  .then((size) => {
155
138
  if (size > 0 || size === -1) {
156
- // only store size if it's larger than 0 or -1 (error while getting size)
157
139
  projects.set(p, size);
158
140
  }
159
- // update the progress after each processed project
160
141
  computed++;
161
142
  updateProgress();
162
143
  });
@@ -181,7 +162,7 @@ class CleanCommand {
181
162
  value: p,
182
163
  };
183
164
  }), true, {
184
- optionsPerPage: process.stdout.rows - 6, // 6 lines are taken up by the instructions
165
+ optionsPerPage: process.stdout.rows - 6,
185
166
  });
186
167
  this.$logger.clearScreen();
187
168
  spinner.warn(`This will run "${color_1.color.yellow(`ns clean`)}" in all the selected projects and ${color_1.color.styleText(["red", "bold"], "delete files from your system")}!`);
@@ -228,7 +209,6 @@ class CleanCommand {
228
209
  let nsDirs = [];
229
210
  const getFiles = async (dir) => {
230
211
  if (dir.includes("node_modules")) {
231
- // skip traversing node_modules
232
212
  return;
233
213
  }
234
214
  const dirents = await (0, promises_1.readdir)(dir, { withFileTypes: true }).catch((err) => {
@@ -239,7 +219,6 @@ class CleanCommand {
239
219
  ent.name.includes("nativescript.config.js"));
240
220
  if (hasNSConfig) {
241
221
  nsDirs.push(dir);
242
- // found a NativeScript project, stop traversing
243
222
  return;
244
223
  }
245
224
  await Promise.all(dirents.map((dirent) => {
@@ -255,4 +234,3 @@ class CleanCommand {
255
234
  }
256
235
  exports.CleanCommand = CleanCommand;
257
236
  yok_1.injector.registerCommand("clean", CleanCommand);
258
- //# sourceMappingURL=clean.js.map
@@ -31,4 +31,3 @@ class ValidatePlatformCommandBase {
31
31
  }
32
32
  }
33
33
  exports.ValidatePlatformCommandBase = ValidatePlatformCommandBase;
34
- //# sourceMappingURL=command-base.js.map
@@ -25,7 +25,6 @@ class ConfigListCommand {
25
25
  Object.keys(value)
26
26
  .map((key) => {
27
27
  return (color_1.color.green(`${indent()}${key}: `) +
28
- // @ts-ignore
29
28
  this.getValueString(value[key], depth + 1));
30
29
  })
31
30
  .join("\n"));
@@ -50,7 +49,6 @@ class ConfigGetCommand {
50
49
  this.$logger.info(current);
51
50
  }
52
51
  catch (err) {
53
- // ignore
54
52
  }
55
53
  }
56
54
  async canExecute(args) {
@@ -102,7 +100,6 @@ class ConfigSetCommand {
102
100
  return JSON.parse(v);
103
101
  }
104
102
  catch (e) {
105
- // just treat it as a string
106
103
  return `${v}`;
107
104
  }
108
105
  }
@@ -111,4 +108,3 @@ exports.ConfigSetCommand = ConfigSetCommand;
111
108
  yok_1.injector.registerCommand("config|*list", ConfigListCommand);
112
109
  yok_1.injector.registerCommand("config|get", ConfigGetCommand);
113
110
  yok_1.injector.registerCommand("config|set", ConfigSetCommand);
114
- //# sourceMappingURL=config.js.map
@@ -105,7 +105,6 @@ class CreateProjectCommand {
105
105
  template: selectedTemplate,
106
106
  appId: this.$options.appid,
107
107
  pathToProject: this.$options.path,
108
- // its already validated above
109
108
  force: true,
110
109
  ignoreScripts: this.$options.ignoreScripts,
111
110
  });
@@ -400,10 +399,6 @@ can skip this prompt next time using the --template option, or using --ng, --rea
400
399
  `For more options consult the docs or run ${color_1.color.green("ns --help")}`,
401
400
  "",
402
401
  ].join("\n"));
403
- // todo: add back ns preview
404
- // this.$logger.printMarkdown(
405
- // `After that you can preview it on device by executing \`$ ns preview\``
406
- // );
407
402
  }
408
403
  }
409
404
  exports.CreateProjectCommand = CreateProjectCommand;
@@ -420,4 +415,3 @@ CreateProjectCommand.DrawerTemplateDescription = "An app with pre-built pages th
420
415
  CreateProjectCommand.TabsTemplateKey = "Tabs";
421
416
  CreateProjectCommand.TabsTemplateDescription = "An app with pre-built pages that uses tabs for navigation";
422
417
  yok_1.injector.registerCommand("create", CreateProjectCommand);
423
- //# sourceMappingURL=create-project.js.map
@@ -90,10 +90,6 @@ class DebugIOSCommand {
90
90
  this.allowedParameters = [];
91
91
  this.platform = this.$devicePlatformsConstants.iOS;
92
92
  this.$projectData.initializeProjectData();
93
- // 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.
94
- // 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.
95
- // That's why the `$ tns debug ios --justlaunch` command will not release the terminal.
96
- // 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.
97
93
  $iosDeviceOperations.setShouldDispose(false);
98
94
  $iOSSimulatorLogProvider.setShouldDispose(false);
99
95
  }
@@ -111,7 +107,7 @@ class DebugIOSCommand {
111
107
  if (this.$options.inspector) {
112
108
  const macOSWarning = await this.$sysInfo.getMacOSWarningMessage();
113
109
  if (macOSWarning &&
114
- macOSWarning.severity === "high" /* SystemWarningsSeverity.high */) {
110
+ macOSWarning.severity === "high") {
115
111
  this.$errors.fail(`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`);
116
112
  }
117
113
  }
@@ -171,4 +167,3 @@ __decorate([
171
167
  (0, decorators_1.cache)()
172
168
  ], DebugAndroidCommand.prototype, "debugPlatformCommand", null);
173
169
  yok_1.injector.registerCommand("debug|android", DebugAndroidCommand);
174
- //# sourceMappingURL=debug.js.map
@@ -16,11 +16,11 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
16
16
  this.allowedParameters = [];
17
17
  this.dashedOptions = {
18
18
  watch: {
19
- type: "boolean" /* OptionType.Boolean */,
19
+ type: "boolean",
20
20
  default: false,
21
21
  hasSensitiveValue: false,
22
22
  },
23
- hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
23
+ hmr: { type: "boolean", default: false, hasSensitiveValue: false },
24
24
  };
25
25
  this.$projectData.initializeProjectData();
26
26
  }
@@ -60,4 +60,3 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
60
60
  }
61
61
  exports.DeployOnDeviceCommand = DeployOnDeviceCommand;
62
62
  yok_1.injector.registerCommand("deploy", DeployOnDeviceCommand);
63
- //# sourceMappingURL=deploy.js.map
@@ -22,7 +22,6 @@ class EmbedCommand extends prepare_1.PrepareCommand {
22
22
  }
23
23
  resolveHostProjectPath(hostProjectPath) {
24
24
  if (hostProjectPath.charAt(0) === ".") {
25
- // resolve relative to the project dir
26
25
  const projectDir = this.$projectData.projectDir;
27
26
  return (0, path_1.resolve)(projectDir, hostProjectPath);
28
27
  }
@@ -46,11 +45,7 @@ class EmbedCommand extends prepare_1.PrepareCommand {
46
45
  if (!canSuperExecute) {
47
46
  return false;
48
47
  }
49
- // args[0] is the platform
50
- // args[1] is the path to the host project
51
- // args[2] is the host project module name
52
48
  const platform = args[0].toLowerCase();
53
- // also allow these to be set in the nativescript.config.ts
54
49
  if (!args[1]) {
55
50
  const hostProjectPath = this.getEmbedConfigForKey("hostProjectPath", platform);
56
51
  if (hostProjectPath) {
@@ -70,10 +65,8 @@ class EmbedCommand extends prepare_1.PrepareCommand {
70
65
  return true;
71
66
  }
72
67
  getEmbedConfigForKey(key, platform) {
73
- // get the embed.<platform>.<key> value, or fallback to embed.<key> value
74
68
  return this.$projectConfigService.getValue(`embed.${platform}.${key}`, this.$projectConfigService.getValue(`embed.${key}`));
75
69
  }
76
70
  }
77
71
  exports.EmbedCommand = EmbedCommand;
78
72
  yok_1.injector.registerCommand("embed", EmbedCommand);
79
- //# sourceMappingURL=embed.js.map
@@ -20,4 +20,3 @@ class InstallExtensionCommand {
20
20
  }
21
21
  exports.InstallExtensionCommand = InstallExtensionCommand;
22
22
  yok_1.injector.registerCommand("extension|install", InstallExtensionCommand);
23
- //# sourceMappingURL=install-extension.js.map
@@ -27,4 +27,3 @@ class ListExtensionsCommand {
27
27
  }
28
28
  exports.ListExtensionsCommand = ListExtensionsCommand;
29
29
  yok_1.injector.registerCommand("extension|*list", ListExtensionsCommand);
30
- //# sourceMappingURL=list-extensions.js.map
@@ -19,4 +19,3 @@ class UninstallExtensionCommand {
19
19
  }
20
20
  exports.UninstallExtensionCommand = UninstallExtensionCommand;
21
21
  yok_1.injector.registerCommand("extension|uninstall", UninstallExtensionCommand);
22
- //# sourceMappingURL=uninstall-extension.js.map
@@ -51,4 +51,3 @@ class FontsCommand {
51
51
  }
52
52
  exports.FontsCommand = FontsCommand;
53
53
  yok_1.injector.registerCommand("fonts", FontsCommand);
54
- //# sourceMappingURL=fonts.js.map
@@ -54,4 +54,3 @@ class GenerateSplashScreensCommand extends GenerateCommandBase {
54
54
  }
55
55
  exports.GenerateSplashScreensCommand = GenerateSplashScreensCommand;
56
56
  yok_1.injector.registerCommand("resources|generate|splashes", GenerateSplashScreensCommand);
57
- //# sourceMappingURL=generate-assets.js.map
@@ -13,4 +13,3 @@ class GenerateHelpCommand {
13
13
  }
14
14
  exports.GenerateHelpCommand = GenerateHelpCommand;
15
15
  yok_1.injector.registerCommand("dev-generate-help", GenerateHelpCommand);
16
- //# sourceMappingURL=generate-help.js.map
@@ -3,10 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GenerateCommand = void 0;
4
4
  const yok_1 = require("../common/yok");
5
5
  class GenerateCommand {
6
- // private executionOptions: ExecutionOptions;
7
- constructor($logger,
8
- // private $options: IOptions,
9
- $errors) {
6
+ constructor($logger, $errors) {
10
7
  this.$logger = $logger;
11
8
  this.$errors = $errors;
12
9
  this.allowedParameters = [];
@@ -14,7 +11,6 @@ class GenerateCommand {
14
11
  async execute(_rawArgs) {
15
12
  try {
16
13
  this.$logger.info("If you have ideas for this command, please discuss at https://nativescript.org/discord");
17
- // await run(this.executionOptions);
18
14
  }
19
15
  catch (error) {
20
16
  this.$errors.fail(error.message);
@@ -26,52 +22,9 @@ class GenerateCommand {
26
22
  return true;
27
23
  }
28
24
  validateExecutionOptions() {
29
- // if (!this.executionOptions.schematic) {
30
- // this.$errors.failWithHelp(
31
- // `The generate command requires a schematic name to be specified.`
32
- // );
33
- // }
34
25
  }
35
26
  setExecutionOptions(rawArgs) {
36
- // const options = this.parseRawArgs(rawArgs);
37
- // this.executionOptions = {
38
- // ...options,
39
- // logger: this.$logger,
40
- // directory: process.cwd(),
41
- // };
42
27
  }
43
28
  }
44
29
  exports.GenerateCommand = GenerateCommand;
45
- /**
46
- * Converts an array of command line arguments to options for the executed schematic.
47
- * @param rawArgs The command line arguments. They should be in the format 'key=value' for strings or 'key' for booleans.
48
- */
49
- // function parseSchematicSettings(rawArgs: string[]) {
50
- // const [optionStrings, args] = partition<string>(rawArgs, (item) =>
51
- // item.includes("=")
52
- // );
53
- // const options = optionStrings
54
- // .map((o) => o.split("=")) // split to key and value pairs
55
- // .map(([key, ...value]) => [key, value.join("=")]) // concat the value arrays if there are multiple = signs
56
- // .reduce((obj, [key, value]) => {
57
- // return { ...obj, [key]: value };
58
- // }, {});
59
- // return { options, args };
60
- // }
61
- /**
62
- * Splits an array into two groups based on a predicate.
63
- * @param array The array to split.
64
- * @param predicate The condition to be used for splitting.
65
- */
66
- // function partition<T>(array: T[], predicate: (item: T) => boolean): T[][] {
67
- // return array.reduce(
68
- // ([pass, fail], item) => {
69
- // return predicate(item)
70
- // ? [[...pass, item], fail]
71
- // : [pass, [...fail, item]];
72
- // },
73
- // [[], []]
74
- // );
75
- // }
76
30
  yok_1.injector.registerCommand("generate", GenerateCommand);
77
- //# sourceMappingURL=generate.js.map
@@ -13,4 +13,3 @@ class InfoCommand {
13
13
  }
14
14
  exports.InfoCommand = InfoCommand;
15
15
  yok_1.injector.registerCommand("info", InfoCommand);
16
- //# sourceMappingURL=info.js.map
@@ -63,4 +63,3 @@ class InstallCommand {
63
63
  }
64
64
  exports.InstallCommand = InstallCommand;
65
65
  yok_1.injector.registerCommand("install", InstallCommand);
66
- //# sourceMappingURL=install.js.map
@@ -32,4 +32,3 @@ class ListPlatformsCommand {
32
32
  }
33
33
  exports.ListPlatformsCommand = ListPlatformsCommand;
34
34
  yok_1.injector.registerCommand("platform|*list", ListPlatformsCommand);
35
- //# sourceMappingURL=list-platforms.js.map
@@ -31,4 +31,3 @@ class MigrateCommand {
31
31
  }
32
32
  exports.MigrateCommand = MigrateCommand;
33
33
  yok_1.injector.registerCommand("migrate", MigrateCommand);
34
- //# sourceMappingURL=migrate.js.map
@@ -173,7 +173,6 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
173
173
  const classFilePath = path.join(iosSourceBase, `${className}.m`);
174
174
  const headerFilePath = path.join(iosSourceBase, `${className}.h`);
175
175
  if (this.generateObjectiveCFiles(className, classFilePath, headerFilePath)) {
176
- // Modify/Generate moduleMap
177
176
  this.generateOrUpdateModuleMap(`${className}.h`, path.join(iosSourceBase, "module.modulemap"));
178
177
  }
179
178
  }
@@ -186,9 +185,7 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
186
185
  }
187
186
  const headerDeclaration = `header "${headerPath}"`;
188
187
  if (moduleMapContent.includes(`module ${moduleName}`)) {
189
- // Module declaration already exists in the module map
190
188
  if (moduleMapContent.includes(headerDeclaration)) {
191
- // Header is already present in the module map
192
189
  this.$logger.warn(`Header '${headerFileName}' is already added to the module map.`);
193
190
  return;
194
191
  }
@@ -196,7 +193,6 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
196
193
  fs.writeFileSync(moduleMapPath, updatedModuleMapContent);
197
194
  }
198
195
  else {
199
- // Module declaration does not exist in the module map
200
196
  const moduleDeclaration = `module ${moduleName} {${os_1.EOL} ${headerDeclaration}${os_1.EOL} export *${os_1.EOL}}`;
201
197
  moduleMapContent += `${os_1.EOL}${os_1.EOL}${moduleDeclaration}`;
202
198
  fs.writeFileSync(moduleMapPath, moduleMapContent);
@@ -279,4 +275,3 @@ yok_1.injector.registerCommand(["native|add|java"], NativeAddJavaCommand);
279
275
  yok_1.injector.registerCommand(["native|add|kotlin"], NativeAddKotlinCommand);
280
276
  yok_1.injector.registerCommand(["native|add|swift"], NativeAddSwiftCommand);
281
277
  yok_1.injector.registerCommand(["native|add|objective-c"], NativeAddObjectiveCCommand);
282
- //# sourceMappingURL=native-add.js.map
@@ -39,4 +39,3 @@ class CleanCommand {
39
39
  }
40
40
  exports.CleanCommand = CleanCommand;
41
41
  yok_1.injector.registerCommand("platform|clean", CleanCommand);
42
- //# sourceMappingURL=platform-clean.js.map
@@ -28,4 +28,3 @@ class AddPluginCommand {
28
28
  }
29
29
  exports.AddPluginCommand = AddPluginCommand;
30
30
  yok_1.injector.registerCommand(["plugin|add", "plugin|install"], AddPluginCommand);
31
- //# sourceMappingURL=add-plugin.js.map
@@ -53,4 +53,3 @@ class BuildPluginCommand {
53
53
  }
54
54
  exports.BuildPluginCommand = BuildPluginCommand;
55
55
  yok_1.injector.registerCommand("plugin|build", BuildPluginCommand);
56
- //# sourceMappingURL=build-plugin.js.map