nativescript 9.0.4-dev.1 → 9.0.4-dev.3
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 +5 -1
- package/lib/bun-package-manager.js +14 -1
- package/lib/color.js +4 -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 +3 -0
- package/lib/commands/build.js +3 -2
- package/lib/commands/clean.js +22 -1
- package/lib/commands/command-base.js +1 -0
- package/lib/commands/config.js +5 -0
- package/lib/commands/create-project.js +6 -0
- package/lib/commands/debug.js +6 -1
- package/lib/commands/deploy.js +3 -2
- package/lib/commands/embedding/embed.js +7 -0
- 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 +48 -1
- package/lib/commands/hooks/common.js +2 -1
- package/lib/commands/hooks/hooks-lock.js +1 -0
- package/lib/commands/hooks/hooks.js +1 -0
- 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/native-add.js +5 -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 +4 -3
- 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 +2 -1
- package/lib/commands/update-platform.js +5 -0
- package/lib/commands/update.js +2 -0
- package/lib/commands/widget.js +20 -1
- 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/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 +6 -1
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
- package/lib/common/mobile/android/logcat-helper.js +13 -0
- 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 +69 -0
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-helper.js +1 -0
- 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 +13 -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 +53 -0
- 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 +90 -4
- package/lib/controllers/platform-controller.js +9 -1
- package/lib/controllers/prepare-controller.js +17 -4
- 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 +1 -0
- 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 +4 -1
- 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 +11 -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 +144 -119
- 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 +1 -0
- 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 +31 -2
- 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/apple-portal/srp/srp-wrapper.js +4 -1
- package/lib/services/assets-generation/assets-generation-service.js +10 -5
- package/lib/services/build-artifacts-service.js +2 -1
- package/lib/services/build-data-service.js +1 -0
- package/lib/services/build-info-file-service.js +1 -0
- package/lib/services/bundler/bundler-compiler-service.js +68 -1
- package/lib/services/bundler/bundler.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 +18 -0
- package/lib/services/ios/xcodebuild-args-service.js +16 -0
- package/lib/services/ios/xcodebuild-command-service.js +1 -0
- package/lib/services/ios/xcodebuild-service.js +2 -1
- 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 +100 -1
- 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 +49 -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 +20 -2
- package/lib/services/prepare-data-service.js +1 -0
- package/lib/services/project-backup-service.js +4 -0
- package/lib/services/project-changes-service.js +14 -3
- package/lib/services/project-cleanup-service.js +2 -0
- package/lib/services/project-config-service.js +21 -2
- 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 +3 -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/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/package.json +1 -1
|
@@ -74,6 +74,8 @@ class AndroidToolsInfo {
|
|
|
74
74
|
return doctor_1.androidToolsInfo.getPathToAdbFromAndroidHome();
|
|
75
75
|
}
|
|
76
76
|
catch (err) {
|
|
77
|
+
// adb does not exist, so ANDROID_HOME is not set correctly
|
|
78
|
+
// try getting default adb path (included in CLI package)
|
|
77
79
|
this.$logger.trace(`Error while executing '${path.join(doctor_1.androidToolsInfo.androidHome, "platform-tools", "adb")} help'. Error is: ${err.message}`);
|
|
78
80
|
}
|
|
79
81
|
return null;
|
|
@@ -87,6 +89,14 @@ class AndroidToolsInfo {
|
|
|
87
89
|
shouldGenerateTypings() {
|
|
88
90
|
return this.$options.androidTypings;
|
|
89
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Prints messages on the screen. In case the showWarningsAsErrors flag is set to true, warnings are shown, else - errors.
|
|
94
|
+
* Uses logger.warn for warnings and errors.failWithoutHelp when erros must be shown.
|
|
95
|
+
* In case additional details must be shown as info message, use the second parameter.
|
|
96
|
+
* NOTE: The additional information will not be printed when showWarningsAsErrors flag is set.
|
|
97
|
+
* @param {string} msg The message that will be shown as warning or error.
|
|
98
|
+
* @return {void}
|
|
99
|
+
*/
|
|
90
100
|
printMessage(msg, showWarningsAsErrors) {
|
|
91
101
|
if (showWarningsAsErrors) {
|
|
92
102
|
this.$errors.fail(msg);
|
|
@@ -106,6 +116,7 @@ class AndroidToolsInfo {
|
|
|
106
116
|
}
|
|
107
117
|
return latestCompileSdk;
|
|
108
118
|
}
|
|
119
|
+
// TODO check if still needed
|
|
109
120
|
getTargetSdk(compileSdk) {
|
|
110
121
|
const targetSdk = this.$options.sdk
|
|
111
122
|
? parseInt(this.$options.sdk)
|
|
@@ -122,3 +133,4 @@ __decorate([
|
|
|
122
133
|
(0, decorators_1.cache)()
|
|
123
134
|
], AndroidToolsInfo.prototype, "validateAndroidHomeEnvVariable", null);
|
|
124
135
|
yok_1.injector.register("androidToolsInfo", AndroidToolsInfo);
|
|
136
|
+
//# sourceMappingURL=android-tools-info.js.map
|
|
@@ -18,6 +18,8 @@ class BasePackageManager {
|
|
|
18
18
|
}
|
|
19
19
|
try {
|
|
20
20
|
const viewResult = await this.view(packageName, { name: true });
|
|
21
|
+
// `npm view nonExistingPackageName` will return `nativescript`
|
|
22
|
+
// if executed in the root dir of the CLI (npm 6.4.1)
|
|
21
23
|
const packageNameRegex = new RegExp(packageName, "i");
|
|
22
24
|
const isProperResult = packageNameRegex.test(viewResult);
|
|
23
25
|
return isProperResult;
|
|
@@ -27,6 +29,8 @@ class BasePackageManager {
|
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
async getPackageNameParts(fullPackageName) {
|
|
32
|
+
// support <reserved_name>@<version> syntax, for example typescript@1.0.0
|
|
33
|
+
// support <scoped_package_name>@<version> syntax, for example @nativescript/vue-template@1.0.0
|
|
30
34
|
const lastIndexOfAtSign = fullPackageName.lastIndexOf("@");
|
|
31
35
|
let version = "";
|
|
32
36
|
let templateName = "";
|
|
@@ -59,6 +63,8 @@ class BasePackageManager {
|
|
|
59
63
|
stdio: stdioValue,
|
|
60
64
|
shell: this.$hostInfo.isWindows,
|
|
61
65
|
});
|
|
66
|
+
// Whenever calling "npm install" or "yarn add" without any arguments (hence installing all dependencies) no output is emitted on stdout
|
|
67
|
+
// 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.
|
|
62
68
|
const { isInstallingAllDependencies } = opts;
|
|
63
69
|
if (isInstallingAllDependencies) {
|
|
64
70
|
return null;
|
|
@@ -110,3 +116,4 @@ class BasePackageManager {
|
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
exports.BasePackageManager = BasePackageManager;
|
|
119
|
+
//# 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");
|
|
@@ -99,6 +100,8 @@ yok_1.injector.requireCommand("dev-test|android", "./commands/test");
|
|
|
99
100
|
yok_1.injector.requireCommand("dev-test|ios", "./commands/test");
|
|
100
101
|
yok_1.injector.requireCommand("test|android", "./commands/test");
|
|
101
102
|
yok_1.injector.requireCommand("test|ios", "./commands/test");
|
|
103
|
+
// injector.requireCommand("test|vision", "./commands/test");
|
|
104
|
+
// injector.requireCommand("test|visionos", "./commands/test");
|
|
102
105
|
yok_1.injector.requireCommand("test|init", "./commands/test-init");
|
|
103
106
|
yok_1.injector.requireCommand("dev-generate-help", "./commands/generate-help");
|
|
104
107
|
yok_1.injector.requireCommand("appstore|*list", "./commands/appstore-list");
|
|
@@ -151,7 +154,7 @@ yok_1.injector.require("LiveSyncSocket", "./services/livesync/livesync-socket");
|
|
|
151
154
|
yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/android-livesync-tool");
|
|
152
155
|
yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
|
|
153
156
|
yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
|
|
154
|
-
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
|
|
157
|
+
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service"); // The name is used in https://github.com/NativeScript/nativescript-dev-typescript
|
|
155
158
|
yok_1.injector.requirePublic("sysInfo", "./sys-info");
|
|
156
159
|
yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
|
|
157
160
|
yok_1.injector.require("appDebugSocketProxyFactory", "./device-sockets/ios/app-debug-socket-proxy-factory");
|
|
@@ -212,3 +215,4 @@ yok_1.injector.requireCommand([
|
|
|
212
215
|
], "./commands/native-add");
|
|
213
216
|
yok_1.injector.requireCommand(["widget", "widget|ios"], "./commands/widget");
|
|
214
217
|
require("./key-commands/bootstrap");
|
|
218
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -42,6 +42,7 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
42
42
|
return result;
|
|
43
43
|
}
|
|
44
44
|
catch (err) {
|
|
45
|
+
// Revert package.json contents to preserve valid state
|
|
45
46
|
this.$fs.writeJson(packageJsonPath, jsonContentBefore);
|
|
46
47
|
throw err;
|
|
47
48
|
}
|
|
@@ -52,8 +53,9 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
52
53
|
cwd,
|
|
53
54
|
});
|
|
54
55
|
}
|
|
56
|
+
// Bun does not have a `view` command; use npm.
|
|
55
57
|
async view(packageName, config) {
|
|
56
|
-
const wrappedConfig = _.extend({}, config, { json: true });
|
|
58
|
+
const wrappedConfig = _.extend({}, config, { json: true }); // always require view response as JSON
|
|
57
59
|
const flags = this.getFlagsString(wrappedConfig, false);
|
|
58
60
|
let viewResult;
|
|
59
61
|
try {
|
|
@@ -69,15 +71,25 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
69
71
|
return null;
|
|
70
72
|
}
|
|
71
73
|
}
|
|
74
|
+
// Bun does not have a `search` command; use npm.
|
|
72
75
|
async search(filter, config) {
|
|
73
76
|
const flags = this.getFlagsString(config, false);
|
|
74
77
|
return this.$childProcess.exec(`npm search ${filter.join(" ")} ${flags}`);
|
|
75
78
|
}
|
|
76
79
|
async searchNpms(keyword) {
|
|
80
|
+
// Bugs with npms.io:
|
|
81
|
+
// 1. API returns no results when a valid package name contains @ or /
|
|
82
|
+
// even if using encodeURIComponent().
|
|
83
|
+
// 2. npms.io's API no longer returns updated results; see
|
|
84
|
+
// https://github.com/npms-io/npms-api/issues/112. Better to switch to
|
|
85
|
+
// https://registry.npmjs.org/<query>
|
|
77
86
|
const httpRequestResult = await this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
|
|
78
87
|
const result = JSON.parse(httpRequestResult.body);
|
|
79
88
|
return result;
|
|
80
89
|
}
|
|
90
|
+
// Bun does not have a command analogous to `npm config get registry`; Bun
|
|
91
|
+
// uses `bunfig.toml` to define custom registries.
|
|
92
|
+
// - TODO: read `bunfig.toml`, if it exists, and return the registry URL.
|
|
81
93
|
async getRegistryPackageData(packageName) {
|
|
82
94
|
const registry = await this.$childProcess.exec(`npm config get registry`);
|
|
83
95
|
const url = registry.trim() + packageName;
|
|
@@ -110,3 +122,4 @@ __decorate([
|
|
|
110
122
|
(0, decorators_1.cache)()
|
|
111
123
|
], BunPackageManager.prototype, "getCachePath", null);
|
|
112
124
|
yok_1.injector.register("bun", BunPackageManager);
|
|
125
|
+
//# sourceMappingURL=bun-package-manager.js.map
|
package/lib/color.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stripColors = exports.color = void 0;
|
|
4
4
|
const node_util_1 = require("node:util");
|
|
5
|
+
// Create a chalk-like API using the Node.js util.styleText function
|
|
5
6
|
exports.color = {
|
|
6
7
|
reset: (text) => (0, node_util_1.styleText)("reset", text),
|
|
7
8
|
bold: (text) => (0, node_util_1.styleText)("bold", text),
|
|
@@ -11,6 +12,7 @@ exports.color = {
|
|
|
11
12
|
inverse: (text) => (0, node_util_1.styleText)("inverse", text),
|
|
12
13
|
hidden: (text) => (0, node_util_1.styleText)("hidden", text),
|
|
13
14
|
strikethrough: (text) => (0, node_util_1.styleText)("strikethrough", text),
|
|
15
|
+
// Text colors
|
|
14
16
|
black: (text) => (0, node_util_1.styleText)("black", text),
|
|
15
17
|
red: (text) => (0, node_util_1.styleText)("red", text),
|
|
16
18
|
blue: (text) => (0, node_util_1.styleText)("blue", text),
|
|
@@ -21,6 +23,7 @@ exports.color = {
|
|
|
21
23
|
yellow: (text) => (0, node_util_1.styleText)("yellow", text),
|
|
22
24
|
green: (text) => (0, node_util_1.styleText)("green", text),
|
|
23
25
|
grey: (text) => (0, node_util_1.styleText)("grey", text),
|
|
26
|
+
// Background colors
|
|
24
27
|
bgBlack: (text) => (0, node_util_1.styleText)("bgBlack", text),
|
|
25
28
|
bgBlackBright: (text) => (0, node_util_1.styleText)("bgBlackBright", text),
|
|
26
29
|
bgRed: (text) => (0, node_util_1.styleText)("bgRed", text),
|
|
@@ -39,3 +42,4 @@ exports.color = {
|
|
|
39
42
|
};
|
|
40
43
|
const stripColors = (text) => (0, node_util_1.stripVTControlCharacters)(text);
|
|
41
44
|
exports.stripColors = stripColors;
|
|
45
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -52,7 +52,9 @@ class PublishIOS {
|
|
|
52
52
|
this.$options.release = true;
|
|
53
53
|
if (!ipaFilePath) {
|
|
54
54
|
const platform = this.$devicePlatformsConstants.iOS.toLowerCase();
|
|
55
|
+
// No .ipa path provided, build .ipa on out own.
|
|
55
56
|
if (mobileProvisionIdentifier) {
|
|
57
|
+
// This is not very correct as if we build multiple targets we will try to sign all of them using the signing identity here.
|
|
56
58
|
this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
|
|
57
59
|
mobileProvisionIdentifier);
|
|
58
60
|
this.$options.provision = mobileProvisionIdentifier;
|
|
@@ -88,3 +90,4 @@ class PublishIOS {
|
|
|
88
90
|
}
|
|
89
91
|
exports.PublishIOS = PublishIOS;
|
|
90
92
|
yok_1.injector.registerCommand(["publish|ios", "appstore|upload"], PublishIOS);
|
|
93
|
+
//# sourceMappingURL=appstore-upload.js.map
|
package/lib/commands/build.js
CHANGED
|
@@ -15,11 +15,11 @@ class BuildCommandBase extends command_base_1.ValidatePlatformCommandBase {
|
|
|
15
15
|
this.$logger = $logger;
|
|
16
16
|
this.dashedOptions = {
|
|
17
17
|
watch: {
|
|
18
|
-
type: "boolean"
|
|
18
|
+
type: "boolean" /* OptionType.Boolean */,
|
|
19
19
|
default: false,
|
|
20
20
|
hasSensitiveValue: false,
|
|
21
21
|
},
|
|
22
|
-
hmr: { type: "boolean"
|
|
22
|
+
hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
|
|
23
23
|
};
|
|
24
24
|
this.$projectData.initializeProjectData();
|
|
25
25
|
}
|
|
@@ -143,3 +143,4 @@ class BuildVisionOsCommand extends BuildIosCommand {
|
|
|
143
143
|
exports.BuildVisionOsCommand = BuildVisionOsCommand;
|
|
144
144
|
yok_1.injector.registerCommand("build|vision", BuildVisionOsCommand);
|
|
145
145
|
yok_1.injector.registerCommand("build|visionos", BuildVisionOsCommand);
|
|
146
|
+
//# sourceMappingURL=build.js.map
|
package/lib/commands/clean.js
CHANGED
|
@@ -17,6 +17,18 @@ function bytesToHumanReadable(bytes) {
|
|
|
17
17
|
}
|
|
18
18
|
return `${bytes.toFixed(2)} ${units[unit]}`;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* A helper function to map an array of values to promises with a concurrency limit.
|
|
22
|
+
* The mapper function should return a promise. It will be called for each value in the values array.
|
|
23
|
+
* The concurrency limit is the number of promises that can be running at the same time.
|
|
24
|
+
*
|
|
25
|
+
* This function will return a promise that resolves when all values have been mapped.
|
|
26
|
+
*
|
|
27
|
+
* @param values A static array of values to map to promises
|
|
28
|
+
* @param mapper A function that maps a value to a promise
|
|
29
|
+
* @param concurrency The number of promises that can be running at the same time
|
|
30
|
+
* @returns Promise<void>
|
|
31
|
+
*/
|
|
20
32
|
function promiseMap(values, mapper, concurrency = 10) {
|
|
21
33
|
let index = 0;
|
|
22
34
|
let pending = 0;
|
|
@@ -73,6 +85,7 @@ class CleanCommand {
|
|
|
73
85
|
try {
|
|
74
86
|
const overridePathsToClean = this.$projectConfigService.getValue("cli.pathsToClean");
|
|
75
87
|
const additionalPaths = this.$projectConfigService.getValue("cli.additionalPathsToClean");
|
|
88
|
+
// allow overriding default paths to clean
|
|
76
89
|
if (Array.isArray(overridePathsToClean)) {
|
|
77
90
|
pathsToClean = overridePathsToClean;
|
|
78
91
|
}
|
|
@@ -81,6 +94,7 @@ class CleanCommand {
|
|
|
81
94
|
}
|
|
82
95
|
}
|
|
83
96
|
catch (err) {
|
|
97
|
+
// ignore
|
|
84
98
|
}
|
|
85
99
|
const res = await this.$projectCleanupService.clean(pathsToClean, {
|
|
86
100
|
dryRun: isDryRun,
|
|
@@ -104,6 +118,7 @@ class CleanCommand {
|
|
|
104
118
|
}
|
|
105
119
|
async cleanMultipleProjects(spinner) {
|
|
106
120
|
if (!(0, helpers_1.isInteractive)() || this.$options.json) {
|
|
121
|
+
// interactive terminal is required, and we can't output json in an interactive command.
|
|
107
122
|
this.$logger.warn("No project found in the current directory.");
|
|
108
123
|
return;
|
|
109
124
|
}
|
|
@@ -119,6 +134,7 @@ class CleanCommand {
|
|
|
119
134
|
const current = color_1.color.grey(`${computed}/${paths.length}`);
|
|
120
135
|
spinner.start(`Gathering cleanable sizes. This may take a while... ${current}`);
|
|
121
136
|
};
|
|
137
|
+
// update the progress initially
|
|
122
138
|
updateProgress();
|
|
123
139
|
const projects = new Map();
|
|
124
140
|
await promiseMap(paths, (p) => {
|
|
@@ -136,8 +152,10 @@ class CleanCommand {
|
|
|
136
152
|
})
|
|
137
153
|
.then((size) => {
|
|
138
154
|
if (size > 0 || size === -1) {
|
|
155
|
+
// only store size if it's larger than 0 or -1 (error while getting size)
|
|
139
156
|
projects.set(p, size);
|
|
140
157
|
}
|
|
158
|
+
// update the progress after each processed project
|
|
141
159
|
computed++;
|
|
142
160
|
updateProgress();
|
|
143
161
|
});
|
|
@@ -162,7 +180,7 @@ class CleanCommand {
|
|
|
162
180
|
value: p,
|
|
163
181
|
};
|
|
164
182
|
}), true, {
|
|
165
|
-
optionsPerPage: process.stdout.rows - 6,
|
|
183
|
+
optionsPerPage: process.stdout.rows - 6, // 6 lines are taken up by the instructions
|
|
166
184
|
});
|
|
167
185
|
this.$logger.clearScreen();
|
|
168
186
|
spinner.warn(`This will run "${color_1.color.yellow(`ns clean`)}" in all the selected projects and ${color_1.color.styleText(["red", "bold"], "delete files from your system")}!`);
|
|
@@ -209,6 +227,7 @@ class CleanCommand {
|
|
|
209
227
|
let nsDirs = [];
|
|
210
228
|
const getFiles = async (dir) => {
|
|
211
229
|
if (dir.includes("node_modules")) {
|
|
230
|
+
// skip traversing node_modules
|
|
212
231
|
return;
|
|
213
232
|
}
|
|
214
233
|
const dirents = await (0, promises_1.readdir)(dir, { withFileTypes: true }).catch((err) => {
|
|
@@ -219,6 +238,7 @@ class CleanCommand {
|
|
|
219
238
|
ent.name.includes("nativescript.config.js"));
|
|
220
239
|
if (hasNSConfig) {
|
|
221
240
|
nsDirs.push(dir);
|
|
241
|
+
// found a NativeScript project, stop traversing
|
|
222
242
|
return;
|
|
223
243
|
}
|
|
224
244
|
await Promise.all(dirents.map((dirent) => {
|
|
@@ -234,3 +254,4 @@ class CleanCommand {
|
|
|
234
254
|
}
|
|
235
255
|
exports.CleanCommand = CleanCommand;
|
|
236
256
|
yok_1.injector.registerCommand("clean", CleanCommand);
|
|
257
|
+
//# sourceMappingURL=clean.js.map
|
package/lib/commands/config.js
CHANGED
|
@@ -25,6 +25,7 @@ class ConfigListCommand {
|
|
|
25
25
|
Object.keys(value)
|
|
26
26
|
.map((key) => {
|
|
27
27
|
return (color_1.color.green(`${indent()}${key}: `) +
|
|
28
|
+
// @ts-ignore
|
|
28
29
|
this.getValueString(value[key], depth + 1));
|
|
29
30
|
})
|
|
30
31
|
.join("\n"));
|
|
@@ -49,6 +50,7 @@ class ConfigGetCommand {
|
|
|
49
50
|
this.$logger.info(current);
|
|
50
51
|
}
|
|
51
52
|
catch (err) {
|
|
53
|
+
// ignore
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
async canExecute(args) {
|
|
@@ -75,6 +77,7 @@ class ConfigSetCommand {
|
|
|
75
77
|
const convertedValue = this.getConvertedValue(value);
|
|
76
78
|
const existingKey = current !== undefined;
|
|
77
79
|
const keyDisplay = color_1.color.green(key);
|
|
80
|
+
// when current is undefined, return empty string to avoid throw
|
|
78
81
|
const currentDisplay = current ? color_1.color.yellow(current) : "";
|
|
79
82
|
const updatedDisplay = color_1.color.cyan(convertedValue);
|
|
80
83
|
this.$logger.info(`${existingKey ? "Updating" : "Setting"} ${keyDisplay}${existingKey ? ` from ${currentDisplay} ` : " "}to ${updatedDisplay}`);
|
|
@@ -100,6 +103,7 @@ class ConfigSetCommand {
|
|
|
100
103
|
return JSON.parse(v);
|
|
101
104
|
}
|
|
102
105
|
catch (e) {
|
|
106
|
+
// just treat it as a string
|
|
103
107
|
return `${v}`;
|
|
104
108
|
}
|
|
105
109
|
}
|
|
@@ -108,3 +112,4 @@ exports.ConfigSetCommand = ConfigSetCommand;
|
|
|
108
112
|
yok_1.injector.registerCommand("config|*list", ConfigListCommand);
|
|
109
113
|
yok_1.injector.registerCommand("config|get", ConfigGetCommand);
|
|
110
114
|
yok_1.injector.registerCommand("config|set", ConfigSetCommand);
|
|
115
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -105,6 +105,7 @@ class CreateProjectCommand {
|
|
|
105
105
|
template: selectedTemplate,
|
|
106
106
|
appId: this.$options.appid,
|
|
107
107
|
pathToProject: this.$options.path,
|
|
108
|
+
// its already validated above
|
|
108
109
|
force: true,
|
|
109
110
|
ignoreScripts: this.$options.ignoreScripts,
|
|
110
111
|
});
|
|
@@ -399,6 +400,10 @@ can skip this prompt next time using the --template option, or using --ng, --rea
|
|
|
399
400
|
`For more options consult the docs or run ${color_1.color.green("ns --help")}`,
|
|
400
401
|
"",
|
|
401
402
|
].join("\n"));
|
|
403
|
+
// todo: add back ns preview
|
|
404
|
+
// this.$logger.printMarkdown(
|
|
405
|
+
// `After that you can preview it on device by executing \`$ ns preview\``
|
|
406
|
+
// );
|
|
402
407
|
}
|
|
403
408
|
}
|
|
404
409
|
exports.CreateProjectCommand = CreateProjectCommand;
|
|
@@ -415,3 +420,4 @@ CreateProjectCommand.DrawerTemplateDescription = "An app with pre-built pages th
|
|
|
415
420
|
CreateProjectCommand.TabsTemplateKey = "Tabs";
|
|
416
421
|
CreateProjectCommand.TabsTemplateDescription = "An app with pre-built pages that uses tabs for navigation";
|
|
417
422
|
yok_1.injector.registerCommand("create", CreateProjectCommand);
|
|
423
|
+
//# sourceMappingURL=create-project.js.map
|
package/lib/commands/debug.js
CHANGED
|
@@ -90,6 +90,10 @@ class DebugIOSCommand {
|
|
|
90
90
|
this.allowedParameters = [];
|
|
91
91
|
this.platform = this.$devicePlatformsConstants.iOS;
|
|
92
92
|
this.$projectData.initializeProjectData();
|
|
93
|
+
// 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.
|
|
94
|
+
// 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.
|
|
95
|
+
// That's why the `$ ns debug ios --justlaunch` command will not release the terminal.
|
|
96
|
+
// 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.
|
|
93
97
|
$iosDeviceOperations.setShouldDispose(false);
|
|
94
98
|
$iOSSimulatorLogProvider.setShouldDispose(false);
|
|
95
99
|
}
|
|
@@ -107,7 +111,7 @@ class DebugIOSCommand {
|
|
|
107
111
|
if (this.$options.inspector) {
|
|
108
112
|
const macOSWarning = await this.$sysInfo.getMacOSWarningMessage();
|
|
109
113
|
if (macOSWarning &&
|
|
110
|
-
macOSWarning.severity === "high") {
|
|
114
|
+
macOSWarning.severity === "high" /* SystemWarningsSeverity.high */) {
|
|
111
115
|
this.$errors.fail(`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`);
|
|
112
116
|
}
|
|
113
117
|
}
|
|
@@ -167,3 +171,4 @@ __decorate([
|
|
|
167
171
|
(0, decorators_1.cache)()
|
|
168
172
|
], DebugAndroidCommand.prototype, "debugPlatformCommand", null);
|
|
169
173
|
yok_1.injector.registerCommand("debug|android", DebugAndroidCommand);
|
|
174
|
+
//# sourceMappingURL=debug.js.map
|
package/lib/commands/deploy.js
CHANGED
|
@@ -16,11 +16,11 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
16
16
|
this.allowedParameters = [];
|
|
17
17
|
this.dashedOptions = {
|
|
18
18
|
watch: {
|
|
19
|
-
type: "boolean"
|
|
19
|
+
type: "boolean" /* OptionType.Boolean */,
|
|
20
20
|
default: false,
|
|
21
21
|
hasSensitiveValue: false,
|
|
22
22
|
},
|
|
23
|
-
hmr: { type: "boolean"
|
|
23
|
+
hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
|
|
24
24
|
};
|
|
25
25
|
this.$projectData.initializeProjectData();
|
|
26
26
|
}
|
|
@@ -60,3 +60,4 @@ class DeployOnDeviceCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
60
60
|
}
|
|
61
61
|
exports.DeployOnDeviceCommand = DeployOnDeviceCommand;
|
|
62
62
|
yok_1.injector.registerCommand("deploy", DeployOnDeviceCommand);
|
|
63
|
+
//# sourceMappingURL=deploy.js.map
|
|
@@ -22,6 +22,7 @@ class EmbedCommand extends prepare_1.PrepareCommand {
|
|
|
22
22
|
}
|
|
23
23
|
resolveHostProjectPath(hostProjectPath) {
|
|
24
24
|
if (hostProjectPath.charAt(0) === ".") {
|
|
25
|
+
// resolve relative to the project dir
|
|
25
26
|
const projectDir = this.$projectData.projectDir;
|
|
26
27
|
return (0, path_1.resolve)(projectDir, hostProjectPath);
|
|
27
28
|
}
|
|
@@ -45,7 +46,11 @@ class EmbedCommand extends prepare_1.PrepareCommand {
|
|
|
45
46
|
if (!canSuperExecute) {
|
|
46
47
|
return false;
|
|
47
48
|
}
|
|
49
|
+
// args[0] is the platform
|
|
50
|
+
// args[1] is the path to the host project
|
|
51
|
+
// args[2] is the host project module name
|
|
48
52
|
const platform = args[0].toLowerCase();
|
|
53
|
+
// also allow these to be set in the nativescript.config.ts
|
|
49
54
|
if (!args[1]) {
|
|
50
55
|
const hostProjectPath = this.getEmbedConfigForKey("hostProjectPath", platform);
|
|
51
56
|
if (hostProjectPath) {
|
|
@@ -65,8 +70,10 @@ class EmbedCommand extends prepare_1.PrepareCommand {
|
|
|
65
70
|
return true;
|
|
66
71
|
}
|
|
67
72
|
getEmbedConfigForKey(key, platform) {
|
|
73
|
+
// get the embed.<platform>.<key> value, or fallback to embed.<key> value
|
|
68
74
|
return this.$projectConfigService.getValue(`embed.${platform}.${key}`, this.$projectConfigService.getValue(`embed.${key}`));
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
77
|
exports.EmbedCommand = EmbedCommand;
|
|
72
78
|
yok_1.injector.registerCommand("embed", EmbedCommand);
|
|
79
|
+
//# sourceMappingURL=embed.js.map
|
package/lib/commands/fonts.js
CHANGED
|
@@ -54,3 +54,4 @@ class GenerateSplashScreensCommand extends GenerateCommandBase {
|
|
|
54
54
|
}
|
|
55
55
|
exports.GenerateSplashScreensCommand = GenerateSplashScreensCommand;
|
|
56
56
|
yok_1.injector.registerCommand("resources|generate|splashes", GenerateSplashScreensCommand);
|
|
57
|
+
//# sourceMappingURL=generate-assets.js.map
|
package/lib/commands/generate.js
CHANGED
|
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GenerateCommand = void 0;
|
|
4
4
|
const yok_1 = require("../common/yok");
|
|
5
5
|
class GenerateCommand {
|
|
6
|
-
|
|
6
|
+
// private executionOptions: ExecutionOptions;
|
|
7
|
+
constructor($logger,
|
|
8
|
+
// private $options: IOptions,
|
|
9
|
+
$errors) {
|
|
7
10
|
this.$logger = $logger;
|
|
8
11
|
this.$errors = $errors;
|
|
9
12
|
this.allowedParameters = [];
|
|
@@ -11,6 +14,7 @@ class GenerateCommand {
|
|
|
11
14
|
async execute(_rawArgs) {
|
|
12
15
|
try {
|
|
13
16
|
this.$logger.info("If you have ideas for this command, please discuss at https://nativescript.org/discord");
|
|
17
|
+
// await run(this.executionOptions);
|
|
14
18
|
}
|
|
15
19
|
catch (error) {
|
|
16
20
|
this.$errors.fail(error.message);
|
|
@@ -22,9 +26,52 @@ class GenerateCommand {
|
|
|
22
26
|
return true;
|
|
23
27
|
}
|
|
24
28
|
validateExecutionOptions() {
|
|
29
|
+
// if (!this.executionOptions.schematic) {
|
|
30
|
+
// this.$errors.failWithHelp(
|
|
31
|
+
// `The generate command requires a schematic name to be specified.`
|
|
32
|
+
// );
|
|
33
|
+
// }
|
|
25
34
|
}
|
|
26
35
|
setExecutionOptions(rawArgs) {
|
|
36
|
+
// const options = this.parseRawArgs(rawArgs);
|
|
37
|
+
// this.executionOptions = {
|
|
38
|
+
// ...options,
|
|
39
|
+
// logger: this.$logger,
|
|
40
|
+
// directory: process.cwd(),
|
|
41
|
+
// };
|
|
27
42
|
}
|
|
28
43
|
}
|
|
29
44
|
exports.GenerateCommand = GenerateCommand;
|
|
45
|
+
/**
|
|
46
|
+
* Converts an array of command line arguments to options for the executed schematic.
|
|
47
|
+
* @param rawArgs The command line arguments. They should be in the format 'key=value' for strings or 'key' for booleans.
|
|
48
|
+
*/
|
|
49
|
+
// function parseSchematicSettings(rawArgs: string[]) {
|
|
50
|
+
// const [optionStrings, args] = partition<string>(rawArgs, (item) =>
|
|
51
|
+
// item.includes("=")
|
|
52
|
+
// );
|
|
53
|
+
// const options = optionStrings
|
|
54
|
+
// .map((o) => o.split("=")) // split to key and value pairs
|
|
55
|
+
// .map(([key, ...value]) => [key, value.join("=")]) // concat the value arrays if there are multiple = signs
|
|
56
|
+
// .reduce((obj, [key, value]) => {
|
|
57
|
+
// return { ...obj, [key]: value };
|
|
58
|
+
// }, {});
|
|
59
|
+
// return { options, args };
|
|
60
|
+
// }
|
|
61
|
+
/**
|
|
62
|
+
* Splits an array into two groups based on a predicate.
|
|
63
|
+
* @param array The array to split.
|
|
64
|
+
* @param predicate The condition to be used for splitting.
|
|
65
|
+
*/
|
|
66
|
+
// function partition<T>(array: T[], predicate: (item: T) => boolean): T[][] {
|
|
67
|
+
// return array.reduce(
|
|
68
|
+
// ([pass, fail], item) => {
|
|
69
|
+
// return predicate(item)
|
|
70
|
+
// ? [[...pass, item], fail]
|
|
71
|
+
// : [pass, [...fail, item]];
|
|
72
|
+
// },
|
|
73
|
+
// [[], []]
|
|
74
|
+
// );
|
|
75
|
+
// }
|
|
30
76
|
yok_1.injector.registerCommand("generate", GenerateCommand);
|
|
77
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -24,7 +24,7 @@ class HooksVerify {
|
|
|
24
24
|
catch (err) {
|
|
25
25
|
this.$errors.fail(`❌ Failed to read or parse ${exports.LOCK_FILE_NAME} at ${hooksLockPath}`);
|
|
26
26
|
}
|
|
27
|
-
const lockMap = new Map();
|
|
27
|
+
const lockMap = new Map(); // pluginName -> hookType -> hash
|
|
28
28
|
for (const plugin of hooksLock) {
|
|
29
29
|
const hookMap = new Map();
|
|
30
30
|
for (const hook of plugin.hooks) {
|
|
@@ -77,3 +77,4 @@ class HooksVerify {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
exports.HooksVerify = HooksVerify;
|
|
80
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -98,3 +98,4 @@ class HooksVerifyPluginCommand extends common_1.HooksVerify {
|
|
|
98
98
|
exports.HooksVerifyPluginCommand = HooksVerifyPluginCommand;
|
|
99
99
|
yok_1.injector.registerCommand(["hooks|lock"], HooksLockPluginCommand);
|
|
100
100
|
yok_1.injector.registerCommand(["hooks|verify"], HooksVerifyPluginCommand);
|
|
101
|
+
//# sourceMappingURL=hooks-lock.js.map
|
|
@@ -69,3 +69,4 @@ class HooksListPluginCommand extends HooksPluginCommand {
|
|
|
69
69
|
exports.HooksListPluginCommand = HooksListPluginCommand;
|
|
70
70
|
yok_1.injector.registerCommand(["hooks|install"], HooksPluginCommand);
|
|
71
71
|
yok_1.injector.registerCommand(["hooks|*list"], HooksListPluginCommand);
|
|
72
|
+
//# sourceMappingURL=hooks.js.map
|
package/lib/commands/info.js
CHANGED
package/lib/commands/install.js
CHANGED
package/lib/commands/migrate.js
CHANGED