nativescript 8.7.0 → 8.8.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android-tools-info.js +0 -12
- package/lib/base-package-manager.js +0 -7
- package/lib/bootstrap.js +1 -5
- package/lib/bun-package-manager.js +1 -17
- package/lib/color.js +0 -3
- package/lib/commands/add-platform.js +0 -1
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.js +0 -4
- package/lib/commands/build.js +2 -3
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.js +0 -3
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.js +1 -6
- package/lib/commands/deploy.js +2 -3
- package/lib/commands/extensibility/install-extension.js +0 -1
- package/lib/commands/extensibility/list-extensions.js +0 -1
- package/lib/commands/extensibility/uninstall-extension.js +0 -1
- package/lib/commands/fonts.js +0 -1
- package/lib/commands/generate-assets.js +0 -1
- package/lib/commands/generate-help.js +0 -1
- package/lib/commands/generate.js +2 -12
- package/lib/commands/info.js +0 -1
- package/lib/commands/install.js +0 -1
- package/lib/commands/list-platforms.js +0 -1
- package/lib/commands/migrate.js +0 -1
- package/lib/commands/platform-clean.js +0 -1
- package/lib/commands/plugin/add-plugin.js +0 -1
- package/lib/commands/plugin/build-plugin.js +0 -1
- package/lib/commands/plugin/create-plugin.js +0 -5
- package/lib/commands/plugin/list-plugins.js +0 -1
- package/lib/commands/plugin/remove-plugin.js +0 -2
- package/lib/commands/plugin/update-plugin.js +0 -1
- package/lib/commands/post-install.js +0 -6
- package/lib/commands/prepare.js +2 -3
- package/lib/commands/preview.js +0 -2
- package/lib/commands/remove-platform.js +0 -1
- package/lib/commands/resources/resources-update.js +0 -2
- package/lib/commands/run.js +0 -1
- package/lib/commands/setup.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/commands/test-init.js +0 -4
- package/lib/commands/test.js +2 -9
- package/lib/commands/typings.js +76 -4
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.js +0 -2
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.js +0 -3
- package/lib/common/codeGeneration/code-entity.js +0 -1
- package/lib/common/codeGeneration/code-printer.js +0 -1
- package/lib/common/command-params.js +0 -1
- package/lib/common/commands/analytics.js +0 -3
- package/lib/common/commands/autocompletion.js +0 -3
- package/lib/common/commands/device/device-log-stream.js +0 -1
- package/lib/common/commands/device/get-file.js +0 -2
- package/lib/common/commands/device/list-applications.js +0 -1
- package/lib/common/commands/device/list-devices.js +0 -3
- package/lib/common/commands/device/list-files.js +0 -2
- package/lib/common/commands/device/put-file.js +0 -2
- package/lib/common/commands/device/run-application.js +0 -1
- package/lib/common/commands/device/stop-application.js +0 -1
- package/lib/common/commands/device/uninstall-application.js +0 -1
- package/lib/common/commands/doctor.js +2 -3
- package/lib/common/commands/generate-messages.js +0 -1
- package/lib/common/commands/help.js +0 -1
- package/lib/common/commands/package-manager-get.js +0 -1
- package/lib/common/commands/package-manager-set.js +0 -1
- package/lib/common/commands/post-install.js +0 -1
- package/lib/common/commands/preuninstall.js +2 -11
- package/lib/common/commands/proxy/proxy-base.js +0 -4
- package/lib/common/commands/proxy/proxy-clear.js +0 -1
- package/lib/common/commands/proxy/proxy-get.js +0 -1
- package/lib/common/commands/proxy/proxy-set.js +0 -1
- package/lib/common/common-lib.js +0 -1
- package/lib/common/constants.js +0 -11
- package/lib/common/decorators.js +0 -48
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/errors.js +3 -13
- package/lib/common/file-system.js +2 -13
- package/lib/common/header.js +0 -3
- package/lib/common/helpers.js +3 -89
- package/lib/common/host-info.js +0 -4
- package/lib/common/http-client.js +0 -20
- package/lib/common/logger/appenders/cli-appender.js +0 -4
- package/lib/common/logger/appenders/emit-appender.js +0 -4
- package/lib/common/logger/layouts/cli-layout.js +0 -1
- package/lib/common/logger/logger.js +0 -5
- package/lib/common/messages/messages.js +0 -6
- package/lib/common/mobile/android/android-application-manager.js +1 -20
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
- package/lib/common/mobile/android/android-debug-bridge.js +0 -6
- package/lib/common/mobile/android/android-device-file-system.js +0 -4
- package/lib/common/mobile/android/android-device-hash-service.js +0 -3
- package/lib/common/mobile/android/android-device.js +0 -8
- package/lib/common/mobile/android/android-emulator-services.js +1 -2
- package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
- package/lib/common/mobile/android/android-log-filter.js +0 -4
- package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
- package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
- package/lib/common/mobile/android/genymotion/genymotion-service.js +0 -5
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +1 -20
- package/lib/common/mobile/application-manager-base.js +0 -6
- package/lib/common/mobile/device-emitter.js +0 -4
- package/lib/common/mobile/device-log-emitter.js +0 -1
- package/lib/common/mobile/device-log-provider-base.js +0 -1
- package/lib/common/mobile/device-log-provider.js +0 -23
- package/lib/common/mobile/device-platforms-constants.js +0 -1
- package/lib/common/mobile/emulator-helper.js +0 -3
- package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
- package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
- package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
- package/lib/common/mobile/ios/device/ios-device.js +0 -4
- package/lib/common/mobile/ios/ios-device-base.js +0 -1
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
- package/lib/common/mobile/ios/ios-log-filter.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
- package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
- package/lib/common/mobile/log-filter.js +0 -2
- package/lib/common/mobile/logging-levels.js +0 -1
- package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
- package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
- package/lib/common/mobile/mobile-core/devices-service.js +0 -69
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-helper.js +0 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
- package/lib/common/opener.js +0 -1
- package/lib/common/os-info.js +0 -1
- package/lib/common/plist-parser.js +0 -1
- package/lib/common/project-helper.js +0 -1
- package/lib/common/prompter.js +1 -9
- package/lib/common/queue.js +0 -1
- package/lib/common/resource-loader.js +0 -1
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +1 -2
- package/lib/common/services/commands-service.js +6 -17
- package/lib/common/services/help-service.js +3 -11
- package/lib/common/services/hooks-service.js +0 -13
- package/lib/common/services/ios-notification-service.js +0 -1
- package/lib/common/services/json-file-settings-service.js +0 -6
- package/lib/common/services/lock-service.js +0 -6
- package/lib/common/services/message-contract-generator.js +0 -1
- package/lib/common/services/messages-service.js +0 -1
- package/lib/common/services/micro-templating-service.js +0 -6
- package/lib/common/services/net-service.js +0 -3
- package/lib/common/services/project-files-manager.js +0 -5
- package/lib/common/services/project-files-provider-base.js +0 -1
- package/lib/common/services/proxy-service.js +0 -1
- package/lib/common/services/qr.js +0 -1
- package/lib/common/services/settings-service.js +0 -1
- package/lib/common/services/xcode-select-service.js +0 -1
- package/lib/common/utils.js +0 -1
- package/lib/common/validators/project-name-validator.js +0 -1
- package/lib/common/validators/validation-result.js +0 -1
- package/lib/common/verify-node-version.js +1 -8
- package/lib/common/yok.js +11 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +0 -53
- package/lib/controllers/build-controller.js +3 -4
- package/lib/controllers/debug-controller.js +3 -8
- package/lib/controllers/deploy-controller.js +0 -1
- package/lib/controllers/migrate-controller.js +3 -91
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +4 -14
- package/lib/controllers/run-controller.js +1 -17
- package/lib/controllers/update-controller-base.js +0 -1
- package/lib/controllers/update-controller.js +0 -11
- package/lib/data/build-data.js +0 -1
- package/lib/data/controller-data-base.js +0 -1
- package/lib/data/debug-data.js +0 -1
- package/lib/data/platform-data.js +0 -1
- package/lib/data/prepare-data.js +0 -1
- package/lib/data/run-data.js +0 -1
- package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
- package/lib/detached-processes/cleanup-process.js +14 -18
- package/lib/detached-processes/file-log-service.js +1 -2
- package/lib/device-path-provider.js +0 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
- package/lib/device-sockets/ios/notification.js +0 -3
- package/lib/device-sockets/ios/socket-request-executor.js +0 -3
- package/lib/helpers/android-bundle-validator-helper.js +1 -2
- package/lib/helpers/deploy-command-helper.js +0 -1
- package/lib/helpers/key-command-helper.js +2 -4
- package/lib/helpers/livesync-command-helper.js +1 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +2 -3
- package/lib/helpers/package-path-helper.js +0 -1
- package/lib/helpers/platform-command-helper.js +2 -7
- package/lib/helpers/version-validator-helper.js +0 -1
- package/lib/key-commands/bootstrap.js +2 -3
- package/lib/key-commands/index.js +4 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +1 -10
- package/lib/node/pbxproj-dom-xcode.js +0 -1
- package/lib/node/xcode.js +0 -1
- package/lib/node-package-manager.js +1 -11
- package/lib/options.js +116 -141
- package/lib/package-installation-manager.js +1 -8
- package/lib/package-manager.js +0 -2
- package/lib/platform-command-param.js +0 -1
- package/lib/pnpm-package-manager.js +1 -4
- package/lib/project-data.js +0 -12
- package/lib/providers/project-files-provider.js +0 -1
- package/lib/resolvers/livesync-service-resolver.js +0 -1
- package/lib/services/analytics/analytics-broker-process.js +6 -10
- package/lib/services/analytics/analytics-broker.js +1 -2
- package/lib/services/analytics/analytics-service.js +25 -29
- package/lib/services/analytics/google-analytics-provider.js +12 -13
- package/lib/services/analytics-settings-service.js +0 -5
- package/lib/services/android/android-bundle-tool-service.js +0 -1
- package/lib/services/android/gradle-build-args-service.js +2 -9
- package/lib/services/android/gradle-build-service.js +0 -1
- package/lib/services/android/gradle-command-service.js +0 -1
- package/lib/services/android-device-debug-service.js +0 -6
- package/lib/services/android-plugin-build-service.js +12 -43
- package/lib/services/android-project-service.js +4 -71
- package/lib/services/android-resources-migration-service.js +0 -7
- package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
- package/lib/services/assets-generation/assets-generation-service.js +5 -16
- package/lib/services/build-artifacts-service.js +1 -2
- package/lib/services/build-data-service.js +0 -1
- package/lib/services/build-info-file-service.js +0 -1
- package/lib/services/cleanup-service.js +9 -13
- package/lib/services/cocoapods-platform-manager.js +0 -9
- package/lib/services/cocoapods-service.js +1 -21
- package/lib/services/debug-data-service.js +0 -1
- package/lib/services/debug-service-base.js +0 -7
- package/lib/services/device/device-install-app-service.js +1 -2
- package/lib/services/doctor-service.js +6 -21
- package/lib/services/extensibility-service.js +0 -8
- package/lib/services/files-hash-service.js +0 -1
- package/lib/services/hmr-status-service.js +0 -2
- package/lib/services/info-service.js +0 -1
- package/lib/services/initialize-service.js +1 -5
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.js +0 -4
- package/lib/services/ios/spm-service.js +0 -9
- package/lib/services/ios/xcodebuild-args-service.js +0 -9
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +0 -1
- package/lib/services/ios-debugger-port-service.js +0 -1
- package/lib/services/ios-device-debug-service.js +0 -1
- package/lib/services/ios-entitlements-service.js +0 -1
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.js +4 -6
- package/lib/services/ios-project-service.js +1 -23
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +0 -1
- package/lib/services/ip-service.js +0 -2
- package/lib/services/itmstransporter-service.js +0 -1
- package/lib/services/karma-execution.js +0 -2
- package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
- package/lib/services/livesync/android-device-livesync-service.js +0 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
- package/lib/services/livesync/android-livesync-service.js +0 -1
- package/lib/services/livesync/android-livesync-tool.js +0 -4
- package/lib/services/livesync/device-livesync-service-base.js +0 -2
- package/lib/services/livesync/ios-device-livesync-service.js +0 -7
- package/lib/services/livesync/ios-livesync-service.js +0 -2
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.js +0 -5
- package/lib/services/livesync-process-data-service.js +0 -1
- package/lib/services/log-parser-service.js +0 -1
- package/lib/services/log-source-map-service.js +0 -15
- package/lib/services/marking-mode-service.js +5 -8
- package/lib/services/metadata-filtering-service.js +0 -1
- package/lib/services/npm-config-service.js +0 -4
- package/lib/services/pacote-service.js +0 -7
- package/lib/services/performance-service.js +1 -3
- package/lib/services/platform/add-platform-service.js +2 -47
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.js +2 -5
- package/lib/services/platform-environment-requirements.js +3 -8
- package/lib/services/platform-project-service-base.js +0 -1
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.js +2 -18
- package/lib/services/prepare-data-service.js +0 -1
- package/lib/services/project-backup-service.js +0 -4
- package/lib/services/project-changes-service.js +3 -12
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +1 -18
- package/lib/services/project-data-service.js +7 -36
- package/lib/services/project-name-service.js +0 -1
- package/lib/services/project-service.js +0 -10
- package/lib/services/project-templates-service.js +2 -3
- package/lib/services/qr-code-terminal-service.js +0 -1
- package/lib/services/require-service.js +0 -1
- package/lib/services/start-service.js +0 -1
- package/lib/services/temp-service.js +0 -1
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.js +2 -9
- package/lib/services/test-initialization-service.js +0 -4
- package/lib/services/timeline-profiler-service.js +0 -1
- package/lib/services/user-settings-service.js +0 -1
- package/lib/services/versions-service.js +4 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/webpack/webpack-compiler-service.js +1 -42
- package/lib/services/xcconfig-service.js +0 -2
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +1 -2
- package/lib/tools/config-manipulation/config-transformer.js +0 -12
- package/lib/tools/node-modules/node-modules-builder.js +0 -1
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
- package/lib/yarn-package-manager.js +0 -1
- package/lib/yarn2-package-manager.js +0 -3
- package/package.json +1 -1
- package/vendor/aab-tool/README.txt +1 -1
- package/vendor/aab-tool/bundletool.jar +0 -0
- package/vendor/gradle-plugin/build.gradle +21 -15
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// This function must be separate to avoid dependencies on C++ modules - it must execute precisely when other functions cannot
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.getNodeWarning = exports.verifyNodeVersion = void 0;
|
|
5
4
|
const color_1 = require("../color");
|
|
6
|
-
// Use only ES5 code here - pure JavaScript can be executed with any Node.js version (even 0.10, 0.12).
|
|
7
|
-
/* tslint:disable:no-var-keyword no-var-requires prefer-const*/
|
|
8
5
|
var os = require("os");
|
|
9
6
|
var semver = require("semver");
|
|
10
7
|
var util = require("util");
|
|
11
|
-
// These versions cannot be used with CLI due to bugs in the node itself.
|
|
12
|
-
// We are absolutely sure we cannot work with them, so inform the user if he is trying to use any of them and exit the process.
|
|
13
8
|
var versionsCausingFailure = ["0.10.34", "4.0.0", "4.2.0", "5.0.0"];
|
|
14
9
|
var minimumRequiredVersion = "8.0.0";
|
|
15
10
|
function getNodeVersionOpts() {
|
|
@@ -74,12 +69,10 @@ function getNodeWarning() {
|
|
|
74
69
|
if (warningMessage) {
|
|
75
70
|
nodeWarn = {
|
|
76
71
|
message: warningMessage,
|
|
77
|
-
severity: "medium"
|
|
72
|
+
severity: "medium",
|
|
78
73
|
};
|
|
79
74
|
}
|
|
80
75
|
}
|
|
81
76
|
return nodeWarn;
|
|
82
77
|
}
|
|
83
78
|
exports.getNodeWarning = getNodeWarning;
|
|
84
|
-
/* tslint:enable */
|
|
85
|
-
//# sourceMappingURL=verify-node-version.js.map
|
package/lib/common/yok.js
CHANGED
|
@@ -16,13 +16,6 @@ const helpers_1 = require("./helpers");
|
|
|
16
16
|
const constants_1 = require("./constants");
|
|
17
17
|
let indent = "";
|
|
18
18
|
function trace(formatStr, ...args) {
|
|
19
|
-
// uncomment following lines when debugging dependency injection
|
|
20
|
-
// const items: any[] = [];
|
|
21
|
-
// for (let _i = 1; _i < arguments.length; _i++) {
|
|
22
|
-
// items[_i - 1] = arguments[_i];
|
|
23
|
-
// }
|
|
24
|
-
// const util = require("util");
|
|
25
|
-
// console.log(util.format.apply(util, [indent + formatStr].concat(args)));
|
|
26
19
|
}
|
|
27
20
|
function pushIndent() {
|
|
28
21
|
indent += " ";
|
|
@@ -40,7 +33,6 @@ function forEachName(names, action) {
|
|
|
40
33
|
}
|
|
41
34
|
function register(...rest) {
|
|
42
35
|
return function (target) {
|
|
43
|
-
// TODO: Check if 'rest' has more arguments that have to be registered
|
|
44
36
|
exports.injector.register(rest[0], target);
|
|
45
37
|
};
|
|
46
38
|
}
|
|
@@ -60,7 +52,7 @@ class Yok {
|
|
|
60
52
|
}
|
|
61
53
|
requireCommand(names, file) {
|
|
62
54
|
forEachName(names, (commandName) => {
|
|
63
|
-
const commands = commandName.split("|"
|
|
55
|
+
const commands = commandName.split("|");
|
|
64
56
|
if (commands.length > 1) {
|
|
65
57
|
if (_.startsWith(commands[1], "*") &&
|
|
66
58
|
this.modules[this.createCommandName(commands[0])]) {
|
|
@@ -70,7 +62,7 @@ class Yok {
|
|
|
70
62
|
if (!this.hierarchicalCommands[parentCommandName]) {
|
|
71
63
|
this.hierarchicalCommands[parentCommandName] = [];
|
|
72
64
|
}
|
|
73
|
-
this.hierarchicalCommands[parentCommandName].push(_.tail(commands).join("|"
|
|
65
|
+
this.hierarchicalCommands[parentCommandName].push(_.tail(commands).join("|"));
|
|
74
66
|
}
|
|
75
67
|
if (commands.length > 1 &&
|
|
76
68
|
!this.modules[this.createCommandName(commands[0])]) {
|
|
@@ -141,7 +133,7 @@ class Yok {
|
|
|
141
133
|
}
|
|
142
134
|
registerCommand(names, resolver) {
|
|
143
135
|
forEachName(names, (name) => {
|
|
144
|
-
const commands = name.split("|"
|
|
136
|
+
const commands = name.split("|");
|
|
145
137
|
this.register(this.createCommandName(name), resolver);
|
|
146
138
|
if (commands.length > 1) {
|
|
147
139
|
this.createHierarchicalCommand(commands[0]);
|
|
@@ -153,7 +145,7 @@ class Yok {
|
|
|
153
145
|
}
|
|
154
146
|
getDefaultCommand(name, commandArguments) {
|
|
155
147
|
const subCommands = this.hierarchicalCommands[name];
|
|
156
|
-
const defaultCommand = _.find(subCommands, (command) => _.some(command.split("|"
|
|
148
|
+
const defaultCommand = _.find(subCommands, (command) => _.some(command.split("|"), (c) => _.startsWith(c, "*")));
|
|
157
149
|
return defaultCommand;
|
|
158
150
|
}
|
|
159
151
|
buildHierarchicalCommand(parentCommandName, commandLineArguments) {
|
|
@@ -169,7 +161,7 @@ class Yok {
|
|
|
169
161
|
remainingArguments = _.tail(remainingArguments);
|
|
170
162
|
if ((matchingSubCommandName = _.find(subCommands, (sc) => sc === currentSubCommandName ||
|
|
171
163
|
sc ===
|
|
172
|
-
`${"*"
|
|
164
|
+
`${"*"}${currentSubCommandName}`))) {
|
|
173
165
|
finalSubCommandName = matchingSubCommandName;
|
|
174
166
|
finalRemainingArguments = remainingArguments;
|
|
175
167
|
}
|
|
@@ -178,8 +170,8 @@ class Yok {
|
|
|
178
170
|
finalSubCommandName =
|
|
179
171
|
this.getDefaultCommand(parentCommandName, commandLineArguments) || "";
|
|
180
172
|
finalRemainingArguments = _.difference(commandLineArguments, finalSubCommandName
|
|
181
|
-
.split("|"
|
|
182
|
-
.map((command) => _.startsWith(command, "*"
|
|
173
|
+
.split("|")
|
|
174
|
+
.map((command) => _.startsWith(command, "*")
|
|
183
175
|
? command.substr(1)
|
|
184
176
|
: command));
|
|
185
177
|
}
|
|
@@ -210,9 +202,7 @@ class Yok {
|
|
|
210
202
|
commandName = defaultCommand
|
|
211
203
|
? this.getHierarchicalCommandName(name, defaultCommand)
|
|
212
204
|
: "help";
|
|
213
|
-
|
|
214
|
-
// for example "tns run ios", we have to remove the "ios" option from the arguments that we'll pass to the command.
|
|
215
|
-
if (_.includes(this.hierarchicalCommands[name], "*" /* CommandsDelimiters.DefaultCommandSymbol */ + args[0])) {
|
|
205
|
+
if (_.includes(this.hierarchicalCommands[name], "*" + args[0])) {
|
|
216
206
|
commandArguments = _.tail(args);
|
|
217
207
|
}
|
|
218
208
|
else {
|
|
@@ -221,13 +211,11 @@ class Yok {
|
|
|
221
211
|
}
|
|
222
212
|
}
|
|
223
213
|
else {
|
|
224
|
-
//Execute only default command without arguments
|
|
225
214
|
if (defaultCommand) {
|
|
226
215
|
commandName = this.getHierarchicalCommandName(name, defaultCommand);
|
|
227
216
|
}
|
|
228
217
|
else {
|
|
229
218
|
commandName = "help";
|
|
230
|
-
// Show command-line help
|
|
231
219
|
const options = this.resolve("options");
|
|
232
220
|
options.help = true;
|
|
233
221
|
}
|
|
@@ -239,7 +227,7 @@ class Yok {
|
|
|
239
227
|
exports.injector.registerCommand(name, factory);
|
|
240
228
|
}
|
|
241
229
|
getHierarchicalCommandName(parentCommandName, subCommandName) {
|
|
242
|
-
return [parentCommandName, subCommandName].join("|"
|
|
230
|
+
return [parentCommandName, subCommandName].join("|");
|
|
243
231
|
}
|
|
244
232
|
isValidHierarchicalCommand(commandName, commandArguments) {
|
|
245
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -248,8 +236,6 @@ class Yok {
|
|
|
248
236
|
if (subCommands) {
|
|
249
237
|
const fullCommandName = this.buildHierarchicalCommand(commandName, commandArguments);
|
|
250
238
|
if (!fullCommandName) {
|
|
251
|
-
// In case buildHierarchicalCommand doesn't find a valid command
|
|
252
|
-
// there isn't a valid command or default with those arguments
|
|
253
239
|
const errors = exports.injector.resolve("errors");
|
|
254
240
|
errors.failWithHelp(constants_1.ERROR_NO_VALID_SUBCOMMAND_FORMAT, commandName);
|
|
255
241
|
}
|
|
@@ -260,8 +246,8 @@ class Yok {
|
|
|
260
246
|
});
|
|
261
247
|
}
|
|
262
248
|
isDefaultCommand(commandName) {
|
|
263
|
-
return (commandName.indexOf("*"
|
|
264
|
-
commandName.indexOf("|"
|
|
249
|
+
return (commandName.indexOf("*") > 0 &&
|
|
250
|
+
commandName.indexOf("|") > 0);
|
|
265
251
|
}
|
|
266
252
|
register(name, resolver, shared) {
|
|
267
253
|
shared = shared === undefined ? true : shared;
|
|
@@ -308,12 +294,6 @@ class Yok {
|
|
|
308
294
|
return this.resolveByName(param, ctorArguments);
|
|
309
295
|
}
|
|
310
296
|
}
|
|
311
|
-
/* Regex to match dynamic calls in the following format:
|
|
312
|
-
#{moduleName.functionName} or
|
|
313
|
-
#{moduleName.functionName(param1)} or
|
|
314
|
-
#{moduleName.functionName(param1, param2)} - multiple parameters separated with comma are supported
|
|
315
|
-
Check dynamicCall method for sample usage of this regular expression and see how to determine the passed parameters
|
|
316
|
-
*/
|
|
317
297
|
get dynamicCallRegex() {
|
|
318
298
|
return /#{([^.]+)\.([^}]+?)(\((.+)\))*}/;
|
|
319
299
|
}
|
|
@@ -444,4 +424,3 @@ function setGlobalInjector(inj) {
|
|
|
444
424
|
return inj;
|
|
445
425
|
}
|
|
446
426
|
exports.setGlobalInjector = setGlobalInjector;
|
|
447
|
-
//# sourceMappingURL=yok.js.map
|
package/lib/config.js
CHANGED
|
@@ -16,10 +16,8 @@ const os = require("os");
|
|
|
16
16
|
const _ = require("lodash");
|
|
17
17
|
const yok_1 = require("./common/yok");
|
|
18
18
|
class Configuration {
|
|
19
|
-
/*don't require logger and everything that has logger as dependency in config.js due to cyclic dependency*/
|
|
20
19
|
constructor($fs) {
|
|
21
20
|
this.$fs = $fs;
|
|
22
|
-
// User specific config
|
|
23
21
|
this.DEBUG = false;
|
|
24
22
|
this.ANDROID_DEBUG_UI = null;
|
|
25
23
|
this.USE_POD_SANDBOX = false;
|
|
@@ -58,7 +56,6 @@ class StaticConfig {
|
|
|
58
56
|
this._userAgent = null;
|
|
59
57
|
}
|
|
60
58
|
get disableCommandHooks() {
|
|
61
|
-
// Never set this to false because it will duplicate execution of hooks realized through method decoration
|
|
62
59
|
return true;
|
|
63
60
|
}
|
|
64
61
|
get HTML_CLI_HELPERS_DIR() {
|
|
@@ -103,7 +100,6 @@ class StaticConfig {
|
|
|
103
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
101
|
const $childProcess = this.$injector.resolve("$childProcess");
|
|
105
102
|
try {
|
|
106
|
-
// Do NOT use the adb wrapper because it will end blow up with Segmentation fault because the wrapper uses this method!!!
|
|
107
103
|
const proc = yield $childProcess.spawnFromEvent("adb", ["version"], "exit", undefined, { throwError: false });
|
|
108
104
|
if (proc.stderr) {
|
|
109
105
|
return yield this.spawnPrivateAdb();
|
|
@@ -117,37 +113,21 @@ class StaticConfig {
|
|
|
117
113
|
return "adb";
|
|
118
114
|
});
|
|
119
115
|
}
|
|
120
|
-
/*
|
|
121
|
-
Problem:
|
|
122
|
-
1. Adb forks itself as a server which keeps running until adb kill-server is invoked or crashes
|
|
123
|
-
2. On Windows running processes lock their image files due to memory mapping. Locked files prevent their parent directories from deletion and cannot be overwritten.
|
|
124
|
-
3. Update and uninstall scenarios are broken
|
|
125
|
-
Solution:
|
|
126
|
-
- Copy adb and associated files into a temporary directory. Let this copy of adb run persistently
|
|
127
|
-
- On Posix OSes, immediately delete the file to not take file space
|
|
128
|
-
- Tie common lib version to updates of adb, so that when we integrate a newer adb we can use it
|
|
129
|
-
- Adb is named differently on OSes and may have additional files. The code is hairy to accommodate these differences
|
|
130
|
-
*/
|
|
131
116
|
spawnPrivateAdb() {
|
|
132
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
118
|
const $fs = this.$injector.resolve("$fs"), $childProcess = this.$injector.resolve("$childProcess"), $hostInfo = this.$injector.resolve("$hostInfo");
|
|
134
|
-
// prepare the directory to host our copy of adb
|
|
135
119
|
const defaultAdbDirPath = path.join(__dirname, "common", "resources", "platform-tools", "android", process.platform);
|
|
136
120
|
const pathToPackageJson = path.join(__dirname, "..", "package.json");
|
|
137
121
|
const nsCliVersion = require(pathToPackageJson).version;
|
|
138
122
|
const tmpDir = path.join(os.tmpdir(), `nativescript-cli-${nsCliVersion}`);
|
|
139
123
|
$fs.createDirectory(tmpDir);
|
|
140
|
-
// copy the adb and associated files
|
|
141
124
|
const targetAdb = path.join(tmpDir, "adb");
|
|
142
|
-
// In case directory is missing or it's empty, copy the new adb
|
|
143
125
|
if (!$fs.exists(tmpDir) || !$fs.readDirectory(tmpDir).length) {
|
|
144
|
-
shelljs.cp(path.join(defaultAdbDirPath, "*"), tmpDir);
|
|
145
|
-
// adb loses its executable bit when packed inside electron asar file. Manually fix the issue
|
|
126
|
+
shelljs.cp(path.join(defaultAdbDirPath, "*"), tmpDir);
|
|
146
127
|
if (!$hostInfo.isWindows) {
|
|
147
128
|
shelljs.chmod("+x", targetAdb);
|
|
148
129
|
}
|
|
149
130
|
}
|
|
150
|
-
// let adb start its global server
|
|
151
131
|
yield $childProcess.spawnFromEvent(targetAdb, ["start-server"], "exit");
|
|
152
132
|
return targetAdb;
|
|
153
133
|
});
|
|
@@ -155,4 +135,3 @@ class StaticConfig {
|
|
|
155
135
|
}
|
|
156
136
|
exports.StaticConfig = StaticConfig;
|
|
157
137
|
yok_1.injector.register("staticConfig", StaticConfig);
|
|
158
|
-
//# sourceMappingURL=config.js.map
|
package/lib/constants.js
CHANGED
|
@@ -146,7 +146,6 @@ exports.RESERVED_TEMPLATE_NAMES = {
|
|
|
146
146
|
solid: "@nativescript/template-blank-solid",
|
|
147
147
|
solidjs: "@nativescript/template-blank-solid",
|
|
148
148
|
svelte: "@nativescript/template-blank-svelte",
|
|
149
|
-
// vision templates
|
|
150
149
|
vision: "@nativescript/template-hello-world-ts-vision",
|
|
151
150
|
"vision-vue": "@nativescript/template-blank-vue-vision",
|
|
152
151
|
"vision-ng": "@nativescript/template-hello-world-ng-vision",
|
|
@@ -222,9 +221,6 @@ DebugCommandErrors.NO_DEVICES_EMULATORS_FOUND_FOR_OPTIONS = "Unable to find devi
|
|
|
222
221
|
DebugCommandErrors.UNSUPPORTED_DEVICE_OS_FOR_DEBUGGING = "Unsupported device OS for debugging";
|
|
223
222
|
exports.DebugCommandErrors = DebugCommandErrors;
|
|
224
223
|
exports.AnalyticsEventLabelDelimiter = "__";
|
|
225
|
-
/**
|
|
226
|
-
* Used in ProjectDataService to concatenate the names of the properties inside nativescript key of package.json.
|
|
227
|
-
*/
|
|
228
224
|
exports.NATIVESCRIPT_PROPS_INTERNAL_DELIMITER = "**|__**";
|
|
229
225
|
exports.CLI_RESOURCES_DIR_NAME = "resources";
|
|
230
226
|
class AssetConstants {
|
|
@@ -241,7 +237,6 @@ AssetConstants.sizeDelimiter = "x";
|
|
|
241
237
|
AssetConstants.defaultScale = 1;
|
|
242
238
|
AssetConstants.defaultOverlayImageScale = 0.8;
|
|
243
239
|
exports.AssetConstants = AssetConstants;
|
|
244
|
-
// https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history
|
|
245
240
|
class MacOSVersions {
|
|
246
241
|
}
|
|
247
242
|
MacOSVersions.Sierra = "10.12";
|
|
@@ -251,14 +246,6 @@ MacOSVersions.Catalina = "10.15";
|
|
|
251
246
|
exports.MacOSVersions = MacOSVersions;
|
|
252
247
|
exports.MacOSDeprecationStringFormat = "NativeScript does not support macOS %s and some functionality may not work. Please, upgrade to the latest macOS version.";
|
|
253
248
|
exports.XcodeDeprecationStringFormat = "The current Xcode version %s will not be supported in the next release of NativeScript. Consider updating your Xcode to latest official version.";
|
|
254
|
-
// export class TemplateVersions {
|
|
255
|
-
// public static v1 = "v1";
|
|
256
|
-
// public static v2 = "v2";
|
|
257
|
-
// }
|
|
258
|
-
// export class ProjectTemplateErrors {
|
|
259
|
-
// public static InvalidTemplateVersionStringFormat =
|
|
260
|
-
// "The template '%s' has a NativeScript version '%s' that is not supported. Unable to create project from it.";
|
|
261
|
-
// }
|
|
262
249
|
class Hooks {
|
|
263
250
|
}
|
|
264
251
|
Hooks.createProject = "createProject";
|
|
@@ -299,7 +286,6 @@ AndroidAppBundleMessages.ANDROID_APP_BUNDLE_PUBLISH_DOCS_MESSAGE = "How to use A
|
|
|
299
286
|
exports.AndroidAppBundleMessages = AndroidAppBundleMessages;
|
|
300
287
|
exports.RunOnDeviceEvents = {
|
|
301
288
|
runOnDeviceStopped: "runOnDeviceStopped",
|
|
302
|
-
// In case we name it error, EventEmitter expects instance of Error to be raised and will also raise uncaught exception in case there's no handler
|
|
303
289
|
runOnDeviceError: "runOnDeviceError",
|
|
304
290
|
runOnDeviceExecuted: "runOnDeviceExecuted",
|
|
305
291
|
runOnDeviceStarted: "runOnDeviceStarted",
|
|
@@ -336,52 +322,14 @@ var DeviceConnectionType;
|
|
|
336
322
|
})(DeviceConnectionType = exports.DeviceConnectionType || (exports.DeviceConnectionType = {}));
|
|
337
323
|
var LoggerLevel;
|
|
338
324
|
(function (LoggerLevel) {
|
|
339
|
-
/**
|
|
340
|
-
* Show all log messages.
|
|
341
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
342
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
343
|
-
*/
|
|
344
325
|
LoggerLevel["ALL"] = "ALL";
|
|
345
|
-
/**
|
|
346
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
347
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
348
|
-
*/
|
|
349
326
|
LoggerLevel["TRACE"] = "TRACE";
|
|
350
|
-
/**
|
|
351
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
352
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
353
|
-
*/
|
|
354
327
|
LoggerLevel["DEBUG"] = "DEBUG";
|
|
355
|
-
/**
|
|
356
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
357
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
358
|
-
*/
|
|
359
328
|
LoggerLevel["INFO"] = "INFO";
|
|
360
|
-
/**
|
|
361
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
362
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
363
|
-
*/
|
|
364
329
|
LoggerLevel["WARN"] = "WARN";
|
|
365
|
-
/**
|
|
366
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
367
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
368
|
-
*/
|
|
369
330
|
LoggerLevel["ERROR"] = "ERROR";
|
|
370
|
-
/**
|
|
371
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
372
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
373
|
-
*/
|
|
374
331
|
LoggerLevel["FATAL"] = "FATAL";
|
|
375
|
-
/**
|
|
376
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
377
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
378
|
-
*/
|
|
379
332
|
LoggerLevel["MARK"] = "MARK";
|
|
380
|
-
/**
|
|
381
|
-
* Disable all logging.
|
|
382
|
-
* Log levels are used to assign importance to log messages, with the integer value being used to sort them.
|
|
383
|
-
* If you do not specify anything in your configuration, the default values are used (ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < MARK < OFF)
|
|
384
|
-
*/
|
|
385
333
|
LoggerLevel["OFF"] = "OFF";
|
|
386
334
|
})(LoggerLevel = exports.LoggerLevel || (exports.LoggerLevel = {}));
|
|
387
335
|
var LoggerConfigData;
|
|
@@ -399,4 +347,3 @@ var PackageManagers;
|
|
|
399
347
|
PackageManagers["yarn2"] = "yarn2";
|
|
400
348
|
PackageManagers["bun"] = "bun";
|
|
401
349
|
})(PackageManagers = exports.PackageManagers || (exports.PackageManagers = {}));
|
|
402
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -47,7 +47,7 @@ class BuildController extends events_1.EventEmitter {
|
|
|
47
47
|
const platform = buildData.platform.toLowerCase();
|
|
48
48
|
const projectData = this.$projectDataService.getProjectData(buildData.projectDir);
|
|
49
49
|
const platformData = this.$platformsDataService.getPlatformData(platform, projectData);
|
|
50
|
-
const action = "Build"
|
|
50
|
+
const action = "Build";
|
|
51
51
|
const isForDevice = this.$mobileHelper.isAndroidPlatform(platform)
|
|
52
52
|
? null
|
|
53
53
|
: buildData && buildData.buildForDevice;
|
|
@@ -57,8 +57,8 @@ class BuildController extends events_1.EventEmitter {
|
|
|
57
57
|
platform,
|
|
58
58
|
projectDir: projectData.projectDir,
|
|
59
59
|
additionalData: `${buildData.release ? constants_1.Configurations.Release : constants_1.Configurations.Debug}_${buildData.clean
|
|
60
|
-
? "Clean"
|
|
61
|
-
: "Incremental"
|
|
60
|
+
? "Clean"
|
|
61
|
+
: "Incremental"}`,
|
|
62
62
|
});
|
|
63
63
|
if (buildData.clean) {
|
|
64
64
|
yield platformData.platformProjectService.cleanProject(platformData.projectRoot);
|
|
@@ -131,4 +131,3 @@ class BuildController extends events_1.EventEmitter {
|
|
|
131
131
|
}
|
|
132
132
|
exports.BuildController = BuildController;
|
|
133
133
|
yok_1.injector.register("buildController", BuildController);
|
|
134
|
-
//# sourceMappingURL=build-controller.js.map
|
|
@@ -50,13 +50,13 @@ class DebugController extends events_1.EventEmitter {
|
|
|
50
50
|
this.$errors.fail(`The device with identifier ${debugData.deviceIdentifier} is unreachable. Make sure it is Trusted and try again.`);
|
|
51
51
|
}
|
|
52
52
|
yield this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
53
|
-
action: "Debug"
|
|
53
|
+
action: "Debug",
|
|
54
54
|
device,
|
|
55
55
|
additionalData: this.$mobileHelper.isiOSPlatform(device.deviceInfo.platform) &&
|
|
56
56
|
options &&
|
|
57
57
|
options.inspector
|
|
58
|
-
? "Inspector"
|
|
59
|
-
: "Chrome"
|
|
58
|
+
? "Inspector"
|
|
59
|
+
: "Chrome",
|
|
60
60
|
projectDir: debugData.projectDir,
|
|
61
61
|
});
|
|
62
62
|
if (!(yield device.applicationManager.isApplicationInstalled(debugData.applicationIdentifier))) {
|
|
@@ -101,7 +101,6 @@ class DebugController extends events_1.EventEmitter {
|
|
|
101
101
|
}
|
|
102
102
|
attachDebugger(attachDebuggerData) {
|
|
103
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
-
// Default values
|
|
105
104
|
if (attachDebuggerData.debugOptions) {
|
|
106
105
|
attachDebuggerData.debugOptions.chrome =
|
|
107
106
|
attachDebuggerData.debugOptions.chrome === undefined
|
|
@@ -120,9 +119,6 @@ class DebugController extends events_1.EventEmitter {
|
|
|
120
119
|
}
|
|
121
120
|
const projectData = this.$projectDataService.getProjectData(attachDebuggerData.projectDir);
|
|
122
121
|
const debugData = this.$debugDataService.getDebugData(attachDebuggerData.deviceIdentifier, projectData, attachDebuggerData.debugOptions);
|
|
123
|
-
// const platformData = this.$platformsDataService.getPlatformData(settings.platform, projectData);
|
|
124
|
-
// Of the properties below only `buildForDevice` and `release` are currently used.
|
|
125
|
-
// Leaving the others with placeholder values so that they may not be forgotten in future implementations.
|
|
126
122
|
const debugInfo = yield this.startDebug(debugData);
|
|
127
123
|
const result = this.printDebugInformation(debugInfo, attachDebuggerData.debugOptions.forceDebuggerAttachedEvent);
|
|
128
124
|
return result;
|
|
@@ -237,4 +233,3 @@ __decorate([
|
|
|
237
233
|
], DebugController.prototype, "enableDebuggingCoreWithoutWaitingCurrentAction", null);
|
|
238
234
|
exports.DebugController = DebugController;
|
|
239
235
|
yok_1.injector.register("debugController", DebugController);
|
|
240
|
-
//# sourceMappingURL=debug-controller.js.map
|