nativescript 8.5.3 → 8.5.4-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/config/config.json +0 -5
  2. package/lib/.d.ts +2 -37
  3. package/lib/bootstrap.js +1 -12
  4. package/lib/color.js +5 -0
  5. package/lib/commands/build.js +2 -6
  6. package/lib/commands/clean.js +11 -10
  7. package/lib/commands/config.js +6 -5
  8. package/lib/commands/create-project.js +12 -11
  9. package/lib/commands/debug.js +10 -11
  10. package/lib/commands/plugin/list-plugins.js +3 -2
  11. package/lib/commands/post-install.js +3 -5
  12. package/lib/commands/preview.js +4 -3
  13. package/lib/commands/run.js +17 -19
  14. package/lib/commands/test-init.js +14 -15
  15. package/lib/commands/test.js +0 -3
  16. package/lib/commands/update.js +1 -1
  17. package/lib/common/bootstrap.js +0 -1
  18. package/lib/common/child-process.js +3 -3
  19. package/lib/common/codeGeneration/code-printer.js +1 -1
  20. package/lib/common/commands/device/device-log-stream.js +1 -1
  21. package/lib/common/commands/device/list-devices.js +7 -8
  22. package/lib/common/commands/generate-messages.js +1 -1
  23. package/lib/common/constants.js +11 -11
  24. package/lib/common/declarations.d.ts +1 -53
  25. package/lib/common/definitions/commands-service.d.ts +0 -1
  26. package/lib/common/definitions/commands.d.ts +0 -1
  27. package/lib/common/definitions/google-analytics.d.ts +0 -5
  28. package/lib/common/dispatchers.js +4 -7
  29. package/lib/common/file-system.js +18 -22
  30. package/lib/common/host-info.js +4 -4
  31. package/lib/common/http-client.js +2 -2
  32. package/lib/common/logger/layouts/cli-layout.js +6 -2
  33. package/lib/common/logger/logger.js +7 -7
  34. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -1
  35. package/lib/common/mobile/android/android-log-filter.js +5 -5
  36. package/lib/common/mobile/android/android-virtual-device-service.js +2 -2
  37. package/lib/common/mobile/android/genymotion/genymotion-service.js +2 -2
  38. package/lib/common/mobile/android/logcat-helper.js +1 -1
  39. package/lib/common/mobile/device-log-provider.js +8 -8
  40. package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -1
  41. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +1 -1
  42. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -1
  43. package/lib/common/mobile/mobile-helper.js +1 -1
  44. package/lib/common/mobile/wp8/wp8-emulator-services.js +4 -4
  45. package/lib/common/opener.js +5 -1
  46. package/lib/common/plist-parser.js +3 -3
  47. package/lib/common/project-helper.js +2 -2
  48. package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +7 -7
  49. package/lib/common/services/auto-completion-service.js +2 -2
  50. package/lib/common/services/commands-service.js +5 -114
  51. package/lib/common/services/help-service.js +16 -16
  52. package/lib/common/services/hooks-service.js +2 -1
  53. package/lib/common/services/json-file-settings-service.js +3 -3
  54. package/lib/common/services/lock-service.js +5 -5
  55. package/lib/common/services/messages-service.js +6 -6
  56. package/lib/common/services/net-service.js +1 -1
  57. package/lib/common/services/project-files-manager.js +2 -2
  58. package/lib/common/services/settings-service.js +2 -2
  59. package/lib/common/validators/project-name-validator.js +1 -1
  60. package/lib/common/validators/validation-result.js +1 -1
  61. package/lib/common/verify-node-version.js +2 -2
  62. package/lib/config.js +3 -8
  63. package/lib/constants.js +18 -32
  64. package/lib/controllers/build-controller.js +5 -5
  65. package/lib/controllers/debug-controller.js +2 -2
  66. package/lib/controllers/migrate-controller.js +21 -20
  67. package/lib/controllers/update-controller.js +5 -4
  68. package/lib/declarations.d.ts +0 -24
  69. package/lib/definitions/build.d.ts +1 -1
  70. package/lib/definitions/livesync.d.ts +0 -10
  71. package/lib/definitions/project.d.ts +0 -6
  72. package/lib/definitions/xcode.d.ts +1 -1
  73. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +15 -4
  74. package/lib/device-sockets/ios/notification.js +1 -1
  75. package/lib/helpers/android-bundle-validator-helper.js +1 -1
  76. package/lib/helpers/network-connectivity-validator.js +1 -1
  77. package/lib/helpers/options-track-helper.js +1 -1
  78. package/lib/nativescript-cli.js +8 -10
  79. package/lib/options.js +61 -21
  80. package/lib/package-installation-manager.js +5 -4
  81. package/lib/project-data.js +9 -10
  82. package/lib/providers/project-files-provider.js +3 -3
  83. package/lib/services/analytics/analytics-broker-process.js +0 -3
  84. package/lib/services/analytics/analytics-broker.js +5 -5
  85. package/lib/services/analytics/analytics-service.js +0 -4
  86. package/lib/services/analytics/analytics.d.ts +1 -8
  87. package/lib/services/analytics/google-analytics-provider.js +1 -21
  88. package/lib/services/analytics-settings-service.js +3 -11
  89. package/lib/services/android-device-debug-service.js +3 -3
  90. package/lib/services/android-plugin-build-service.js +3 -3
  91. package/lib/services/android-resources-migration-service.js +1 -1
  92. package/lib/services/assets-generation/assets-generation-service.js +5 -5
  93. package/lib/services/{build-artefacts-service.js → build-artifacts-service.js} +4 -4
  94. package/lib/services/cocoapods-service.js +1 -1
  95. package/lib/services/device/device-install-app-service.js +3 -3
  96. package/lib/services/doctor-service.js +10 -9
  97. package/lib/services/extensibility-service.js +8 -8
  98. package/lib/services/ios-entitlements-service.js +1 -1
  99. package/lib/services/ios-project-service.js +5 -5
  100. package/lib/services/ios-provision-service.js +7 -7
  101. package/lib/services/ios-watch-app-service.js +1 -1
  102. package/lib/services/ip-service.js +2 -4
  103. package/lib/services/itmstransporter-service.js +2 -2
  104. package/lib/services/livesync/android-device-livesync-sockets-service.js +1 -1
  105. package/lib/services/livesync/android-livesync-tool.js +5 -5
  106. package/lib/services/livesync/ios-device-livesync-service.js +2 -2
  107. package/lib/services/livesync/platform-livesync-service-base.js +2 -1
  108. package/lib/services/log-parser-service.js +1 -5
  109. package/lib/services/log-source-map-service.js +10 -7
  110. package/lib/services/npm-config-service.js +23 -9
  111. package/lib/services/performance-service.js +3 -3
  112. package/lib/services/platform-environment-requirements.js +1 -1
  113. package/lib/services/plugins-service.js +19 -19
  114. package/lib/services/project-backup-service.js +4 -3
  115. package/lib/services/project-cleanup-service.js +4 -3
  116. package/lib/services/test-execution-service.js +2 -2
  117. package/lib/services/timeline-profiler-service.js +4 -1
  118. package/lib/services/user-settings-service.js +4 -4
  119. package/lib/tools/config-manipulation/config-transformer.js +3 -3
  120. package/lib/tools/node-modules/node-modules-builder.js +1 -1
  121. package/node_modules/@npmcli/move-file/LICENSE.md +22 -0
  122. package/node_modules/@npmcli/move-file/README.md +69 -0
  123. package/node_modules/@npmcli/move-file/lib/index.js +185 -0
  124. package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
  125. package/node_modules/@npmcli/move-file/node_modules/mkdirp/LICENSE +21 -0
  126. package/node_modules/@npmcli/move-file/node_modules/mkdirp/bin/cmd.js +68 -0
  127. package/node_modules/@npmcli/move-file/node_modules/mkdirp/index.js +31 -0
  128. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/find-made.js +29 -0
  129. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-manual.js +64 -0
  130. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-native.js +39 -0
  131. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/opts-arg.js +23 -0
  132. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/path-arg.js +29 -0
  133. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/use-native.js +10 -0
  134. package/node_modules/@npmcli/move-file/node_modules/mkdirp/package.json +44 -0
  135. package/node_modules/@npmcli/move-file/node_modules/mkdirp/readme.markdown +266 -0
  136. package/node_modules/@npmcli/move-file/package.json +47 -0
  137. package/node_modules/balanced-match/.npmignore +5 -0
  138. package/node_modules/balanced-match/LICENSE.md +21 -0
  139. package/node_modules/balanced-match/README.md +91 -0
  140. package/node_modules/balanced-match/index.js +59 -0
  141. package/node_modules/balanced-match/package.json +49 -0
  142. package/node_modules/brace-expansion/LICENSE +21 -0
  143. package/node_modules/brace-expansion/README.md +129 -0
  144. package/node_modules/brace-expansion/index.js +201 -0
  145. package/node_modules/brace-expansion/package.json +47 -0
  146. package/node_modules/concat-map/.travis.yml +4 -0
  147. package/node_modules/concat-map/LICENSE +18 -0
  148. package/node_modules/concat-map/README.markdown +62 -0
  149. package/node_modules/concat-map/example/map.js +6 -0
  150. package/node_modules/concat-map/index.js +13 -0
  151. package/node_modules/concat-map/package.json +43 -0
  152. package/node_modules/concat-map/test/map.js +39 -0
  153. package/node_modules/fs.realpath/LICENSE +43 -0
  154. package/node_modules/fs.realpath/README.md +33 -0
  155. package/node_modules/fs.realpath/index.js +66 -0
  156. package/node_modules/fs.realpath/old.js +303 -0
  157. package/node_modules/fs.realpath/package.json +26 -0
  158. package/node_modules/inflight/LICENSE +15 -0
  159. package/node_modules/inflight/README.md +37 -0
  160. package/node_modules/inflight/inflight.js +54 -0
  161. package/node_modules/inflight/package.json +29 -0
  162. package/node_modules/inherits/LICENSE +16 -0
  163. package/node_modules/inherits/README.md +42 -0
  164. package/node_modules/inherits/inherits.js +9 -0
  165. package/node_modules/inherits/inherits_browser.js +27 -0
  166. package/node_modules/inherits/package.json +29 -0
  167. package/node_modules/once/LICENSE +15 -0
  168. package/node_modules/once/README.md +79 -0
  169. package/node_modules/once/once.js +42 -0
  170. package/node_modules/once/package.json +33 -0
  171. package/node_modules/path-is-absolute/index.js +20 -0
  172. package/node_modules/path-is-absolute/license +21 -0
  173. package/node_modules/path-is-absolute/package.json +43 -0
  174. package/node_modules/path-is-absolute/readme.md +59 -0
  175. package/node_modules/rimraf/CHANGELOG.md +65 -0
  176. package/node_modules/rimraf/LICENSE +15 -0
  177. package/node_modules/rimraf/README.md +101 -0
  178. package/node_modules/rimraf/bin.js +68 -0
  179. package/node_modules/rimraf/node_modules/glob/LICENSE +21 -0
  180. package/node_modules/rimraf/node_modules/glob/README.md +378 -0
  181. package/node_modules/rimraf/node_modules/glob/common.js +238 -0
  182. package/node_modules/rimraf/node_modules/glob/glob.js +790 -0
  183. package/node_modules/rimraf/node_modules/glob/package.json +55 -0
  184. package/node_modules/rimraf/node_modules/glob/sync.js +486 -0
  185. package/node_modules/rimraf/node_modules/minimatch/LICENSE +15 -0
  186. package/node_modules/rimraf/node_modules/minimatch/README.md +230 -0
  187. package/node_modules/rimraf/node_modules/minimatch/minimatch.js +947 -0
  188. package/node_modules/rimraf/node_modules/minimatch/package.json +33 -0
  189. package/node_modules/rimraf/package.json +32 -0
  190. package/node_modules/rimraf/rimraf.js +360 -0
  191. package/node_modules/stringify-package/CHANGELOG.md +16 -0
  192. package/node_modules/stringify-package/LICENSE +13 -0
  193. package/node_modules/stringify-package/README.md +55 -0
  194. package/node_modules/stringify-package/index.js +18 -0
  195. package/node_modules/stringify-package/package.json +38 -0
  196. package/node_modules/wrappy/LICENSE +15 -0
  197. package/node_modules/wrappy/README.md +36 -0
  198. package/node_modules/wrappy/package.json +29 -0
  199. package/node_modules/wrappy/wrappy.js +33 -0
  200. package/package.json +88 -89
  201. package/lib/common/definitions/byline.d.ts +0 -4
  202. package/lib/common/definitions/colors.d.ts +0 -24
  203. package/lib/common/definitions/marked.d.ts +0 -125
  204. package/lib/common/definitions/open.d.ts +0 -5
  205. package/lib/common/definitions/osenv.d.ts +0 -4
  206. package/lib/common/definitions/plist.d.ts +0 -7
  207. package/lib/common/definitions/rimraf.d.ts +0 -9
  208. package/lib/common/definitions/shelljs.d.ts +0 -583
  209. package/lib/common/definitions/simple-plist.d.ts +0 -7
  210. package/lib/common/definitions/xmlhttprequest.d.ts +0 -29
  211. package/lib/controllers/company-insights-controller.js +0 -78
  212. package/lib/controllers/preview-app-controller.js +0 -251
  213. package/lib/definitions/company-insights-controller.d.ts +0 -59
  214. package/lib/definitions/email-validator.d.ts +0 -8
  215. package/lib/definitions/libnpmconfig.d.ts +0 -3
  216. package/lib/definitions/npm.d.ts +0 -12
  217. package/lib/definitions/preview-app-livesync.d.ts +0 -116
  218. package/lib/services/livesync/playground/devices/preview-devices-service.js +0 -67
  219. package/lib/services/livesync/playground/preview-app-constants.js +0 -23
  220. package/lib/services/livesync/playground/preview-app-files-service.js +0 -83
  221. package/lib/services/livesync/playground/preview-app-log-provider.js +0 -14
  222. package/lib/services/livesync/playground/preview-app-plugins-service.js +0 -134
  223. package/lib/services/livesync/playground/preview-qr-code-service.js +0 -109
  224. package/lib/services/livesync/playground/preview-schema-service.js +0 -57
  225. package/lib/services/livesync/playground/preview-sdk-service.js +0 -112
  226. package/lib/services/playground-service.js +0 -65
  227. package/lib/xml-validator.js +0 -47
