nativescript 9.0.3 → 9.0.4-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -14
- package/lib/color.js +0 -4
- 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 -3
- 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 -5
- 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/embedding/embed.js +0 -7
- 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 +1 -48
- package/lib/commands/hooks/common.js +1 -2
- package/lib/commands/hooks/hooks-lock.js +0 -1
- package/lib/commands/hooks/hooks.js +0 -1
- 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/native-add.js +0 -5
- 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 +3 -4
- 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 +1 -2
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.js +0 -2
- package/lib/commands/widget.js +1 -20
- 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 +1 -6
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +0 -13
- 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 +4 -90
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +4 -17
- 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 -11
- 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 +119 -144
- 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 +0 -3
- 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 +2 -31
- 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/apple-portal/srp/srp-wrapper.js +1 -4
- package/lib/services/assets-generation/assets-generation-service.js +5 -10
- 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/bundler/bundler-compiler-service.js +1 -68
- package/lib/services/bundler/bundler.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 +10 -7
- package/lib/services/ios/spm-service.js +0 -18
- package/lib/services/ios/xcodebuild-args-service.js +0 -11
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +1 -2
- 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 +3 -2
- 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 +11 -105
- 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 -49
- 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 -20
- 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 -14
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +2 -21
- 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 -3
- 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/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
|
@@ -74,8 +74,6 @@ 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)
|
|
79
77
|
this.$logger.trace(`Error while executing '${path.join(doctor_1.androidToolsInfo.androidHome, "platform-tools", "adb")} help'. Error is: ${err.message}`);
|
|
80
78
|
}
|
|
81
79
|
return null;
|
|
@@ -89,14 +87,6 @@ class AndroidToolsInfo {
|
|
|
89
87
|
shouldGenerateTypings() {
|
|
90
88
|
return this.$options.androidTypings;
|
|
91
89
|
}
|
|
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
|
-
*/
|
|
100
90
|
printMessage(msg, showWarningsAsErrors) {
|
|
101
91
|
if (showWarningsAsErrors) {
|
|
102
92
|
this.$errors.fail(msg);
|
|
@@ -116,7 +106,6 @@ class AndroidToolsInfo {
|
|
|
116
106
|
}
|
|
117
107
|
return latestCompileSdk;
|
|
118
108
|
}
|
|
119
|
-
// TODO check if still needed
|
|
120
109
|
getTargetSdk(compileSdk) {
|
|
121
110
|
const targetSdk = this.$options.sdk
|
|
122
111
|
? parseInt(this.$options.sdk)
|
|
@@ -133,4 +122,3 @@ __decorate([
|
|
|
133
122
|
(0, decorators_1.cache)()
|
|
134
123
|
], AndroidToolsInfo.prototype, "validateAndroidHomeEnvVariable", null);
|
|
135
124
|
yok_1.injector.register("androidToolsInfo", AndroidToolsInfo);
|
|
136
|
-
//# sourceMappingURL=android-tools-info.js.map
|
|
@@ -18,8 +18,6 @@ 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)
|
|
23
21
|
const packageNameRegex = new RegExp(packageName, "i");
|
|
24
22
|
const isProperResult = packageNameRegex.test(viewResult);
|
|
25
23
|
return isProperResult;
|
|
@@ -29,8 +27,6 @@ class BasePackageManager {
|
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
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
|
|
34
30
|
const lastIndexOfAtSign = fullPackageName.lastIndexOf("@");
|
|
35
31
|
let version = "";
|
|
36
32
|
let templateName = "";
|
|
@@ -63,8 +59,6 @@ class BasePackageManager {
|
|
|
63
59
|
stdio: stdioValue,
|
|
64
60
|
shell: this.$hostInfo.isWindows,
|
|
65
61
|
});
|
|
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.
|
|
68
62
|
const { isInstallingAllDependencies } = opts;
|
|
69
63
|
if (isInstallingAllDependencies) {
|
|
70
64
|
return null;
|
|
@@ -116,4 +110,3 @@ class BasePackageManager {
|
|
|
116
110
|
}
|
|
117
111
|
}
|
|
118
112
|
exports.BasePackageManager = BasePackageManager;
|
|
119
|
-
//# 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");
|
|
@@ -100,8 +99,6 @@ yok_1.injector.requireCommand("dev-test|android", "./commands/test");
|
|
|
100
99
|
yok_1.injector.requireCommand("dev-test|ios", "./commands/test");
|
|
101
100
|
yok_1.injector.requireCommand("test|android", "./commands/test");
|
|
102
101
|
yok_1.injector.requireCommand("test|ios", "./commands/test");
|
|
103
|
-
// injector.requireCommand("test|vision", "./commands/test");
|
|
104
|
-
// injector.requireCommand("test|visionos", "./commands/test");
|
|
105
102
|
yok_1.injector.requireCommand("test|init", "./commands/test-init");
|
|
106
103
|
yok_1.injector.requireCommand("dev-generate-help", "./commands/generate-help");
|
|
107
104
|
yok_1.injector.requireCommand("appstore|*list", "./commands/appstore-list");
|
|
@@ -154,7 +151,7 @@ yok_1.injector.require("LiveSyncSocket", "./services/livesync/livesync-socket");
|
|
|
154
151
|
yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/android-livesync-tool");
|
|
155
152
|
yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
|
|
156
153
|
yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
|
|
157
|
-
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
|
|
154
|
+
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service");
|
|
158
155
|
yok_1.injector.requirePublic("sysInfo", "./sys-info");
|
|
159
156
|
yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
|
|
160
157
|
yok_1.injector.require("appDebugSocketProxyFactory", "./device-sockets/ios/app-debug-socket-proxy-factory");
|
|
@@ -215,4 +212,3 @@ yok_1.injector.requireCommand([
|
|
|
215
212
|
], "./commands/native-add");
|
|
216
213
|
yok_1.injector.requireCommand(["widget", "widget|ios"], "./commands/widget");
|
|
217
214
|
require("./key-commands/bootstrap");
|
|
218
|
-
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -42,7 +42,6 @@ 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
|
|
46
45
|
this.$fs.writeJson(packageJsonPath, jsonContentBefore);
|
|
47
46
|
throw err;
|
|
48
47
|
}
|
|
@@ -53,9 +52,8 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
53
52
|
cwd,
|
|
54
53
|
});
|
|
55
54
|
}
|
|
56
|
-
// Bun does not have a `view` command; use npm.
|
|
57
55
|
async view(packageName, config) {
|
|
58
|
-
const wrappedConfig = _.extend({}, config, { json: true });
|
|
56
|
+
const wrappedConfig = _.extend({}, config, { json: true });
|
|
59
57
|
const flags = this.getFlagsString(wrappedConfig, false);
|
|
60
58
|
let viewResult;
|
|
61
59
|
try {
|
|
@@ -71,25 +69,15 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
71
69
|
return null;
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
|
-
// Bun does not have a `search` command; use npm.
|
|
75
72
|
async search(filter, config) {
|
|
76
73
|
const flags = this.getFlagsString(config, false);
|
|
77
74
|
return this.$childProcess.exec(`npm search ${filter.join(" ")} ${flags}`);
|
|
78
75
|
}
|
|
79
76
|
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>
|
|
86
77
|
const httpRequestResult = await this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
|
|
87
78
|
const result = JSON.parse(httpRequestResult.body);
|
|
88
79
|
return result;
|
|
89
80
|
}
|
|
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.
|
|
93
81
|
async getRegistryPackageData(packageName) {
|
|
94
82
|
const registry = await this.$childProcess.exec(`npm config get registry`);
|
|
95
83
|
const url = registry.trim() + packageName;
|
|
@@ -122,4 +110,3 @@ __decorate([
|
|
|
122
110
|
(0, decorators_1.cache)()
|
|
123
111
|
], BunPackageManager.prototype, "getCachePath", null);
|
|
124
112
|
yok_1.injector.register("bun", BunPackageManager);
|
|
125
|
-
//# sourceMappingURL=bun-package-manager.js.map
|
package/lib/color.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
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
|
|
6
5
|
exports.color = {
|
|
7
6
|
reset: (text) => (0, node_util_1.styleText)("reset", text),
|
|
8
7
|
bold: (text) => (0, node_util_1.styleText)("bold", text),
|
|
@@ -12,7 +11,6 @@ exports.color = {
|
|
|
12
11
|
inverse: (text) => (0, node_util_1.styleText)("inverse", text),
|
|
13
12
|
hidden: (text) => (0, node_util_1.styleText)("hidden", text),
|
|
14
13
|
strikethrough: (text) => (0, node_util_1.styleText)("strikethrough", text),
|
|
15
|
-
// Text colors
|
|
16
14
|
black: (text) => (0, node_util_1.styleText)("black", text),
|
|
17
15
|
red: (text) => (0, node_util_1.styleText)("red", text),
|
|
18
16
|
blue: (text) => (0, node_util_1.styleText)("blue", text),
|
|
@@ -23,7 +21,6 @@ exports.color = {
|
|
|
23
21
|
yellow: (text) => (0, node_util_1.styleText)("yellow", text),
|
|
24
22
|
green: (text) => (0, node_util_1.styleText)("green", text),
|
|
25
23
|
grey: (text) => (0, node_util_1.styleText)("grey", text),
|
|
26
|
-
// Background colors
|
|
27
24
|
bgBlack: (text) => (0, node_util_1.styleText)("bgBlack", text),
|
|
28
25
|
bgBlackBright: (text) => (0, node_util_1.styleText)("bgBlackBright", text),
|
|
29
26
|
bgRed: (text) => (0, node_util_1.styleText)("bgRed", text),
|
|
@@ -42,4 +39,3 @@ exports.color = {
|
|
|
42
39
|
};
|
|
43
40
|
const stripColors = (text) => (0, node_util_1.stripVTControlCharacters)(text);
|
|
44
41
|
exports.stripColors = stripColors;
|
|
45
|
-
//# sourceMappingURL=color.js.map
|
|
@@ -52,9 +52,7 @@ 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.
|
|
56
55
|
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.
|
|
58
56
|
this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
|
|
59
57
|
mobileProvisionIdentifier);
|
|
60
58
|
this.$options.provision = mobileProvisionIdentifier;
|
|
@@ -90,4 +88,3 @@ class PublishIOS {
|
|
|
90
88
|
}
|
|
91
89
|
exports.PublishIOS = PublishIOS;
|
|
92
90
|
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",
|
|
19
19
|
default: false,
|
|
20
20
|
hasSensitiveValue: false,
|
|
21
21
|
},
|
|
22
|
-
hmr: { type: "boolean"
|
|
22
|
+
hmr: { type: "boolean", default: false, hasSensitiveValue: false },
|
|
23
23
|
};
|
|
24
24
|
this.$projectData.initializeProjectData();
|
|
25
25
|
}
|
|
@@ -143,4 +143,3 @@ 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,18 +17,6 @@ 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
|
-
*/
|
|
32
20
|
function promiseMap(values, mapper, concurrency = 10) {
|
|
33
21
|
let index = 0;
|
|
34
22
|
let pending = 0;
|
|
@@ -85,7 +73,6 @@ class CleanCommand {
|
|
|
85
73
|
try {
|
|
86
74
|
const overridePathsToClean = this.$projectConfigService.getValue("cli.pathsToClean");
|
|
87
75
|
const additionalPaths = this.$projectConfigService.getValue("cli.additionalPathsToClean");
|
|
88
|
-
// allow overriding default paths to clean
|
|
89
76
|
if (Array.isArray(overridePathsToClean)) {
|
|
90
77
|
pathsToClean = overridePathsToClean;
|
|
91
78
|
}
|
|
@@ -94,7 +81,6 @@ class CleanCommand {
|
|
|
94
81
|
}
|
|
95
82
|
}
|
|
96
83
|
catch (err) {
|
|
97
|
-
// ignore
|
|
98
84
|
}
|
|
99
85
|
const res = await this.$projectCleanupService.clean(pathsToClean, {
|
|
100
86
|
dryRun: isDryRun,
|
|
@@ -118,7 +104,6 @@ class CleanCommand {
|
|
|
118
104
|
}
|
|
119
105
|
async cleanMultipleProjects(spinner) {
|
|
120
106
|
if (!(0, helpers_1.isInteractive)() || this.$options.json) {
|
|
121
|
-
// interactive terminal is required, and we can't output json in an interactive command.
|
|
122
107
|
this.$logger.warn("No project found in the current directory.");
|
|
123
108
|
return;
|
|
124
109
|
}
|
|
@@ -134,7 +119,6 @@ class CleanCommand {
|
|
|
134
119
|
const current = color_1.color.grey(`${computed}/${paths.length}`);
|
|
135
120
|
spinner.start(`Gathering cleanable sizes. This may take a while... ${current}`);
|
|
136
121
|
};
|
|
137
|
-
// update the progress initially
|
|
138
122
|
updateProgress();
|
|
139
123
|
const projects = new Map();
|
|
140
124
|
await promiseMap(paths, (p) => {
|
|
@@ -152,10 +136,8 @@ class CleanCommand {
|
|
|
152
136
|
})
|
|
153
137
|
.then((size) => {
|
|
154
138
|
if (size > 0 || size === -1) {
|
|
155
|
-
// only store size if it's larger than 0 or -1 (error while getting size)
|
|
156
139
|
projects.set(p, size);
|
|
157
140
|
}
|
|
158
|
-
// update the progress after each processed project
|
|
159
141
|
computed++;
|
|
160
142
|
updateProgress();
|
|
161
143
|
});
|
|
@@ -180,7 +162,7 @@ class CleanCommand {
|
|
|
180
162
|
value: p,
|
|
181
163
|
};
|
|
182
164
|
}), true, {
|
|
183
|
-
optionsPerPage: process.stdout.rows - 6,
|
|
165
|
+
optionsPerPage: process.stdout.rows - 6,
|
|
184
166
|
});
|
|
185
167
|
this.$logger.clearScreen();
|
|
186
168
|
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")}!`);
|
|
@@ -227,7 +209,6 @@ class CleanCommand {
|
|
|
227
209
|
let nsDirs = [];
|
|
228
210
|
const getFiles = async (dir) => {
|
|
229
211
|
if (dir.includes("node_modules")) {
|
|
230
|
-
// skip traversing node_modules
|
|
231
212
|
return;
|
|
232
213
|
}
|
|
233
214
|
const dirents = await (0, promises_1.readdir)(dir, { withFileTypes: true }).catch((err) => {
|
|
@@ -238,7 +219,6 @@ class CleanCommand {
|
|
|
238
219
|
ent.name.includes("nativescript.config.js"));
|
|
239
220
|
if (hasNSConfig) {
|
|
240
221
|
nsDirs.push(dir);
|
|
241
|
-
// found a NativeScript project, stop traversing
|
|
242
222
|
return;
|
|
243
223
|
}
|
|
244
224
|
await Promise.all(dirents.map((dirent) => {
|
|
@@ -254,4 +234,3 @@ class CleanCommand {
|
|
|
254
234
|
}
|
|
255
235
|
exports.CleanCommand = CleanCommand;
|
|
256
236
|
yok_1.injector.registerCommand("clean", CleanCommand);
|
|
257
|
-
//# sourceMappingURL=clean.js.map
|
package/lib/commands/config.js
CHANGED
|
@@ -25,7 +25,6 @@ class ConfigListCommand {
|
|
|
25
25
|
Object.keys(value)
|
|
26
26
|
.map((key) => {
|
|
27
27
|
return (color_1.color.green(`${indent()}${key}: `) +
|
|
28
|
-
// @ts-ignore
|
|
29
28
|
this.getValueString(value[key], depth + 1));
|
|
30
29
|
})
|
|
31
30
|
.join("\n"));
|
|
@@ -50,7 +49,6 @@ class ConfigGetCommand {
|
|
|
50
49
|
this.$logger.info(current);
|
|
51
50
|
}
|
|
52
51
|
catch (err) {
|
|
53
|
-
// ignore
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
async canExecute(args) {
|
|
@@ -77,7 +75,6 @@ class ConfigSetCommand {
|
|
|
77
75
|
const convertedValue = this.getConvertedValue(value);
|
|
78
76
|
const existingKey = current !== undefined;
|
|
79
77
|
const keyDisplay = color_1.color.green(key);
|
|
80
|
-
// when current is undefined, return empty string to avoid throw
|
|
81
78
|
const currentDisplay = current ? color_1.color.yellow(current) : "";
|
|
82
79
|
const updatedDisplay = color_1.color.cyan(convertedValue);
|
|
83
80
|
this.$logger.info(`${existingKey ? "Updating" : "Setting"} ${keyDisplay}${existingKey ? ` from ${currentDisplay} ` : " "}to ${updatedDisplay}`);
|
|
@@ -103,7 +100,6 @@ class ConfigSetCommand {
|
|
|
103
100
|
return JSON.parse(v);
|
|
104
101
|
}
|
|
105
102
|
catch (e) {
|
|
106
|
-
// just treat it as a string
|
|
107
103
|
return `${v}`;
|
|
108
104
|
}
|
|
109
105
|
}
|
|
@@ -112,4 +108,3 @@ exports.ConfigSetCommand = ConfigSetCommand;
|
|
|
112
108
|
yok_1.injector.registerCommand("config|*list", ConfigListCommand);
|
|
113
109
|
yok_1.injector.registerCommand("config|get", ConfigGetCommand);
|
|
114
110
|
yok_1.injector.registerCommand("config|set", ConfigSetCommand);
|
|
115
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -105,7 +105,6 @@ class CreateProjectCommand {
|
|
|
105
105
|
template: selectedTemplate,
|
|
106
106
|
appId: this.$options.appid,
|
|
107
107
|
pathToProject: this.$options.path,
|
|
108
|
-
// its already validated above
|
|
109
108
|
force: true,
|
|
110
109
|
ignoreScripts: this.$options.ignoreScripts,
|
|
111
110
|
});
|
|
@@ -400,10 +399,6 @@ can skip this prompt next time using the --template option, or using --ng, --rea
|
|
|
400
399
|
`For more options consult the docs or run ${color_1.color.green("ns --help")}`,
|
|
401
400
|
"",
|
|
402
401
|
].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
|
-
// );
|
|
407
402
|
}
|
|
408
403
|
}
|
|
409
404
|
exports.CreateProjectCommand = CreateProjectCommand;
|
|
@@ -420,4 +415,3 @@ CreateProjectCommand.DrawerTemplateDescription = "An app with pre-built pages th
|
|
|
420
415
|
CreateProjectCommand.TabsTemplateKey = "Tabs";
|
|
421
416
|
CreateProjectCommand.TabsTemplateDescription = "An app with pre-built pages that uses tabs for navigation";
|
|
422
417
|
yok_1.injector.registerCommand("create", CreateProjectCommand);
|
|
423
|
-
//# sourceMappingURL=create-project.js.map
|
package/lib/commands/debug.js
CHANGED
|
@@ -90,10 +90,6 @@ 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.
|
|
97
93
|
$iosDeviceOperations.setShouldDispose(false);
|
|
98
94
|
$iOSSimulatorLogProvider.setShouldDispose(false);
|
|
99
95
|
}
|
|
@@ -111,7 +107,7 @@ class DebugIOSCommand {
|
|
|
111
107
|
if (this.$options.inspector) {
|
|
112
108
|
const macOSWarning = await this.$sysInfo.getMacOSWarningMessage();
|
|
113
109
|
if (macOSWarning &&
|
|
114
|
-
macOSWarning.severity === "high"
|
|
110
|
+
macOSWarning.severity === "high") {
|
|
115
111
|
this.$errors.fail(`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`);
|
|
116
112
|
}
|
|
117
113
|
}
|
|
@@ -171,4 +167,3 @@ __decorate([
|
|
|
171
167
|
(0, decorators_1.cache)()
|
|
172
168
|
], DebugAndroidCommand.prototype, "debugPlatformCommand", null);
|
|
173
169
|
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",
|
|
20
20
|
default: false,
|
|
21
21
|
hasSensitiveValue: false,
|
|
22
22
|
},
|
|
23
|
-
hmr: { type: "boolean"
|
|
23
|
+
hmr: { type: "boolean", default: false, hasSensitiveValue: false },
|
|
24
24
|
};
|
|
25
25
|
this.$projectData.initializeProjectData();
|
|
26
26
|
}
|
|
@@ -60,4 +60,3 @@ 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,7 +22,6 @@ 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
|
|
26
25
|
const projectDir = this.$projectData.projectDir;
|
|
27
26
|
return (0, path_1.resolve)(projectDir, hostProjectPath);
|
|
28
27
|
}
|
|
@@ -46,11 +45,7 @@ class EmbedCommand extends prepare_1.PrepareCommand {
|
|
|
46
45
|
if (!canSuperExecute) {
|
|
47
46
|
return false;
|
|
48
47
|
}
|
|
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
|
|
52
48
|
const platform = args[0].toLowerCase();
|
|
53
|
-
// also allow these to be set in the nativescript.config.ts
|
|
54
49
|
if (!args[1]) {
|
|
55
50
|
const hostProjectPath = this.getEmbedConfigForKey("hostProjectPath", platform);
|
|
56
51
|
if (hostProjectPath) {
|
|
@@ -70,10 +65,8 @@ class EmbedCommand extends prepare_1.PrepareCommand {
|
|
|
70
65
|
return true;
|
|
71
66
|
}
|
|
72
67
|
getEmbedConfigForKey(key, platform) {
|
|
73
|
-
// get the embed.<platform>.<key> value, or fallback to embed.<key> value
|
|
74
68
|
return this.$projectConfigService.getValue(`embed.${platform}.${key}`, this.$projectConfigService.getValue(`embed.${key}`));
|
|
75
69
|
}
|
|
76
70
|
}
|
|
77
71
|
exports.EmbedCommand = EmbedCommand;
|
|
78
72
|
yok_1.injector.registerCommand("embed", EmbedCommand);
|
|
79
|
-
//# sourceMappingURL=embed.js.map
|
package/lib/commands/fonts.js
CHANGED
|
@@ -54,4 +54,3 @@ 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,10 +3,7 @@ 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
|
-
|
|
7
|
-
constructor($logger,
|
|
8
|
-
// private $options: IOptions,
|
|
9
|
-
$errors) {
|
|
6
|
+
constructor($logger, $errors) {
|
|
10
7
|
this.$logger = $logger;
|
|
11
8
|
this.$errors = $errors;
|
|
12
9
|
this.allowedParameters = [];
|
|
@@ -14,7 +11,6 @@ class GenerateCommand {
|
|
|
14
11
|
async execute(_rawArgs) {
|
|
15
12
|
try {
|
|
16
13
|
this.$logger.info("If you have ideas for this command, please discuss at https://nativescript.org/discord");
|
|
17
|
-
// await run(this.executionOptions);
|
|
18
14
|
}
|
|
19
15
|
catch (error) {
|
|
20
16
|
this.$errors.fail(error.message);
|
|
@@ -26,52 +22,9 @@ class GenerateCommand {
|
|
|
26
22
|
return true;
|
|
27
23
|
}
|
|
28
24
|
validateExecutionOptions() {
|
|
29
|
-
// if (!this.executionOptions.schematic) {
|
|
30
|
-
// this.$errors.failWithHelp(
|
|
31
|
-
// `The generate command requires a schematic name to be specified.`
|
|
32
|
-
// );
|
|
33
|
-
// }
|
|
34
25
|
}
|
|
35
26
|
setExecutionOptions(rawArgs) {
|
|
36
|
-
// const options = this.parseRawArgs(rawArgs);
|
|
37
|
-
// this.executionOptions = {
|
|
38
|
-
// ...options,
|
|
39
|
-
// logger: this.$logger,
|
|
40
|
-
// directory: process.cwd(),
|
|
41
|
-
// };
|
|
42
27
|
}
|
|
43
28
|
}
|
|
44
29
|
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
|
-
// }
|
|
76
30
|
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();
|
|
28
28
|
for (const plugin of hooksLock) {
|
|
29
29
|
const hookMap = new Map();
|
|
30
30
|
for (const hook of plugin.hooks) {
|
|
@@ -77,4 +77,3 @@ class HooksVerify {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
exports.HooksVerify = HooksVerify;
|
|
80
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -98,4 +98,3 @@ 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,4 +69,3 @@ 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