nativescript 8.7.0 → 8.8.0-alpha.0
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 +0 -12
- package/lib/base-package-manager.js +0 -7
- package/lib/bootstrap.js +1 -5
- package/lib/bun-package-manager.js +1 -17
- package/lib/color.js +0 -3
- package/lib/commands/add-platform.js +0 -1
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.js +0 -4
- package/lib/commands/build.js +2 -3
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.js +0 -3
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.js +1 -6
- package/lib/commands/deploy.js +2 -3
- package/lib/commands/extensibility/install-extension.js +0 -1
- package/lib/commands/extensibility/list-extensions.js +0 -1
- package/lib/commands/extensibility/uninstall-extension.js +0 -1
- package/lib/commands/fonts.js +0 -1
- package/lib/commands/generate-assets.js +0 -1
- package/lib/commands/generate-help.js +0 -1
- package/lib/commands/generate.js +2 -12
- package/lib/commands/info.js +0 -1
- package/lib/commands/install.js +0 -1
- package/lib/commands/list-platforms.js +0 -1
- package/lib/commands/migrate.js +0 -1
- package/lib/commands/platform-clean.js +0 -1
- package/lib/commands/plugin/add-plugin.js +0 -1
- package/lib/commands/plugin/build-plugin.js +0 -1
- package/lib/commands/plugin/create-plugin.js +0 -5
- package/lib/commands/plugin/list-plugins.js +0 -1
- package/lib/commands/plugin/remove-plugin.js +0 -2
- package/lib/commands/plugin/update-plugin.js +0 -1
- package/lib/commands/post-install.js +0 -6
- package/lib/commands/prepare.js +2 -3
- package/lib/commands/preview.js +0 -2
- package/lib/commands/remove-platform.js +0 -1
- package/lib/commands/resources/resources-update.js +0 -2
- package/lib/commands/run.js +0 -1
- package/lib/commands/setup.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/commands/test-init.js +0 -4
- package/lib/commands/test.js +2 -9
- package/lib/commands/typings.js +76 -4
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.js +0 -2
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.js +0 -3
- package/lib/common/codeGeneration/code-entity.js +0 -1
- package/lib/common/codeGeneration/code-printer.js +0 -1
- package/lib/common/command-params.js +0 -1
- package/lib/common/commands/analytics.js +0 -3
- package/lib/common/commands/autocompletion.js +0 -3
- package/lib/common/commands/device/device-log-stream.js +0 -1
- package/lib/common/commands/device/get-file.js +0 -2
- package/lib/common/commands/device/list-applications.js +0 -1
- package/lib/common/commands/device/list-devices.js +0 -3
- package/lib/common/commands/device/list-files.js +0 -2
- package/lib/common/commands/device/put-file.js +0 -2
- package/lib/common/commands/device/run-application.js +0 -1
- package/lib/common/commands/device/stop-application.js +0 -1
- package/lib/common/commands/device/uninstall-application.js +0 -1
- package/lib/common/commands/doctor.js +2 -3
- package/lib/common/commands/generate-messages.js +0 -1
- package/lib/common/commands/help.js +0 -1
- package/lib/common/commands/package-manager-get.js +0 -1
- package/lib/common/commands/package-manager-set.js +0 -1
- package/lib/common/commands/post-install.js +0 -1
- package/lib/common/commands/preuninstall.js +2 -11
- package/lib/common/commands/proxy/proxy-base.js +0 -4
- package/lib/common/commands/proxy/proxy-clear.js +0 -1
- package/lib/common/commands/proxy/proxy-get.js +0 -1
- package/lib/common/commands/proxy/proxy-set.js +0 -1
- package/lib/common/common-lib.js +0 -1
- package/lib/common/constants.js +0 -11
- package/lib/common/decorators.js +0 -48
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/errors.js +3 -13
- package/lib/common/file-system.js +2 -13
- package/lib/common/header.js +0 -3
- package/lib/common/helpers.js +3 -89
- package/lib/common/host-info.js +0 -4
- package/lib/common/http-client.js +0 -20
- package/lib/common/logger/appenders/cli-appender.js +0 -4
- package/lib/common/logger/appenders/emit-appender.js +0 -4
- package/lib/common/logger/layouts/cli-layout.js +0 -1
- package/lib/common/logger/logger.js +0 -5
- package/lib/common/messages/messages.js +0 -6
- package/lib/common/mobile/android/android-application-manager.js +1 -20
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
- package/lib/common/mobile/android/android-debug-bridge.js +0 -6
- package/lib/common/mobile/android/android-device-file-system.js +0 -4
- package/lib/common/mobile/android/android-device-hash-service.js +0 -3
- package/lib/common/mobile/android/android-device.js +0 -8
- package/lib/common/mobile/android/android-emulator-services.js +1 -2
- package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
- package/lib/common/mobile/android/android-log-filter.js +0 -4
- package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
- package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
- package/lib/common/mobile/android/genymotion/genymotion-service.js +0 -5
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +1 -20
- package/lib/common/mobile/application-manager-base.js +0 -6
- package/lib/common/mobile/device-emitter.js +0 -4
- package/lib/common/mobile/device-log-emitter.js +0 -1
- package/lib/common/mobile/device-log-provider-base.js +0 -1
- package/lib/common/mobile/device-log-provider.js +0 -23
- package/lib/common/mobile/device-platforms-constants.js +0 -1
- package/lib/common/mobile/emulator-helper.js +0 -3
- package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
- package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
- package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
- package/lib/common/mobile/ios/device/ios-device.js +0 -4
- package/lib/common/mobile/ios/ios-device-base.js +0 -1
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
- package/lib/common/mobile/ios/ios-log-filter.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
- package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
- package/lib/common/mobile/log-filter.js +0 -2
- package/lib/common/mobile/logging-levels.js +0 -1
- package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
- package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
- package/lib/common/mobile/mobile-core/devices-service.js +0 -69
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-helper.js +0 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
- package/lib/common/opener.js +0 -1
- package/lib/common/os-info.js +0 -1
- package/lib/common/plist-parser.js +0 -1
- package/lib/common/project-helper.js +0 -1
- package/lib/common/prompter.js +1 -9
- package/lib/common/queue.js +0 -1
- package/lib/common/resource-loader.js +0 -1
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +1 -2
- package/lib/common/services/commands-service.js +6 -17
- package/lib/common/services/help-service.js +3 -11
- package/lib/common/services/hooks-service.js +0 -13
- package/lib/common/services/ios-notification-service.js +0 -1
- package/lib/common/services/json-file-settings-service.js +0 -6
- package/lib/common/services/lock-service.js +0 -6
- package/lib/common/services/message-contract-generator.js +0 -1
- package/lib/common/services/messages-service.js +0 -1
- package/lib/common/services/micro-templating-service.js +0 -6
- package/lib/common/services/net-service.js +0 -3
- package/lib/common/services/project-files-manager.js +0 -5
- package/lib/common/services/project-files-provider-base.js +0 -1
- package/lib/common/services/proxy-service.js +0 -1
- package/lib/common/services/qr.js +0 -1
- package/lib/common/services/settings-service.js +0 -1
- package/lib/common/services/xcode-select-service.js +0 -1
- package/lib/common/utils.js +0 -1
- package/lib/common/validators/project-name-validator.js +0 -1
- package/lib/common/validators/validation-result.js +0 -1
- package/lib/common/verify-node-version.js +1 -8
- package/lib/common/yok.js +11 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +0 -53
- package/lib/controllers/build-controller.js +3 -4
- package/lib/controllers/debug-controller.js +3 -8
- package/lib/controllers/deploy-controller.js +0 -1
- package/lib/controllers/migrate-controller.js +3 -91
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +4 -14
- package/lib/controllers/run-controller.js +1 -17
- package/lib/controllers/update-controller-base.js +0 -1
- package/lib/controllers/update-controller.js +0 -11
- package/lib/data/build-data.js +0 -1
- package/lib/data/controller-data-base.js +0 -1
- package/lib/data/debug-data.js +0 -1
- package/lib/data/platform-data.js +0 -1
- package/lib/data/prepare-data.js +0 -1
- package/lib/data/run-data.js +0 -1
- package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
- package/lib/detached-processes/cleanup-process.js +14 -18
- package/lib/detached-processes/file-log-service.js +1 -2
- package/lib/device-path-provider.js +0 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
- package/lib/device-sockets/ios/notification.js +0 -3
- package/lib/device-sockets/ios/socket-request-executor.js +0 -3
- package/lib/helpers/android-bundle-validator-helper.js +1 -2
- package/lib/helpers/deploy-command-helper.js +0 -1
- package/lib/helpers/key-command-helper.js +2 -4
- package/lib/helpers/livesync-command-helper.js +1 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +2 -3
- package/lib/helpers/package-path-helper.js +0 -1
- package/lib/helpers/platform-command-helper.js +2 -7
- package/lib/helpers/version-validator-helper.js +0 -1
- package/lib/key-commands/bootstrap.js +2 -3
- package/lib/key-commands/index.js +4 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +1 -10
- package/lib/node/pbxproj-dom-xcode.js +0 -1
- package/lib/node/xcode.js +0 -1
- package/lib/node-package-manager.js +1 -11
- package/lib/options.js +116 -141
- package/lib/package-installation-manager.js +1 -8
- package/lib/package-manager.js +0 -2
- package/lib/platform-command-param.js +0 -1
- package/lib/pnpm-package-manager.js +1 -4
- package/lib/project-data.js +0 -12
- package/lib/providers/project-files-provider.js +0 -1
- package/lib/resolvers/livesync-service-resolver.js +0 -1
- package/lib/services/analytics/analytics-broker-process.js +6 -10
- package/lib/services/analytics/analytics-broker.js +1 -2
- package/lib/services/analytics/analytics-service.js +25 -29
- package/lib/services/analytics/google-analytics-provider.js +12 -13
- package/lib/services/analytics-settings-service.js +0 -5
- package/lib/services/android/android-bundle-tool-service.js +0 -1
- package/lib/services/android/gradle-build-args-service.js +2 -9
- package/lib/services/android/gradle-build-service.js +0 -1
- package/lib/services/android/gradle-command-service.js +0 -1
- package/lib/services/android-device-debug-service.js +0 -6
- package/lib/services/android-plugin-build-service.js +12 -43
- package/lib/services/android-project-service.js +4 -71
- package/lib/services/android-resources-migration-service.js +0 -7
- package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
- package/lib/services/assets-generation/assets-generation-service.js +5 -16
- package/lib/services/build-artifacts-service.js +1 -2
- package/lib/services/build-data-service.js +0 -1
- package/lib/services/build-info-file-service.js +0 -1
- package/lib/services/cleanup-service.js +9 -13
- package/lib/services/cocoapods-platform-manager.js +0 -9
- package/lib/services/cocoapods-service.js +1 -21
- package/lib/services/debug-data-service.js +0 -1
- package/lib/services/debug-service-base.js +0 -7
- package/lib/services/device/device-install-app-service.js +1 -2
- package/lib/services/doctor-service.js +6 -21
- package/lib/services/extensibility-service.js +0 -8
- package/lib/services/files-hash-service.js +0 -1
- package/lib/services/hmr-status-service.js +0 -2
- package/lib/services/info-service.js +0 -1
- package/lib/services/initialize-service.js +1 -5
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.js +0 -4
- package/lib/services/ios/spm-service.js +0 -9
- package/lib/services/ios/xcodebuild-args-service.js +0 -9
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +0 -1
- package/lib/services/ios-debugger-port-service.js +0 -1
- package/lib/services/ios-device-debug-service.js +0 -1
- package/lib/services/ios-entitlements-service.js +0 -1
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.js +4 -6
- package/lib/services/ios-project-service.js +1 -23
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +0 -1
- package/lib/services/ip-service.js +0 -2
- package/lib/services/itmstransporter-service.js +0 -1
- package/lib/services/karma-execution.js +0 -2
- package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
- package/lib/services/livesync/android-device-livesync-service.js +0 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
- package/lib/services/livesync/android-livesync-service.js +0 -1
- package/lib/services/livesync/android-livesync-tool.js +0 -4
- package/lib/services/livesync/device-livesync-service-base.js +0 -2
- package/lib/services/livesync/ios-device-livesync-service.js +0 -7
- package/lib/services/livesync/ios-livesync-service.js +0 -2
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.js +0 -5
- package/lib/services/livesync-process-data-service.js +0 -1
- package/lib/services/log-parser-service.js +0 -1
- package/lib/services/log-source-map-service.js +0 -15
- package/lib/services/marking-mode-service.js +5 -8
- package/lib/services/metadata-filtering-service.js +0 -1
- package/lib/services/npm-config-service.js +0 -4
- package/lib/services/pacote-service.js +0 -7
- package/lib/services/performance-service.js +1 -3
- package/lib/services/platform/add-platform-service.js +2 -47
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.js +2 -5
- package/lib/services/platform-environment-requirements.js +3 -8
- package/lib/services/platform-project-service-base.js +0 -1
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.js +2 -18
- package/lib/services/prepare-data-service.js +0 -1
- package/lib/services/project-backup-service.js +0 -4
- package/lib/services/project-changes-service.js +3 -12
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +1 -18
- package/lib/services/project-data-service.js +7 -36
- package/lib/services/project-name-service.js +0 -1
- package/lib/services/project-service.js +0 -10
- package/lib/services/project-templates-service.js +2 -3
- package/lib/services/qr-code-terminal-service.js +0 -1
- package/lib/services/require-service.js +0 -1
- package/lib/services/start-service.js +0 -1
- package/lib/services/temp-service.js +0 -1
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.js +2 -9
- package/lib/services/test-initialization-service.js +0 -4
- package/lib/services/timeline-profiler-service.js +0 -1
- package/lib/services/user-settings-service.js +0 -1
- package/lib/services/versions-service.js +4 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/webpack/webpack-compiler-service.js +1 -42
- package/lib/services/xcconfig-service.js +0 -2
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +1 -2
- package/lib/tools/config-manipulation/config-transformer.js +0 -12
- package/lib/tools/node-modules/node-modules-builder.js +0 -1
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
- package/lib/yarn-package-manager.js +0 -1
- package/lib/yarn2-package-manager.js +0 -3
- package/package.json +1 -1
- package/vendor/aab-tool/README.txt +1 -1
- package/vendor/aab-tool/bundletool.jar +0 -0
- package/vendor/gradle-plugin/build.gradle +21 -15
|
@@ -84,8 +84,6 @@ 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)
|
|
89
87
|
this.$logger.trace(`Error while executing '${path.join(doctor_1.androidToolsInfo.androidHome, "platform-tools", "adb")} help'. Error is: ${err.message}`);
|
|
90
88
|
}
|
|
91
89
|
return null;
|
|
@@ -100,14 +98,6 @@ class AndroidToolsInfo {
|
|
|
100
98
|
shouldGenerateTypings() {
|
|
101
99
|
return this.$options.androidTypings;
|
|
102
100
|
}
|
|
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
|
-
*/
|
|
111
101
|
printMessage(msg, showWarningsAsErrors) {
|
|
112
102
|
if (showWarningsAsErrors) {
|
|
113
103
|
this.$errors.fail(msg);
|
|
@@ -127,7 +117,6 @@ class AndroidToolsInfo {
|
|
|
127
117
|
}
|
|
128
118
|
return latestCompileSdk;
|
|
129
119
|
}
|
|
130
|
-
// TODO check if still needed
|
|
131
120
|
getTargetSdk(compileSdk) {
|
|
132
121
|
const targetSdk = this.$options.sdk
|
|
133
122
|
? parseInt(this.$options.sdk)
|
|
@@ -144,4 +133,3 @@ __decorate([
|
|
|
144
133
|
], AndroidToolsInfo.prototype, "validateAndroidHomeEnvVariable", null);
|
|
145
134
|
exports.AndroidToolsInfo = AndroidToolsInfo;
|
|
146
135
|
yok_1.injector.register("androidToolsInfo", AndroidToolsInfo);
|
|
147
|
-
//# sourceMappingURL=android-tools-info.js.map
|
|
@@ -28,8 +28,6 @@ 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)
|
|
33
31
|
const packageNameRegex = new RegExp(packageName, "i");
|
|
34
32
|
const isProperResult = packageNameRegex.test(viewResult);
|
|
35
33
|
return isProperResult;
|
|
@@ -41,8 +39,6 @@ class BasePackageManager {
|
|
|
41
39
|
}
|
|
42
40
|
getPackageNameParts(fullPackageName) {
|
|
43
41
|
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
|
|
46
42
|
const lastIndexOfAtSign = fullPackageName.lastIndexOf("@");
|
|
47
43
|
let version = "";
|
|
48
44
|
let templateName = "";
|
|
@@ -78,8 +74,6 @@ class BasePackageManager {
|
|
|
78
74
|
cwd: opts.cwd,
|
|
79
75
|
stdio: stdioValue,
|
|
80
76
|
});
|
|
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.
|
|
83
77
|
const { isInstallingAllDependencies } = opts;
|
|
84
78
|
if (isInstallingAllDependencies) {
|
|
85
79
|
return null;
|
|
@@ -132,4 +126,3 @@ class BasePackageManager {
|
|
|
132
126
|
}
|
|
133
127
|
}
|
|
134
128
|
exports.BasePackageManager = BasePackageManager;
|
|
135
|
-
//# sourceMappingURL=base-package-manager.js.map
|
package/lib/bootstrap.js
CHANGED
|
@@ -5,7 +5,6 @@ require("./common/bootstrap");
|
|
|
5
5
|
yok_1.injector.requirePublicClass("logger", "./common/logger/logger");
|
|
6
6
|
yok_1.injector.require("config", "./config");
|
|
7
7
|
yok_1.injector.require("options", "./options");
|
|
8
|
-
// note: order above is important!
|
|
9
8
|
yok_1.injector.requirePublicClass("constants", "./constants-provider");
|
|
10
9
|
yok_1.injector.require("projectData", "./project-data");
|
|
11
10
|
yok_1.injector.requirePublic("projectDataService", "./services/project-data-service");
|
|
@@ -99,8 +98,6 @@ yok_1.injector.requireCommand("dev-test|android", "./commands/test");
|
|
|
99
98
|
yok_1.injector.requireCommand("dev-test|ios", "./commands/test");
|
|
100
99
|
yok_1.injector.requireCommand("test|android", "./commands/test");
|
|
101
100
|
yok_1.injector.requireCommand("test|ios", "./commands/test");
|
|
102
|
-
// injector.requireCommand("test|vision", "./commands/test");
|
|
103
|
-
// injector.requireCommand("test|visionos", "./commands/test");
|
|
104
101
|
yok_1.injector.requireCommand("test|init", "./commands/test-init");
|
|
105
102
|
yok_1.injector.requireCommand("dev-generate-help", "./commands/generate-help");
|
|
106
103
|
yok_1.injector.requireCommand("appstore|*list", "./commands/appstore-list");
|
|
@@ -151,7 +148,7 @@ yok_1.injector.require("LiveSyncSocket", "./services/livesync/livesync-socket");
|
|
|
151
148
|
yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/android-livesync-tool");
|
|
152
149
|
yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
|
|
153
150
|
yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
|
|
154
|
-
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
|
|
151
|
+
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
|
|
155
152
|
yok_1.injector.requirePublic("sysInfo", "./sys-info");
|
|
156
153
|
yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
|
|
157
154
|
yok_1.injector.require("appDebugSocketProxyFactory", "./device-sockets/ios/app-debug-socket-proxy-factory");
|
|
@@ -204,4 +201,3 @@ yok_1.injector.require("keyCommandHelper", "./helpers/key-command-helper");
|
|
|
204
201
|
yok_1.injector.requireCommand("start", "./commands/start");
|
|
205
202
|
yok_1.injector.require("startService", "./services/start-service");
|
|
206
203
|
require("./key-commands/bootstrap");
|
|
207
|
-
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -40,9 +40,6 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
40
40
|
const packageJsonPath = path.join(pathToSave, "package.json");
|
|
41
41
|
const jsonContentBefore = this.$fs.readJson(packageJsonPath);
|
|
42
42
|
const flags = this.getFlagsString(config, true);
|
|
43
|
-
// TODO: Confirm desired behavior. The npm version uses --legacy-peer-deps
|
|
44
|
-
// by default, we could use `--no-peer` for Bun if similar is needed; the
|
|
45
|
-
// pnpm version uses `--shamefully-hoist`, but Bun has no similar flag.
|
|
46
43
|
let params = ["install", "--legacy-peer-deps"];
|
|
47
44
|
const isInstallingAllDependencies = packageName === pathToSave;
|
|
48
45
|
if (!isInstallingAllDependencies) {
|
|
@@ -55,7 +52,6 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
55
52
|
return result;
|
|
56
53
|
}
|
|
57
54
|
catch (err) {
|
|
58
|
-
// Revert package.json contents to preserve valid state
|
|
59
55
|
this.$fs.writeJson(packageJsonPath, jsonContentBefore);
|
|
60
56
|
throw err;
|
|
61
57
|
}
|
|
@@ -69,10 +65,9 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
69
65
|
});
|
|
70
66
|
});
|
|
71
67
|
}
|
|
72
|
-
// Bun does not have a `view` command; use npm.
|
|
73
68
|
view(packageName, config) {
|
|
74
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
const wrappedConfig = _.extend({}, config, { json: true });
|
|
70
|
+
const wrappedConfig = _.extend({}, config, { json: true });
|
|
76
71
|
const flags = this.getFlagsString(wrappedConfig, false);
|
|
77
72
|
let viewResult;
|
|
78
73
|
try {
|
|
@@ -89,7 +84,6 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
89
84
|
}
|
|
90
85
|
});
|
|
91
86
|
}
|
|
92
|
-
// Bun does not have a `search` command; use npm.
|
|
93
87
|
search(filter, config) {
|
|
94
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
89
|
const flags = this.getFlagsString(config, false);
|
|
@@ -98,20 +92,11 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
98
92
|
}
|
|
99
93
|
searchNpms(keyword) {
|
|
100
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
// Bugs with npms.io:
|
|
102
|
-
// 1. API returns no results when a valid package name contains @ or /
|
|
103
|
-
// even if using encodeURIComponent().
|
|
104
|
-
// 2. npms.io's API no longer returns updated results; see
|
|
105
|
-
// https://github.com/npms-io/npms-api/issues/112. Better to switch to
|
|
106
|
-
// https://registry.npmjs.org/<query>
|
|
107
95
|
const httpRequestResult = yield this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
|
|
108
96
|
const result = JSON.parse(httpRequestResult.body);
|
|
109
97
|
return result;
|
|
110
98
|
});
|
|
111
99
|
}
|
|
112
|
-
// Bun does not have a command analogous to `npm config get registry`; Bun
|
|
113
|
-
// uses `bunfig.toml` to define custom registries.
|
|
114
|
-
// - TODO: read `bunfig.toml`, if it exists, and return the registry URL.
|
|
115
100
|
getRegistryPackageData(packageName) {
|
|
116
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
102
|
const registry = yield this.$childProcess.exec(`npm config get registry`);
|
|
@@ -148,4 +133,3 @@ __decorate([
|
|
|
148
133
|
], BunPackageManager.prototype, "getCachePath", null);
|
|
149
134
|
exports.BunPackageManager = BunPackageManager;
|
|
150
135
|
yok_1.injector.register("bun", BunPackageManager);
|
|
151
|
-
//# sourceMappingURL=bun-package-manager.js.map
|
package/lib/color.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
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
|
|
6
4
|
const ansi = require("ansi-colors");
|
|
7
5
|
const chalk = require("chalk");
|
|
8
6
|
function stripColors(formatStr) {
|
|
@@ -10,4 +8,3 @@ function stripColors(formatStr) {
|
|
|
10
8
|
}
|
|
11
9
|
exports.stripColors = stripColors;
|
|
12
10
|
exports.color = chalk;
|
|
13
|
-
//# sourceMappingURL=color.js.map
|
|
@@ -63,12 +63,9 @@ 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.
|
|
67
66
|
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.
|
|
69
67
|
this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
|
|
70
68
|
mobileProvisionIdentifier);
|
|
71
|
-
// As we need to build the package for device
|
|
72
69
|
this.$options.forDevice = true;
|
|
73
70
|
this.$options.provision = mobileProvisionIdentifier;
|
|
74
71
|
const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, Object.assign(Object.assign({}, this.$options.argv), { watch: false }));
|
|
@@ -107,4 +104,3 @@ class PublishIOS {
|
|
|
107
104
|
}
|
|
108
105
|
exports.PublishIOS = PublishIOS;
|
|
109
106
|
yok_1.injector.registerCommand(["publish|ios", "appstore|upload"], PublishIOS);
|
|
110
|
-
//# sourceMappingURL=appstore-upload.js.map
|
package/lib/commands/build.js
CHANGED
|
@@ -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",
|
|
28
28
|
default: false,
|
|
29
29
|
hasSensitiveValue: false,
|
|
30
30
|
},
|
|
31
|
-
hmr: { type: "boolean"
|
|
31
|
+
hmr: { type: "boolean", default: false, hasSensitiveValue: false },
|
|
32
32
|
};
|
|
33
33
|
this.$projectData.initializeProjectData();
|
|
34
34
|
}
|
|
@@ -159,4 +159,3 @@ class BuildVisionOsCommand extends BuildIosCommand {
|
|
|
159
159
|
exports.BuildVisionOsCommand = BuildVisionOsCommand;
|
|
160
160
|
yok_1.injector.registerCommand("build|vision", BuildVisionOsCommand);
|
|
161
161
|
yok_1.injector.registerCommand("build|visionos", BuildVisionOsCommand);
|
|
162
|
-
//# sourceMappingURL=build.js.map
|
package/lib/commands/clean.js
CHANGED
|
@@ -26,18 +26,6 @@ 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
|
-
*/
|
|
41
29
|
function promiseMap(values, mapper, concurrency = 10) {
|
|
42
30
|
let index = 0;
|
|
43
31
|
let pending = 0;
|
|
@@ -96,7 +84,6 @@ class CleanCommand {
|
|
|
96
84
|
try {
|
|
97
85
|
const overridePathsToClean = this.$projectConfigService.getValue("cli.pathsToClean");
|
|
98
86
|
const additionalPaths = this.$projectConfigService.getValue("cli.additionalPathsToClean");
|
|
99
|
-
// allow overriding default paths to clean
|
|
100
87
|
if (Array.isArray(overridePathsToClean)) {
|
|
101
88
|
pathsToClean = overridePathsToClean;
|
|
102
89
|
}
|
|
@@ -105,7 +92,6 @@ class CleanCommand {
|
|
|
105
92
|
}
|
|
106
93
|
}
|
|
107
94
|
catch (err) {
|
|
108
|
-
// ignore
|
|
109
95
|
}
|
|
110
96
|
const res = yield this.$projectCleanupService.clean(pathsToClean, {
|
|
111
97
|
dryRun: isDryRun,
|
|
@@ -131,7 +117,6 @@ class CleanCommand {
|
|
|
131
117
|
cleanMultipleProjects(spinner) {
|
|
132
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
119
|
if (!(0, helpers_1.isInteractive)() || this.$options.json) {
|
|
134
|
-
// interactive terminal is required, and we can't output json in an interactive command.
|
|
135
120
|
this.$logger.warn("No project found in the current directory.");
|
|
136
121
|
return;
|
|
137
122
|
}
|
|
@@ -147,7 +132,6 @@ class CleanCommand {
|
|
|
147
132
|
const current = color_1.color.grey(`${computed}/${paths.length}`);
|
|
148
133
|
spinner.start(`Gathering cleanable sizes. This may take a while... ${current}`);
|
|
149
134
|
};
|
|
150
|
-
// update the progress initially
|
|
151
135
|
updateProgress();
|
|
152
136
|
const projects = new Map();
|
|
153
137
|
yield promiseMap(paths, (p) => {
|
|
@@ -165,10 +149,8 @@ class CleanCommand {
|
|
|
165
149
|
})
|
|
166
150
|
.then((size) => {
|
|
167
151
|
if (size > 0 || size === -1) {
|
|
168
|
-
// only store size if it's larger than 0 or -1 (error while getting size)
|
|
169
152
|
projects.set(p, size);
|
|
170
153
|
}
|
|
171
|
-
// update the progress after each processed project
|
|
172
154
|
computed++;
|
|
173
155
|
updateProgress();
|
|
174
156
|
});
|
|
@@ -193,7 +175,7 @@ class CleanCommand {
|
|
|
193
175
|
value: p,
|
|
194
176
|
};
|
|
195
177
|
}), true, {
|
|
196
|
-
optionsPerPage: process.stdout.rows - 6,
|
|
178
|
+
optionsPerPage: process.stdout.rows - 6,
|
|
197
179
|
});
|
|
198
180
|
this.$logger.clearScreen();
|
|
199
181
|
spinner.warn(`This will run "${color_1.color.yellow(`ns clean`)}" in all the selected projects and ${color_1.color.red.bold("delete files from your system")}!`);
|
|
@@ -242,7 +224,6 @@ class CleanCommand {
|
|
|
242
224
|
let nsDirs = [];
|
|
243
225
|
const getFiles = (dir) => __awaiter(this, void 0, void 0, function* () {
|
|
244
226
|
if (dir.includes("node_modules")) {
|
|
245
|
-
// skip traversing node_modules
|
|
246
227
|
return;
|
|
247
228
|
}
|
|
248
229
|
const dirents = yield (0, promises_1.readdir)(dir, { withFileTypes: true }).catch((err) => {
|
|
@@ -253,7 +234,6 @@ class CleanCommand {
|
|
|
253
234
|
ent.name.includes("nativescript.config.js"));
|
|
254
235
|
if (hasNSConfig) {
|
|
255
236
|
nsDirs.push(dir);
|
|
256
|
-
// found a NativeScript project, stop traversing
|
|
257
237
|
return;
|
|
258
238
|
}
|
|
259
239
|
yield Promise.all(dirents.map((dirent) => {
|
|
@@ -270,4 +250,3 @@ class CleanCommand {
|
|
|
270
250
|
}
|
|
271
251
|
exports.CleanCommand = CleanCommand;
|
|
272
252
|
yok_1.injector.registerCommand("clean", CleanCommand);
|
|
273
|
-
//# sourceMappingURL=clean.js.map
|
package/lib/commands/config.js
CHANGED
|
@@ -61,7 +61,6 @@ class ConfigGetCommand {
|
|
|
61
61
|
this.$logger.info(current);
|
|
62
62
|
}
|
|
63
63
|
catch (err) {
|
|
64
|
-
// ignore
|
|
65
64
|
}
|
|
66
65
|
});
|
|
67
66
|
}
|
|
@@ -120,7 +119,6 @@ class ConfigSetCommand {
|
|
|
120
119
|
return JSON.parse(v);
|
|
121
120
|
}
|
|
122
121
|
catch (e) {
|
|
123
|
-
// just treat it as a string
|
|
124
122
|
return `${v}`;
|
|
125
123
|
}
|
|
126
124
|
}
|
|
@@ -129,4 +127,3 @@ exports.ConfigSetCommand = ConfigSetCommand;
|
|
|
129
127
|
yok_1.injector.registerCommand("config|*list", ConfigListCommand);
|
|
130
128
|
yok_1.injector.registerCommand("config|get", ConfigGetCommand);
|
|
131
129
|
yok_1.injector.registerCommand("config|set", ConfigSetCommand);
|
|
132
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -115,7 +115,6 @@ class CreateProjectCommand {
|
|
|
115
115
|
template: selectedTemplate,
|
|
116
116
|
appId: this.$options.appid,
|
|
117
117
|
pathToProject: this.$options.path,
|
|
118
|
-
// its already validated above
|
|
119
118
|
force: true,
|
|
120
119
|
ignoreScripts: this.$options.ignoreScripts,
|
|
121
120
|
});
|
|
@@ -413,10 +412,6 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
413
412
|
`For more options consult the docs or run ${color_1.color.green("ns --help")}`,
|
|
414
413
|
"",
|
|
415
414
|
].join("\n"));
|
|
416
|
-
// todo: add back ns preview
|
|
417
|
-
// this.$logger.printMarkdown(
|
|
418
|
-
// `After that you can preview it on device by executing \`$ ns preview\``
|
|
419
|
-
// );
|
|
420
415
|
});
|
|
421
416
|
}
|
|
422
417
|
}
|
|
@@ -434,4 +429,3 @@ CreateProjectCommand.TabsTemplateKey = "Tabs";
|
|
|
434
429
|
CreateProjectCommand.TabsTemplateDescription = "An app with pre-built pages that uses tabs for navigation";
|
|
435
430
|
exports.CreateProjectCommand = CreateProjectCommand;
|
|
436
431
|
yok_1.injector.registerCommand("create", CreateProjectCommand);
|
|
437
|
-
//# sourceMappingURL=create-project.js.map
|
package/lib/commands/debug.js
CHANGED
|
@@ -106,10 +106,6 @@ 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.
|
|
113
109
|
$iosDeviceOperations.setShouldDispose(false);
|
|
114
110
|
$iOSSimulatorLogProvider.setShouldDispose(false);
|
|
115
111
|
}
|
|
@@ -128,7 +124,7 @@ class DebugIOSCommand {
|
|
|
128
124
|
if (this.$options.inspector) {
|
|
129
125
|
const macOSWarning = yield this.$sysInfo.getMacOSWarningMessage();
|
|
130
126
|
if (macOSWarning &&
|
|
131
|
-
macOSWarning.severity === "high"
|
|
127
|
+
macOSWarning.severity === "high") {
|
|
132
128
|
this.$errors.fail(`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`);
|
|
133
129
|
}
|
|
134
130
|
}
|
|
@@ -193,4 +189,3 @@ __decorate([
|
|
|
193
189
|
], DebugAndroidCommand.prototype, "debugPlatformCommand", null);
|
|
194
190
|
exports.DebugAndroidCommand = DebugAndroidCommand;
|
|
195
191
|
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",
|
|
29
29
|
default: false,
|
|
30
30
|
hasSensitiveValue: false,
|
|
31
31
|
},
|
|
32
|
-
hmr: { type: "boolean"
|
|
32
|
+
hmr: { type: "boolean", default: false, hasSensitiveValue: false },
|
|
33
33
|
};
|
|
34
34
|
this.$projectData.initializeProjectData();
|
|
35
35
|
}
|
|
@@ -76,4 +76,3 @@ 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,4 +69,3 @@ 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,25 +58,16 @@ 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
|
-
*/
|
|
65
61
|
function parseSchematicSettings(rawArgs) {
|
|
66
62
|
const [optionStrings, args] = partition(rawArgs, (item) => item.includes("="));
|
|
67
63
|
const options = optionStrings
|
|
68
|
-
.map((o) => o.split("="))
|
|
69
|
-
.map(([key, ...value]) => [key, value.join("=")])
|
|
64
|
+
.map((o) => o.split("="))
|
|
65
|
+
.map(([key, ...value]) => [key, value.join("=")])
|
|
70
66
|
.reduce((obj, [key, value]) => {
|
|
71
67
|
return Object.assign(Object.assign({}, obj), { [key]: value });
|
|
72
68
|
}, {});
|
|
73
69
|
return { options, args };
|
|
74
70
|
}
|
|
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
|
-
*/
|
|
80
71
|
function partition(array, predicate) {
|
|
81
72
|
return array.reduce(([pass, fail], item) => {
|
|
82
73
|
return predicate(item)
|
|
@@ -85,4 +76,3 @@ function partition(array, predicate) {
|
|
|
85
76
|
}, [[], []]);
|
|
86
77
|
}
|
|
87
78
|
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,14 +38,12 @@ 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.
|
|
42
41
|
this.ensurePackageDir(projectDir);
|
|
43
42
|
try {
|
|
44
43
|
yield this.downloadPackage(selectedTemplate, projectDir);
|
|
45
44
|
yield this.setupSeed(projectDir, pluginRepoName);
|
|
46
45
|
}
|
|
47
46
|
catch (err) {
|
|
48
|
-
// The call to this.ensurePackageDir() above will throw error if folder alredy exists, so it is safe to delete here.
|
|
49
47
|
this.$fs.deleteDirectory(projectDir);
|
|
50
48
|
throw err;
|
|
51
49
|
}
|
|
@@ -85,7 +83,6 @@ class CreatePluginCommand {
|
|
|
85
83
|
!config.includeTypeScriptDemo)) {
|
|
86
84
|
this.$logger.printMarkdown("Using default values for plugin creation options since your shell is not interactive.");
|
|
87
85
|
}
|
|
88
|
-
// run postclone script manually and kill it if it takes more than 10 sec
|
|
89
86
|
const pathToPostCloneScript = path.join("scripts", "postclone");
|
|
90
87
|
const params = [
|
|
91
88
|
pathToPostCloneScript,
|
|
@@ -146,7 +143,6 @@ class CreatePluginCommand {
|
|
|
146
143
|
getPluginNameSource(pluginNameSource, pluginRepoName) {
|
|
147
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
145
|
if (!pluginNameSource) {
|
|
149
|
-
// remove nativescript- prefix for naming plugin files
|
|
150
146
|
const prefix = "nativescript-";
|
|
151
147
|
pluginNameSource = pluginRepoName.toLowerCase().startsWith(prefix)
|
|
152
148
|
? pluginRepoName.slice(prefix.length, pluginRepoName.length)
|
|
@@ -177,4 +173,3 @@ class CreatePluginCommand {
|
|
|
177
173
|
}
|
|
178
174
|
exports.CreatePluginCommand = CreatePluginCommand;
|
|
179
175
|
yok_1.injector.registerCommand(["plugin|create"], CreatePluginCommand);
|
|
180
|
-
//# sourceMappingURL=create-plugin.js.map
|
|
@@ -33,7 +33,6 @@ 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.
|
|
37
36
|
const installedPlugins = yield this.$pluginsService.getAllInstalledPlugins(this.$projectData);
|
|
38
37
|
pluginNames = installedPlugins.map((pl) => pl.name);
|
|
39
38
|
}
|
|
@@ -51,4 +50,3 @@ class RemovePluginCommand {
|
|
|
51
50
|
}
|
|
52
51
|
exports.RemovePluginCommand = RemovePluginCommand;
|
|
53
52
|
yok_1.injector.registerCommand("plugin|remove", RemovePluginCommand);
|
|
54
|
-
//# sourceMappingURL=remove-plugin.js.map
|
|
@@ -29,18 +29,13 @@ class PostInstallCliCommand {
|
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
30
|
const isRunningWithSudoUser = !!process.env.SUDO_USER;
|
|
31
31
|
if (!this.$hostInfo.isWindows) {
|
|
32
|
-
// when running under 'sudo' we create a working dir with wrong owner (root) and
|
|
33
|
-
// it is no longer accessible for the user initiating the installation
|
|
34
|
-
// patch the owner here
|
|
35
32
|
if (isRunningWithSudoUser) {
|
|
36
|
-
// TODO: Check if this is the correct place, probably we should set this at the end of the command.
|
|
37
33
|
yield this.$fs.setCurrentUserAsOwner(this.$settingsService.getProfileDir(), process.env.SUDO_USER);
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
const canExecutePostInstallTask = !isRunningWithSudoUser || (0, helpers_1.doesCurrentNpmCommandMatch)([/^--unsafe-perm$/]);
|
|
41
37
|
if (canExecutePostInstallTask) {
|
|
42
38
|
yield this.$helpService.generateHtmlPages();
|
|
43
|
-
// Explicitly ask for confirmation of usage-reporting:
|
|
44
39
|
yield this.$analyticsService.checkConsent();
|
|
45
40
|
yield this.$commandsService.tryExecuteCommand("autocomplete", []);
|
|
46
41
|
}
|
|
@@ -60,4 +55,3 @@ class PostInstallCliCommand {
|
|
|
60
55
|
}
|
|
61
56
|
exports.PostInstallCliCommand = PostInstallCliCommand;
|
|
62
57
|
yok_1.injector.registerCommand("post-install-cli", PostInstallCliCommand);
|
|
63
|
-
//# sourceMappingURL=post-install.js.map
|
package/lib/commands/prepare.js
CHANGED
|
@@ -22,11 +22,11 @@ class PrepareCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
22
22
|
this.allowedParameters = [this.$platformCommandParameter];
|
|
23
23
|
this.dashedOptions = {
|
|
24
24
|
watch: {
|
|
25
|
-
type: "boolean"
|
|
25
|
+
type: "boolean",
|
|
26
26
|
default: false,
|
|
27
27
|
hasSensitiveValue: false,
|
|
28
28
|
},
|
|
29
|
-
hmr: { type: "boolean"
|
|
29
|
+
hmr: { type: "boolean", default: false, hasSensitiveValue: false },
|
|
30
30
|
};
|
|
31
31
|
this.$projectData.initializeProjectData();
|
|
32
32
|
}
|
|
@@ -61,4 +61,3 @@ class PrepareCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
61
61
|
}
|
|
62
62
|
exports.PrepareCommand = PrepareCommand;
|
|
63
63
|
yok_1.injector.registerCommand("prepare", PrepareCommand);
|
|
64
|
-
//# sourceMappingURL=prepare.js.map
|