@@ -4,10 +4,5 @@
4
4
  "ANDROID_DEBUG_UI_MAC": "Google Chrome",
5
5
  "USE_POD_SANDBOX": false,
6
6
  "DISABLE_HOOKS": false,
7
- "UPLOAD_PLAYGROUND_FILES_ENDPOINT": "https://play.nativescript.org/api/files",
8
- "SHORTEN_URL_ENDPOINT": "https://play.nativescript.org/api/shortenurl?longUrl=%s",
9
- "INSIGHTS_URL_ENDPOINT": "https://play-server.nativescript.org/api/insights?ipAddress=%s",
10
- "WHOAMI_URL_ENDPOINT": "https://play.nativescript.org/api/whoami",
11
- "PREVIEW_APP_ENVIRONMENT": "live",
12
7
  "GA_TRACKING_ID": "UA-111455-44"
13
8
  }
package/lib/.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /// <reference path="android-tools-info.ts" />
3
3
  /// <reference path="base-package-manager.ts" />
4
4
  /// <reference path="bootstrap.ts" />
5
+ /// <reference path="color.ts" />
5
6
  /// <reference path="commands/add-platform.ts" />
6
7
  /// <reference path="commands/apple-login.ts" />
7
8
  /// <reference path="commands/appstore-list.ts" />
