nativescript 8.5.1-dev.0 → 8.5.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.
- package/config/config.json +5 -0
- package/lib/.d.ts +37 -2
- package/lib/base-package-manager.js +1 -3
- package/lib/bootstrap.js +12 -1
- package/lib/commands/build.js +6 -2
- package/lib/commands/clean.js +1 -2
- package/lib/commands/config.js +5 -6
- package/lib/commands/create-project.js +11 -12
- package/lib/commands/debug.js +11 -10
- package/lib/commands/plugin/list-plugins.js +2 -3
- package/lib/commands/post-install.js +5 -3
- package/lib/commands/preview.js +3 -4
- package/lib/commands/run.js +19 -17
- package/lib/commands/test-init.js +15 -14
- package/lib/commands/test.js +3 -0
- package/lib/commands/update.js +1 -1
- package/lib/common/bootstrap.js +1 -0
- package/lib/common/child-process.js +3 -3
- package/lib/common/codeGeneration/code-printer.js +1 -1
- package/lib/common/commands/device/device-log-stream.js +1 -1
- package/lib/common/commands/device/list-devices.js +8 -7
- package/lib/common/commands/generate-messages.js +1 -1
- package/lib/common/constants.js +11 -11
- package/lib/common/declarations.d.ts +53 -1
- package/lib/common/definitions/byline.d.ts +4 -0
- package/lib/common/definitions/colors.d.ts +24 -0
- package/lib/common/definitions/commands-service.d.ts +1 -0
- package/lib/common/definitions/commands.d.ts +1 -0
- package/lib/common/definitions/google-analytics.d.ts +5 -0
- package/lib/common/definitions/marked.d.ts +125 -0
- package/lib/common/definitions/open.d.ts +5 -0
- package/lib/common/definitions/osenv.d.ts +4 -0
- package/lib/common/definitions/plist.d.ts +7 -0
- package/lib/common/definitions/rimraf.d.ts +9 -0
- package/lib/common/definitions/shelljs.d.ts +583 -0
- package/lib/common/definitions/simple-plist.d.ts +7 -0
- package/lib/common/definitions/xmlhttprequest.d.ts +29 -0
- package/lib/common/dispatchers.js +5 -0
- package/lib/common/file-system.js +22 -18
- package/lib/common/host-info.js +4 -4
- package/lib/common/http-client.js +2 -2
- package/lib/common/logger/layouts/cli-layout.js +2 -6
- package/lib/common/logger/logger.js +7 -7
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -1
- package/lib/common/mobile/android/android-log-filter.js +5 -5
- package/lib/common/mobile/android/android-virtual-device-service.js +2 -2
- package/lib/common/mobile/android/genymotion/genymotion-service.js +2 -2
- package/lib/common/mobile/android/logcat-helper.js +1 -1
- package/lib/common/mobile/device-log-provider.js +8 -8
- package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +1 -1
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -1
- package/lib/common/mobile/mobile-helper.js +1 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +4 -4
- package/lib/common/opener.js +1 -5
- package/lib/common/plist-parser.js +3 -3
- package/lib/common/project-helper.js +2 -2
- package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +7 -7
- package/lib/common/services/auto-completion-service.js +2 -2
- package/lib/common/services/commands-service.js +114 -5
- package/lib/common/services/help-service.js +16 -16
- package/lib/common/services/hooks-service.js +2 -3
- package/lib/common/services/json-file-settings-service.js +3 -3
- package/lib/common/services/lock-service.js +5 -5
- package/lib/common/services/messages-service.js +6 -6
- package/lib/common/services/net-service.js +1 -1
- package/lib/common/services/project-files-manager.js +2 -2
- package/lib/common/services/settings-service.js +2 -2
- package/lib/common/test/definitions/mocha.d.ts +86 -0
- package/lib/common/validators/project-name-validator.js +1 -1
- package/lib/common/validators/validation-result.js +1 -1
- package/lib/common/verify-node-version.js +2 -2
- package/lib/config.js +8 -3
- package/lib/constants.js +32 -18
- package/lib/controllers/build-controller.js +5 -5
- package/lib/controllers/company-insights-controller.js +78 -0
- package/lib/controllers/debug-controller.js +2 -2
- package/lib/controllers/migrate-controller.js +20 -21
- package/lib/controllers/preview-app-controller.js +251 -0
- package/lib/controllers/update-controller.js +4 -5
- package/lib/declarations.d.ts +24 -0
- package/lib/definitions/build.d.ts +1 -1
- package/lib/definitions/company-insights-controller.d.ts +59 -0
- package/lib/definitions/email-validator.d.ts +8 -0
- package/lib/definitions/libnpmconfig.d.ts +3 -0
- package/lib/definitions/livesync.d.ts +10 -0
- package/lib/definitions/npm.d.ts +12 -0
- package/lib/definitions/preview-app-livesync.d.ts +116 -0
- package/lib/definitions/project.d.ts +6 -0
- package/lib/definitions/xcode.d.ts +1 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +4 -15
- package/lib/device-sockets/ios/notification.js +1 -1
- package/lib/helpers/android-bundle-validator-helper.js +1 -1
- package/lib/helpers/network-connectivity-validator.js +1 -1
- package/lib/helpers/options-track-helper.js +1 -1
- package/lib/nativescript-cli.js +10 -8
- package/lib/options.js +21 -61
- package/lib/package-installation-manager.js +4 -5
- package/lib/project-data.js +10 -9
- package/lib/providers/project-files-provider.js +3 -3
- package/lib/services/analytics/analytics-broker-process.js +3 -0
- package/lib/services/analytics/analytics-broker.js +5 -5
- package/lib/services/analytics/analytics-service.js +4 -0
- package/lib/services/analytics/analytics.d.ts +8 -1
- package/lib/services/analytics/google-analytics-provider.js +21 -1
- package/lib/services/analytics-settings-service.js +11 -3
- package/lib/services/android-device-debug-service.js +3 -3
- package/lib/services/android-plugin-build-service.js +36 -3
- package/lib/services/android-resources-migration-service.js +1 -1
- package/lib/services/assets-generation/assets-generation-service.js +5 -5
- package/lib/services/{build-artifacts-service.js → build-artefacts-service.js} +4 -4
- package/lib/services/cocoapods-service.js +1 -1
- package/lib/services/device/device-install-app-service.js +3 -3
- package/lib/services/doctor-service.js +9 -10
- package/lib/services/extensibility-service.js +8 -8
- package/lib/services/ios-entitlements-service.js +1 -1
- package/lib/services/ios-project-service.js +5 -5
- package/lib/services/ios-provision-service.js +7 -7
- package/lib/services/ios-watch-app-service.js +1 -1
- package/lib/services/ip-service.js +4 -2
- package/lib/services/itmstransporter-service.js +2 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +1 -1
- package/lib/services/livesync/android-livesync-tool.js +5 -5
- package/lib/services/livesync/ios-device-livesync-service.js +2 -2
- package/lib/services/livesync/platform-livesync-service-base.js +1 -2
- package/lib/services/livesync/playground/devices/preview-devices-service.js +67 -0
- package/lib/services/livesync/playground/preview-app-constants.js +23 -0
- package/lib/services/livesync/playground/preview-app-files-service.js +83 -0
- package/lib/services/livesync/playground/preview-app-log-provider.js +14 -0
- package/lib/services/livesync/playground/preview-app-plugins-service.js +134 -0
- package/lib/services/livesync/playground/preview-qr-code-service.js +109 -0
- package/lib/services/livesync/playground/preview-schema-service.js +57 -0
- package/lib/services/livesync/playground/preview-sdk-service.js +112 -0
- package/lib/services/log-parser-service.js +5 -1
- package/lib/services/log-source-map-service.js +7 -10
- package/lib/services/npm-config-service.js +9 -23
- package/lib/services/performance-service.js +3 -3
- package/lib/services/platform-environment-requirements.js +1 -1
- package/lib/services/playground-service.js +65 -0
- package/lib/services/plugins-service.js +19 -19
- package/lib/services/project-backup-service.js +3 -4
- package/lib/services/project-cleanup-service.js +2 -3
- package/lib/services/test-execution-service.js +2 -2
- package/lib/services/timeline-profiler-service.js +1 -4
- package/lib/services/user-settings-service.js +4 -4
- package/lib/tools/config-manipulation/config-transformer.js +3 -3
- package/lib/tools/node-modules/node-modules-builder.js +1 -1
- package/lib/xml-validator.js +47 -0
- package/package.json +90 -88
- package/vendor/gradle-plugin/build.gradle +28 -176
- package/vendor/gradle-plugin/gradle.properties +16 -1
- package/lib/color.js +0 -5
- package/node_modules/@npmcli/move-file/LICENSE.md +0 -22
- package/node_modules/@npmcli/move-file/README.md +0 -69
- package/node_modules/@npmcli/move-file/lib/index.js +0 -185
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +0 -15
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/LICENSE +0 -21
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/bin/cmd.js +0 -68
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/index.js +0 -31
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/find-made.js +0 -29
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/opts-arg.js +0 -23
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/path-arg.js +0 -29
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/use-native.js +0 -10
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/package.json +0 -44
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/readme.markdown +0 -266
- package/node_modules/@npmcli/move-file/package.json +0 -47
- package/node_modules/balanced-match/.npmignore +0 -5
- package/node_modules/balanced-match/LICENSE.md +0 -21
- package/node_modules/balanced-match/README.md +0 -91
- package/node_modules/balanced-match/index.js +0 -59
- package/node_modules/balanced-match/package.json +0 -49
- package/node_modules/brace-expansion/LICENSE +0 -21
- package/node_modules/brace-expansion/README.md +0 -129
- package/node_modules/brace-expansion/index.js +0 -201
- package/node_modules/brace-expansion/package.json +0 -47
- package/node_modules/concat-map/.travis.yml +0 -4
- package/node_modules/concat-map/LICENSE +0 -18
- package/node_modules/concat-map/README.markdown +0 -62
- package/node_modules/concat-map/example/map.js +0 -6
- package/node_modules/concat-map/index.js +0 -13
- package/node_modules/concat-map/package.json +0 -43
- package/node_modules/concat-map/test/map.js +0 -39
- package/node_modules/fs.realpath/LICENSE +0 -43
- package/node_modules/fs.realpath/README.md +0 -33
- package/node_modules/fs.realpath/index.js +0 -66
- package/node_modules/fs.realpath/old.js +0 -303
- package/node_modules/fs.realpath/package.json +0 -26
- package/node_modules/inflight/LICENSE +0 -15
- package/node_modules/inflight/README.md +0 -37
- package/node_modules/inflight/inflight.js +0 -54
- package/node_modules/inflight/package.json +0 -29
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/path-is-absolute/index.js +0 -20
- package/node_modules/path-is-absolute/license +0 -21
- package/node_modules/path-is-absolute/package.json +0 -43
- package/node_modules/path-is-absolute/readme.md +0 -59
- package/node_modules/rimraf/CHANGELOG.md +0 -65
- package/node_modules/rimraf/LICENSE +0 -15
- package/node_modules/rimraf/README.md +0 -101
- package/node_modules/rimraf/bin.js +0 -68
- package/node_modules/rimraf/node_modules/glob/LICENSE +0 -21
- package/node_modules/rimraf/node_modules/glob/README.md +0 -378
- package/node_modules/rimraf/node_modules/glob/common.js +0 -238
- package/node_modules/rimraf/node_modules/glob/glob.js +0 -790
- package/node_modules/rimraf/node_modules/glob/package.json +0 -55
- package/node_modules/rimraf/node_modules/glob/sync.js +0 -486
- package/node_modules/rimraf/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/minimatch/README.md +0 -230
- package/node_modules/rimraf/node_modules/minimatch/minimatch.js +0 -947
- package/node_modules/rimraf/node_modules/minimatch/package.json +0 -33
- package/node_modules/rimraf/package.json +0 -32
- package/node_modules/rimraf/rimraf.js +0 -360
- package/node_modules/stringify-package/CHANGELOG.md +0 -16
- package/node_modules/stringify-package/LICENSE +0 -13
- package/node_modules/stringify-package/README.md +0 -55
- package/node_modules/stringify-package/index.js +0 -18
- package/node_modules/stringify-package/package.json +0 -38
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
package/config/config.json
CHANGED
|
@@ -4,5 +4,10 @@
|
|
|
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",
|
|
7
12
|
"GA_TRACKING_ID": "UA-111455-44"
|
|
8
13
|
}
|
package/lib/.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
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" />
|
|
6
5
|
/// <reference path="commands/add-platform.ts" />
|
|
7
6
|
/// <reference path="commands/apple-login.ts" />
|
|
8
7
|
/// <reference path="commands/appstore-list.ts" />
|
|
@@ -76,7 +75,9 @@
|
|
|
76
75
|
/// <reference path="common/constants.ts" />
|
|
77
76
|
/// <reference path="common/declarations.d.ts" />
|
|
78
77
|
/// <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" />
|
|
80
81
|
/// <reference path="common/definitions/commands-service.d.ts" />
|
|
81
82
|
/// <reference path="common/definitions/commands.d.ts" />
|
|
82
83
|
/// <reference path="common/definitions/config.d.ts" />
|
|
@@ -84,8 +85,16 @@
|
|
|
84
85
|
/// <reference path="common/definitions/google-analytics.d.ts" />
|
|
85
86
|
/// <reference path="common/definitions/json-file-settings-service.d.ts" />
|
|
86
87
|
/// <reference path="common/definitions/logger.d.ts" />
|
|
88
|
+
/// <reference path="common/definitions/marked.d.ts" />
|
|
87
89
|
/// <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" />
|
|
88
96
|
/// <reference path="common/definitions/validator.d.ts" />
|
|
97
|
+
/// <reference path="common/definitions/xmlhttprequest.d.ts" />
|
|
89
98
|
/// <reference path="common/definitions/yok.d.ts" />
|
|
90
99
|
/// <reference path="common/dispatchers.ts" />
|
|
91
100
|
/// <reference path="common/doctor.d.ts" />
|
|
@@ -224,11 +233,13 @@
|
|
|
224
233
|
/// <reference path="constants-provider.ts" />
|
|
225
234
|
/// <reference path="constants.ts" />
|
|
226
235
|
/// <reference path="controllers/build-controller.ts" />
|
|
236
|
+
/// <reference path="controllers/company-insights-controller.ts" />
|
|
227
237
|
/// <reference path="controllers/debug-controller.ts" />
|
|
228
238
|
/// <reference path="controllers/deploy-controller.ts" />
|
|
229
239
|
/// <reference path="controllers/migrate-controller.ts" />
|
|
230
240
|
/// <reference path="controllers/platform-controller.ts" />
|
|
231
241
|
/// <reference path="controllers/prepare-controller.ts" />
|
|
242
|
+
/// <reference path="controllers/preview-app-controller.ts" />
|
|
232
243
|
/// <reference path="controllers/run-controller.ts" />
|
|
233
244
|
/// <reference path="controllers/update-controller-base.ts" />
|
|
234
245
|
/// <reference path="controllers/update-controller.ts" />
|
|
@@ -243,9 +254,11 @@
|
|
|
243
254
|
/// <reference path="definitions/android-plugin-migrator.d.ts" />
|
|
244
255
|
/// <reference path="definitions/build.d.ts" />
|
|
245
256
|
/// <reference path="definitions/cleanup-service.d.ts" />
|
|
257
|
+
/// <reference path="definitions/company-insights-controller.d.ts" />
|
|
246
258
|
/// <reference path="definitions/data.d.ts" />
|
|
247
259
|
/// <reference path="definitions/debug.d.ts" />
|
|
248
260
|
/// <reference path="definitions/deploy.d.ts" />
|
|
261
|
+
/// <reference path="definitions/email-validator.d.ts" />
|
|
249
262
|
/// <reference path="definitions/file-log-service.d.ts" />
|
|
250
263
|
/// <reference path="definitions/files-hash-service.d.ts" />
|
|
251
264
|
/// <reference path="definitions/gradle.d.ts" />
|
|
@@ -254,6 +267,7 @@
|
|
|
254
267
|
/// <reference path="definitions/ios-debugger-port-service.d.ts" />
|
|
255
268
|
/// <reference path="definitions/ios.d.ts" />
|
|
256
269
|
/// <reference path="definitions/ip-service.d.ts" />
|
|
270
|
+
/// <reference path="definitions/libnpmconfig.d.ts" />
|
|
257
271
|
/// <reference path="definitions/livesync-global.d.ts" />
|
|
258
272
|
/// <reference path="definitions/livesync.d.ts" />
|
|
259
273
|
/// <reference path="definitions/lock-service.d.ts" />
|
|
@@ -262,10 +276,12 @@
|
|
|
262
276
|
/// <reference path="definitions/metadata-filtering-service.d.ts" />
|
|
263
277
|
/// <reference path="definitions/migrate.d.ts" />
|
|
264
278
|
/// <reference path="definitions/nativescript-dev-xcode.d.ts" />
|
|
279
|
+
/// <reference path="definitions/npm.d.ts" />
|
|
265
280
|
/// <reference path="definitions/pacote-service.d.ts" />
|
|
266
281
|
/// <reference path="definitions/platform.d.ts" />
|
|
267
282
|
/// <reference path="definitions/plugins.d.ts" />
|
|
268
283
|
/// <reference path="definitions/prepare.d.ts" />
|
|
284
|
+
/// <reference path="definitions/preview-app-livesync.d.ts" />
|
|
269
285
|
/// <reference path="definitions/project-changes.d.ts" />
|
|
270
286
|
/// <reference path="definitions/project.d.ts" />
|
|
271
287
|
/// <reference path="definitions/prompter.d.ts" />
|
|
@@ -329,7 +345,7 @@
|
|
|
329
345
|
/// <reference path="services/apple-portal/apple-portal-session-service.ts" />
|
|
330
346
|
/// <reference path="services/apple-portal/definitions.d.ts" />
|
|
331
347
|
/// <reference path="services/assets-generation/assets-generation-service.ts" />
|
|
332
|
-
/// <reference path="services/build-
|
|
348
|
+
/// <reference path="services/build-artefacts-service.ts" />
|
|
333
349
|
/// <reference path="services/build-data-service.ts" />
|
|
334
350
|
/// <reference path="services/build-info-file-service.ts" />
|
|
335
351
|
/// <reference path="services/cleanup-service.ts" />
|
|
@@ -373,6 +389,14 @@
|
|
|
373
389
|
/// <reference path="services/livesync/ios-livesync-service.ts" />
|
|
374
390
|
/// <reference path="services/livesync/livesync-socket.ts" />
|
|
375
391
|
/// <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" />
|
|
376
400
|
/// <reference path="services/log-parser-service.ts" />
|
|
377
401
|
/// <reference path="services/log-source-map-service.ts" />
|
|
378
402
|
/// <reference path="services/marking-mode-service.ts" />
|
|
@@ -386,6 +410,7 @@
|
|
|
386
410
|
/// <reference path="services/platform/platform-validation-service.ts" />
|
|
387
411
|
/// <reference path="services/platform/prepare-native-platform-service.ts" />
|
|
388
412
|
/// <reference path="services/platforms-data-service.ts" />
|
|
413
|
+
/// <reference path="services/playground-service.ts" />
|
|
389
414
|
/// <reference path="services/plugins-service.ts" />
|
|
390
415
|
/// <reference path="services/prepare-data-service.ts" />
|
|
391
416
|
/// <reference path="services/project-backup-service.ts" />
|
|
@@ -415,6 +440,7 @@
|
|
|
415
440
|
/// <reference path="tools/config-manipulation/config-transformer.ts" />
|
|
416
441
|
/// <reference path="tools/node-modules/node-modules-builder.ts" />
|
|
417
442
|
/// <reference path="tools/node-modules/node-modules-dependencies-builder.ts" />
|
|
443
|
+
/// <reference path="xml-validator.ts" />
|
|
418
444
|
/// <reference path="yarn-package-manager.ts" />
|
|
419
445
|
/// <reference path="yarn2-package-manager.ts" />
|
|
420
446
|
/// <reference path="../test/android-tools-info.ts" />
|
|
@@ -423,10 +449,12 @@
|
|
|
423
449
|
/// <reference path="../test/commands/post-install.ts" />
|
|
424
450
|
/// <reference path="../test/config/config-json.ts" />
|
|
425
451
|
/// <reference path="../test/controllers/add-platform-controller.ts" />
|
|
452
|
+
/// <reference path="../test/controllers/company-insights-controller.ts" />
|
|
426
453
|
/// <reference path="../test/controllers/debug-controller.ts" />
|
|
427
454
|
/// <reference path="../test/controllers/prepare-controller.ts" />
|
|
428
455
|
/// <reference path="../test/controllers/run-controller.ts" />
|
|
429
456
|
/// <reference path="../test/controllers/update-controller.ts" />
|
|
457
|
+
/// <reference path="../test/definitions/should.d.ts" />
|
|
430
458
|
/// <reference path="../test/helpers/platform-command-helper.ts" />
|
|
431
459
|
/// <reference path="../test/ios-entitlements-service.ts" />
|
|
432
460
|
/// <reference path="../test/ios-project-service.ts" />
|
|
@@ -469,6 +497,13 @@
|
|
|
469
497
|
/// <reference path="../test/services/pacote-service.ts" />
|
|
470
498
|
/// <reference path="../test/services/platform-environment-requirements.ts" />
|
|
471
499
|
/// <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" />
|
|
472
507
|
/// <reference path="../test/services/project-config-service.ts" />
|
|
473
508
|
/// <reference path="../test/services/project-data-service.ts" />
|
|
474
509
|
/// <reference path="../test/services/test-execution-service.ts" />
|
|
@@ -88,9 +88,7 @@ class BasePackageManager {
|
|
|
88
88
|
getFlagsString(config, asArray) {
|
|
89
89
|
const array = [];
|
|
90
90
|
for (const flag in config) {
|
|
91
|
-
if (flag === "global" &&
|
|
92
|
-
this.packageManager !== "yarn" &&
|
|
93
|
-
this.packageManager !== "yarn2") {
|
|
91
|
+
if (flag === "global" && this.packageManager !== "yarn" && this.packageManager !== "yarn2") {
|
|
94
92
|
array.push(`--${flag}`);
|
|
95
93
|
array.push(`${config[flag]}`);
|
|
96
94
|
}
|
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("
|
|
45
|
+
yok_1.injector.require("buildArtefactsService", "./services/build-artefacts-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,6 +50,7 @@ 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");
|
|
53
54
|
yok_1.injector.requirePublicClass("updateController", "./controllers/update-controller");
|
|
54
55
|
yok_1.injector.requirePublicClass("migrateController", "./controllers/migrate-controller");
|
|
55
56
|
yok_1.injector.require("prepareDataService", "./services/prepare-data-service");
|
|
@@ -64,6 +65,7 @@ yok_1.injector.require("userSettingsService", "./services/user-settings-service"
|
|
|
64
65
|
yok_1.injector.requirePublic("analyticsSettingsService", "./services/analytics-settings-service");
|
|
65
66
|
yok_1.injector.require("analyticsService", "./services/analytics/analytics-service");
|
|
66
67
|
yok_1.injector.require("googleAnalyticsProvider", "./services/analytics/google-analytics-provider");
|
|
68
|
+
yok_1.injector.requirePublicClass("companyInsightsController", "./controllers/company-insights-controller");
|
|
67
69
|
yok_1.injector.require("platformCommandParameter", "./platform-command-param");
|
|
68
70
|
yok_1.injector.requireCommand("create", "./commands/create-project");
|
|
69
71
|
yok_1.injector.requireCommand("clean", "./commands/clean");
|
|
@@ -142,12 +144,20 @@ yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/an
|
|
|
142
144
|
yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
|
|
143
145
|
yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
|
|
144
146
|
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");
|
|
145
154
|
yok_1.injector.requirePublic("sysInfo", "./sys-info");
|
|
146
155
|
yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
|
|
147
156
|
yok_1.injector.require("appDebugSocketProxyFactory", "./device-sockets/ios/app-debug-socket-proxy-factory");
|
|
148
157
|
yok_1.injector.require("iOSNotification", "./device-sockets/ios/notification");
|
|
149
158
|
yok_1.injector.require("iOSSocketRequestExecutor", "./device-sockets/ios/socket-request-executor");
|
|
150
159
|
yok_1.injector.require("messages", "./common/messages/messages");
|
|
160
|
+
yok_1.injector.require("xmlValidator", "./xml-validator");
|
|
151
161
|
yok_1.injector.requireCommand("post-install-cli", "./commands/post-install");
|
|
152
162
|
yok_1.injector.requireCommand("migrate", "./commands/migrate");
|
|
153
163
|
yok_1.injector.requireCommand("update", "./commands/update");
|
|
@@ -164,6 +174,7 @@ yok_1.injector.requireCommand("extension|uninstall", "./commands/extensibility/u
|
|
|
164
174
|
yok_1.injector.requirePublicClass("extensibilityService", "./services/extensibility-service");
|
|
165
175
|
yok_1.injector.require("nodeModulesDependenciesBuilder", "./tools/node-modules/node-modules-dependencies-builder");
|
|
166
176
|
yok_1.injector.require("terminalSpinnerService", "./services/terminal-spinner-service");
|
|
177
|
+
yok_1.injector.require("playgroundService", "./services/playground-service");
|
|
167
178
|
yok_1.injector.require("platformEnvironmentRequirements", "./services/platform-environment-requirements");
|
|
168
179
|
yok_1.injector.requireCommand("resources|generate|icons", "./commands/generate-assets");
|
|
169
180
|
yok_1.injector.requireCommand("resources|generate|splashes", "./commands/generate-assets");
|
package/lib/commands/build.js
CHANGED
|
@@ -83,7 +83,9 @@ class BuildIosCommand extends BuildCommandBase {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
_super.validatePlatform.call(this, platform);
|
|
86
|
-
let canExecute = yield _super.canExecuteCommandBase.call(this, platform
|
|
86
|
+
let canExecute = yield _super.canExecuteCommandBase.call(this, platform, {
|
|
87
|
+
notConfiguredEnvOptions: { hideSyncToPreviewAppOption: true },
|
|
88
|
+
});
|
|
87
89
|
if (canExecute) {
|
|
88
90
|
canExecute = yield _super.validateArgs.call(this, args, platform);
|
|
89
91
|
}
|
|
@@ -130,7 +132,9 @@ class BuildAndroidCommand extends BuildCommandBase {
|
|
|
130
132
|
});
|
|
131
133
|
}
|
|
132
134
|
this.$androidBundleValidatorHelper.validateRuntimeVersion(this.$projectData);
|
|
133
|
-
let canExecute = yield _super.canExecuteCommandBase.call(this, platform
|
|
135
|
+
let canExecute = yield _super.canExecuteCommandBase.call(this, platform, {
|
|
136
|
+
notConfiguredEnvOptions: { hideSyncToPreviewAppOption: true },
|
|
137
|
+
});
|
|
134
138
|
if (canExecute) {
|
|
135
139
|
if (this.$options.release && !(0, helpers_1.hasValidAndroidSigning)(this.$options)) {
|
|
136
140
|
this.$errors.failWithHelp(constants_1.ANDROID_RELEASE_BUILD_ERROR_MESSAGE);
|
package/lib/commands/clean.js
CHANGED
|
@@ -10,7 +10,6 @@ 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");
|
|
14
13
|
const yok_1 = require("../common/yok");
|
|
15
14
|
const constants = require("../constants");
|
|
16
15
|
class CleanCommand {
|
|
@@ -47,7 +46,7 @@ class CleanCommand {
|
|
|
47
46
|
spinner.succeed("Project successfully cleaned.");
|
|
48
47
|
}
|
|
49
48
|
else {
|
|
50
|
-
spinner.fail(
|
|
49
|
+
spinner.fail(`${"Project unsuccessfully cleaned.".red}`);
|
|
51
50
|
}
|
|
52
51
|
});
|
|
53
52
|
}
|
package/lib/commands/config.js
CHANGED
|
@@ -11,7 +11,6 @@ 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");
|
|
15
14
|
class ConfigListCommand {
|
|
16
15
|
constructor($projectConfigService, $logger) {
|
|
17
16
|
this.$projectConfigService = $projectConfigService;
|
|
@@ -35,13 +34,13 @@ class ConfigListCommand {
|
|
|
35
34
|
return (`${depth > 0 ? "\n" : ""}` +
|
|
36
35
|
Object.keys(value)
|
|
37
36
|
.map((key) => {
|
|
38
|
-
return (
|
|
37
|
+
return (`${indent()}${key}: `.green +
|
|
39
38
|
this.getValueString(value[key], depth + 1));
|
|
40
39
|
})
|
|
41
40
|
.join("\n"));
|
|
42
41
|
}
|
|
43
42
|
else {
|
|
44
|
-
return
|
|
43
|
+
return `${value}`.yellow;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
}
|
|
@@ -90,9 +89,9 @@ class ConfigSetCommand {
|
|
|
90
89
|
}
|
|
91
90
|
const convertedValue = this.getConvertedValue(value);
|
|
92
91
|
const existingKey = current !== undefined;
|
|
93
|
-
const keyDisplay =
|
|
94
|
-
const currentDisplay =
|
|
95
|
-
const updatedDisplay =
|
|
92
|
+
const keyDisplay = `${key}`.green;
|
|
93
|
+
const currentDisplay = `${current}`.yellow;
|
|
94
|
+
const updatedDisplay = `${convertedValue}`.cyan;
|
|
96
95
|
this.$logger.info(`${existingKey ? "Updating" : "Setting"} ${keyDisplay}${existingKey ? ` from ${currentDisplay} ` : " "}to ${updatedDisplay}`);
|
|
97
96
|
try {
|
|
98
97
|
yield this.$projectConfigService.setValue(key, convertedValue);
|
|
@@ -14,7 +14,6 @@ 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");
|
|
18
17
|
class CreateProjectCommand {
|
|
19
18
|
constructor($projectService, $logger, $errors, $options, $prompter, $stringParameter) {
|
|
20
19
|
this.$projectService = $projectService;
|
|
@@ -294,33 +293,34 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
294
293
|
return __awaiter(this, void 0, void 0, function* () {
|
|
295
294
|
const { projectDir, projectName } = this.createdProjectData;
|
|
296
295
|
const relativePath = path.relative(process.cwd(), projectDir);
|
|
297
|
-
const greyDollarSign =
|
|
296
|
+
const greyDollarSign = "$".grey;
|
|
298
297
|
this.$logger.clearScreen();
|
|
299
298
|
this.$logger.info([
|
|
300
299
|
[
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
`Project`.green,
|
|
301
|
+
projectName.cyan,
|
|
302
|
+
`was successfully created.`.green,
|
|
304
303
|
].join(" "),
|
|
305
304
|
"",
|
|
306
|
-
`Now you can navigate to your project with ${
|
|
305
|
+
`Now you can navigate to your project with ${`cd ${relativePath}`.cyan} and then:`,
|
|
307
306
|
"",
|
|
308
307
|
`Run the project on multiple devices:`,
|
|
309
308
|
"",
|
|
310
|
-
` ${greyDollarSign} ${
|
|
311
|
-
` ${greyDollarSign} ${
|
|
309
|
+
` ${greyDollarSign} ${"ns run ios".green}`,
|
|
310
|
+
` ${greyDollarSign} ${"ns run android".green}`,
|
|
312
311
|
"",
|
|
313
312
|
"Debug the project with Chrome DevTools:",
|
|
314
313
|
"",
|
|
315
|
-
` ${greyDollarSign} ${
|
|
316
|
-
` ${greyDollarSign} ${
|
|
314
|
+
` ${greyDollarSign} ${"ns debug ios".green}`,
|
|
315
|
+
` ${greyDollarSign} ${"ns debug android".green}`,
|
|
317
316
|
``,
|
|
318
|
-
`For more options consult the docs or run ${
|
|
317
|
+
`For more options consult the docs or run ${"ns --help".green}`,
|
|
319
318
|
"",
|
|
320
319
|
].join("\n"));
|
|
321
320
|
});
|
|
322
321
|
}
|
|
323
322
|
}
|
|
323
|
+
exports.CreateProjectCommand = CreateProjectCommand;
|
|
324
324
|
CreateProjectCommand.BlankTemplateKey = "Blank";
|
|
325
325
|
CreateProjectCommand.BlankTemplateDescription = "A blank app";
|
|
326
326
|
CreateProjectCommand.BlankTsTemplateKey = "Blank Typescript";
|
|
@@ -331,5 +331,4 @@ 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;
|
|
335
334
|
yok_1.injector.registerCommand("create", CreateProjectCommand);
|
package/lib/commands/debug.js
CHANGED
|
@@ -83,6 +83,7 @@ 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 },
|
|
86
87
|
});
|
|
87
88
|
return result;
|
|
88
89
|
});
|
|
@@ -90,11 +91,6 @@ class DebugPlatformCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
90
91
|
}
|
|
91
92
|
exports.DebugPlatformCommand = DebugPlatformCommand;
|
|
92
93
|
class DebugIOSCommand {
|
|
93
|
-
get debugPlatformCommand() {
|
|
94
|
-
return this.$injector.resolve(DebugPlatformCommand, {
|
|
95
|
-
platform: this.platform,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
94
|
constructor($errors, $devicePlatformsConstants, $platformValidationService, $options, $injector, $sysInfo, $projectData, $iosDeviceOperations, $iOSSimulatorLogProvider) {
|
|
99
95
|
this.$errors = $errors;
|
|
100
96
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
@@ -109,6 +105,11 @@ class DebugIOSCommand {
|
|
|
109
105
|
$iosDeviceOperations.setShouldDispose(false);
|
|
110
106
|
$iOSSimulatorLogProvider.setShouldDispose(false);
|
|
111
107
|
}
|
|
108
|
+
get debugPlatformCommand() {
|
|
109
|
+
return this.$injector.resolve(DebugPlatformCommand, {
|
|
110
|
+
platform: this.platform,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
112
113
|
execute(args) {
|
|
113
114
|
return this.debugPlatformCommand.execute(args);
|
|
114
115
|
}
|
|
@@ -152,11 +153,6 @@ __decorate([
|
|
|
152
153
|
exports.DebugIOSCommand = DebugIOSCommand;
|
|
153
154
|
yok_1.injector.registerCommand("debug|ios", DebugIOSCommand);
|
|
154
155
|
class DebugAndroidCommand {
|
|
155
|
-
get debugPlatformCommand() {
|
|
156
|
-
return this.$injector.resolve(DebugPlatformCommand, {
|
|
157
|
-
platform: this.platform,
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
156
|
constructor($errors, $devicePlatformsConstants, $injector, $projectData, $options) {
|
|
161
157
|
this.$errors = $errors;
|
|
162
158
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
@@ -167,6 +163,11 @@ class DebugAndroidCommand {
|
|
|
167
163
|
this.platform = this.$devicePlatformsConstants.Android;
|
|
168
164
|
this.$projectData.initializeProjectData();
|
|
169
165
|
}
|
|
166
|
+
get debugPlatformCommand() {
|
|
167
|
+
return this.$injector.resolve(DebugPlatformCommand, {
|
|
168
|
+
platform: this.platform,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
170
171
|
execute(args) {
|
|
171
172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
172
173
|
return this.debugPlatformCommand.execute(args);
|
|
@@ -12,7 +12,6 @@ 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");
|
|
16
15
|
class ListPluginsCommand {
|
|
17
16
|
constructor($pluginsService, $projectData, $logger) {
|
|
18
17
|
this.$pluginsService = $pluginsService;
|
|
@@ -39,8 +38,8 @@ class ListPluginsCommand {
|
|
|
39
38
|
else {
|
|
40
39
|
this.$logger.info("There are no dev dependencies.");
|
|
41
40
|
}
|
|
42
|
-
const viewDependenciesCommand =
|
|
43
|
-
const viewDevDependenciesCommand =
|
|
41
|
+
const viewDependenciesCommand = "npm view <pluginName> grep dependencies".cyan.toString();
|
|
42
|
+
const viewDevDependenciesCommand = "npm view <pluginName> grep devDependencies".cyan.toString();
|
|
44
43
|
this.$logger.warn("NOTE:");
|
|
45
44
|
this.$logger.warn(`If you want to check the dependencies of installed plugin use ${viewDependenciesCommand}`);
|
|
46
45
|
this.$logger.warn(`If you want to check the dev dependencies of installed plugin use ${viewDevDependenciesCommand}`);
|
|
@@ -12,7 +12,6 @@ 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");
|
|
16
15
|
class PostInstallCliCommand {
|
|
17
16
|
constructor($fs, $commandsService, $helpService, $settingsService, $analyticsService, $logger, $hostInfo) {
|
|
18
17
|
this.$fs = $fs;
|
|
@@ -44,10 +43,13 @@ class PostInstallCliCommand {
|
|
|
44
43
|
postCommandAction(args) {
|
|
45
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
45
|
this.$logger.info("");
|
|
47
|
-
this.$logger.info(
|
|
46
|
+
this.$logger.info("You have successfully installed the NativeScript CLI!".green.bold);
|
|
48
47
|
this.$logger.info("");
|
|
49
48
|
this.$logger.info("Your next step is to create a new project:");
|
|
50
|
-
this.$logger.info(
|
|
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`");
|
|
51
53
|
this.$logger.info("");
|
|
52
54
|
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`");
|
|
53
55
|
});
|
package/lib/commands/preview.js
CHANGED
|
@@ -11,10 +11,9 @@ 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");
|
|
14
15
|
const resolve_package_path_1 = require("@rigor789/resolve-package-path");
|
|
15
16
|
const constants_1 = require("../constants");
|
|
16
|
-
const color_1 = require("../color");
|
|
17
|
-
const path = require("path");
|
|
18
17
|
const PREVIEW_CLI_PACKAGE = "@nativescript/preview-cli";
|
|
19
18
|
class PreviewCommand {
|
|
20
19
|
constructor($logger, $errors, $projectData, $packageManager, $childProcess, $options) {
|
|
@@ -61,12 +60,12 @@ class PreviewCommand {
|
|
|
61
60
|
`This should not happen under regular circumstances, but seems like it did somehow... :(`,
|
|
62
61
|
`Good news though, you can install the Preview CLI by running`,
|
|
63
62
|
"",
|
|
64
|
-
" " +
|
|
63
|
+
" " + installCommand.green,
|
|
65
64
|
"",
|
|
66
65
|
"Once installed, run this command again and everything should work!",
|
|
67
66
|
"If it still fails, you can invoke the preview-cli directly as a last resort with",
|
|
68
67
|
"",
|
|
69
|
-
|
|
68
|
+
" ./node_modules/.bin/preview-cli".cyan,
|
|
70
69
|
"",
|
|
71
70
|
"And if you are still having issues, try again - or reach out on Discord/open an issue on GitHub.",
|
|
72
71
|
].join("\n"));
|
package/lib/commands/run.js
CHANGED
|
@@ -22,7 +22,8 @@ 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($devicePlatformsConstants, $errors, $hostInfo, $liveSyncCommandHelper, $migrateController, $options, $projectData) {
|
|
25
|
+
constructor($analyticsService, $devicePlatformsConstants, $errors, $hostInfo, $liveSyncCommandHelper, $migrateController, $options, $projectData) {
|
|
26
|
+
this.$analyticsService = $analyticsService;
|
|
26
27
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
27
28
|
this.$errors = $errors;
|
|
28
29
|
this.$hostInfo = $hostInfo;
|
|
@@ -35,6 +36,7 @@ class RunCommandBase {
|
|
|
35
36
|
}
|
|
36
37
|
execute(args) {
|
|
37
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
yield this.$analyticsService.trackPreviewAppData(this.platform, this.$projectData.projectDir);
|
|
38
40
|
return this.$liveSyncCommandHelper.executeCommandLiveSync(this.platform, this.liveSyncCommandHelperAdditionalOptions);
|
|
39
41
|
});
|
|
40
42
|
}
|
|
@@ -68,14 +70,6 @@ class RunCommandBase {
|
|
|
68
70
|
exports.RunCommandBase = RunCommandBase;
|
|
69
71
|
yok_1.injector.registerCommand("run|*all", RunCommandBase);
|
|
70
72
|
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
|
-
}
|
|
79
73
|
constructor($devicePlatformsConstants, $errors, $injector, $options, $platformValidationService, $projectDataService) {
|
|
80
74
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
81
75
|
this.$errors = $errors;
|
|
@@ -85,6 +79,14 @@ class RunIosCommand {
|
|
|
85
79
|
this.$projectDataService = $projectDataService;
|
|
86
80
|
this.allowedParameters = [];
|
|
87
81
|
}
|
|
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
|
+
}
|
|
88
90
|
execute(args) {
|
|
89
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
92
|
return this.runCommand.execute(args);
|
|
@@ -108,14 +110,6 @@ __decorate([
|
|
|
108
110
|
exports.RunIosCommand = RunIosCommand;
|
|
109
111
|
yok_1.injector.registerCommand("run|ios", RunIosCommand);
|
|
110
112
|
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
|
-
}
|
|
119
113
|
constructor($devicePlatformsConstants, $errors, $injector, $options, $platformValidationService, $projectData) {
|
|
120
114
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
121
115
|
this.$errors = $errors;
|
|
@@ -125,6 +119,14 @@ class RunAndroidCommand {
|
|
|
125
119
|
this.$projectData = $projectData;
|
|
126
120
|
this.allowedParameters = [];
|
|
127
121
|
}
|
|
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
|
+
}
|
|
128
130
|
execute(args) {
|
|
129
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
132
|
return this.runCommand.execute(args);
|