nativescript 9.0.0-alpha.13 → 9.0.0-alpha.14

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 (343) hide show
  1. package/config/test-deps-versions-generated.json +2 -2
  2. package/docs/build-jekyll-md.sh +1 -1
  3. package/docs/man_pages/config/config-get.md +36 -0
  4. package/docs/man_pages/config/config-set.md +40 -0
  5. package/docs/man_pages/config/config.md +39 -0
  6. package/docs/man_pages/project/hooks/hooks.md +35 -0
  7. package/docs/man_pages/start.md +1 -0
  8. package/lib/.d.ts +4 -0
  9. package/lib/android-tools-info.js +12 -0
  10. package/lib/base-package-manager.js +7 -0
  11. package/lib/bootstrap.js +7 -1
  12. package/lib/bun-package-manager.js +14 -1
  13. package/lib/color.js +4 -0
  14. package/lib/commands/add-platform.js +1 -0
  15. package/lib/commands/apple-login.js +1 -0
  16. package/lib/commands/appstore-list.js +1 -0
  17. package/lib/commands/appstore-upload.js +3 -0
  18. package/lib/commands/build.js +3 -2
  19. package/lib/commands/clean.js +22 -1
  20. package/lib/commands/command-base.js +1 -0
  21. package/lib/commands/config.js +5 -0
  22. package/lib/commands/create-project.js +6 -0
  23. package/lib/commands/debug.js +6 -1
  24. package/lib/commands/deploy.js +3 -2
  25. package/lib/commands/embedding/embed.js +7 -0
  26. package/lib/commands/extensibility/install-extension.js +1 -0
  27. package/lib/commands/extensibility/list-extensions.js +1 -0
  28. package/lib/commands/extensibility/uninstall-extension.js +1 -0
  29. package/lib/commands/fonts.js +1 -0
  30. package/lib/commands/generate-assets.js +1 -0
  31. package/lib/commands/generate-help.js +1 -0
  32. package/lib/commands/generate.js +48 -1
  33. package/lib/commands/hooks/common.js +80 -0
  34. package/lib/commands/hooks/hooks-lock.js +101 -0
  35. package/lib/commands/hooks/hooks.js +72 -0
  36. package/lib/commands/info.js +1 -0
  37. package/lib/commands/install.js +1 -0
  38. package/lib/commands/list-platforms.js +1 -0
  39. package/lib/commands/migrate.js +1 -0
  40. package/lib/commands/native-add.js +5 -0
  41. package/lib/commands/platform-clean.js +1 -0
  42. package/lib/commands/plugin/add-plugin.js +1 -0
  43. package/lib/commands/plugin/build-plugin.js +1 -0
  44. package/lib/commands/plugin/create-plugin.js +5 -0
  45. package/lib/commands/plugin/list-plugins.js +1 -0
  46. package/lib/commands/plugin/remove-plugin.js +2 -0
  47. package/lib/commands/plugin/update-plugin.js +1 -0
  48. package/lib/commands/post-install.js +6 -0
  49. package/lib/commands/prepare.js +4 -3
  50. package/lib/commands/preview.js +2 -0
  51. package/lib/commands/remove-platform.js +1 -0
  52. package/lib/commands/resources/resources-update.js +2 -0
  53. package/lib/commands/run.js +1 -0
  54. package/lib/commands/setup.js +1 -0
  55. package/lib/commands/start.js +1 -0
  56. package/lib/commands/test-init.js +4 -0
  57. package/lib/commands/test.js +9 -2
  58. package/lib/commands/typings.js +2 -1
  59. package/lib/commands/update-platform.js +5 -0
  60. package/lib/commands/update.js +2 -0
  61. package/lib/commands/widget.js +20 -1
  62. package/lib/common/bootstrap.js +1 -0
  63. package/lib/common/child-process.js +3 -0
  64. package/lib/common/codeGeneration/code-entity.js +1 -0
  65. package/lib/common/codeGeneration/code-printer.js +1 -0
  66. package/lib/common/command-params.js +1 -0
  67. package/lib/common/commands/analytics.js +3 -0
  68. package/lib/common/commands/autocompletion.js +3 -0
  69. package/lib/common/commands/device/device-log-stream.js +1 -0
  70. package/lib/common/commands/device/get-file.js +2 -0
  71. package/lib/common/commands/device/list-applications.js +1 -0
  72. package/lib/common/commands/device/list-devices.js +3 -0
  73. package/lib/common/commands/device/list-files.js +2 -0
  74. package/lib/common/commands/device/put-file.js +2 -0
  75. package/lib/common/commands/device/run-application.js +1 -0
  76. package/lib/common/commands/device/stop-application.js +1 -0
  77. package/lib/common/commands/device/uninstall-application.js +1 -0
  78. package/lib/common/commands/doctor.js +3 -2
  79. package/lib/common/commands/generate-messages.js +1 -0
  80. package/lib/common/commands/help.js +1 -0
  81. package/lib/common/commands/package-manager-get.js +1 -0
  82. package/lib/common/commands/package-manager-set.js +1 -0
  83. package/lib/common/commands/post-install.js +1 -0
  84. package/lib/common/commands/preuninstall.js +11 -2
  85. package/lib/common/commands/proxy/proxy-base.js +4 -0
  86. package/lib/common/commands/proxy/proxy-clear.js +1 -0
  87. package/lib/common/commands/proxy/proxy-get.js +1 -0
  88. package/lib/common/commands/proxy/proxy-set.js +1 -0
  89. package/lib/common/common-lib.js +1 -0
  90. package/lib/common/constants.js +11 -0
  91. package/lib/common/decorators.js +48 -0
  92. package/lib/common/definitions/extensibility.d.ts +2 -2
  93. package/lib/common/definitions/mobile.d.ts +72 -72
  94. package/lib/common/dispatchers.js +10 -1
  95. package/lib/common/errors.js +13 -3
  96. package/lib/common/file-system.js +13 -2
  97. package/lib/common/header.js +3 -0
  98. package/lib/common/helpers.js +89 -3
  99. package/lib/common/host-info.js +4 -0
  100. package/lib/common/http-client.js +20 -0
  101. package/lib/common/logger/appenders/cli-appender.js +4 -0
  102. package/lib/common/logger/appenders/emit-appender.js +4 -0
  103. package/lib/common/logger/layouts/cli-layout.js +1 -0
  104. package/lib/common/logger/logger.js +5 -0
  105. package/lib/common/messages/messages.js +6 -0
  106. package/lib/common/mobile/android/android-application-manager.js +20 -1
  107. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
  108. package/lib/common/mobile/android/android-debug-bridge.js +6 -0
  109. package/lib/common/mobile/android/android-device-file-system.js +4 -0
  110. package/lib/common/mobile/android/android-device-hash-service.js +3 -0
  111. package/lib/common/mobile/android/android-device.js +8 -0
  112. package/lib/common/mobile/android/android-emulator-services.js +2 -1
  113. package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
  114. package/lib/common/mobile/android/android-log-filter.js +4 -0
  115. package/lib/common/mobile/android/android-virtual-device-service.js +26 -0
  116. package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
  117. package/lib/common/mobile/android/genymotion/genymotion-service.js +6 -1
  118. package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
  119. package/lib/common/mobile/android/logcat-helper.js +13 -0
  120. package/lib/common/mobile/application-manager-base.js +6 -0
  121. package/lib/common/mobile/device-emitter.js +4 -0
  122. package/lib/common/mobile/device-log-emitter.js +1 -0
  123. package/lib/common/mobile/device-log-provider-base.js +1 -0
  124. package/lib/common/mobile/device-log-provider.js +23 -0
  125. package/lib/common/mobile/device-platforms-constants.js +1 -0
  126. package/lib/common/mobile/emulator-helper.js +3 -0
  127. package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
  128. package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
  129. package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
  130. package/lib/common/mobile/ios/device/ios-device.js +4 -0
  131. package/lib/common/mobile/ios/ios-device-base.js +1 -0
  132. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
  133. package/lib/common/mobile/ios/ios-log-filter.js +1 -0
  134. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
  135. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
  136. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
  137. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
  138. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
  139. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
  140. package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
  141. package/lib/common/mobile/log-filter.js +2 -0
  142. package/lib/common/mobile/logging-levels.js +1 -0
  143. package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
  144. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
  145. package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
  146. package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
  147. package/lib/common/mobile/mobile-core/devices-service.js +69 -0
  148. package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
  149. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
  150. package/lib/common/mobile/mobile-helper.js +1 -0
  151. package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
  152. package/lib/common/opener.js +1 -0
  153. package/lib/common/os-info.js +1 -0
  154. package/lib/common/plist-parser.js +1 -0
  155. package/lib/common/project-helper.js +1 -0
  156. package/lib/common/prompter.js +9 -1
  157. package/lib/common/queue.js +1 -0
  158. package/lib/common/resource-loader.js +1 -0
  159. package/lib/common/services/auto-completion-service.js +13 -1
  160. package/lib/common/services/cancellation.js +2 -1
  161. package/lib/common/services/commands-service.js +17 -6
  162. package/lib/common/services/help-service.js +11 -3
  163. package/lib/common/services/hooks-service.js +13 -0
  164. package/lib/common/services/ios-notification-service.js +1 -0
  165. package/lib/common/services/json-file-settings-service.js +6 -0
  166. package/lib/common/services/lock-service.js +6 -0
  167. package/lib/common/services/message-contract-generator.js +1 -0
  168. package/lib/common/services/messages-service.js +1 -0
  169. package/lib/common/services/micro-templating-service.js +6 -0
  170. package/lib/common/services/net-service.js +3 -0
  171. package/lib/common/services/project-files-manager.js +5 -0
  172. package/lib/common/services/project-files-provider-base.js +1 -0
  173. package/lib/common/services/proxy-service.js +1 -0
  174. package/lib/common/services/qr.js +1 -0
  175. package/lib/common/services/settings-service.js +1 -0
  176. package/lib/common/services/xcode-select-service.js +1 -0
  177. package/lib/common/utils.js +1 -0
  178. package/lib/common/validators/project-name-validator.js +1 -0
  179. package/lib/common/validators/validation-result.js +1 -0
  180. package/lib/common/verify-node-version.js +8 -1
  181. package/lib/common/yok.js +32 -11
  182. package/lib/config.js +22 -1
  183. package/lib/constants-provider.js +1 -0
  184. package/lib/constants.js +53 -0
  185. package/lib/controllers/build-controller.js +4 -3
  186. package/lib/controllers/debug-controller.js +8 -3
  187. package/lib/controllers/deploy-controller.js +1 -0
  188. package/lib/controllers/migrate-controller.js +90 -4
  189. package/lib/controllers/platform-controller.js +9 -1
  190. package/lib/controllers/prepare-controller.js +17 -4
  191. package/lib/controllers/run-controller.js +17 -1
  192. package/lib/controllers/update-controller-base.js +1 -0
  193. package/lib/controllers/update-controller.js +11 -0
  194. package/lib/data/build-data.js +1 -0
  195. package/lib/data/controller-data-base.js +1 -0
  196. package/lib/data/debug-data.js +1 -0
  197. package/lib/data/platform-data.js +1 -0
  198. package/lib/data/prepare-data.js +1 -0
  199. package/lib/data/run-data.js +1 -0
  200. package/lib/definitions/hooks.d.ts +1 -0
  201. package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
  202. package/lib/detached-processes/cleanup-process.js +18 -14
  203. package/lib/detached-processes/file-log-service.js +2 -1
  204. package/lib/device-path-provider.js +1 -0
  205. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
  206. package/lib/device-sockets/ios/notification.js +3 -0
  207. package/lib/device-sockets/ios/socket-request-executor.js +3 -0
  208. package/lib/helpers/android-bundle-validator-helper.js +2 -1
  209. package/lib/helpers/deploy-command-helper.js +1 -0
  210. package/lib/helpers/key-command-helper.js +4 -2
  211. package/lib/helpers/livesync-command-helper.js +4 -1
  212. package/lib/helpers/network-connectivity-validator.js +1 -0
  213. package/lib/helpers/options-track-helper.js +3 -2
  214. package/lib/helpers/package-path-helper.js +1 -0
  215. package/lib/helpers/platform-command-helper.js +7 -2
  216. package/lib/helpers/version-validator-helper.js +1 -0
  217. package/lib/key-commands/bootstrap.js +3 -2
  218. package/lib/key-commands/index.js +5 -4
  219. package/lib/nativescript-cli-lib-bootstrap.js +4 -0
  220. package/lib/nativescript-cli-lib.js +1 -0
  221. package/lib/nativescript-cli.js +11 -1
  222. package/lib/node/pbxproj-dom-xcode.js +1 -0
  223. package/lib/node/xcode.js +1 -0
  224. package/lib/node-package-manager.js +11 -1
  225. package/lib/options.js +144 -119
  226. package/lib/package-installation-manager.js +8 -1
  227. package/lib/package-manager.js +2 -0
  228. package/lib/platform-command-param.js +1 -0
  229. package/lib/pnpm-package-manager.js +4 -1
  230. package/lib/project-data.js +12 -0
  231. package/lib/providers/project-files-provider.js +1 -0
  232. package/lib/resolvers/livesync-service-resolver.js +1 -0
  233. package/lib/services/analytics/analytics-broker-process.js +10 -6
  234. package/lib/services/analytics/analytics-broker.js +2 -1
  235. package/lib/services/analytics/analytics-service.js +29 -25
  236. package/lib/services/analytics/google-analytics-provider.js +13 -12
  237. package/lib/services/analytics-settings-service.js +5 -0
  238. package/lib/services/android/android-bundle-tool-service.js +1 -0
  239. package/lib/services/android/gradle-build-args-service.js +3 -0
  240. package/lib/services/android/gradle-build-service.js +1 -0
  241. package/lib/services/android/gradle-command-service.js +1 -0
  242. package/lib/services/android-device-debug-service.js +6 -0
  243. package/lib/services/android-plugin-build-service.js +31 -2
  244. package/lib/services/android-project-service.js +71 -4
  245. package/lib/services/android-resources-migration-service.js +7 -0
  246. package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
  247. package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
  248. package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
  249. package/lib/services/apple-portal/srp/srp-wrapper.js +4 -1
  250. package/lib/services/assets-generation/assets-generation-service.js +10 -5
  251. package/lib/services/build-artifacts-service.js +2 -1
  252. package/lib/services/build-data-service.js +1 -0
  253. package/lib/services/build-info-file-service.js +1 -0
  254. package/lib/services/bundler/bundler-compiler-service.js +88 -17
  255. package/lib/services/bundler/bundler.js +1 -0
  256. package/lib/services/cleanup-service.js +13 -9
  257. package/lib/services/cocoapods-platform-manager.js +9 -0
  258. package/lib/services/cocoapods-service.js +21 -1
  259. package/lib/services/debug-data-service.js +1 -0
  260. package/lib/services/debug-service-base.js +7 -0
  261. package/lib/services/device/device-install-app-service.js +2 -1
  262. package/lib/services/doctor-service.js +21 -6
  263. package/lib/services/extensibility-service.js +9 -1
  264. package/lib/services/files-hash-service.js +1 -0
  265. package/lib/services/hmr-status-service.js +2 -0
  266. package/lib/services/info-service.js +1 -0
  267. package/lib/services/initialize-service.js +5 -1
  268. package/lib/services/ios/export-options-plist-service.js +4 -0
  269. package/lib/services/ios/ios-signing-service.js +4 -0
  270. package/lib/services/ios/spm-service.js +11 -0
  271. package/lib/services/ios/xcodebuild-args-service.js +9 -0
  272. package/lib/services/ios/xcodebuild-command-service.js +1 -0
  273. package/lib/services/ios/xcodebuild-service.js +2 -1
  274. package/lib/services/ios-debugger-port-service.js +1 -0
  275. package/lib/services/ios-device-debug-service.js +1 -0
  276. package/lib/services/ios-entitlements-service.js +1 -0
  277. package/lib/services/ios-extensions-service.js +1 -0
  278. package/lib/services/ios-log-filter.js +20 -0
  279. package/lib/services/ios-native-target-service.js +6 -4
  280. package/lib/services/ios-project-service.js +91 -1
  281. package/lib/services/ios-provision-service.js +3 -0
  282. package/lib/services/ios-watch-app-service.js +1 -0
  283. package/lib/services/ip-service.js +2 -0
  284. package/lib/services/itmstransporter-service.js +1 -0
  285. package/lib/services/karma-execution.js +2 -0
  286. package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
  287. package/lib/services/livesync/android-device-livesync-service.js +2 -0
  288. package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
  289. package/lib/services/livesync/android-livesync-service.js +1 -0
  290. package/lib/services/livesync/android-livesync-tool.js +4 -0
  291. package/lib/services/livesync/device-livesync-service-base.js +2 -0
  292. package/lib/services/livesync/ios-device-livesync-service.js +7 -0
  293. package/lib/services/livesync/ios-livesync-service.js +2 -0
  294. package/lib/services/livesync/livesync-socket.js +1 -0
  295. package/lib/services/livesync/platform-livesync-service-base.js +5 -0
  296. package/lib/services/livesync-process-data-service.js +1 -0
  297. package/lib/services/log-parser-service.js +1 -0
  298. package/lib/services/log-source-map-service.js +15 -0
  299. package/lib/services/marking-mode-service.js +8 -5
  300. package/lib/services/metadata-filtering-service.js +1 -0
  301. package/lib/services/npm-config-service.js +4 -0
  302. package/lib/services/pacote-service.js +7 -0
  303. package/lib/services/performance-service.js +3 -1
  304. package/lib/services/platform/add-platform-service.js +49 -2
  305. package/lib/services/platform/platform-validation-service.js +1 -0
  306. package/lib/services/platform/prepare-native-platform-service.js +5 -2
  307. package/lib/services/platform-environment-requirements.js +8 -3
  308. package/lib/services/platform-project-service-base.js +1 -0
  309. package/lib/services/platforms-data-service.js +1 -0
  310. package/lib/services/plugins-service.js +21 -2
  311. package/lib/services/prepare-data-service.js +1 -0
  312. package/lib/services/project-backup-service.js +4 -0
  313. package/lib/services/project-changes-service.js +14 -3
  314. package/lib/services/project-cleanup-service.js +2 -0
  315. package/lib/services/project-config-service.js +21 -2
  316. package/lib/services/project-data-service.js +36 -7
  317. package/lib/services/project-name-service.js +1 -0
  318. package/lib/services/project-service.js +10 -0
  319. package/lib/services/project-templates-service.js +3 -2
  320. package/lib/services/qr-code-terminal-service.js +1 -0
  321. package/lib/services/require-service.js +1 -0
  322. package/lib/services/start-service.js +1 -0
  323. package/lib/services/temp-service.js +3 -0
  324. package/lib/services/terminal-spinner-service.js +2 -0
  325. package/lib/services/test-execution-service.js +9 -2
  326. package/lib/services/test-initialization-service.js +4 -0
  327. package/lib/services/timeline-profiler-service.js +1 -0
  328. package/lib/services/user-settings-service.js +1 -0
  329. package/lib/services/versions-service.js +6 -4
  330. package/lib/services/watch-ignore-list-service.js +1 -0
  331. package/lib/services/xcconfig-service.js +2 -0
  332. package/lib/services/xcproj-service.js +1 -0
  333. package/lib/shared-event-bus.js +6 -0
  334. package/lib/sys-info.js +2 -1
  335. package/lib/tools/config-manipulation/config-transformer.js +12 -0
  336. package/lib/tools/node-modules/node-modules-builder.js +1 -0
  337. package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
  338. package/lib/yarn-package-manager.js +1 -0
  339. package/lib/yarn2-package-manager.js +3 -0
  340. package/package.json +11 -10
  341. package/vendor/aab-tool/README.txt +1 -1
  342. package/vendor/aab-tool/bundletool.jar +0 -0
  343. package/vendor/gradle-plugin/build.gradle +1 -1