@@ -75,9 +76,7 @@
75
76
  /// <reference path="common/constants.ts" />
76
77
  /// <reference path="common/declarations.d.ts" />
77
78
  /// <reference path="common/decorators.ts" />
78
- /// <reference path="common/definitions/byline.d.ts" />
79
79
  /// <reference path="common/definitions/cli-global.d.ts" />
80
- /// <reference path="common/definitions/colors.d.ts" />
81
80
  /// <reference path="common/definitions/commands-service.d.ts" />
82
81
  /// <reference path="common/definitions/commands.d.ts" />
83
82
  /// <reference path="common/definitions/config.d.ts" />
@@ -85,16 +84,8 @@
85
84
  /// <reference path="common/definitions/google-analytics.d.ts" />
86
85
  /// <reference path="common/definitions/json-file-settings-service.d.ts" />
87
86
  /// <reference path="common/definitions/logger.d.ts" />
88
- /// <reference path="common/definitions/marked.d.ts" />
89
87
  /// <reference path="common/definitions/mobile.d.ts" />
90
- /// <reference path="common/definitions/open.d.ts" />
91
- /// <reference path="common/definitions/osenv.d.ts" />
92
- /// <reference path="common/definitions/plist.d.ts" />
93
- /// <reference path="common/definitions/rimraf.d.ts" />
94
- /// <reference path="common/definitions/shelljs.d.ts" />
95
- /// <reference path="common/definitions/simple-plist.d.ts" />
96
88
  /// <reference path="common/definitions/validator.d.ts" />
97
- /// <reference path="common/definitions/xmlhttprequest.d.ts" />
98
89
  /// <reference path="common/definitions/yok.d.ts" />
99
90
  /// <reference path="common/dispatchers.ts" />
100
91
  /// <reference path="common/doctor.d.ts" />
@@ -233,13 +224,11 @@
233
224
  /// <reference path="constants-provider.ts" />
234
225
  /// <reference path="constants.ts" />
235
226
  /// <reference path="controllers/build-controller.ts" />
236
- /// <reference path="controllers/company-insights-controller.ts" />
237
227
  /// <reference path="controllers/debug-controller.ts" />
238
228
  /// <reference path="controllers/deploy-controller.ts" />
239
229
  /// <reference path="controllers/migrate-controller.ts" />
240
230
  /// <reference path="controllers/platform-controller.ts" />
241
231
  /// <reference path="controllers/prepare-controller.ts" />
242
- /// <reference path="controllers/preview-app-controller.ts" />
243
232
  /// <reference path="controllers/run-controller.ts" />
244
233
  /// <reference path="controllers/update-controller-base.ts" />
245
234
  /// <reference path="controllers/update-controller.ts" />
@@ -254,11 +243,9 @@
254
243
  /// <reference path="definitions/android-plugin-migrator.d.ts" />
255
244
  /// <reference path="definitions/build.d.ts" />
256
245
  /// <reference path="definitions/cleanup-service.d.ts" />
257
- /// <reference path="definitions/company-insights-controller.d.ts" />
258
246
  /// <reference path="definitions/data.d.ts" />
259
247
  /// <reference path="definitions/debug.d.ts" />
260
248
  /// <reference path="definitions/deploy.d.ts" />
261
- /// <reference path="definitions/email-validator.d.ts" />
262
249
  /// <reference path="definitions/file-log-service.d.ts" />
263
250
  /// <reference path="definitions/files-hash-service.d.ts" />
264
251
  /// <reference path="definitions/gradle.d.ts" />
@@ -267,7 +254,6 @@
267
254
  /// <reference path="definitions/ios-debugger-port-service.d.ts" />
268
255
  /// <reference path="definitions/ios.d.ts" />
269
256
  /// <reference path="definitions/ip-service.d.ts" />
270
- /// <reference path="definitions/libnpmconfig.d.ts" />
271
257
  /// <reference path="definitions/livesync-global.d.ts" />
272
258
  /// <reference path="definitions/livesync.d.ts" />
273
259
  /// <reference path="definitions/lock-service.d.ts" />
@@ -276,12 +262,10 @@
276
262
  /// <reference path="definitions/metadata-filtering-service.d.ts" />
