nativescript 8.7.0-rc.1 → 8.7.0-rc.2
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/lib/android-tools-info.js +12 -0
- package/lib/base-package-manager.js +7 -0
- package/lib/bootstrap.js +7 -1
- package/lib/color.js +3 -0
- package/lib/commands/add-platform.js +1 -0
- package/lib/commands/apple-login.js +1 -0
- package/lib/commands/appstore-list.js +1 -0
- package/lib/commands/appstore-upload.js +4 -0
- package/lib/commands/build.js +20 -3
- package/lib/commands/clean.js +22 -1
- package/lib/commands/command-base.js +1 -0
- package/lib/commands/config.js +3 -0
- package/lib/commands/create-project.js +34 -22
- package/lib/commands/debug.js +6 -1
- package/lib/commands/deploy.js +3 -2
- package/lib/commands/extensibility/install-extension.js +1 -0
- package/lib/commands/extensibility/list-extensions.js +1 -0
- package/lib/commands/extensibility/uninstall-extension.js +1 -0
- package/lib/commands/fonts.js +1 -0
- package/lib/commands/generate-assets.js +1 -0
- package/lib/commands/generate-help.js +1 -0
- package/lib/commands/generate.js +12 -2
- package/lib/commands/info.js +1 -0
- package/lib/commands/install.js +1 -0
- package/lib/commands/list-platforms.js +1 -0
- package/lib/commands/migrate.js +1 -0
- package/lib/commands/platform-clean.js +1 -0
- package/lib/commands/plugin/add-plugin.js +1 -0
- package/lib/commands/plugin/build-plugin.js +1 -0
- package/lib/commands/plugin/create-plugin.js +5 -0
- package/lib/commands/plugin/list-plugins.js +1 -0
- package/lib/commands/plugin/remove-plugin.js +2 -0
- package/lib/commands/plugin/update-plugin.js +1 -0
- package/lib/commands/post-install.js +6 -0
- package/lib/commands/prepare.js +3 -2
- package/lib/commands/preview.js +2 -0
- package/lib/commands/remove-platform.js +1 -0
- package/lib/commands/resources/resources-update.js +2 -0
- package/lib/commands/run.js +1 -0
- package/lib/commands/setup.js +1 -0
- package/lib/commands/start.js +1 -0
- package/lib/commands/test-init.js +4 -0
- package/lib/commands/test.js +9 -2
- package/lib/commands/typings.js +1 -0
- package/lib/commands/update-platform.js +5 -0
- package/lib/commands/update.js +2 -0
- package/lib/common/bootstrap.js +1 -0
- package/lib/common/child-process.js +3 -0
- package/lib/common/codeGeneration/code-entity.js +1 -0
- package/lib/common/codeGeneration/code-printer.js +1 -0
- package/lib/common/command-params.js +1 -0
- package/lib/common/commands/analytics.js +3 -0
- package/lib/common/commands/autocompletion.js +3 -0
- package/lib/common/commands/device/device-log-stream.js +1 -0
- package/lib/common/commands/device/get-file.js +2 -0
- package/lib/common/commands/device/list-applications.js +1 -0
- package/lib/common/commands/device/list-devices.js +3 -0
- package/lib/common/commands/device/list-files.js +2 -0
- package/lib/common/commands/device/put-file.js +2 -0
- package/lib/common/commands/device/run-application.js +1 -0
- package/lib/common/commands/device/stop-application.js +1 -0
- package/lib/common/commands/device/uninstall-application.js +1 -0
- package/lib/common/commands/doctor.js +3 -2
- package/lib/common/commands/generate-messages.js +1 -0
- package/lib/common/commands/help.js +1 -0
- package/lib/common/commands/package-manager-get.js +1 -0
- package/lib/common/commands/package-manager-set.js +1 -0
- package/lib/common/commands/post-install.js +1 -0
- package/lib/common/commands/preuninstall.js +11 -2
- package/lib/common/commands/proxy/proxy-base.js +4 -0
- package/lib/common/commands/proxy/proxy-clear.js +1 -0
- package/lib/common/commands/proxy/proxy-get.js +1 -0
- package/lib/common/commands/proxy/proxy-set.js +1 -0
- package/lib/common/common-lib.js +1 -0
- package/lib/common/constants.js +11 -0
- package/lib/common/decorators.js +48 -0
- package/lib/common/definitions/mobile.d.ts +1 -1
- package/lib/common/dispatchers.js +10 -1
- package/lib/common/errors.js +13 -3
- package/lib/common/file-system.js +13 -2
- package/lib/common/header.js +3 -0
- package/lib/common/helpers.js +89 -3
- package/lib/common/host-info.js +4 -0
- package/lib/common/http-client.js +20 -0
- package/lib/common/logger/appenders/cli-appender.js +4 -0
- package/lib/common/logger/appenders/emit-appender.js +4 -0
- package/lib/common/logger/layouts/cli-layout.js +1 -0
- package/lib/common/logger/logger.js +5 -0
- package/lib/common/messages/messages.js +6 -0
- package/lib/common/mobile/android/android-application-manager.js +20 -1
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
- package/lib/common/mobile/android/android-debug-bridge.js +6 -0
- package/lib/common/mobile/android/android-device-file-system.js +4 -0
- package/lib/common/mobile/android/android-device-hash-service.js +3 -0
- package/lib/common/mobile/android/android-device.js +8 -0
- package/lib/common/mobile/android/android-emulator-services.js +2 -1
- package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
- package/lib/common/mobile/android/android-log-filter.js +4 -0
- package/lib/common/mobile/android/android-virtual-device-service.js +26 -0
- package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
- package/lib/common/mobile/android/genymotion/genymotion-service.js +5 -0
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
- package/lib/common/mobile/android/logcat-helper.js +20 -1
- package/lib/common/mobile/application-manager-base.js +6 -0
- package/lib/common/mobile/device-emitter.js +4 -0
- package/lib/common/mobile/device-log-emitter.js +1 -0
- package/lib/common/mobile/device-log-provider-base.js +1 -0
- package/lib/common/mobile/device-log-provider.js +23 -0
- package/lib/common/mobile/device-platforms-constants.js +1 -0
- package/lib/common/mobile/emulator-helper.js +3 -0
- package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
- package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
- package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
- package/lib/common/mobile/ios/device/ios-device.js +4 -0
- package/lib/common/mobile/ios/ios-device-base.js +1 -0
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
- package/lib/common/mobile/ios/ios-log-filter.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
- package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
- package/lib/common/mobile/log-filter.js +2 -0
- package/lib/common/mobile/logging-levels.js +1 -0
- package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
- package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
- package/lib/common/mobile/mobile-core/devices-service.js +72 -3
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +3 -1
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-helper.js +2 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
- package/lib/common/opener.js +1 -0
- package/lib/common/os-info.js +1 -0
- package/lib/common/plist-parser.js +1 -0
- package/lib/common/project-helper.js +1 -0
- package/lib/common/prompter.js +9 -1
- package/lib/common/queue.js +1 -0
- package/lib/common/resource-loader.js +1 -0
- package/lib/common/services/auto-completion-service.js +12 -1
- package/lib/common/services/cancellation.js +2 -1
- package/lib/common/services/commands-service.js +17 -6
- package/lib/common/services/help-service.js +11 -3
- package/lib/common/services/hooks-service.js +13 -0
- package/lib/common/services/ios-notification-service.js +1 -0
- package/lib/common/services/json-file-settings-service.js +6 -0
- package/lib/common/services/lock-service.js +6 -0
- package/lib/common/services/message-contract-generator.js +1 -0
- package/lib/common/services/messages-service.js +1 -0
- package/lib/common/services/micro-templating-service.js +6 -0
- package/lib/common/services/net-service.js +3 -0
- package/lib/common/services/project-files-manager.js +5 -0
- package/lib/common/services/project-files-provider-base.js +1 -0
- package/lib/common/services/proxy-service.js +1 -0
- package/lib/common/services/qr.js +1 -0
- package/lib/common/services/settings-service.js +1 -0
- package/lib/common/services/xcode-select-service.js +1 -0
- package/lib/common/utils.js +1 -0
- package/lib/common/validators/project-name-validator.js +1 -0
- package/lib/common/validators/validation-result.js +1 -0
- package/lib/common/verify-node-version.js +8 -1
- package/lib/common/yok.js +32 -11
- package/lib/config.js +22 -1
- package/lib/constants-provider.js +1 -0
- package/lib/constants.js +58 -5
- package/lib/controllers/build-controller.js +4 -3
- package/lib/controllers/debug-controller.js +8 -3
- package/lib/controllers/deploy-controller.js +1 -0
- package/lib/controllers/migrate-controller.js +91 -3
- package/lib/controllers/platform-controller.js +9 -1
- package/lib/controllers/prepare-controller.js +15 -5
- package/lib/controllers/run-controller.js +17 -1
- package/lib/controllers/update-controller-base.js +1 -0
- package/lib/controllers/update-controller.js +11 -0
- package/lib/data/build-data.js +1 -0
- package/lib/data/controller-data-base.js +1 -0
- package/lib/data/debug-data.js +1 -0
- package/lib/data/platform-data.js +1 -0
- package/lib/data/prepare-data.js +1 -0
- package/lib/data/run-data.js +1 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
- package/lib/detached-processes/cleanup-process.js +18 -14
- package/lib/detached-processes/file-log-service.js +2 -1
- package/lib/device-path-provider.js +3 -2
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
- package/lib/device-sockets/ios/notification.js +3 -0
- package/lib/device-sockets/ios/socket-request-executor.js +3 -0
- package/lib/helpers/android-bundle-validator-helper.js +2 -1
- package/lib/helpers/deploy-command-helper.js +1 -0
- package/lib/helpers/key-command-helper.js +4 -2
- package/lib/helpers/livesync-command-helper.js +5 -2
- package/lib/helpers/network-connectivity-validator.js +1 -0
- package/lib/helpers/options-track-helper.js +3 -2
- package/lib/helpers/package-path-helper.js +1 -0
- package/lib/helpers/platform-command-helper.js +7 -2
- package/lib/helpers/version-validator-helper.js +1 -0
- package/lib/key-commands/bootstrap.js +3 -2
- package/lib/key-commands/index.js +5 -4
- package/lib/nativescript-cli-lib-bootstrap.js +4 -0
- package/lib/nativescript-cli-lib.js +1 -0
- package/lib/nativescript-cli.js +10 -1
- package/lib/node/pbxproj-dom-xcode.js +1 -0
- package/lib/node/xcode.js +1 -0
- package/lib/node-package-manager.js +11 -1
- package/lib/options.js +141 -115
- package/lib/package-installation-manager.js +8 -1
- package/lib/package-manager.js +2 -0
- package/lib/platform-command-param.js +1 -0
- package/lib/pnpm-package-manager.js +4 -1
- package/lib/project-data.js +12 -0
- package/lib/providers/project-files-provider.js +1 -0
- package/lib/resolvers/livesync-service-resolver.js +2 -1
- package/lib/services/analytics/analytics-broker-process.js +10 -6
- package/lib/services/analytics/analytics-broker.js +2 -1
- package/lib/services/analytics/analytics-service.js +29 -25
- package/lib/services/analytics/google-analytics-provider.js +13 -12
- package/lib/services/analytics-settings-service.js +5 -0
- package/lib/services/android/android-bundle-tool-service.js +1 -0
- package/lib/services/android/gradle-build-args-service.js +3 -0
- package/lib/services/android/gradle-build-service.js +1 -0
- package/lib/services/android/gradle-command-service.js +1 -0
- package/lib/services/android-device-debug-service.js +6 -0
- package/lib/services/android-plugin-build-service.js +28 -0
- package/lib/services/android-project-service.js +71 -4
- package/lib/services/android-resources-migration-service.js +7 -0
- package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
- package/lib/services/assets-generation/assets-generation-service.js +16 -5
- package/lib/services/build-artifacts-service.js +2 -1
- package/lib/services/build-data-service.js +2 -1
- package/lib/services/build-info-file-service.js +1 -0
- package/lib/services/cleanup-service.js +13 -9
- package/lib/services/cocoapods-platform-manager.js +9 -0
- package/lib/services/cocoapods-service.js +21 -1
- package/lib/services/debug-data-service.js +1 -0
- package/lib/services/debug-service-base.js +7 -0
- package/lib/services/device/device-install-app-service.js +2 -1
- package/lib/services/doctor-service.js +21 -6
- package/lib/services/extensibility-service.js +8 -0
- package/lib/services/files-hash-service.js +1 -0
- package/lib/services/hmr-status-service.js +2 -0
- package/lib/services/info-service.js +1 -0
- package/lib/services/initialize-service.js +5 -1
- package/lib/services/ios/export-options-plist-service.js +4 -0
- package/lib/services/ios/ios-signing-service.js +4 -0
- package/lib/services/ios/spm-service.js +10 -1
- package/lib/services/ios/xcodebuild-args-service.js +13 -4
- package/lib/services/ios/xcodebuild-command-service.js +1 -0
- package/lib/services/ios/xcodebuild-service.js +1 -0
- package/lib/services/ios-debugger-port-service.js +1 -0
- package/lib/services/ios-device-debug-service.js +1 -0
- package/lib/services/ios-entitlements-service.js +1 -0
- package/lib/services/ios-extensions-service.js +1 -0
- package/lib/services/ios-log-filter.js +20 -0
- package/lib/services/ios-native-target-service.js +6 -4
- package/lib/services/ios-project-service.js +29 -7
- package/lib/services/ios-provision-service.js +3 -0
- package/lib/services/ios-watch-app-service.js +1 -0
- package/lib/services/ip-service.js +2 -0
- package/lib/services/itmstransporter-service.js +1 -0
- package/lib/services/karma-execution.js +2 -0
- package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
- package/lib/services/livesync/android-device-livesync-service.js +2 -0
- package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
- package/lib/services/livesync/android-livesync-service.js +1 -0
- package/lib/services/livesync/android-livesync-tool.js +4 -0
- package/lib/services/livesync/device-livesync-service-base.js +2 -0
- package/lib/services/livesync/ios-device-livesync-service.js +7 -0
- package/lib/services/livesync/ios-livesync-service.js +2 -0
- package/lib/services/livesync/livesync-socket.js +1 -0
- package/lib/services/livesync/platform-livesync-service-base.js +5 -0
- package/lib/services/livesync-process-data-service.js +1 -0
- package/lib/services/log-parser-service.js +1 -0
- package/lib/services/log-source-map-service.js +15 -0
- package/lib/services/marking-mode-service.js +8 -5
- package/lib/services/metadata-filtering-service.js +1 -0
- package/lib/services/npm-config-service.js +4 -0
- package/lib/services/pacote-service.js +7 -0
- package/lib/services/performance-service.js +3 -1
- package/lib/services/platform/add-platform-service.js +47 -2
- package/lib/services/platform/platform-validation-service.js +1 -0
- package/lib/services/platform/prepare-native-platform-service.js +5 -2
- package/lib/services/platform-environment-requirements.js +8 -3
- package/lib/services/platform-project-service-base.js +1 -0
- package/lib/services/platforms-data-service.js +1 -0
- package/lib/services/plugins-service.js +18 -2
- package/lib/services/prepare-data-service.js +2 -1
- package/lib/services/project-backup-service.js +4 -0
- package/lib/services/project-changes-service.js +12 -3
- package/lib/services/project-cleanup-service.js +2 -0
- package/lib/services/project-config-service.js +18 -1
- package/lib/services/project-data-service.js +36 -7
- package/lib/services/project-name-service.js +1 -0
- package/lib/services/project-service.js +10 -0
- package/lib/services/project-templates-service.js +3 -2
- package/lib/services/qr-code-terminal-service.js +1 -0
- package/lib/services/require-service.js +1 -0
- package/lib/services/start-service.js +1 -0
- package/lib/services/temp-service.js +1 -0
- package/lib/services/terminal-spinner-service.js +2 -0
- package/lib/services/test-execution-service.js +9 -2
- package/lib/services/test-initialization-service.js +4 -0
- package/lib/services/timeline-profiler-service.js +1 -0
- package/lib/services/user-settings-service.js +1 -0
- package/lib/services/versions-service.js +6 -4
- package/lib/services/watch-ignore-list-service.js +1 -0
- package/lib/services/webpack/webpack-compiler-service.js +42 -1
- package/lib/services/xcconfig-service.js +2 -0
- package/lib/services/xcproj-service.js +1 -0
- package/lib/shared-event-bus.js +6 -0
- package/lib/sys-info.js +2 -1
- package/lib/tools/config-manipulation/config-transformer.js +12 -0
- package/lib/tools/node-modules/node-modules-builder.js +1 -0
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
- package/lib/yarn-package-manager.js +1 -0
- package/lib/yarn2-package-manager.js +3 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
- package/node_modules/rimraf/CHANGELOG.md +65 -0
- package/node_modules/stringify-package/CHANGELOG.md +16 -0
- package/package.json +1 -1
|
@@ -84,6 +84,8 @@ class AndroidToolsInfo {
|
|
|
84
84
|
return doctor_1.androidToolsInfo.getPathToAdbFromAndroidHome();
|
|
85
85
|
}
|
|
86
86
|
catch (err) {
|
|
87
|
+
// adb does not exist, so ANDROID_HOME is not set correctly
|
|
88
|
+
// try getting default adb path (included in CLI package)
|
|
87
89
|
this.$logger.trace(`Error while executing '${path.join(doctor_1.androidToolsInfo.androidHome, "platform-tools", "adb")} help'. Error is: ${err.message}`);
|
|
88
90
|
}
|
|
89
91
|
return null;
|
|
@@ -98,6 +100,14 @@ class AndroidToolsInfo {
|
|
|
98
100
|
shouldGenerateTypings() {
|
|
99
101
|
return this.$options.androidTypings;
|
|
100
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Prints messages on the screen. In case the showWarningsAsErrors flag is set to true, warnings are shown, else - errors.
|
|
105
|
+
* Uses logger.warn for warnings and errors.failWithoutHelp when erros must be shown.
|
|
106
|
+
* In case additional details must be shown as info message, use the second parameter.
|
|
107
|
+
* NOTE: The additional information will not be printed when showWarningsAsErrors flag is set.
|
|
108
|
+
* @param {string} msg The message that will be shown as warning or error.
|
|
109
|
+
* @return {void}
|
|
110
|
+
*/
|
|
101
111
|
printMessage(msg, showWarningsAsErrors) {
|
|
102
112
|
if (showWarningsAsErrors) {
|
|
103
113
|
this.$errors.fail(msg);
|
|
@@ -117,6 +127,7 @@ class AndroidToolsInfo {
|
|
|
117
127
|
}
|
|
118
128
|
return latestCompileSdk;
|
|
119
129
|
}
|
|
130
|
+
// TODO check if still needed
|
|
120
131
|
getTargetSdk(compileSdk) {
|
|
121
132
|
const targetSdk = this.$options.sdk
|
|
122
133
|
? parseInt(this.$options.sdk)
|
|
@@ -133,3 +144,4 @@ __decorate([
|
|
|
133
144
|
], AndroidToolsInfo.prototype, "validateAndroidHomeEnvVariable", null);
|
|
134
145
|
exports.AndroidToolsInfo = AndroidToolsInfo;
|
|
135
146
|
yok_1.injector.register("androidToolsInfo", AndroidToolsInfo);
|
|
147
|
+
//# sourceMappingURL=android-tools-info.js.map
|
|
@@ -28,6 +28,8 @@ class BasePackageManager {
|
|
|
28
28
|
}
|
|
29
29
|
try {
|
|
30
30
|
const viewResult = yield this.view(packageName, { name: true });
|
|
31
|
+
// `npm view nonExistingPackageName` will return `nativescript`
|
|
32
|
+
// if executed in the root dir of the CLI (npm 6.4.1)
|
|
31
33
|
const packageNameRegex = new RegExp(packageName, "i");
|
|
32
34
|
const isProperResult = packageNameRegex.test(viewResult);
|
|
33
35
|
return isProperResult;
|
|
@@ -39,6 +41,8 @@ class BasePackageManager {
|
|
|
39
41
|
}
|
|
40
42
|
getPackageNameParts(fullPackageName) {
|
|
41
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
// support <reserved_name>@<version> syntax, for example typescript@1.0.0
|
|
45
|
+
// support <scoped_package_name>@<version> syntax, for example @nativescript/vue-template@1.0.0
|
|
42
46
|
const lastIndexOfAtSign = fullPackageName.lastIndexOf("@");
|
|
43
47
|
let version = "";
|
|
44
48
|
let templateName = "";
|
|
@@ -74,6 +78,8 @@ class BasePackageManager {
|
|
|
74
78
|
cwd: opts.cwd,
|
|
75
79
|
stdio: stdioValue,
|
|
76
80
|
});
|
|
81
|
+
// Whenever calling "npm install" or "yarn add" without any arguments (hence installing all dependencies) no output is emitted on stdout
|
|
82
|
+
// Luckily, whenever you call "npm install" or "yarn add" to install all dependencies chances are you won't need the name/version of the package you're installing because there is none.
|
|
77
83
|
const { isInstallingAllDependencies } = opts;
|
|
78
84
|
if (isInstallingAllDependencies) {
|
|
79
85
|
return null;
|
|
@@ -126,3 +132,4 @@ class BasePackageManager {
|
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
134
|
exports.BasePackageManager = BasePackageManager;
|
|
135
|
+
//# sourceMappingURL=base-package-manager.js.map
|
package/lib/bootstrap.js
CHANGED
|
@@ -5,6 +5,7 @@ require("./common/bootstrap");
|
|
|
5
5
|
yok_1.injector.requirePublicClass("logger", "./common/logger/logger");
|
|
6
6
|
yok_1.injector.require("config", "./config");
|
|
7
7
|
yok_1.injector.require("options", "./options");
|
|
8
|
+
// note: order above is important!
|
|
8
9
|
yok_1.injector.requirePublicClass("constants", "./constants-provider");
|
|
9
10
|
yok_1.injector.require("projectData", "./project-data");
|
|
10
11
|
yok_1.injector.requirePublic("projectDataService", "./services/project-data-service");
|
|
@@ -90,12 +91,16 @@ yok_1.injector.requireCommand("fonts", "./commands/fonts");
|
|
|
90
91
|
yok_1.injector.requireCommand("prepare", "./commands/prepare");
|
|
91
92
|
yok_1.injector.requireCommand("build|ios", "./commands/build");
|
|
92
93
|
yok_1.injector.requireCommand("build|android", "./commands/build");
|
|
94
|
+
yok_1.injector.requireCommand("build|vision", "./commands/build");
|
|
95
|
+
yok_1.injector.requireCommand("build|visionos", "./commands/build");
|
|
93
96
|
yok_1.injector.requireCommand("deploy", "./commands/deploy");
|
|
94
97
|
yok_1.injector.require("testExecutionService", "./services/test-execution-service");
|
|
95
98
|
yok_1.injector.requireCommand("dev-test|android", "./commands/test");
|
|
96
99
|
yok_1.injector.requireCommand("dev-test|ios", "./commands/test");
|
|
97
100
|
yok_1.injector.requireCommand("test|android", "./commands/test");
|
|
98
101
|
yok_1.injector.requireCommand("test|ios", "./commands/test");
|
|
102
|
+
// injector.requireCommand("test|vision", "./commands/test");
|
|
103
|
+
// injector.requireCommand("test|visionos", "./commands/test");
|
|
99
104
|
yok_1.injector.requireCommand("test|init", "./commands/test-init");
|
|
100
105
|
yok_1.injector.requireCommand("dev-generate-help", "./commands/generate-help");
|
|
101
106
|
yok_1.injector.requireCommand("appstore|*list", "./commands/appstore-list");
|
|
@@ -145,7 +150,7 @@ yok_1.injector.require("LiveSyncSocket", "./services/livesync/livesync-socket");
|
|
|
145
150
|
yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/android-livesync-tool");
|
|
146
151
|
yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
|
|
147
152
|
yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
|
|
148
|
-
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
|
|
153
|
+
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service"); // The name is used in https://github.com/NativeScript/nativescript-dev-typescript
|
|
149
154
|
yok_1.injector.requirePublic("sysInfo", "./sys-info");
|
|
150
155
|
yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
|
|
151
156
|
yok_1.injector.require("appDebugSocketProxyFactory", "./device-sockets/ios/app-debug-socket-proxy-factory");
|
|
@@ -198,3 +203,4 @@ yok_1.injector.require("keyCommandHelper", "./helpers/key-command-helper");
|
|
|
198
203
|
yok_1.injector.requireCommand("start", "./commands/start");
|
|
199
204
|
yok_1.injector.require("startService", "./services/start-service");
|
|
200
205
|
require("./key-commands/bootstrap");
|
|
206
|
+
//# sourceMappingURL=bootstrap.js.map
|
package/lib/color.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.color = exports.stripColors = void 0;
|
|
4
|
+
// using chalk as some of our other dependencies are already using it...
|
|
5
|
+
// exporting from here so we can easily refactor to a different color library if needed
|
|
4
6
|
const ansi = require("ansi-colors");
|
|
5
7
|
const chalk = require("chalk");
|
|
6
8
|
function stripColors(formatStr) {
|
|
@@ -8,3 +10,4 @@ function stripColors(formatStr) {
|
|
|
8
10
|
}
|
|
9
11
|
exports.stripColors = stripColors;
|
|
10
12
|
exports.color = chalk;
|
|
13
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -63,9 +63,12 @@ class PublishIOS {
|
|
|
63
63
|
this.$options.release = true;
|
|
64
64
|
if (!ipaFilePath) {
|
|
65
65
|
const platform = this.$devicePlatformsConstants.iOS.toLowerCase();
|
|
66
|
+
// No .ipa path provided, build .ipa on out own.
|
|
66
67
|
if (mobileProvisionIdentifier) {
|
|
68
|
+
// This is not very correct as if we build multiple targets we will try to sign all of them using the signing identity here.
|
|
67
69
|
this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
|
|
68
70
|
mobileProvisionIdentifier);
|
|
71
|
+
// As we need to build the package for device
|
|
69
72
|
this.$options.forDevice = true;
|
|
70
73
|
this.$options.provision = mobileProvisionIdentifier;
|
|
71
74
|
const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, Object.assign(Object.assign({}, this.$options.argv), { watch: false }));
|
|
@@ -104,3 +107,4 @@ class PublishIOS {
|
|
|
104
107
|
}
|
|
105
108
|
exports.PublishIOS = PublishIOS;
|
|
106
109
|
yok_1.injector.registerCommand(["publish|ios", "appstore|upload"], PublishIOS);
|
|
110
|
+
//# sourceMappingURL=appstore-upload.js.map
|
package/lib/commands/build.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.BuildAndroidCommand = exports.BuildIosCommand = exports.BuildCommandBase = void 0;
|
|
12
|
+
exports.BuildVisionOsCommand = exports.BuildAndroidCommand = exports.BuildIosCommand = exports.BuildCommandBase = void 0;
|
|
13
13
|
const constants_1 = require("../constants");
|
|
14
14
|
const command_base_1 = require("./command-base");
|
|
15
15
|
const helpers_1 = require("../common/helpers");
|
|
@@ -24,11 +24,11 @@ class BuildCommandBase extends command_base_1.ValidatePlatformCommandBase {
|
|
|
24
24
|
this.$logger = $logger;
|
|
25
25
|
this.dashedOptions = {
|
|
26
26
|
watch: {
|
|
27
|
-
type: "boolean"
|
|
27
|
+
type: "boolean" /* OptionType.Boolean */,
|
|
28
28
|
default: false,
|
|
29
29
|
hasSensitiveValue: false,
|
|
30
30
|
},
|
|
31
|
-
hmr: { type: "boolean"
|
|
31
|
+
hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
|
|
32
32
|
};
|
|
33
33
|
this.$projectData.initializeProjectData();
|
|
34
34
|
}
|
|
@@ -143,3 +143,20 @@ class BuildAndroidCommand extends BuildCommandBase {
|
|
|
143
143
|
}
|
|
144
144
|
exports.BuildAndroidCommand = BuildAndroidCommand;
|
|
145
145
|
yok_1.injector.registerCommand("build|android", BuildAndroidCommand);
|
|
146
|
+
class BuildVisionOsCommand extends BuildIosCommand {
|
|
147
|
+
constructor($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $logger, $buildDataService, $migrateController) {
|
|
148
|
+
super($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $logger, $buildDataService, $migrateController);
|
|
149
|
+
this.$options = $options;
|
|
150
|
+
this.$migrateController = $migrateController;
|
|
151
|
+
}
|
|
152
|
+
canExecute(args) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
this.$errors.fail('Building for "visionOS" platform is not supported via the CLI. Please open the project in Xcode and build it from there.');
|
|
155
|
+
return false;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.BuildVisionOsCommand = BuildVisionOsCommand;
|
|
160
|
+
yok_1.injector.registerCommand("build|vision", BuildVisionOsCommand);
|
|
161
|
+
yok_1.injector.registerCommand("build|visionos", BuildVisionOsCommand);
|
|
162
|
+
//# sourceMappingURL=build.js.map
|
package/lib/commands/clean.js
CHANGED
|
@@ -26,6 +26,18 @@ function bytesToHumanReadable(bytes) {
|
|
|
26
26
|
}
|
|
27
27
|
return `${bytes.toFixed(2)} ${units[unit]}`;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* A helper function to map an array of values to promises with a concurrency limit.
|
|
31
|
+
* The mapper function should return a promise. It will be called for each value in the values array.
|
|
32
|
+
* The concurrency limit is the number of promises that can be running at the same time.
|
|
33
|
+
*
|
|
34
|
+
* This function will return a promise that resolves when all values have been mapped.
|
|
35
|
+
*
|
|
36
|
+
* @param values A static array of values to map to promises
|
|
37
|
+
* @param mapper A function that maps a value to a promise
|
|
38
|
+
* @param concurrency The number of promises that can be running at the same time
|
|
39
|
+
* @returns Promise<void>
|
|
40
|
+
*/
|
|
29
41
|
function promiseMap(values, mapper, concurrency = 10) {
|
|
30
42
|
let index = 0;
|
|
31
43
|
let pending = 0;
|
|
@@ -84,6 +96,7 @@ class CleanCommand {
|
|
|
84
96
|
try {
|
|
85
97
|
const overridePathsToClean = this.$projectConfigService.getValue("cli.pathsToClean");
|
|
86
98
|
const additionalPaths = this.$projectConfigService.getValue("cli.additionalPathsToClean");
|
|
99
|
+
// allow overriding default paths to clean
|
|
87
100
|
if (Array.isArray(overridePathsToClean)) {
|
|
88
101
|
pathsToClean = overridePathsToClean;
|
|
89
102
|
}
|
|
@@ -92,6 +105,7 @@ class CleanCommand {
|
|
|
92
105
|
}
|
|
93
106
|
}
|
|
94
107
|
catch (err) {
|
|
108
|
+
// ignore
|
|
95
109
|
}
|
|
96
110
|
const res = yield this.$projectCleanupService.clean(pathsToClean, {
|
|
97
111
|
dryRun: isDryRun,
|
|
@@ -117,6 +131,7 @@ class CleanCommand {
|
|
|
117
131
|
cleanMultipleProjects(spinner) {
|
|
118
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
119
133
|
if (!(0, helpers_1.isInteractive)() || this.$options.json) {
|
|
134
|
+
// interactive terminal is required, and we can't output json in an interactive command.
|
|
120
135
|
this.$logger.warn("No project found in the current directory.");
|
|
121
136
|
return;
|
|
122
137
|
}
|
|
@@ -132,6 +147,7 @@ class CleanCommand {
|
|
|
132
147
|
const current = color_1.color.grey(`${computed}/${paths.length}`);
|
|
133
148
|
spinner.start(`Gathering cleanable sizes. This may take a while... ${current}`);
|
|
134
149
|
};
|
|
150
|
+
// update the progress initially
|
|
135
151
|
updateProgress();
|
|
136
152
|
const projects = new Map();
|
|
137
153
|
yield promiseMap(paths, (p) => {
|
|
@@ -149,8 +165,10 @@ class CleanCommand {
|
|
|
149
165
|
})
|
|
150
166
|
.then((size) => {
|
|
151
167
|
if (size > 0 || size === -1) {
|
|
168
|
+
// only store size if it's larger than 0 or -1 (error while getting size)
|
|
152
169
|
projects.set(p, size);
|
|
153
170
|
}
|
|
171
|
+
// update the progress after each processed project
|
|
154
172
|
computed++;
|
|
155
173
|
updateProgress();
|
|
156
174
|
});
|
|
@@ -175,7 +193,7 @@ class CleanCommand {
|
|
|
175
193
|
value: p,
|
|
176
194
|
};
|
|
177
195
|
}), true, {
|
|
178
|
-
optionsPerPage: process.stdout.rows - 6,
|
|
196
|
+
optionsPerPage: process.stdout.rows - 6, // 6 lines are taken up by the instructions
|
|
179
197
|
});
|
|
180
198
|
this.$logger.clearScreen();
|
|
181
199
|
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")}!`);
|
|
@@ -224,6 +242,7 @@ class CleanCommand {
|
|
|
224
242
|
let nsDirs = [];
|
|
225
243
|
const getFiles = (dir) => __awaiter(this, void 0, void 0, function* () {
|
|
226
244
|
if (dir.includes("node_modules")) {
|
|
245
|
+
// skip traversing node_modules
|
|
227
246
|
return;
|
|
228
247
|
}
|
|
229
248
|
const dirents = yield (0, promises_1.readdir)(dir, { withFileTypes: true }).catch((err) => {
|
|
@@ -234,6 +253,7 @@ class CleanCommand {
|
|
|
234
253
|
ent.name.includes("nativescript.config.js"));
|
|
235
254
|
if (hasNSConfig) {
|
|
236
255
|
nsDirs.push(dir);
|
|
256
|
+
// found a NativeScript project, stop traversing
|
|
237
257
|
return;
|
|
238
258
|
}
|
|
239
259
|
yield Promise.all(dirents.map((dirent) => {
|
|
@@ -250,3 +270,4 @@ class CleanCommand {
|
|
|
250
270
|
}
|
|
251
271
|
exports.CleanCommand = CleanCommand;
|
|
252
272
|
yok_1.injector.registerCommand("clean", CleanCommand);
|
|
273
|
+
//# sourceMappingURL=clean.js.map
|
package/lib/commands/config.js
CHANGED
|
@@ -61,6 +61,7 @@ class ConfigGetCommand {
|
|
|
61
61
|
this.$logger.info(current);
|
|
62
62
|
}
|
|
63
63
|
catch (err) {
|
|
64
|
+
// ignore
|
|
64
65
|
}
|
|
65
66
|
});
|
|
66
67
|
}
|
|
@@ -119,6 +120,7 @@ class ConfigSetCommand {
|
|
|
119
120
|
return JSON.parse(v);
|
|
120
121
|
}
|
|
121
122
|
catch (e) {
|
|
123
|
+
// just treat it as a string
|
|
122
124
|
return `${v}`;
|
|
123
125
|
}
|
|
124
126
|
}
|
|
@@ -127,3 +129,4 @@ exports.ConfigSetCommand = ConfigSetCommand;
|
|
|
127
129
|
yok_1.injector.registerCommand("config|*list", ConfigListCommand);
|
|
128
130
|
yok_1.injector.registerCommand("config|get", ConfigGetCommand);
|
|
129
131
|
yok_1.injector.registerCommand("config|set", ConfigSetCommand);
|
|
132
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -44,19 +44,43 @@ class CreateProjectCommand {
|
|
|
44
44
|
}
|
|
45
45
|
let projectName = args[0];
|
|
46
46
|
let selectedTemplate;
|
|
47
|
-
if (this.$options
|
|
48
|
-
|
|
47
|
+
if (this.$options["vision-ng"] ||
|
|
48
|
+
(this.$options.vision && this.$options.ng)) {
|
|
49
|
+
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-ng"];
|
|
50
|
+
}
|
|
51
|
+
else if (this.$options["vision-react"] ||
|
|
52
|
+
(this.$options.vision && this.$options.react)) {
|
|
53
|
+
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-react"];
|
|
54
|
+
}
|
|
55
|
+
else if (this.$options["vision-solid"]) {
|
|
56
|
+
// note: we don't have solid templates or --solid
|
|
57
|
+
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-solid"];
|
|
49
58
|
}
|
|
50
|
-
else if (this.$options
|
|
59
|
+
else if (this.$options["vision-svelte"] ||
|
|
60
|
+
(this.$options.vision && this.$options.svelte)) {
|
|
61
|
+
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-svelte"];
|
|
62
|
+
}
|
|
63
|
+
else if (this.$options["vision-vue"] ||
|
|
64
|
+
(this.$options.vision && (this.$options.vue || this.$options.vuejs))) {
|
|
65
|
+
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-vue"];
|
|
66
|
+
}
|
|
67
|
+
else if ((this.$options.vue || this.$options.vuejs) &&
|
|
68
|
+
this.$options.tsc) {
|
|
51
69
|
selectedTemplate = "@nativescript/template-blank-vue-ts";
|
|
52
70
|
}
|
|
71
|
+
else if (this.$options.vision) {
|
|
72
|
+
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision"];
|
|
73
|
+
}
|
|
74
|
+
else if (this.$options.js) {
|
|
75
|
+
selectedTemplate = constants.JAVASCRIPT_NAME;
|
|
76
|
+
}
|
|
53
77
|
else if (this.$options.tsc) {
|
|
54
78
|
selectedTemplate = constants.TYPESCRIPT_NAME;
|
|
55
79
|
}
|
|
56
80
|
else if (this.$options.ng) {
|
|
57
81
|
selectedTemplate = constants.ANGULAR_NAME;
|
|
58
82
|
}
|
|
59
|
-
else if (this.$options.vue) {
|
|
83
|
+
else if (this.$options.vue || this.$options.vuejs) {
|
|
60
84
|
selectedTemplate = constants.VUE_NAME;
|
|
61
85
|
}
|
|
62
86
|
else if (this.$options.react) {
|
|
@@ -65,24 +89,6 @@ class CreateProjectCommand {
|
|
|
65
89
|
else if (this.$options.svelte) {
|
|
66
90
|
selectedTemplate = constants.SVELTE_NAME;
|
|
67
91
|
}
|
|
68
|
-
else if (this.$options["vision"]) {
|
|
69
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision"];
|
|
70
|
-
}
|
|
71
|
-
else if (this.$options["vision-ng"]) {
|
|
72
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-ng"];
|
|
73
|
-
}
|
|
74
|
-
else if (this.$options["vision-react"]) {
|
|
75
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-react"];
|
|
76
|
-
}
|
|
77
|
-
else if (this.$options["vision-solid"]) {
|
|
78
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-solid"];
|
|
79
|
-
}
|
|
80
|
-
else if (this.$options["vision-svelte"]) {
|
|
81
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-svelte"];
|
|
82
|
-
}
|
|
83
|
-
else if (this.$options["vision-vue"]) {
|
|
84
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-vue"];
|
|
85
|
-
}
|
|
86
92
|
else {
|
|
87
93
|
selectedTemplate = this.$options.template;
|
|
88
94
|
}
|
|
@@ -105,6 +111,7 @@ class CreateProjectCommand {
|
|
|
105
111
|
template: selectedTemplate,
|
|
106
112
|
appId: this.$options.appid,
|
|
107
113
|
pathToProject: this.$options.path,
|
|
114
|
+
// its already validated above
|
|
108
115
|
force: true,
|
|
109
116
|
ignoreScripts: this.$options.ignoreScripts,
|
|
110
117
|
});
|
|
@@ -379,6 +386,10 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
379
386
|
`For more options consult the docs or run ${color_1.color.green("ns --help")}`,
|
|
380
387
|
"",
|
|
381
388
|
].join("\n"));
|
|
389
|
+
// todo: add back ns preview
|
|
390
|
+
// this.$logger.printMarkdown(
|
|
391
|
+
// `After that you can preview it on device by executing \`$ ns preview\``
|
|
392
|
+
// );
|
|
382
393
|
});
|
|
383
394
|
}
|
|
384
395
|
}
|
|
@@ -396,3 +407,4 @@ CreateProjectCommand.TabsTemplateKey = "Tabs";
|
|
|
396
407
|
CreateProjectCommand.TabsTemplateDescription = "An app with pre-built pages that uses tabs for navigation";
|
|
397
408
|
exports.CreateProjectCommand = CreateProjectCommand;
|
|
398
409
|
yok_1.injector.registerCommand("create", CreateProjectCommand);
|
|
410
|
+
//# sourceMappingURL=create-project.js.map
|
package/lib/commands/debug.js
CHANGED
|
@@ -106,6 +106,10 @@ class DebugIOSCommand {
|
|
|
106
106
|
this.allowedParameters = [];
|
|
107
107
|
this.platform = this.$devicePlatformsConstants.iOS;
|
|
108
108
|
this.$projectData.initializeProjectData();
|
|
109
|
+
// Do not dispose ios-device-lib, so the process will remain alive and the debug application (NativeScript Inspector or Chrome DevTools) will be able to connect to the socket.
|
|
110
|
+
// In case we dispose ios-device-lib, the socket will be closed and the code will fail when the debug application tries to read/send data to device socket.
|
|
111
|
+
// That's why the `$ tns debug ios --justlaunch` command will not release the terminal.
|
|
112
|
+
// In case we do not set it to false, the dispose will be called once the command finishes its execution, which will prevent the debugging.
|
|
109
113
|
$iosDeviceOperations.setShouldDispose(false);
|
|
110
114
|
$iOSSimulatorLogProvider.setShouldDispose(false);
|
|
111
115
|
}
|
|
@@ -124,7 +128,7 @@ class DebugIOSCommand {
|
|
|
124
128
|
if (this.$options.inspector) {
|
|
125
129
|
const macOSWarning = yield this.$sysInfo.getMacOSWarningMessage();
|
|
126
130
|
if (macOSWarning &&
|
|
127
|
-
macOSWarning.severity === "high") {
|
|
131
|
+
macOSWarning.severity === "high" /* SystemWarningsSeverity.high */) {
|
|
128
132
|
this.$errors.fail(`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`);
|
|
129
133
|
}
|
|
130
134
|
}
|
|
@@ -189,3 +193,4 @@ __decorate([
|
|
|
189
193
|
], DebugAndroidCommand.prototype, "debugPlatformCommand", null);
|
|
190
194
|
exports.DebugAndroidCommand = DebugAndroidCommand;
|
|
191
195
|
yok_1.injector.registerCommand("debug|android", DebugAndroidCommand);
|
|
196
|
+
//# sourceMappingURL=debug.js.map
|
package/lib/commands/deploy.js
CHANGED
|
@@ -25,11 +25,11 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
25
25
|
this.allowedParameters = [];
|
|
26
26
|
this.dashedOptions = {
|
|
27
27
|
watch: {
|
|
28
|
-
type: "boolean"
|
|
28
|
+
type: "boolean" /* OptionType.Boolean */,
|
|
29
29
|
default: false,
|
|
30
30
|
hasSensitiveValue: false,
|
|
31
31
|
},
|
|
32
|
-
hmr: { type: "boolean"
|
|
32
|
+
hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
|
|
33
33
|
};
|
|
34
34
|
this.$projectData.initializeProjectData();
|
|
35
35
|
}
|
|
@@ -76,3 +76,4 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
76
76
|
}
|
|
77
77
|
exports.DeployOnDeviceCommand = DeployOnDeviceCommand;
|
|
78
78
|
yok_1.injector.registerCommand("deploy", DeployOnDeviceCommand);
|
|
79
|
+
//# sourceMappingURL=deploy.js.map
|
package/lib/commands/fonts.js
CHANGED
|
@@ -69,3 +69,4 @@ class GenerateSplashScreensCommand extends GenerateCommandBase {
|
|
|
69
69
|
}
|
|
70
70
|
exports.GenerateSplashScreensCommand = GenerateSplashScreensCommand;
|
|
71
71
|
yok_1.injector.registerCommand("resources|generate|splashes", GenerateSplashScreensCommand);
|
|
72
|
+
//# sourceMappingURL=generate-assets.js.map
|
package/lib/commands/generate.js
CHANGED
|
@@ -58,16 +58,25 @@ class GenerateCommand {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
exports.GenerateCommand = GenerateCommand;
|
|
61
|
+
/**
|
|
62
|
+
* Converts an array of command line arguments to options for the executed schematic.
|
|
63
|
+
* @param rawArgs The command line arguments. They should be in the format 'key=value' for strings or 'key' for booleans.
|
|
64
|
+
*/
|
|
61
65
|
function parseSchematicSettings(rawArgs) {
|
|
62
66
|
const [optionStrings, args] = partition(rawArgs, (item) => item.includes("="));
|
|
63
67
|
const options = optionStrings
|
|
64
|
-
.map((o) => o.split("="))
|
|
65
|
-
.map(([key, ...value]) => [key, value.join("=")])
|
|
68
|
+
.map((o) => o.split("=")) // split to key and value pairs
|
|
69
|
+
.map(([key, ...value]) => [key, value.join("=")]) // concat the value arrays if there are multiple = signs
|
|
66
70
|
.reduce((obj, [key, value]) => {
|
|
67
71
|
return Object.assign(Object.assign({}, obj), { [key]: value });
|
|
68
72
|
}, {});
|
|
69
73
|
return { options, args };
|
|
70
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Splits an array into two groups based on a predicate.
|
|
77
|
+
* @param array The array to split.
|
|
78
|
+
* @param predicate The condition to be used for splitting.
|
|
79
|
+
*/
|
|
71
80
|
function partition(array, predicate) {
|
|
72
81
|
return array.reduce(([pass, fail], item) => {
|
|
73
82
|
return predicate(item)
|
|
@@ -76,3 +85,4 @@ function partition(array, predicate) {
|
|
|
76
85
|
}, [[], []]);
|
|
77
86
|
}
|
|
78
87
|
yok_1.injector.registerCommand("generate", GenerateCommand);
|
|
88
|
+
//# sourceMappingURL=generate.js.map
|
package/lib/commands/info.js
CHANGED
package/lib/commands/install.js
CHANGED
package/lib/commands/migrate.js
CHANGED
|
@@ -38,12 +38,14 @@ class CreatePluginCommand {
|
|
|
38
38
|
const selectedTemplate = this.$options.template;
|
|
39
39
|
const selectedPath = path.resolve(pathToProject || ".");
|
|
40
40
|
const projectDir = path.join(selectedPath, pluginRepoName);
|
|
41
|
+
// Must be out of try catch block, because will throw error if folder alredy exists and we don't want to delete it.
|
|
41
42
|
this.ensurePackageDir(projectDir);
|
|
42
43
|
try {
|
|
43
44
|
yield this.downloadPackage(selectedTemplate, projectDir);
|
|
44
45
|
yield this.setupSeed(projectDir, pluginRepoName);
|
|
45
46
|
}
|
|
46
47
|
catch (err) {
|
|
48
|
+
// The call to this.ensurePackageDir() above will throw error if folder alredy exists, so it is safe to delete here.
|
|
47
49
|
this.$fs.deleteDirectory(projectDir);
|
|
48
50
|
throw err;
|
|
49
51
|
}
|
|
@@ -83,6 +85,7 @@ class CreatePluginCommand {
|
|
|
83
85
|
!config.includeTypeScriptDemo)) {
|
|
84
86
|
this.$logger.printMarkdown("Using default values for plugin creation options since your shell is not interactive.");
|
|
85
87
|
}
|
|
88
|
+
// run postclone script manually and kill it if it takes more than 10 sec
|
|
86
89
|
const pathToPostCloneScript = path.join("scripts", "postclone");
|
|
87
90
|
const params = [
|
|
88
91
|
pathToPostCloneScript,
|
|
@@ -143,6 +146,7 @@ class CreatePluginCommand {
|
|
|
143
146
|
getPluginNameSource(pluginNameSource, pluginRepoName) {
|
|
144
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
148
|
if (!pluginNameSource) {
|
|
149
|
+
// remove nativescript- prefix for naming plugin files
|
|
146
150
|
const prefix = "nativescript-";
|
|
147
151
|
pluginNameSource = pluginRepoName.toLowerCase().startsWith(prefix)
|
|
148
152
|
? pluginRepoName.slice(prefix.length, pluginRepoName.length)
|
|
@@ -173,3 +177,4 @@ class CreatePluginCommand {
|
|
|
173
177
|
}
|
|
174
178
|
exports.CreatePluginCommand = CreatePluginCommand;
|
|
175
179
|
yok_1.injector.registerCommand(["plugin|create"], CreatePluginCommand);
|
|
180
|
+
//# sourceMappingURL=create-plugin.js.map
|
|
@@ -33,6 +33,7 @@ class RemovePluginCommand {
|
|
|
33
33
|
}
|
|
34
34
|
let pluginNames = [];
|
|
35
35
|
try {
|
|
36
|
+
// try installing the plugins, so we can get information from node_modules about their native code, libs, etc.
|
|
36
37
|
const installedPlugins = yield this.$pluginsService.getAllInstalledPlugins(this.$projectData);
|
|
37
38
|
pluginNames = installedPlugins.map((pl) => pl.name);
|
|
38
39
|
}
|
|
@@ -50,3 +51,4 @@ class RemovePluginCommand {
|
|
|
50
51
|
}
|
|
51
52
|
exports.RemovePluginCommand = RemovePluginCommand;
|
|
52
53
|
yok_1.injector.registerCommand("plugin|remove", RemovePluginCommand);
|
|
54
|
+
//# sourceMappingURL=remove-plugin.js.map
|