@@ -22,6 +22,7 @@ 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
25
26
  const projectDir = this.$projectData.projectDir;
26
27
  return (0, path_1.resolve)(projectDir, hostProjectPath);
27
28
  }
@@ -45,7 +46,11 @@ class EmbedCommand extends prepare_1.PrepareCommand {
45
46
  if (!canSuperExecute) {
46
47
  return false;
47
48
  }
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
48
52
  const platform = args[0].toLowerCase();
53
+ // also allow these to be set in the nativescript.config.ts
49
54
  if (!args[1]) {
50
55
  const hostProjectPath = this.getEmbedConfigForKey("hostProjectPath", platform);
51
56
  if (hostProjectPath) {
@@ -65,8 +70,10 @@ class EmbedCommand extends prepare_1.PrepareCommand {
65
70
  return true;
66
71
  }
67
72
  getEmbedConfigForKey(key, platform) {
73
+ // get the embed.<platform>.<key> value, or fallback to embed.<key> value
68
74
  return this.$projectConfigService.getValue(`embed.${platform}.${key}`, this.$projectConfigService.getValue(`embed.${key}`));
69
75
  }
70
76
  }
71
77
  exports.EmbedCommand = EmbedCommand;
72
78
  yok_1.injector.registerCommand("embed", EmbedCommand);
79
+ //# sourceMappingURL=embed.js.map
@@ -20,3 +20,4 @@ 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,3 +27,4 @@ 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,3 +19,4 @@ 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,3 +51,4 @@ class FontsCommand {
51
51
  }
52
52
  exports.FontsCommand = FontsCommand;
53
53
  yok_1.injector.registerCommand("fonts", FontsCommand);
54
+ //# sourceMappingURL=fonts.js.map
@@ -54,3 +54,4 @@ 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,3 +13,4 @@ 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,7 +3,10 @@ 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
- constructor($logger, $errors) {
6
+ // private executionOptions: ExecutionOptions;
7
+ constructor($logger,
8
+ // private $options: IOptions,
9
+ $errors) {
7
10
  this.$logger = $logger;
8
11
  this.$errors = $errors;
9
12
  this.allowedParameters = [];
@@ -11,6 +14,7 @@ class GenerateCommand {
11
14
  async execute(_rawArgs) {
12
15
  try {
13
16
  this.$logger.info("If you have ideas for this command, please discuss at https://nativescript.org/discord");
17
+ // await run(this.executionOptions);
14
18
  }
15
19
  catch (error) {
16
20
  this.$errors.fail(error.message);
@@ -22,9 +26,52 @@ class GenerateCommand {
22
26
  return true;
23
27
  }
24
28
  validateExecutionOptions() {
29
+ // if (!this.executionOptions.schematic) {
30
+ // this.$errors.failWithHelp(
31
+ // `The generate command requires a schematic name to be specified.`
32
+ // );
33
+ // }
25
34
  }
26
35
  setExecutionOptions(rawArgs) {
36
+ // const options = this.parseRawArgs(rawArgs);
37
+ // this.executionOptions = {
38
+ // ...options,
39
+ // logger: this.$logger,
40
+ // directory: process.cwd(),
41
+ // };
27
42
  }
28
43
  }
29
44
  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
+ // }
30
76
  yok_1.injector.registerCommand("generate", GenerateCommand);
77
+ //# sourceMappingURL=generate.js.map
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HooksVerify = exports.LOCK_FILE_NAME = void 0;
4
+ const path = require("path");
5
+ const crypto = require("crypto");
6
+ exports.LOCK_FILE_NAME = "nativescript-lock.json";
7
+ class HooksVerify {
8
+ constructor($projectData, $errors, $fs, $logger) {
9
+ this.$projectData = $projectData;
10
+ this.$errors = $errors;
11
+ this.$fs = $fs;
12
+ this.$logger = $logger;
13
+ this.allowedParameters = [];
14
+ this.$projectData.initializeProjectData();
15
+ }
16
+ async verifyHooksLock(plugins, hooksLockPath) {
17
+ var _a;
18
+ let lockFileContent;
19
+ let hooksLock;
20
+ try {
21
+ lockFileContent = this.$fs.readText(hooksLockPath, "utf8");
22
+ hooksLock = JSON.parse(lockFileContent);
23
+ }
24
+ catch (err) {
25
+ this.$errors.fail(`❌ Failed to read or parse ${exports.LOCK_FILE_NAME} at ${hooksLockPath}`);
26
+ }
27
+ const lockMap = new Map(); // pluginName -> hookType -> hash
28
+ for (const plugin of hooksLock) {
29
+ const hookMap = new Map();
30
+ for (const hook of plugin.hooks) {
31
+ hookMap.set(hook.type, hook.hash);
32
+ }
33
+ lockMap.set(plugin.name, hookMap);
34
+ }
35
+ let isValid = true;
36
+ for (const plugin of plugins) {
37
+ const pluginLockHooks = lockMap.get(plugin.name);
38
+ if (!pluginLockHooks) {
39
+ this.$logger.error(`❌ Plugin '${plugin.name}' not found in ${exports.LOCK_FILE_NAME}`);
40
+ isValid = false;
41
+ continue;
42
+ }
43
+ for (const hook of ((_a = plugin.nativescript) === null || _a === void 0 ? void 0 : _a.hooks) || []) {
44
+ const expectedHash = pluginLockHooks.get(hook.type);
45
+ if (!expectedHash) {
46
+ this.$logger.error(`❌ Missing hook '${hook.type}' for plugin '${plugin.name}' in ${exports.LOCK_FILE_NAME}`);
47
+ isValid = false;
48
+ continue;
49
+ }
50
+ let fileContent;
51
+ try {
52
+ fileContent = this.$fs.readFile(path.join(plugin.fullPath, hook.script));
53
+ }
54
+ catch (err) {
55
+ this.$logger.error(`❌ Cannot read script file '${hook.script}' for hook '${hook.type}' in plugin '${plugin.name}'`);
56
+ isValid = false;
57
+ continue;
58
+ }
59
+ const actualHash = crypto
60
+ .createHash("sha256")
61
+ .update(fileContent)
62
+ .digest("hex");
63
+ if (actualHash !== expectedHash) {
64
+ this.$logger.error(`❌ Hash mismatch for '${hook.script}' (${hook.type} in ${plugin.name}):`);
65
+ this.$logger.error(` Expected: ${expectedHash}`);
66
+ this.$logger.error(` Actual: ${actualHash}`);
67
+ isValid = false;
68
+ }
69
+ }
70
+ }
71
+ if (isValid) {
72
+ this.$logger.info("✅ All hooks verified successfully. No issues found.");
73
+ }
74
+ else {
75
+ this.$errors.fail("❌ One or more hooks failed verification.");
76
+ }
77
+ }
78
+ }
79
+ exports.HooksVerify = HooksVerify;
80
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HooksVerifyPluginCommand = exports.HooksLockPluginCommand = void 0;
4
+ const yok_1 = require("../../common/yok");
5
+ const path = require("path");
6
+ const crypto = require("crypto");
7
+ const common_1 = require("./common");
8
+ class HooksLockPluginCommand {
9
+ constructor($pluginsService, $projectData, $errors, $fs, $logger) {
10
+ this.$pluginsService = $pluginsService;
11
+ this.$projectData = $projectData;
12
+ this.$errors = $errors;
13
+ this.$fs = $fs;
14
+ this.$logger = $logger;
15
+ this.allowedParameters = [];
16
+ this.$projectData.initializeProjectData();
17
+ }
18
+ async execute() {
19
+ var _a, _b;
20
+ const plugins = await this.$pluginsService.getAllInstalledPlugins(this.$projectData);
21
+ if (plugins && plugins.length > 0) {
22
+ const pluginsWithHooks = [];
23
+ for (const plugin of plugins) {
24
+ if (((_b = (_a = plugin.nativescript) === null || _a === void 0 ? void 0 : _a.hooks) === null || _b === void 0 ? void 0 : _b.length) > 0) {
25
+ pluginsWithHooks.push(plugin);
26
+ }
27
+ }
28
+ await this.writeHooksLockFile(pluginsWithHooks, this.$projectData.projectDir);
29
+ }
30
+ else {
31
+ this.$logger.info("No plugins with hooks found.");
32
+ }
33
+ }
34
+ async canExecute(args) {
35
+ return true;
36
+ }
37
+ async writeHooksLockFile(plugins, outputDir) {
38
+ var _a;
39
+ const output = [];
40
+ for (const plugin of plugins) {
41
+ const hooks = [];
42
+ for (const hook of ((_a = plugin.nativescript) === null || _a === void 0 ? void 0 : _a.hooks) || []) {
43
+ try {
44
+ const fileContent = this.$fs.readFile(path.join(plugin.fullPath, hook.script));
45
+ const hash = crypto
46
+ .createHash("sha256")
47
+ .update(fileContent)
48
+ .digest("hex");
49
+ hooks.push({
50
+ type: hook.type,
51
+ hash,
52
+ });
53
+ }
54
+ catch (err) {
55
+ this.$logger.warn(`Warning: Failed to read script '${hook.script}' for plugin '${plugin.name}'. Skipping this hook.`);
56
+ continue;
57
+ }
58
+ }
59
+ output.push({ name: plugin.name, hooks });
60
+ }
61
+ const filePath = path.resolve(outputDir, common_1.LOCK_FILE_NAME);
62
+ try {
63
+ this.$fs.writeFile(filePath, JSON.stringify(output, null, 2), "utf8");
64
+ this.$logger.info(`✅ ${common_1.LOCK_FILE_NAME} written to: ${filePath}`);
65
+ }
66
+ catch (err) {
67
+ this.$errors.fail(`❌ Failed to write ${common_1.LOCK_FILE_NAME}: ${err}`);
68
+ }
69
+ }
70
+ }
71
+ exports.HooksLockPluginCommand = HooksLockPluginCommand;
72
+ class HooksVerifyPluginCommand extends common_1.HooksVerify {
73
+ constructor($pluginsService, $projectData, $errors, $fs, $logger) {
74
+ super($projectData, $errors, $fs, $logger);
75
+ this.$pluginsService = $pluginsService;
76
+ this.allowedParameters = [];
77
+ }
78
+ async execute() {
79
+ var _a, _b;
80
+ const plugins = await this.$pluginsService.getAllInstalledPlugins(this.$projectData);
81
+ if (plugins && plugins.length > 0) {
82
+ const pluginsWithHooks = [];
83
+ for (const plugin of plugins) {
84
+ if (((_b = (_a = plugin.nativescript) === null || _a === void 0 ? void 0 : _a.hooks) === null || _b === void 0 ? void 0 : _b.length) > 0) {
85
+ pluginsWithHooks.push(plugin);
86
+ }
87
+ }
88
+ await this.verifyHooksLock(pluginsWithHooks, path.join(this.$projectData.projectDir, common_1.LOCK_FILE_NAME));
89
+ }
90
+ else {
91
+ this.$logger.info("No plugins with hooks found.");
92
+ }
93
+ }
94
+ async canExecute(args) {
95
+ return true;
96
+ }
97
+ }
98
+ exports.HooksVerifyPluginCommand = HooksVerifyPluginCommand;
99
+ yok_1.injector.registerCommand(["hooks|lock"], HooksLockPluginCommand);
100
+ yok_1.injector.registerCommand(["hooks|verify"], HooksVerifyPluginCommand);
101
+ //# sourceMappingURL=hooks-lock.js.map
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HooksListPluginCommand = exports.HooksPluginCommand = void 0;
4
+ const yok_1 = require("../../common/yok");
5
+ const path = require("path");
6
+ const constants_1 = require("../../constants");
7
+ const helpers_1 = require("../../common/helpers");
8
+ const nsHooks = require("@nativescript/hook");
9
+ const common_1 = require("./common");
10
+ class HooksPluginCommand extends common_1.HooksVerify {
11
+ constructor($pluginsService, $projectData, $errors, $fs, $logger) {
12
+ super($projectData, $errors, $fs, $logger);
13
+ this.$pluginsService = $pluginsService;
14
+ this.allowedParameters = [];
15
+ }
16
+ async execute(args) {
17
+ var _a, _b;
18
+ const isList = args.length > 0 && args[0] === "list" ? true : false;
19
+ const plugins = await this.$pluginsService.getAllInstalledPlugins(this.$projectData);
20
+ if (plugins && plugins.length > 0) {
21
+ const hooksDir = path.join(this.$projectData.projectDir, constants_1.HOOKS_DIR_NAME);
22
+ const pluginsWithHooks = [];
23
+ for (const plugin of plugins) {
24
+ if (((_b = (_a = plugin.nativescript) === null || _a === void 0 ? void 0 : _a.hooks) === null || _b === void 0 ? void 0 : _b.length) > 0) {
25
+ pluginsWithHooks.push(plugin);
26
+ }
27
+ }
28
+ if (isList) {
29
+ const headers = ["Plugin", "HookName", "HookPath"];
30
+ const hookDataData = pluginsWithHooks.flatMap((plugin) => plugin.nativescript.hooks.map((hook) => {
31
+ return [plugin.name, hook.type, hook.script];
32
+ }));
33
+ const hookDataTable = (0, helpers_1.createTable)(headers, hookDataData);
34
+ this.$logger.info("Hooks:");
35
+ this.$logger.info(hookDataTable.toString());
36
+ }
37
+ else {
38
+ if (this.$fs.exists(path.join(this.$projectData.projectDir, common_1.LOCK_FILE_NAME))) {
39
+ await this.verifyHooksLock(pluginsWithHooks, path.join(this.$projectData.projectDir, common_1.LOCK_FILE_NAME));
40
+ }
41
+ if (pluginsWithHooks.length === 0) {
42
+ if (!this.$fs.exists(hooksDir)) {
43
+ this.$fs.createDirectory(hooksDir);
44
+ }
45
+ }
46
+ for (const plugin of pluginsWithHooks) {
47
+ nsHooks(plugin.fullPath).postinstall();
48
+ }
49
+ }
50
+ }
51
+ }
52
+ async canExecute(args) {
53
+ if (args.length > 0 && args[0] !== "list") {
54
+ this.$errors.failWithHelp(`Invalid argument ${args[0]}. Supported argument is "list".`);
55
+ }
56
+ return true;
57
+ }
58
+ }
59
+ exports.HooksPluginCommand = HooksPluginCommand;
60
+ class HooksListPluginCommand extends HooksPluginCommand {
61
+ constructor($pluginsService, $projectData, $errors, $fs, $logger) {
62
+ super($pluginsService, $projectData, $errors, $fs, $logger);
63
+ this.allowedParameters = [];
64
+ }
65
+ async execute() {
66
+ await super.execute(["list"]);
67
+ }
68
+ }
69
+ exports.HooksListPluginCommand = HooksListPluginCommand;
70
+ yok_1.injector.registerCommand(["hooks|install"], HooksPluginCommand);
71
+ yok_1.injector.registerCommand(["hooks|*list"], HooksListPluginCommand);
72
+ //# sourceMappingURL=hooks.js.map
@@ -13,3 +13,4 @@ class InfoCommand {
13
13
  }
14
14
  exports.InfoCommand = InfoCommand;
15
15
  yok_1.injector.registerCommand("info", InfoCommand);
16
+ //# sourceMappingURL=info.js.map
@@ -63,3 +63,4 @@ class InstallCommand {
63
63
  }
64
64
  exports.InstallCommand = InstallCommand;
65
65
  yok_1.injector.registerCommand("install", InstallCommand);
66
+ //# sourceMappingURL=install.js.map
@@ -32,3 +32,4 @@ 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,3 +31,4 @@ class MigrateCommand {
31
31
  }
32
32
  exports.MigrateCommand = MigrateCommand;
33
33
  yok_1.injector.registerCommand("migrate", MigrateCommand);
34
+ //# sourceMappingURL=migrate.js.map
@@ -173,6 +173,7 @@ 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
176
177
  this.generateOrUpdateModuleMap(`${className}.h`, path.join(iosSourceBase, "module.modulemap"));
177
178
  }
178
179
  }
@@ -185,7 +186,9 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
185
186
  }
186
187
  const headerDeclaration = `header "${headerPath}"`;
187
188
  if (moduleMapContent.includes(`module ${moduleName}`)) {
189
+ // Module declaration already exists in the module map
188
190
  if (moduleMapContent.includes(headerDeclaration)) {
191
+ // Header is already present in the module map
189
192
  this.$logger.warn(`Header '${headerFileName}' is already added to the module map.`);
190
193
  return;
191
194
  }
@@ -193,6 +196,7 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
193
196
  fs.writeFileSync(moduleMapPath, updatedModuleMapContent);
194
197
  }
195
198
  else {
199
+ // Module declaration does not exist in the module map
196
200
  const moduleDeclaration = `module ${moduleName} {${os_1.EOL} ${headerDeclaration}${os_1.EOL} export *${os_1.EOL}}`;
197
201
  moduleMapContent += `${os_1.EOL}${os_1.EOL}${moduleDeclaration}`;
198
202
  fs.writeFileSync(moduleMapPath, moduleMapContent);
@@ -275,3 +279,4 @@ yok_1.injector.registerCommand(["native|add|java"], NativeAddJavaCommand);
275
279
  yok_1.injector.registerCommand(["native|add|kotlin"], NativeAddKotlinCommand);
276
280
  yok_1.injector.registerCommand(["native|add|swift"], NativeAddSwiftCommand);
277
281
  yok_1.injector.registerCommand(["native|add|objective-c"], NativeAddObjectiveCCommand);
282
+ //# sourceMappingURL=native-add.js.map
@@ -39,3 +39,4 @@ 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,3 +28,4 @@ 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,3 +53,4 @@ class BuildPluginCommand {
53
53
  }
54
54
  exports.BuildPluginCommand = BuildPluginCommand;
55
55
  yok_1.injector.registerCommand("plugin|build", BuildPluginCommand);
56
+ //# sourceMappingURL=build-plugin.js.map
@@ -28,12 +28,14 @@ class CreatePluginCommand {
28
28
  const selectedTemplate = this.$options.template;
29
29
  const selectedPath = path.resolve(pathToProject || ".");
30
30
  const projectDir = path.join(selectedPath, pluginRepoName);
31
+ // Must be out of try catch block, because will throw error if folder alredy exists and we don't want to delete it.
31
32
  this.ensurePackageDir(projectDir);
32
33
  try {
33
34
  await this.downloadPackage(selectedTemplate, projectDir);
34
35
  await this.setupSeed(projectDir, pluginRepoName);
35
36
  }
36
37
  catch (err) {
38
+ // The call to this.ensurePackageDir() above will throw error if folder alredy exists, so it is safe to delete here.
37
39
  this.$fs.deleteDirectory(projectDir);
38
40
  throw err;
39
41
  }
@@ -69,6 +71,7 @@ class CreatePluginCommand {
69
71
  !config.includeTypeScriptDemo)) {
70
72
  this.$logger.printMarkdown("Using default values for plugin creation options since your shell is not interactive.");
71
73
  }
74
+ // run postclone script manually and kill it if it takes more than 10 sec
72
75
  const pathToPostCloneScript = path.join("scripts", "postclone");
73
76
  const params = [
74
77
  pathToPostCloneScript,
@@ -123,6 +126,7 @@ class CreatePluginCommand {
123
126
  }
124
127
  async getPluginNameSource(pluginNameSource, pluginRepoName) {
125
128
  if (!pluginNameSource) {
129
+ // remove nativescript- prefix for naming plugin files
126
130
  const prefix = "nativescript-";
127
131
  pluginNameSource = pluginRepoName.toLowerCase().startsWith(prefix)
128
132
  ? pluginRepoName.slice(prefix.length, pluginRepoName.length)
@@ -150,3 +154,4 @@ class CreatePluginCommand {
150
154
  }
151
155
  exports.CreatePluginCommand = CreatePluginCommand;
152
156
  yok_1.injector.registerCommand(["plugin|create"], CreatePluginCommand);
157
+ //# sourceMappingURL=create-plugin.js.map
@@ -41,3 +41,4 @@ class ListPluginsCommand {
41
41
  }
42
42
  exports.ListPluginsCommand = ListPluginsCommand;
43
43
  yok_1.injector.registerCommand("plugin|*list", ListPluginsCommand);
44
+ //# sourceMappingURL=list-plugins.js.map
@@ -21,6 +21,7 @@ class RemovePluginCommand {
21
21
  }
22
22
  let pluginNames = [];
23
23
  try {
24
+ // try installing the plugins, so we can get information from node_modules about their native code, libs, etc.
24
25
  const installedPlugins = await this.$pluginsService.getAllInstalledPlugins(this.$projectData);
25
26
  pluginNames = installedPlugins.map((pl) => pl.name);
26
27
  }
@@ -37,3 +38,4 @@ class RemovePluginCommand {
37
38
  }
38
39
  exports.RemovePluginCommand = RemovePluginCommand;
39
40
  yok_1.injector.registerCommand("plugin|remove", RemovePluginCommand);
41
+ //# sourceMappingURL=remove-plugin.js.map
@@ -37,3 +37,4 @@ class UpdatePluginCommand {
37
37
  }
38
38
  exports.UpdatePluginCommand = UpdatePluginCommand;
39
39
  yok_1.injector.registerCommand("plugin|update", UpdatePluginCommand);
40
+ //# sourceMappingURL=update-plugin.js.map
@@ -19,13 +19,18 @@ class PostInstallCliCommand {
19
19
  async execute(args) {
20
20
  const isRunningWithSudoUser = !!process.env.SUDO_USER;
21
21
  if (!this.$hostInfo.isWindows) {
22
+ // when running under 'sudo' we create a working dir with wrong owner (root) and
23
+ // it is no longer accessible for the user initiating the installation
24
+ // patch the owner here
22
25
  if (isRunningWithSudoUser) {
26
+ // TODO: Check if this is the correct place, probably we should set this at the end of the command.
23
27
  await this.$fs.setCurrentUserAsOwner(this.$settingsService.getProfileDir(), process.env.SUDO_USER);
24
28
  }
25
29
  }
26
30
  const canExecutePostInstallTask = !isRunningWithSudoUser || (0, helpers_1.doesCurrentNpmCommandMatch)([/^--unsafe-perm$/]);
27
31
  if (canExecutePostInstallTask) {
28
32
  await this.$helpService.generateHtmlPages();
33
+ // Explicitly ask for confirmation of usage-reporting:
29
34
  await this.$analyticsService.checkConsent();
30
35
  await this.$commandsService.tryExecuteCommand("autocomplete", []);
31
36
  }
@@ -42,3 +47,4 @@ class PostInstallCliCommand {
42
47
  }
43
48
  exports.PostInstallCliCommand = PostInstallCliCommand;
44
49
  yok_1.injector.registerCommand("post-install-cli", PostInstallCliCommand);
50
+ //# sourceMappingURL=post-install.js.map
@@ -17,13 +17,13 @@ class PrepareCommand extends command_base_1.ValidatePlatformCommandBase {
17
17
  this.allowedParameters = [this.$platformCommandParameter];
18
18
  this.dashedOptions = {
19
19
  watch: {
20
- type: "boolean",
20
+ type: "boolean" /* OptionType.Boolean */,
21
21
  default: false,
22
22
  hasSensitiveValue: false,
23
23
  },
24
- hmr: { type: "boolean", default: false, hasSensitiveValue: false },
24
+ hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
25
25
  whatever: {
26
- type: "boolean",
26
+ type: "boolean" /* OptionType.Boolean */,
27
27
  default: false,
28
28
  hasSensitiveValue: false,
29
29
  },
@@ -54,3 +54,4 @@ class PrepareCommand extends command_base_1.ValidatePlatformCommandBase {
54
54
  }
55
55
  exports.PrepareCommand = PrepareCommand;
56
56
  yok_1.injector.registerCommand("prepare", PrepareCommand);
57
+ //# sourceMappingURL=prepare.js.map
@@ -24,6 +24,7 @@ class PreviewCommand {
24
24
  }
25
25
  async execute(args) {
26
26
  if (!this.$options.disableNpmInstall) {
27
+ // ensure latest is installed
27
28
  await this.$packageManager.install(`${PREVIEW_CLI_PACKAGE}@latest`, this.$projectData.projectDir, {
28
29
  "save-dev": true,
29
30
  "save-exact": true,
@@ -78,3 +79,4 @@ class PreviewCommand {
78
79
  }
79
80
  exports.PreviewCommand = PreviewCommand;
80
81
  yok_1.injector.registerCommand("preview", PreviewCommand);
82
+ //# sourceMappingURL=preview.js.map
@@ -27,3 +27,4 @@ class RemovePlatformCommand {
27
27
  }
28
28
  exports.RemovePlatformCommand = RemovePlatformCommand;
29
29
  yok_1.injector.registerCommand("platform|remove", RemovePlatformCommand);
30
+ //# sourceMappingURL=remove-platform.js.map
@@ -15,6 +15,7 @@ class ResourcesUpdateCommand {
15
15
  }
16
16
  async canExecute(args) {
17
17
  if (!args || args.length === 0) {
18
+ // Command defaults to migrating the Android App_Resources, unless explicitly specified
18
19
  args = ["android"];
19
20
  }
20
21
  for (const platform of args) {
@@ -30,3 +31,4 @@ class ResourcesUpdateCommand {
30
31
  }
31
32
  exports.ResourcesUpdateCommand = ResourcesUpdateCommand;
32
33
  yok_1.injector.registerCommand("resources|update", ResourcesUpdateCommand);
34
+ //# sourceMappingURL=resources-update.js.map
@@ -154,3 +154,4 @@ class RunVisionOSCommand extends RunIosCommand {
154
154
  exports.RunVisionOSCommand = RunVisionOSCommand;
155
155
  yok_1.injector.registerCommand("run|vision", RunVisionOSCommand);
156
156
  yok_1.injector.registerCommand("run|visionos", RunVisionOSCommand);
157
+ //# sourceMappingURL=run.js.map
@@ -13,3 +13,4 @@ class SetupCommand {
13
13
  }
14
14
  exports.SetupCommand = SetupCommand;
15
15
  yok_1.injector.registerCommand("setup|*", SetupCommand);
16
+ //# sourceMappingURL=setup.js.map
@@ -18,3 +18,4 @@ class StartCommand {
18
18
  }
19
19
  exports.StartCommand = StartCommand;
20
20
  yok_1.injector.registerCommand("start", StartCommand);
21
+ //# sourceMappingURL=start.js.map
@@ -66,6 +66,8 @@ class TestInitCommand {
66
66
  continue;
67
67
  }
68
68
  const dependencyVersion = modulePeerDependencies[peerDependency] || "*";
69
+ // catch errors when a peerDependency is already installed
70
+ // e.g karma is installed; karma-jasmine depends on karma and will try to install it again
69
71
  try {
70
72
  await this.$packageManager.install(`${peerDependency}@${dependencyVersion}`, projectDir, {
71
73
  "save-dev": true,
@@ -117,6 +119,7 @@ class TestInitCommand {
117
119
  const targetExampleTestRelativePath = path.relative(projectDir, targetExampleTestPath);
118
120
  bufferedLogs.push(`Added example test: ${color_1.color.yellow(targetExampleTestRelativePath)}`);
119
121
  }
122
+ // test main entry
120
123
  const testMainResourcesPath = this.$resources.resolvePath(`test/test-main${projectFilesExtension}`);
121
124
  const testMainPath = path.join(this.$projectData.appDirectoryPath, `test${projectFilesExtension}`);
122
125
  if (!this.$fs.exists(testMainPath)) {
@@ -154,3 +157,4 @@ class TestInitCommand {
154
157
  }
155
158
  }
156
159
  yok_1.injector.registerCommand("test|init", TestInitCommand);
160
+ //# sourceMappingURL=test-init.js.map