277
263
  /// <reference path="definitions/migrate.d.ts" />
278
264
  /// <reference path="definitions/nativescript-dev-xcode.d.ts" />
279
- /// <reference path="definitions/npm.d.ts" />
280
265
  /// <reference path="definitions/pacote-service.d.ts" />
281
266
  /// <reference path="definitions/platform.d.ts" />
282
267
  /// <reference path="definitions/plugins.d.ts" />
283
268
  /// <reference path="definitions/prepare.d.ts" />
284
- /// <reference path="definitions/preview-app-livesync.d.ts" />
285
269
  /// <reference path="definitions/project-changes.d.ts" />
286
270
  /// <reference path="definitions/project.d.ts" />
287
271
  /// <reference path="definitions/prompter.d.ts" />
@@ -345,7 +329,7 @@
345
329
  /// <reference path="services/apple-portal/apple-portal-session-service.ts" />
346
330
  /// <reference path="services/apple-portal/definitions.d.ts" />
347
331
  /// <reference path="services/assets-generation/assets-generation-service.ts" />
348
- /// <reference path="services/build-artefacts-service.ts" />
332
+ /// <reference path="services/build-artifacts-service.ts" />
349
333
  /// <reference path="services/build-data-service.ts" />
350
334
  /// <reference path="services/build-info-file-service.ts" />
351
335
  /// <reference path="services/cleanup-service.ts" />
@@ -389,14 +373,6 @@
389
373
  /// <reference path="services/livesync/ios-livesync-service.ts" />
390
374
  /// <reference path="services/livesync/livesync-socket.ts" />
391
375
  /// <reference path="services/livesync/platform-livesync-service-base.ts" />
392
- /// <reference path="services/livesync/playground/devices/preview-devices-service.ts" />
393
- /// <reference path="services/livesync/playground/preview-app-constants.ts" />
394
- /// <reference path="services/livesync/playground/preview-app-files-service.ts" />
395
- /// <reference path="services/livesync/playground/preview-app-log-provider.ts" />
396
- /// <reference path="services/livesync/playground/preview-app-plugins-service.ts" />
397
- /// <reference path="services/livesync/playground/preview-qr-code-service.ts" />
398
- /// <reference path="services/livesync/playground/preview-schema-service.ts" />
399
- /// <reference path="services/livesync/playground/preview-sdk-service.ts" />
400
376
  /// <reference path="services/log-parser-service.ts" />
401
377
  /// <reference path="services/log-source-map-service.ts" />
402
378
  /// <reference path="services/marking-mode-service.ts" />
@@ -410,7 +386,6 @@
410
386
  /// <reference path="services/platform/platform-validation-service.ts" />
411
387
  /// <reference path="services/platform/prepare-native-platform-service.ts" />
412
388
  /// <reference path="services/platforms-data-service.ts" />
413
- /// <reference path="services/playground-service.ts" />
414
389
  /// <reference path="services/plugins-service.ts" />
415
390
  /// <reference path="services/prepare-data-service.ts" />
416
391
  /// <reference path="services/project-backup-service.ts" />
@@ -440,7 +415,6 @@
440
415
  /// <reference path="tools/config-manipulation/config-transformer.ts" />
441
416
  /// <reference path="tools/node-modules/node-modules-builder.ts" />
442
417
  /// <reference path="tools/node-modules/node-modules-dependencies-builder.ts" />
443
- /// <reference path="xml-validator.ts" />
444
418
  /// <reference path="yarn-package-manager.ts" />
445
419
  /// <reference path="yarn2-package-manager.ts" />
446
420
  /// <reference path="../test/android-tools-info.ts" />
@@ -449,12 +423,10 @@
449
423
  /// <reference path="../test/commands/post-install.ts" />
450
424
  /// <reference path="../test/config/config-json.ts" />
451
425
  /// <reference path="../test/controllers/add-platform-controller.ts" />
452
- /// <reference path="../test/controllers/company-insights-controller.ts" />
453
426
  /// <reference path="../test/controllers/debug-controller.ts" />
454
427
  /// <reference path="../test/controllers/prepare-controller.ts" />
455
428
  /// <reference path="../test/controllers/run-controller.ts" />
456
429
  /// <reference path="../test/controllers/update-controller.ts" />
457
- /// <reference path="../test/definitions/should.d.ts" />
458
430
  /// <reference path="../test/helpers/platform-command-helper.ts" />
459
431
  /// <reference path="../test/ios-entitlements-service.ts" />
460
432
  /// <reference path="../test/ios-project-service.ts" />
@@ -497,13 +469,6 @@
497
469
  /// <reference path="../test/services/pacote-service.ts" />
498
470
  /// <reference path="../test/services/platform-environment-requirements.ts" />
499
471
  /// <reference path="../test/services/platform/add-platform-service.ts" />
500
- /// <reference path="../test/services/playground-service.ts" />
501
- /// <reference path="../test/services/playground/preview-app-files-service.ts" />
502
- /// <reference path="../test/services/playground/preview-app-livesync-service.ts" />
503
- /// <reference path="../test/services/playground/preview-app-plugins-service.ts" />
504
- /// <reference path="../test/services/playground/preview-schema-service.ts" />
505
- /// <reference path="../test/services/preview-devices-service.ts" />
506
- /// <reference path="../test/services/preview-sdk-service.ts" />
507
472
  /// <reference path="../test/services/project-config-service.ts" />
508
473
  /// <reference path="../test/services/project-data-service.ts" />
509
474
  /// <reference path="../test/services/test-execution-service.ts" />
