nativescript 9.1.0-alpha.15 → 9.1.0-alpha.16
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/docs/build-jekyll-md.sh +1 -1
- package/docs/man_pages/config/config-set.md +2 -0
- 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 +3 -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 +2 -6
- package/lib/commands/deploy.js +3 -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 +5 -5
- 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 +3 -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 +0 -18
- 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 +3 -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 +14 -12
- package/lib/common/declarations.d.ts +37 -117
- package/lib/common/decorators.js +0 -48
- package/lib/common/definitions/key-commands.js +8 -0
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/enums.js +42 -0
- package/lib/common/errors.js +4 -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 -9
- 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/analytics/google-analytics-custom-dimensions.js +13 -0
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +2 -2
- package/lib/common/services/commands-service.js +8 -17
- package/lib/common/services/help-service.js +4 -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 +2 -8
- package/lib/common/yok.js +12 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +54 -58
- 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 +2 -9
- package/lib/controllers/prepare-controller.js +8 -24
- package/lib/controllers/run-controller.js +1 -81
- 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/definitions/project.d.ts +1 -6
- package/lib/definitions/system-warnings.js +8 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +3 -8
- package/lib/detached-processes/cleanup-process.js +15 -18
- package/lib/detached-processes/detached-process-enums.js +24 -0
- package/lib/detached-processes/file-log-service.js +2 -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 +3 -4
- package/lib/helpers/livesync-command-helper.js +2 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +4 -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 +3 -3
- package/lib/key-commands/index.js +5 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +2 -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 +121 -145
- 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 +8 -10
- package/lib/services/analytics/analytics-broker.js +2 -2
- package/lib/services/analytics/analytics-service.js +29 -29
- package/lib/services/analytics/google-analytics-provider.js +16 -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 +13 -11
- 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 -144
- package/lib/services/bundler/bundler.js +0 -1
- package/lib/services/cleanup-service.js +10 -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 +2 -5
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.js +0 -4
- package/lib/services/ios/spm-service.js +0 -119
- package/lib/services/ios/xcodebuild-args-service.js +0 -29
- package/lib/services/ios/xcodebuild-command-service.js +0 -3
- 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 +0 -1
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.js +5 -6
- package/lib/services/ios-project-service.js +7 -133
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +10 -60
- 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 -55
- 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 +10 -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 +2 -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 +3 -5
- package/lib/services/platform-environment-requirements.js +4 -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 +3 -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 +5 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/xcconfig-service.js +45 -12
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +2 -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 +7 -18
- package/lib/.d.ts +0 -504
- package/lib/common/definitions/key-commands.d.ts +0 -62
- package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +0 -16
- package/lib/definitions/system-warnings.d.ts +0 -4
- package/lib/detached-processes/detached-process-enums.d.ts +0 -70
- package/lib/services/analytics/google-analytics-cross-client-custom-dimensions.d.ts +0 -6
package/lib/options.js
CHANGED
|
@@ -5,6 +5,7 @@ const helpers = require("./common/helpers");
|
|
|
5
5
|
const yargs = require("yargs");
|
|
6
6
|
const helpers_1 = require("yargs/helpers");
|
|
7
7
|
const _ = require("lodash");
|
|
8
|
+
const enums_1 = require("./common/enums");
|
|
8
9
|
const yok_1 = require("./common/yok");
|
|
9
10
|
const constants_1 = require("./constants");
|
|
10
11
|
class Options {
|
|
@@ -14,7 +15,6 @@ class Options {
|
|
|
14
15
|
this.setArgv();
|
|
15
16
|
}
|
|
16
17
|
this.argv.bundle = "webpack";
|
|
17
|
-
// Check if the user has explicitly provide --hmr and --release options from command line
|
|
18
18
|
if (this.initialArgv.release && this.initialArgv.hmr) {
|
|
19
19
|
this.$errors.fail("The options --release and --hmr cannot be used simultaneously.");
|
|
20
20
|
}
|
|
@@ -22,8 +22,6 @@ class Options {
|
|
|
22
22
|
this.argv.hmr = !this.argv.release;
|
|
23
23
|
}
|
|
24
24
|
if (this.argv.debugBrk) {
|
|
25
|
-
// we cannot use HMR along with debug-brk because we have to restart the app
|
|
26
|
-
// on each livesync in order to stop and allow debugging on app start
|
|
27
25
|
this.argv.hmr = false;
|
|
28
26
|
}
|
|
29
27
|
if (this.argv.justlaunch) {
|
|
@@ -41,18 +39,17 @@ class Options {
|
|
|
41
39
|
"timeout",
|
|
42
40
|
"_",
|
|
43
41
|
"$0",
|
|
44
|
-
];
|
|
42
|
+
];
|
|
45
43
|
this.globalOptions = {
|
|
46
|
-
log: { type:
|
|
47
|
-
verbose: { type:
|
|
48
|
-
version: { type:
|
|
49
|
-
help: { type:
|
|
50
|
-
profileDir: { type:
|
|
51
|
-
analyticsClient: { type:
|
|
52
|
-
path: { type:
|
|
53
|
-
config: { type:
|
|
54
|
-
|
|
55
|
-
_: { type: "string" /* OptionType.String */, hasSensitiveValue: false },
|
|
44
|
+
log: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
45
|
+
verbose: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
46
|
+
version: { type: enums_1.OptionType.Boolean, alias: "v", hasSensitiveValue: false },
|
|
47
|
+
help: { type: enums_1.OptionType.Boolean, alias: "h", hasSensitiveValue: false },
|
|
48
|
+
profileDir: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
49
|
+
analyticsClient: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
50
|
+
path: { type: enums_1.OptionType.String, alias: "p", hasSensitiveValue: true },
|
|
51
|
+
config: { type: enums_1.OptionType.String, alias: "c", hasSensitiveValue: true },
|
|
52
|
+
_: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
56
53
|
};
|
|
57
54
|
this.options = _.extend({}, this.commonOptions, this.globalOptions);
|
|
58
55
|
this.setArgv();
|
|
@@ -68,165 +65,164 @@ class Options {
|
|
|
68
65
|
}
|
|
69
66
|
get commonOptions() {
|
|
70
67
|
return {
|
|
71
|
-
ipa: { type:
|
|
72
|
-
frameworkPath: { type:
|
|
73
|
-
frameworkName: { type:
|
|
74
|
-
framework: { type:
|
|
75
|
-
frameworkVersion: { type:
|
|
76
|
-
forDevice: { type:
|
|
68
|
+
ipa: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
69
|
+
frameworkPath: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
70
|
+
frameworkName: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
71
|
+
framework: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
72
|
+
frameworkVersion: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
73
|
+
forDevice: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
77
74
|
iCloudContainerEnvironment: {
|
|
78
|
-
type:
|
|
75
|
+
type: enums_1.OptionType.String,
|
|
79
76
|
hasSensitiveValue: false,
|
|
80
77
|
},
|
|
81
|
-
provision: { type:
|
|
78
|
+
provision: { type: enums_1.OptionType.Object, hasSensitiveValue: true },
|
|
82
79
|
client: {
|
|
83
|
-
type:
|
|
80
|
+
type: enums_1.OptionType.Boolean,
|
|
84
81
|
default: true,
|
|
85
82
|
hasSensitiveValue: false,
|
|
86
83
|
},
|
|
87
|
-
env: { type:
|
|
88
|
-
production: { type:
|
|
89
|
-
debugTransport: { type:
|
|
90
|
-
keyStorePath: { type:
|
|
91
|
-
keyStorePassword: { type:
|
|
92
|
-
keyStoreAlias: { type:
|
|
84
|
+
env: { type: enums_1.OptionType.Object, hasSensitiveValue: false },
|
|
85
|
+
production: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
86
|
+
debugTransport: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
87
|
+
keyStorePath: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
88
|
+
keyStorePassword: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
89
|
+
keyStoreAlias: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
93
90
|
keyStoreAliasPassword: {
|
|
94
|
-
type:
|
|
91
|
+
type: enums_1.OptionType.String,
|
|
95
92
|
hasSensitiveValue: true,
|
|
96
93
|
},
|
|
97
|
-
ignoreScripts: { type:
|
|
98
|
-
disableNpmInstall: { type:
|
|
99
|
-
compileSdk: { type:
|
|
100
|
-
port: { type:
|
|
101
|
-
copyTo: { type:
|
|
102
|
-
js: { type:
|
|
103
|
-
javascript: { type:
|
|
104
|
-
ng: { type:
|
|
105
|
-
angular: { type:
|
|
106
|
-
react: { type:
|
|
107
|
-
reactjs: { type:
|
|
108
|
-
vue: { type:
|
|
109
|
-
vuejs: { type:
|
|
110
|
-
svelte: { type:
|
|
111
|
-
vision: { type:
|
|
112
|
-
"vision-ng": { type:
|
|
113
|
-
"vision-react": { type:
|
|
114
|
-
"vision-solid": { type:
|
|
115
|
-
"vision-svelte": { type:
|
|
116
|
-
"vision-vue": { type:
|
|
117
|
-
tsc: { type:
|
|
118
|
-
ts: { type:
|
|
119
|
-
typescript: { type:
|
|
120
|
-
yarn: { type:
|
|
121
|
-
yarn2: { type:
|
|
122
|
-
pnpm: { type:
|
|
123
|
-
androidTypings: { type:
|
|
124
|
-
bundle: { type:
|
|
125
|
-
all: { type:
|
|
126
|
-
teamId: { type:
|
|
127
|
-
chrome: { type:
|
|
128
|
-
inspector: { type:
|
|
129
|
-
clean: { type:
|
|
94
|
+
ignoreScripts: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
95
|
+
disableNpmInstall: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
96
|
+
compileSdk: { type: enums_1.OptionType.Number, hasSensitiveValue: false },
|
|
97
|
+
port: { type: enums_1.OptionType.Number, hasSensitiveValue: false },
|
|
98
|
+
copyTo: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
99
|
+
js: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
100
|
+
javascript: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
101
|
+
ng: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
102
|
+
angular: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
103
|
+
react: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
104
|
+
reactjs: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
105
|
+
vue: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
106
|
+
vuejs: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
107
|
+
svelte: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
108
|
+
vision: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
109
|
+
"vision-ng": { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
110
|
+
"vision-react": { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
111
|
+
"vision-solid": { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
112
|
+
"vision-svelte": { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
113
|
+
"vision-vue": { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
114
|
+
tsc: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
115
|
+
ts: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
116
|
+
typescript: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
117
|
+
yarn: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
118
|
+
yarn2: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
119
|
+
pnpm: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
120
|
+
androidTypings: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
121
|
+
bundle: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
122
|
+
all: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
123
|
+
teamId: { type: enums_1.OptionType.Object, hasSensitiveValue: true },
|
|
124
|
+
chrome: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
125
|
+
inspector: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
126
|
+
clean: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
130
127
|
watch: {
|
|
131
|
-
type:
|
|
128
|
+
type: enums_1.OptionType.Boolean,
|
|
132
129
|
default: true,
|
|
133
130
|
hasSensitiveValue: false,
|
|
134
131
|
},
|
|
135
|
-
background: { type:
|
|
136
|
-
username: { type:
|
|
137
|
-
pluginName: { type:
|
|
132
|
+
background: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
133
|
+
username: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
134
|
+
pluginName: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
138
135
|
includeTypeScriptDemo: {
|
|
139
|
-
type:
|
|
136
|
+
type: enums_1.OptionType.String,
|
|
140
137
|
hasSensitiveValue: false,
|
|
141
138
|
},
|
|
142
|
-
includeAngularDemo: { type:
|
|
139
|
+
includeAngularDemo: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
143
140
|
hmr: {
|
|
144
|
-
type:
|
|
141
|
+
type: enums_1.OptionType.Boolean,
|
|
145
142
|
hasSensitiveValue: false,
|
|
146
143
|
default: true,
|
|
147
144
|
},
|
|
148
145
|
collection: {
|
|
149
|
-
type:
|
|
146
|
+
type: enums_1.OptionType.String,
|
|
150
147
|
alias: "c",
|
|
151
148
|
hasSensitiveValue: false,
|
|
152
149
|
},
|
|
153
|
-
json: { type:
|
|
154
|
-
avd: { type:
|
|
155
|
-
|
|
156
|
-
config: { type: "array" /* OptionType.Array */, hasSensitiveValue: false },
|
|
150
|
+
json: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
151
|
+
avd: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
152
|
+
config: { type: enums_1.OptionType.Array, hasSensitiveValue: false },
|
|
157
153
|
insecure: {
|
|
158
|
-
type:
|
|
154
|
+
type: enums_1.OptionType.Boolean,
|
|
159
155
|
alias: "k",
|
|
160
156
|
hasSensitiveValue: false,
|
|
161
157
|
},
|
|
162
|
-
debug: { type:
|
|
163
|
-
timeout: { type:
|
|
164
|
-
device: { type:
|
|
165
|
-
availableDevices: { type:
|
|
166
|
-
appid: { type:
|
|
167
|
-
geny: { type:
|
|
168
|
-
debugBrk: { type:
|
|
169
|
-
debugPort: { type:
|
|
170
|
-
start: { type:
|
|
171
|
-
stop: { type:
|
|
172
|
-
ddi: { type:
|
|
173
|
-
justlaunch: { type:
|
|
174
|
-
file: { type:
|
|
175
|
-
force: { type:
|
|
176
|
-
emulator: { type:
|
|
177
|
-
simulator: { type:
|
|
178
|
-
sdk: { type:
|
|
179
|
-
template: { type:
|
|
180
|
-
certificate: { type:
|
|
181
|
-
certificatePassword: { type:
|
|
158
|
+
debug: { type: enums_1.OptionType.Boolean, alias: "d", hasSensitiveValue: false },
|
|
159
|
+
timeout: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
160
|
+
device: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
161
|
+
availableDevices: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
162
|
+
appid: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
163
|
+
geny: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
164
|
+
debugBrk: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
165
|
+
debugPort: { type: enums_1.OptionType.Number, hasSensitiveValue: false },
|
|
166
|
+
start: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
167
|
+
stop: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
168
|
+
ddi: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
169
|
+
justlaunch: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
170
|
+
file: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
171
|
+
force: { type: enums_1.OptionType.Boolean, alias: "f", hasSensitiveValue: false },
|
|
172
|
+
emulator: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
173
|
+
simulator: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
174
|
+
sdk: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
175
|
+
template: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
176
|
+
certificate: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
177
|
+
certificatePassword: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
182
178
|
release: {
|
|
183
|
-
type:
|
|
179
|
+
type: enums_1.OptionType.Boolean,
|
|
184
180
|
alias: "r",
|
|
185
181
|
hasSensitiveValue: false,
|
|
186
182
|
},
|
|
187
|
-
markingMode: { type:
|
|
188
|
-
var: { type:
|
|
189
|
-
default: { type:
|
|
190
|
-
count: { type:
|
|
191
|
-
analyticsLogFile: { type:
|
|
192
|
-
disableAnalytics: { type:
|
|
193
|
-
cleanupLogFile: { type:
|
|
183
|
+
markingMode: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
184
|
+
var: { type: enums_1.OptionType.Object, hasSensitiveValue: true },
|
|
185
|
+
default: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
186
|
+
count: { type: enums_1.OptionType.Number, hasSensitiveValue: false },
|
|
187
|
+
analyticsLogFile: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
188
|
+
disableAnalytics: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
189
|
+
cleanupLogFile: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
194
190
|
hooks: {
|
|
195
|
-
type:
|
|
191
|
+
type: enums_1.OptionType.Boolean,
|
|
196
192
|
default: true,
|
|
197
193
|
hasSensitiveValue: false,
|
|
198
194
|
},
|
|
199
195
|
link: {
|
|
200
|
-
type:
|
|
196
|
+
type: enums_1.OptionType.Boolean,
|
|
201
197
|
default: false,
|
|
202
198
|
hasSensitiveValue: false,
|
|
203
199
|
},
|
|
204
|
-
gradlePath: { type:
|
|
205
|
-
gradleArgs: { type:
|
|
206
|
-
hostProjectPath: { type:
|
|
200
|
+
gradlePath: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
201
|
+
gradleArgs: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
202
|
+
hostProjectPath: { type: enums_1.OptionType.String, hasSensitiveValue: false },
|
|
207
203
|
hostProjectModuleName: {
|
|
208
|
-
type:
|
|
204
|
+
type: enums_1.OptionType.String,
|
|
209
205
|
hasSensitiveValue: false,
|
|
210
206
|
default: constants_1.APP_FOLDER_NAME,
|
|
211
207
|
},
|
|
212
|
-
aab: { type:
|
|
213
|
-
performance: { type:
|
|
208
|
+
aab: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
209
|
+
performance: { type: enums_1.OptionType.Object, hasSensitiveValue: true },
|
|
214
210
|
appleApplicationSpecificPassword: {
|
|
215
|
-
type:
|
|
211
|
+
type: enums_1.OptionType.String,
|
|
216
212
|
hasSensitiveValue: true,
|
|
217
213
|
},
|
|
218
|
-
appleSessionBase64: { type:
|
|
219
|
-
jar: { type:
|
|
220
|
-
aar: { type:
|
|
221
|
-
filter: { type:
|
|
214
|
+
appleSessionBase64: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
215
|
+
jar: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
216
|
+
aar: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
217
|
+
filter: { type: enums_1.OptionType.String, hasSensitiveValue: true },
|
|
222
218
|
git: {
|
|
223
|
-
type:
|
|
219
|
+
type: enums_1.OptionType.Boolean,
|
|
224
220
|
hasSensitiveValue: false,
|
|
225
221
|
default: true,
|
|
226
222
|
},
|
|
227
|
-
dryRun: { type:
|
|
228
|
-
skipNative: { type:
|
|
229
|
-
uniqueBundle: { type:
|
|
223
|
+
dryRun: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
224
|
+
skipNative: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
225
|
+
uniqueBundle: { type: enums_1.OptionType.Boolean, hasSensitiveValue: false },
|
|
230
226
|
};
|
|
231
227
|
}
|
|
232
228
|
get optionNames() {
|
|
@@ -244,7 +240,6 @@ class Options {
|
|
|
244
240
|
parsed[optionName] = this.getOptionValue(optionName);
|
|
245
241
|
}
|
|
246
242
|
_.each(parsed, (value, originalOptionName) => {
|
|
247
|
-
// when this.options are passed to yargs, it returns all of them and the ones that are not part of process.argv are set to undefined.
|
|
248
243
|
if (value === undefined) {
|
|
249
244
|
return;
|
|
250
245
|
}
|
|
@@ -254,14 +249,14 @@ class Options {
|
|
|
254
249
|
this.$errors.failWithHelp(`The option '${originalOptionName}' is not supported.`);
|
|
255
250
|
}
|
|
256
251
|
const optionType = this.getOptionType(optionName), optionValue = parsed[optionName];
|
|
257
|
-
if (_.isArray(optionValue) && optionType !==
|
|
252
|
+
if (_.isArray(optionValue) && optionType !== enums_1.OptionType.Array) {
|
|
258
253
|
this.$errors.failWithHelp("The '%s' option requires a single value.", originalOptionName);
|
|
259
254
|
}
|
|
260
|
-
else if (optionType ===
|
|
255
|
+
else if (optionType === enums_1.OptionType.String &&
|
|
261
256
|
helpers.isNullOrWhitespace(optionValue)) {
|
|
262
257
|
this.$errors.failWithHelp("The option '%s' requires non-empty value.", originalOptionName);
|
|
263
258
|
}
|
|
264
|
-
else if (optionType ===
|
|
259
|
+
else if (optionType === enums_1.OptionType.Array &&
|
|
265
260
|
optionValue.length === 0) {
|
|
266
261
|
this.$errors.failWithHelp(`The option '${originalOptionName}' requires one or more values, separated by a space.`);
|
|
267
262
|
}
|
|
@@ -289,16 +284,9 @@ class Options {
|
|
|
289
284
|
}
|
|
290
285
|
return true;
|
|
291
286
|
}
|
|
292
|
-
// If you pass value with dash, yargs adds it to yargs.argv in two ways:
|
|
293
|
-
// with dash and without dash, replacing first symbol after it with its toUpper equivalent
|
|
294
|
-
// ex, "$ <cli name> emulate android --profile-dir" will add profile-dir to yargs.argv as profile-dir and profileDir
|
|
295
|
-
// IMPORTANT: In your code, it is better to use the value without dashes (profileDir in the example).
|
|
296
|
-
// This way your code will work in case "$ <cli name> emulate android --profile-dir" or "$ <cli name> emulate android --profileDir" is used by user.
|
|
297
287
|
getNonDashedOptionName(optionName) {
|
|
298
288
|
const matchUpperCaseLetters = optionName.match(Options.NONDASHED_OPTION_REGEX);
|
|
299
289
|
if (matchUpperCaseLetters) {
|
|
300
|
-
// get here if option with upperCase letter is specified, for example profileDir
|
|
301
|
-
// check if in knownOptions we have its kebabCase presentation
|
|
302
290
|
const secondaryOptionName = matchUpperCaseLetters[1] +
|
|
303
291
|
matchUpperCaseLetters[2].toUpperCase() +
|
|
304
292
|
matchUpperCaseLetters[3] || "";
|
|
@@ -327,18 +315,15 @@ class Options {
|
|
|
327
315
|
const args = argv._.slice(1);
|
|
328
316
|
const commands = yok_1.injector
|
|
329
317
|
.getRegisteredCommandsNames(false)
|
|
330
|
-
.filter((c) => c != "/?");
|
|
318
|
+
.filter((c) => c != "/?");
|
|
331
319
|
const currentDepth = args.length > 0 ? args.length - 1 : 0;
|
|
332
320
|
const current = (_a = current_ !== null && current_ !== void 0 ? current_ : args[currentDepth]) !== null && _a !== void 0 ? _a : "";
|
|
333
|
-
// split all commands into their components ie. "device|list" => ["device", "list"]
|
|
334
321
|
const matchGroups = commands.map((c) => c.split("|"));
|
|
335
|
-
// find all commands that match the current depth and all the previous args
|
|
336
322
|
const possibleMatches = matchGroups.filter((group) => {
|
|
337
323
|
return group.slice(0, currentDepth).every((g, i) => {
|
|
338
324
|
return g === args[i] || args[i].at(0) === "-";
|
|
339
325
|
});
|
|
340
326
|
});
|
|
341
|
-
// filter out duplicates
|
|
342
327
|
const completions = [
|
|
343
328
|
...new Set(possibleMatches
|
|
344
329
|
.map((match) => {
|
|
@@ -346,28 +331,21 @@ class Options {
|
|
|
346
331
|
})
|
|
347
332
|
.filter(Boolean)),
|
|
348
333
|
];
|
|
349
|
-
// autocomplete long -- options
|
|
350
334
|
if (current.startsWith("--")) {
|
|
351
335
|
return this.optionNames.filter((o) => o !== "_").map((o) => `--${o}`);
|
|
352
336
|
}
|
|
353
|
-
// autocomple short - options
|
|
354
337
|
if (current.startsWith("-")) {
|
|
355
338
|
return this.shorthands.map((o) => `-${o}`);
|
|
356
339
|
}
|
|
357
|
-
// autocomplete matched completions
|
|
358
340
|
return completions;
|
|
359
341
|
});
|
|
360
342
|
this.initialArgv = parsed.argv;
|
|
361
343
|
this.argv = parsed.options(opts).argv;
|
|
362
|
-
// For backwards compatibility
|
|
363
|
-
// Previously profileDir had a default option and calling `this.$options.profileDir` always returned valid result.
|
|
364
|
-
// Now the profileDir should be used from $settingsService, but ensure the `this.$options.profileDir` returns the same value.
|
|
365
344
|
this.$settingsService.setSettings({
|
|
366
345
|
profileDir: this.argv.profileDir,
|
|
367
346
|
});
|
|
368
347
|
this.argv.profileDir = this.argv["profile-dir"] =
|
|
369
348
|
this.$settingsService.getProfileDir();
|
|
370
|
-
// if justlaunch is set, it takes precedence over the --watch flag and the default true value
|
|
371
349
|
if (this.argv.justlaunch) {
|
|
372
350
|
this.argv.watch = false;
|
|
373
351
|
}
|
|
@@ -383,7 +361,6 @@ class Options {
|
|
|
383
361
|
if (this.argv.javascript) {
|
|
384
362
|
this.argv.js = true;
|
|
385
363
|
}
|
|
386
|
-
// alias --simulator to --emulator
|
|
387
364
|
if (this.argv.simulator) {
|
|
388
365
|
this.argv.emulator = this.argv.simulator;
|
|
389
366
|
}
|
|
@@ -408,4 +385,3 @@ exports.Options = Options;
|
|
|
408
385
|
Options.DASHED_OPTION_REGEX = /(.+?)([A-Z])(.*)/;
|
|
409
386
|
Options.NONDASHED_OPTION_REGEX = /(.+?)[-]([a-zA-Z])(.*)/;
|
|
410
387
|
yok_1.injector.register("options", Options);
|
|
411
|
-
//# sourceMappingURL=options.js.map
|
|
@@ -24,7 +24,6 @@ class PackageInstallationManager {
|
|
|
24
24
|
async getLatestCompatibleVersion(packageName, referenceVersion) {
|
|
25
25
|
referenceVersion = referenceVersion || this.$staticConfig.version;
|
|
26
26
|
const isPreReleaseVersion = semver.prerelease(referenceVersion) !== null;
|
|
27
|
-
// if the user has some v.v.v-prerelease-xx.xx pre-release version, include pre-release versions in the search query.
|
|
28
27
|
const compatibleVersionRange = isPreReleaseVersion
|
|
29
28
|
? `~${referenceVersion}`
|
|
30
29
|
: `~${semver.major(referenceVersion)}.${semver.minor(referenceVersion)}.0`;
|
|
@@ -106,14 +105,13 @@ class PackageInstallationManager {
|
|
|
106
105
|
}
|
|
107
106
|
async getInspectorFromCache(inspectorNpmPackageName, projectDir) {
|
|
108
107
|
const inspectorPath = path.join(projectDir, constants.NODE_MODULES_FOLDER_NAME, inspectorNpmPackageName);
|
|
109
|
-
// local installation takes precedence over cache
|
|
110
108
|
if (this.inspectorAlreadyInstalled(inspectorPath)) {
|
|
111
109
|
return inspectorPath;
|
|
112
110
|
}
|
|
113
111
|
const cachePath = this.getInspectorCachePath();
|
|
114
112
|
this.prepareCacheDir(cachePath);
|
|
115
113
|
const pathToPackageInCache = path.join(cachePath, constants.NODE_MODULES_FOLDER_NAME, inspectorNpmPackageName);
|
|
116
|
-
const iOSFrameworkNSValue = this.$projectDataService.getRuntimePackage(projectDir,
|
|
114
|
+
const iOSFrameworkNSValue = this.$projectDataService.getRuntimePackage(projectDir, constants.PlatformTypes.ios);
|
|
117
115
|
const version = await this.getLatestCompatibleVersion(inspectorNpmPackageName, iOSFrameworkNSValue.version);
|
|
118
116
|
let shouldInstall = !this.$fs.exists(pathToPackageInCache);
|
|
119
117
|
if (!shouldInstall) {
|
|
@@ -174,10 +172,6 @@ class PackageInstallationManager {
|
|
|
174
172
|
}
|
|
175
173
|
return await this.$packageManager.install(packageName, pathToSave, npmOptions);
|
|
176
174
|
}
|
|
177
|
-
/**
|
|
178
|
-
* This function must not be used with packageName being a URL or local file,
|
|
179
|
-
* because npm view doens't work with those
|
|
180
|
-
*/
|
|
181
175
|
async getVersion(packageName, version) {
|
|
182
176
|
var _a;
|
|
183
177
|
let data = await this.$packageManager.view(packageName, {
|
|
@@ -190,4 +184,3 @@ class PackageInstallationManager {
|
|
|
190
184
|
}
|
|
191
185
|
exports.PackageInstallationManager = PackageInstallationManager;
|
|
192
186
|
yok_1.injector.register("packageInstallationManager", PackageInstallationManager);
|
|
193
|
-
//# sourceMappingURL=package-installation-manager.js.map
|
package/lib/package-manager.js
CHANGED
|
@@ -92,7 +92,6 @@ class PackageManager {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
catch (err) {
|
|
95
|
-
// ignore error, but log info
|
|
96
95
|
this.$logger.trace("Tried to read cli.packageManager from project config and failed. Error is: ", err);
|
|
97
96
|
}
|
|
98
97
|
if (pm === constants_1.PackageManagers.yarn || this.$options.yarn) {
|
|
@@ -160,4 +159,3 @@ __decorate([
|
|
|
160
159
|
(0, decorators_1.invokeInit)()
|
|
161
160
|
], PackageManager.prototype, "getCachePath", null);
|
|
162
161
|
yok_1.injector.register("packageManager", PackageManager);
|
|
163
|
-
//# sourceMappingURL=package-manager.js.map
|
|
@@ -24,14 +24,13 @@ class PnpmPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
24
24
|
if (config.disableNpmInstall) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
delete config.dev;
|
|
27
|
+
delete config.dev;
|
|
28
28
|
if (config.ignoreScripts) {
|
|
29
29
|
config["ignore-scripts"] = true;
|
|
30
30
|
}
|
|
31
31
|
const packageJsonPath = path.join(pathToSave, "package.json");
|
|
32
32
|
const jsonContentBefore = this.$fs.readJson(packageJsonPath);
|
|
33
33
|
const flags = this.getFlagsString(config, true);
|
|
34
|
-
// With pnpm we need to install as "flat" or some imports wont be found
|
|
35
34
|
let params = ["i", "--shamefully-hoist"];
|
|
36
35
|
const isInstallingAllDependencies = packageName === pathToSave;
|
|
37
36
|
if (!isInstallingAllDependencies) {
|
|
@@ -49,7 +48,6 @@ class PnpmPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
uninstall(packageName, config, cwd) {
|
|
52
|
-
// pnpm does not want save option in remove. It saves it by default
|
|
53
51
|
delete config["save"];
|
|
54
52
|
const flags = this.getFlagsString(config, false);
|
|
55
53
|
return this.$childProcess.exec(`pnpm remove ${packageName} ${flags}`, {
|
|
@@ -117,4 +115,3 @@ __decorate([
|
|
|
117
115
|
(0, decorators_1.exported)("pnpm")
|
|
118
116
|
], PnpmPackageManager.prototype, "getCachePath", null);
|
|
119
117
|
yok_1.injector.register("pnpm", PnpmPackageManager);
|
|
120
|
-
//# sourceMappingURL=pnpm-package-manager.js.map
|
package/lib/project-data.js
CHANGED
|
@@ -19,7 +19,6 @@ class ProjectData {
|
|
|
19
19
|
this.warnProjectId();
|
|
20
20
|
return this.projectIdentifiers.ios;
|
|
21
21
|
}
|
|
22
|
-
//just in case hook/extension modifies it.
|
|
23
22
|
set projectId(identifier) {
|
|
24
23
|
this.warnProjectId();
|
|
25
24
|
this.projectIdentifiers.ios = identifier;
|
|
@@ -45,7 +44,6 @@ class ProjectData {
|
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
46
|
projectDir = projectDir || this.$projectHelper.projectDir;
|
|
48
|
-
// If no project found, projectDir should be null
|
|
49
47
|
if (projectDir) {
|
|
50
48
|
const projectFilePath = this.getProjectFilePath(projectDir);
|
|
51
49
|
if (this.$fs.exists(projectFilePath)) {
|
|
@@ -118,7 +116,6 @@ class ProjectData {
|
|
|
118
116
|
errorInvalidProject(projectDir) {
|
|
119
117
|
const currentDir = path.resolve(".");
|
|
120
118
|
this.$logger.trace(`Unable to find project. projectDir: ${projectDir}, options.path: ${this.$options.path}, ${currentDir}`);
|
|
121
|
-
// This is the case when no project file found
|
|
122
119
|
this.$errors.fail("No project found at or above '%s' and neither was a --path specified.", projectDir || this.$options.path || currentDir);
|
|
123
120
|
}
|
|
124
121
|
getProjectFilePath(projectDir) {
|
|
@@ -134,10 +131,6 @@ class ProjectData {
|
|
|
134
131
|
return this.nsConfig[constants.CONFIG_NS_APP_RESOURCES_ENTRY];
|
|
135
132
|
}
|
|
136
133
|
return constants.APP_RESOURCES_FOLDER_NAME;
|
|
137
|
-
// return path.join(
|
|
138
|
-
// this.getAppDirectoryRelativePath(),
|
|
139
|
-
// constants.APP_RESOURCES_FOLDER_NAME
|
|
140
|
-
// );
|
|
141
134
|
}
|
|
142
135
|
getAppDirectoryPath(projectDir) {
|
|
143
136
|
const appRelativePath = this.getAppDirectoryRelativePath();
|
|
@@ -151,7 +144,6 @@ class ProjectData {
|
|
|
151
144
|
return constants.SRC_DIR;
|
|
152
145
|
}
|
|
153
146
|
else {
|
|
154
|
-
// legacy project setup often uses app folder
|
|
155
147
|
return constants.APP_FOLDER_NAME;
|
|
156
148
|
}
|
|
157
149
|
}
|
|
@@ -209,9 +201,6 @@ class ProjectData {
|
|
|
209
201
|
}
|
|
210
202
|
}
|
|
211
203
|
exports.ProjectData = ProjectData;
|
|
212
|
-
/**
|
|
213
|
-
* NOTE: Order of the elements is important as the TypeScript dependencies are commonly included in Angular project as well.
|
|
214
|
-
*/
|
|
215
204
|
ProjectData.PROJECT_TYPES = [
|
|
216
205
|
{
|
|
217
206
|
type: constants.ProjectTypes.JsFlavorName,
|
|
@@ -249,4 +238,3 @@ __decorate([
|
|
|
249
238
|
(0, decorators_1.cache)()
|
|
250
239
|
], ProjectData.prototype, "warnProjectId", null);
|
|
251
240
|
yok_1.injector.register("projectData", ProjectData, true);
|
|
252
|
-
//# sourceMappingURL=project-data.js.map
|
|
@@ -44,4 +44,3 @@ class ProjectFilesProvider extends project_files_provider_base_1.ProjectFilesPro
|
|
|
44
44
|
exports.ProjectFilesProvider = ProjectFilesProvider;
|
|
45
45
|
ProjectFilesProvider.INTERNAL_NONPROJECT_FILES = ["**/*.ts"];
|
|
46
46
|
yok_1.injector.register("projectFilesProvider", ProjectFilesProvider);
|
|
47
|
-
//# sourceMappingURL=project-files-provider.js.map
|