package/lib/bootstrap.js CHANGED
@@ -42,7 +42,7 @@ yok_1.injector.require("addPlatformService", "./services/platform/add-platform-s
42
42
  yok_1.injector.require("buildInfoFileService", "./services/build-info-file-service");
43
43
  yok_1.injector.require("prepareNativePlatformService", "./services/platform/prepare-native-platform-service");
44
44
  yok_1.injector.require("platformValidationService", "./services/platform/platform-validation-service");
45
- yok_1.injector.require("buildArtefactsService", "./services/build-artefacts-service");
45
+ yok_1.injector.require("buildArtifactsService", "./services/build-artifacts-service");
46
46
  yok_1.injector.require("deviceInstallAppService", "./services/device/device-install-app-service");
47
47
  yok_1.injector.require("platformController", "./controllers/platform-controller");
48
48
  yok_1.injector.require("prepareController", "./controllers/prepare-controller");
@@ -50,7 +50,6 @@ yok_1.injector.require("deployController", "./controllers/deploy-controller");
50
50
  yok_1.injector.requirePublicClass("buildController", "./controllers/build-controller");
51
51
  yok_1.injector.requirePublicClass("runController", "./controllers/run-controller");
52
52
  yok_1.injector.requirePublicClass("debugController", "./controllers/debug-controller");
53
- yok_1.injector.requirePublicClass("previewAppController", "./controllers/preview-app-controller");
54
53
  yok_1.injector.requirePublicClass("updateController", "./controllers/update-controller");
55
54
  yok_1.injector.requirePublicClass("migrateController", "./controllers/migrate-controller");
56
55
  yok_1.injector.require("prepareDataService", "./services/prepare-data-service");
@@ -65,7 +64,6 @@ yok_1.injector.require("userSettingsService", "./services/user-settings-service"
65
64
  yok_1.injector.requirePublic("analyticsSettingsService", "./services/analytics-settings-service");
66
65
  yok_1.injector.require("analyticsService", "./services/analytics/analytics-service");
67
66
  yok_1.injector.require("googleAnalyticsProvider", "./services/analytics/google-analytics-provider");
68
- yok_1.injector.requirePublicClass("companyInsightsController", "./controllers/company-insights-controller");
69
67
  yok_1.injector.require("platformCommandParameter", "./platform-command-param");
70
68
  yok_1.injector.requireCommand("create", "./commands/create-project");
71
69
  yok_1.injector.requireCommand("clean", "./commands/clean");
@@ -144,20 +142,12 @@ yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/an
144
142
  yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
145
143
  yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
146
144
  yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
147
- yok_1.injector.require("previewAppFilesService", "./services/livesync/playground/preview-app-files-service");
148
- yok_1.injector.require("previewAppLogProvider", "./services/livesync/playground/preview-app-log-provider");
149
- yok_1.injector.require("previewAppPluginsService", "./services/livesync/playground/preview-app-plugins-service");
150
- yok_1.injector.require("previewSdkService", "./services/livesync/playground/preview-sdk-service");
151
- yok_1.injector.require("previewSchemaService", "./services/livesync/playground/preview-schema-service");
152
- yok_1.injector.requirePublicClass("previewDevicesService", "./services/livesync/playground/devices/preview-devices-service");
153
- yok_1.injector.requirePublic("previewQrCodeService", "./services/livesync/playground/preview-qr-code-service");
154
145
  yok_1.injector.requirePublic("sysInfo", "./sys-info");
155
146
  yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
156
147
  yok_1.injector.require("appDebugSocketProxyFactory", "./device-sockets/ios/app-debug-socket-proxy-factory");
157
148
  yok_1.injector.require("iOSNotification", "./device-sockets/ios/notification");
158
149
  yok_1.injector.require("iOSSocketRequestExecutor", "./device-sockets/ios/socket-request-executor");
159
150
  yok_1.injector.require("messages", "./common/messages/messages");
160
- yok_1.injector.require("xmlValidator", "./xml-validator");
161
151
  yok_1.injector.requireCommand("post-install-cli", "./commands/post-install");
162
152
  yok_1.injector.requireCommand("migrate", "./commands/migrate");
163
153
  yok_1.injector.requireCommand("update", "./commands/update");
@@ -174,7 +164,6 @@ yok_1.injector.requireCommand("extension|uninstall", "./commands/extensibility/u
174
164
  yok_1.injector.requirePublicClass("extensibilityService", "./services/extensibility-service");
175
165
  yok_1.injector.require("nodeModulesDependenciesBuilder", "./tools/node-modules/node-modules-dependencies-builder");
176
166
  yok_1.injector.require("terminalSpinnerService", "./services/terminal-spinner-service");
177
- yok_1.injector.require("playgroundService", "./services/playground-service");
178
167
  yok_1.injector.require("platformEnvironmentRequirements", "./services/platform-environment-requirements");
179
168
  yok_1.injector.requireCommand("resources|generate|icons", "./commands/generate-assets");
180
169
  yok_1.injector.requireCommand("resources|generate|splashes", "./commands/generate-assets");
package/lib/color.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.color = void 0;
4
+ const chalk = require("chalk");
5
+ exports.color = chalk;
@@ -83,9 +83,7 @@ class BuildIosCommand extends BuildCommandBase {
83
83
  });
84
84
  }
85
85
  _super.validatePlatform.call(this, platform);
86
- let canExecute = yield _super.canExecuteCommandBase.call(this, platform, {
87
- notConfiguredEnvOptions: { hideSyncToPreviewAppOption: true },
88
- });
86
+ let canExecute = yield _super.canExecuteCommandBase.call(this, platform);
89
87
  if (canExecute) {
90
88
  canExecute = yield _super.validateArgs.call(this, args, platform);
91
89
  }
@@ -132,9 +130,7 @@ class BuildAndroidCommand extends BuildCommandBase {
132
130
  });
133
131
  }
134
132
  this.$androidBundleValidatorHelper.validateRuntimeVersion(this.$projectData);
135
- let canExecute = yield _super.canExecuteCommandBase.call(this, platform, {
136
- notConfiguredEnvOptions: { hideSyncToPreviewAppOption: true },
137
- });
133
+ let canExecute = yield _super.canExecuteCommandBase.call(this, platform);
138
134
  if (canExecute) {
139
135
  if (this.$options.release && !(0, helpers_1.hasValidAndroidSigning)(this.$options)) {
140
136
  this.$errors.failWithHelp(constants_1.ANDROID_RELEASE_BUILD_ERROR_MESSAGE);
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CleanCommand = void 0;
13
+ const color_1 = require("../color");
13
14
  const yok_1 = require("../common/yok");
14
15
  const constants = require("../constants");
15
16
  const os = require("os");
@@ -109,7 +110,7 @@ class CleanCommand {
109
110
  spinner.succeed("Project successfully cleaned.");
110
111
  }
111
112
  else {
112
- spinner.fail(`${"Project unsuccessfully cleaned.".red}`);
113
+ spinner.fail(color_1.color.red("Project unsuccessfully cleaned."));
113
114
  }
114
115
  });
115
116
  }
@@ -128,7 +129,7 @@ class CleanCommand {
128
129
  spinner.succeed(`Found ${paths.length} projects.`);
129
130
  let computed = 0;
130
131
  const updateProgress = () => {
131
- const current = `${computed}/${paths.length}`.grey;
132
+ const current = color_1.color.grey(`${computed}/${paths.length}`);
132
133
  spinner.start(`Gathering cleanable sizes. This may take a while... ${current}`);
133
134
  };
134
135
  updateProgress();
@@ -160,7 +161,7 @@ class CleanCommand {
160
161
  const totalSize = Array.from(projects.values())
161
162
  .filter((s) => s > 0)
162
163
  .reduce((a, b) => a + b, 0);
163
- const pathsToClean = yield this.$prompter.promptForChoice(`Found ${projects.size} cleanable project(s) with a total size of: ${bytesToHumanReadable(totalSize).green}. Select projects to clean`, Array.from(projects.keys()).map((p) => {
164
+ const pathsToClean = yield this.$prompter.promptForChoice(`Found ${projects.size} cleanable project(s) with a total size of: ${color_1.color.green(bytesToHumanReadable(totalSize))}. Select projects to clean`, Array.from(projects.keys()).map((p) => {
164
165
  const size = projects.get(p);
165
166
  let description;
166
167
  if (size === -1) {
@@ -170,14 +171,14 @@ class CleanCommand {
170
171
  description = ` - ${bytesToHumanReadable(size)}`;
171
172
  }
172
173
  return {
173
- title: `${p}${description.grey}`,
174
+ title: `${p}${color_1.color.grey(description)}`,
174
175
  value: p,
175
176
  };
176
177
  }), true, {
177
178
  optionsPerPage: process.stdout.rows - 6,
178
179
  });
179
180
  this.$logger.clearScreen();
180
- spinner.warn(`This will run "${`ns clean`.yellow}" in all the selected projects and ${"delete files from your system".red.bold}!`);
181
+ spinner.warn(`This will run "${color_1.color.yellow(`ns clean`)}" in all the selected projects and ${color_1.color.red.bold("delete files from your system")}!`);
181
182
  spinner.warn(`This action cannot be undone!`);
182
183
  let confirmed = yield this.$prompter.confirm("Are you sure you want to clean the selected projects?");
183
184
  if (!confirmed) {
@@ -187,7 +188,7 @@ class CleanCommand {
187
188
  let totalSizeCleaned = 0;
188
189
  for (let i = 0; i < pathsToClean.length; i++) {
189
190
  const currentPath = pathsToClean[i];
190
- spinner.start(`Cleaning ${currentPath.cyan}... ${i + 1}/${pathsToClean.length}`);
191
+ spinner.start(`Cleaning ${color_1.color.cyan(currentPath)}... ${i + 1}/${pathsToClean.length}`);
191
192
  const ok = yield this.$childProcess
192
193
  .exec(`node ${CLIPath} clean ${this.$options.dryRun ? "--dry-run" : ""} --json --disable-analytics`, {
193
194
  cwd: currentPath,
@@ -202,17 +203,17 @@ class CleanCommand {
202
203
  });
203
204
  if (ok) {
204
205
  const cleanedSize = projects.get(currentPath);
205
- const cleanedSizeStr = `- ${bytesToHumanReadable(cleanedSize)}`.grey;
206
- spinner.succeed(`Cleaned ${currentPath.cyan} ${cleanedSizeStr}`);
206
+ const cleanedSizeStr = color_1.color.grey(`- ${bytesToHumanReadable(cleanedSize)}`);
207
+ spinner.succeed(`Cleaned ${color_1.color.cyan(currentPath)} ${cleanedSizeStr}`);
207
208
  totalSizeCleaned += cleanedSize;
208
209
  }
209
210
  else {
210
- spinner.fail(`Failed to clean ${currentPath.cyan} - skipped`);
211
+ spinner.fail(`Failed to clean ${color_1.color.cyan(currentPath)} - skipped`);
211
212
  }
212
213
  }
213
214
  spinner.clear();
214
215
  spinner.stop();
215
- spinner.succeed(`Done! We've just freed up ${bytesToHumanReadable(totalSizeCleaned).green}! Woohoo! 🎉`);
216
+ spinner.succeed(`Done! We've just freed up ${color_1.color.green(bytesToHumanReadable(totalSizeCleaned))}! Woohoo! 🎉`);
216
217
  if (this.$options.dryRun) {
217
218
  spinner.info('Note: the "--dry-run" flag was used, so no files were actually deleted.');
218
219
  }
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ConfigSetCommand = exports.ConfigGetCommand = exports.ConfigListCommand = void 0;
13
13
  const yok_1 = require("../common/yok");
14
+ const color_1 = require("../color");
14
15
  class ConfigListCommand {
15
16
  constructor($projectConfigService, $logger) {
16
17
  this.$projectConfigService = $projectConfigService;
@@ -34,13 +35,13 @@ class ConfigListCommand {
34
35
  return (`${depth > 0 ? "\n" : ""}` +
35
36
  Object.keys(value)
36
37
  .map((key) => {
37
- return (`${indent()}${key}: `.green +
38
+ return (color_1.color.green(`${indent()}${key}: `) +
38
39
  this.getValueString(value[key], depth + 1));
39
40
  })
40
41
  .join("\n"));
41
42
  }
42
43
  else {
43
- return `${value}`.yellow;
44
+ return color_1.color.yellow(value.toString());
44
45
  }
45
46
  }
46
47
  }
@@ -89,9 +90,9 @@ class ConfigSetCommand {
89
90
  }
90
91
  const convertedValue = this.getConvertedValue(value);
91
92
  const existingKey = current !== undefined;
92
- const keyDisplay = `${key}`.green;
93
- const currentDisplay = `${current}`.yellow;
94
- const updatedDisplay = `${convertedValue}`.cyan;
93
+ const keyDisplay = color_1.color.green(key);
94
+ const currentDisplay = color_1.color.yellow(current);
95
+ const updatedDisplay = color_1.color.cyan(convertedValue);
95
96
  this.$logger.info(`${existingKey ? "Updating" : "Setting"} ${keyDisplay}${existingKey ? ` from ${currentDisplay} ` : " "}to ${updatedDisplay}`);
96
97
  try {
97
98
  yield this.$projectConfigService.setValue(key, convertedValue);
@@ -14,6 +14,7 @@ const constants = require("../constants");
14
14
  const path = require("path");
15
15
  const helpers_1 = require("../common/helpers");
16
16
  const yok_1 = require("../common/yok");
17
+ const color_1 = require("../color");
17
18
  class CreateProjectCommand {
18
19
  constructor($projectService, $logger, $errors, $options, $prompter, $stringParameter) {
19
20
  this.$projectService = $projectService;
@@ -293,34 +294,33 @@ can skip this prompt next time using the --template option, or the --ng, --react
293
294
  return __awaiter(this, void 0, void 0, function* () {
294
295
  const { projectDir, projectName } = this.createdProjectData;
295
296
  const relativePath = path.relative(process.cwd(), projectDir);
296
- const greyDollarSign = "$".grey;
297
+ const greyDollarSign = color_1.color.grey("$");
297
298
  this.$logger.clearScreen();
298
299
  this.$logger.info([
299
300
  [
300
- `Project`.green,
301
- projectName.cyan,
302
- `was successfully created.`.green,
301
+ color_1.color.green(`Project`),
302
+ color_1.color.cyan(projectName),
303
+ color_1.color.green(`was successfully created.`),
303
304
  ].join(" "),
304
305
  "",
305
- `Now you can navigate to your project with ${`cd ${relativePath}`.cyan} and then:`,
306
+ `Now you can navigate to your project with ${color_1.color.cyan(`cd ${relativePath}`)} and then:`,
306
307
  "",
307
308
  `Run the project on multiple devices:`,
308
309
  "",
309
- ` ${greyDollarSign} ${"ns run ios".green}`,
310
- ` ${greyDollarSign} ${"ns run android".green}`,
310
+ ` ${greyDollarSign} ${color_1.color.green("ns run ios")}`,
311
+ ` ${greyDollarSign} ${color_1.color.green("ns run android")}`,
311
312
  "",
312
313
  "Debug the project with Chrome DevTools:",
313
314
  "",
314
- ` ${greyDollarSign} ${"ns debug ios".green}`,
315
- ` ${greyDollarSign} ${"ns debug android".green}`,
315
+ ` ${greyDollarSign} ${color_1.color.green("ns debug ios")}`,
316
+ ` ${greyDollarSign} ${color_1.color.green("ns debug android")}`,
316
317
  ``,
317
- `For more options consult the docs or run ${"ns --help".green}`,
318
+ `For more options consult the docs or run ${color_1.color.green("ns --help")}`,
318
319
  "",
319
320
  ].join("\n"));
320
321
  });
321
322
  }
322
323
  }
323
- exports.CreateProjectCommand = CreateProjectCommand;
324
324
  CreateProjectCommand.BlankTemplateKey = "Blank";
325
325
  CreateProjectCommand.BlankTemplateDescription = "A blank app";
326
326
  CreateProjectCommand.BlankTsTemplateKey = "Blank Typescript";
@@ -331,4 +331,5 @@ CreateProjectCommand.DrawerTemplateKey = "SideDrawer";
331
331
  CreateProjectCommand.DrawerTemplateDescription = "An app with pre-built pages that uses a drawer for navigation";
332
332
  CreateProjectCommand.TabsTemplateKey = "Tabs";
333
333
  CreateProjectCommand.TabsTemplateDescription = "An app with pre-built pages that uses tabs for navigation";
334
+ exports.CreateProjectCommand = CreateProjectCommand;
334
335
  yok_1.injector.registerCommand("create", CreateProjectCommand);
@@ -83,7 +83,6 @@ class DebugPlatformCommand extends command_base_1.ValidatePlatformCommandBase {
83
83
  }
84
84
  const result = yield _super.canExecuteCommandBase.call(this, this.platform, {
85
85
  validateOptions: true,
86
- notConfiguredEnvOptions: { hideSyncToPreviewAppOption: true },
87
86
  });
88
87
  return result;
89
88
  });
@@ -91,6 +90,11 @@ class DebugPlatformCommand extends command_base_1.ValidatePlatformCommandBase {
91
90
  }
92
91
  exports.DebugPlatformCommand = DebugPlatformCommand;
93
92
  class DebugIOSCommand {
93
+ get debugPlatformCommand() {
94
+ return this.$injector.resolve(DebugPlatformCommand, {
95
+ platform: this.platform,
96
+ });
97
+ }
94
98
  constructor($errors, $devicePlatformsConstants, $platformValidationService, $options, $injector, $sysInfo, $projectData, $iosDeviceOperations, $iOSSimulatorLogProvider) {
95
99
  this.$errors = $errors;
96
100
  this.$devicePlatformsConstants = $devicePlatformsConstants;
@@ -105,11 +109,6 @@ class DebugIOSCommand {
105
109
  $iosDeviceOperations.setShouldDispose(false);
106
110
  $iOSSimulatorLogProvider.setShouldDispose(false);
107
111
  }
108
- get debugPlatformCommand() {
109
- return this.$injector.resolve(DebugPlatformCommand, {
110
- platform: this.platform,
111
- });
112
- }
113
112
  execute(args) {
114
113
  return this.debugPlatformCommand.execute(args);
115
114
  }
@@ -153,6 +152,11 @@ __decorate([
153
152
  exports.DebugIOSCommand = DebugIOSCommand;
154
153
  yok_1.injector.registerCommand("debug|ios", DebugIOSCommand);
155
154
  class DebugAndroidCommand {
155
+ get debugPlatformCommand() {
156
+ return this.$injector.resolve(DebugPlatformCommand, {
157
+ platform: this.platform,
158
+ });
159
+ }
156
160
  constructor($errors, $devicePlatformsConstants, $injector, $projectData, $options) {
157
161
  this.$errors = $errors;
158
162
  this.$devicePlatformsConstants = $devicePlatformsConstants;
@@ -163,11 +167,6 @@ class DebugAndroidCommand {
163
167
  this.platform = this.$devicePlatformsConstants.Android;
164
168
  this.$projectData.initializeProjectData();
165
169
  }
166
- get debugPlatformCommand() {
167
- return this.$injector.resolve(DebugPlatformCommand, {
168
- platform: this.platform,
169
- });
170
- }
171
170
  execute(args) {
172
171
  return __awaiter(this, void 0, void 0, function* () {
173
172
  return this.debugPlatformCommand.execute(args);
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ListPluginsCommand = void 0;
13
13
  const helpers_1 = require("../../common/helpers");
14
14
  const yok_1 = require("../../common/yok");
15
+ const color_1 = require("../../color");
15
16
  class ListPluginsCommand {
16
17
  constructor($pluginsService, $projectData, $logger) {
17
18
  this.$pluginsService = $pluginsService;
@@ -38,8 +39,8 @@ class ListPluginsCommand {
38
39
  else {
39
40
  this.$logger.info("There are no dev dependencies.");
40
41
  }
41
- const viewDependenciesCommand = "npm view <pluginName> grep dependencies".cyan.toString();
42
- const viewDevDependenciesCommand = "npm view <pluginName> grep devDependencies".cyan.toString();
42
+ const viewDependenciesCommand = color_1.color.cyan("npm view <pluginName> grep dependencies");
43
+ const viewDevDependenciesCommand = color_1.color.cyan("npm view <pluginName> grep devDependencies");
43
44
  this.$logger.warn("NOTE:");
44
45
  this.$logger.warn(`If you want to check the dependencies of installed plugin use ${viewDependenciesCommand}`);
45
46
  this.$logger.warn(`If you want to check the dev dependencies of installed plugin use ${viewDevDependenciesCommand}`);
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PostInstallCliCommand = void 0;
13
13
  const helpers_1 = require("../common/helpers");
14
14
  const yok_1 = require("../common/yok");
15
+ const color_1 = require("../color");
15
16
  class PostInstallCliCommand {
16
17
  constructor($fs, $commandsService, $helpService, $settingsService, $analyticsService, $logger, $hostInfo) {
17
18
  this.$fs = $fs;
@@ -43,13 +44,10 @@ class PostInstallCliCommand {
43
44
  postCommandAction(args) {
44
45
  return __awaiter(this, void 0, void 0, function* () {
45
46
  this.$logger.info("");
46
- this.$logger.info("You have successfully installed the NativeScript CLI!".green.bold);
47
+ this.$logger.info(color_1.color.green.bold("You have successfully installed the NativeScript CLI!"));
47
48
  this.$logger.info("");
48
49
  this.$logger.info("Your next step is to create a new project:");
49
- this.$logger.info("ns create".green.bold);
50
- this.$logger.info("");
51
- this.$logger.printMarkdown("New to NativeScript?".bold +
52
- " Try the tutorials in NativeScript Playground: `https://play.nativescript.org`");
50
+ this.$logger.info(color_1.color.green.bold("ns create"));
53
51
  this.$logger.info("");
54
52
  this.$logger.printMarkdown("If you have any questions, check Stack Overflow: `https://stackoverflow.com/questions/tagged/nativescript` and our public Discord channel: `https://nativescript.org/discord`");
55
53
  });
@@ -11,9 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PreviewCommand = void 0;
13
13
  const yok_1 = require("../common/yok");
14
- const path = require("path");
15
14
  const resolve_package_path_1 = require("@rigor789/resolve-package-path");
16
15
  const constants_1 = require("../constants");
16
+ const color_1 = require("../color");
17
+ const path = require("path");
17
18
  const PREVIEW_CLI_PACKAGE = "@nativescript/preview-cli";
18
19
  class PreviewCommand {
19
20
  constructor($logger, $errors, $projectData, $packageManager, $childProcess, $options) {
@@ -60,12 +61,12 @@ class PreviewCommand {
60
61
  `This should not happen under regular circumstances, but seems like it did somehow... :(`,
61
62
  `Good news though, you can install the Preview CLI by running`,
62
63
  "",
63
- " " + installCommand.green,
64
+ " " + color_1.color.green(installCommand),
64
65
  "",
65
66
  "Once installed, run this command again and everything should work!",
66
67
  "If it still fails, you can invoke the preview-cli directly as a last resort with",
67
68
  "",
68
- " ./node_modules/.bin/preview-cli".cyan,
69
+ color_1.color.cyan(" ./node_modules/.bin/preview-cli"),
69
70
  "",
70
71
  "And if you are still having issues, try again - or reach out on Discord/open an issue on GitHub.",
71
72
  ].join("\n"));
@@ -22,8 +22,7 @@ const decorators_1 = require("../common/decorators");
22
22
  const helpers_1 = require("../common/helpers");
23
23
  const yok_1 = require("../common/yok");
24
24
  class RunCommandBase {
25
- constructor($analyticsService, $devicePlatformsConstants, $errors, $hostInfo, $liveSyncCommandHelper, $migrateController, $options, $projectData) {
26
- this.$analyticsService = $analyticsService;
25
+ constructor($devicePlatformsConstants, $errors, $hostInfo, $liveSyncCommandHelper, $migrateController, $options, $projectData) {
27
26
  this.$devicePlatformsConstants = $devicePlatformsConstants;
28
27
  this.$errors = $errors;
29
28
  this.$hostInfo = $hostInfo;
@@ -36,7 +35,6 @@ class RunCommandBase {
36
35
  }
37
36
  execute(args) {
38
37
  return __awaiter(this, void 0, void 0, function* () {
39
- yield this.$analyticsService.trackPreviewAppData(this.platform, this.$projectData.projectDir);
40
38
  return this.$liveSyncCommandHelper.executeCommandLiveSync(this.platform, this.liveSyncCommandHelperAdditionalOptions);
41
39
  });
42
40
  }
@@ -70,6 +68,14 @@ class RunCommandBase {
70
68
  exports.RunCommandBase = RunCommandBase;
71
69
  yok_1.injector.registerCommand("run|*all", RunCommandBase);
72
70
  class RunIosCommand {
71
+ get runCommand() {
72
+ const runCommand = this.$injector.resolve(RunCommandBase);
73
+ runCommand.platform = this.platform;
74
+ return runCommand;
75
+ }
76
+ get platform() {
77
+ return this.$devicePlatformsConstants.iOS;
78
+ }
73
79
  constructor($devicePlatformsConstants, $errors, $injector, $options, $platformValidationService, $projectDataService) {
74
80
  this.$devicePlatformsConstants = $devicePlatformsConstants;
75
81
  this.$errors = $errors;
@@ -79,14 +85,6 @@ class RunIosCommand {
79
85
  this.$projectDataService = $projectDataService;
80
86
  this.allowedParameters = [];
81
87
  }
82
- get runCommand() {
83
- const runCommand = this.$injector.resolve(RunCommandBase);
84
- runCommand.platform = this.platform;
85
- return runCommand;
86
- }
87
- get platform() {
88
- return this.$devicePlatformsConstants.iOS;
89
- }
90
88
  execute(args) {
91
89
  return __awaiter(this, void 0, void 0, function* () {
92
90
  return this.runCommand.execute(args);
@@ -110,6 +108,14 @@ __decorate([
110
108
  exports.RunIosCommand = RunIosCommand;
111
109
  yok_1.injector.registerCommand("run|ios", RunIosCommand);
112
110
  class RunAndroidCommand {
111
+ get runCommand() {
112
+ const runCommand = this.$injector.resolve(RunCommandBase);
113
+ runCommand.platform = this.platform;
114
+ return runCommand;
115
+ }
116
+ get platform() {
117
+ return this.$devicePlatformsConstants.Android;
118
+ }
113
119
  constructor($devicePlatformsConstants, $errors, $injector, $options, $platformValidationService, $projectData) {
114
120
  this.$devicePlatformsConstants = $devicePlatformsConstants;
115
121
  this.$errors = $errors;
@@ -119,14 +125,6 @@ class RunAndroidCommand {
119
125
  this.$projectData = $projectData;
120
126
  this.allowedParameters = [];
121
127
  }
122
- get runCommand() {
123
- const runCommand = this.$injector.resolve(RunCommandBase);
124
- runCommand.platform = this.platform;
125
- return runCommand;
126
- }
127
- get platform() {
128
- return this.$devicePlatformsConstants.Android;
129
- }
130
128
  execute(args) {
131
129
  return __awaiter(this, void 0, void 0, function* () {
132
130
  return this.runCommand.execute(args);