nativescript 9.0.0-alpha.2 → 9.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android-tools-info.js +12 -0
- package/lib/base-package-manager.js +7 -0
- package/lib/bootstrap.js +5 -1
- package/lib/bun-package-manager.js +14 -1
- package/lib/color.js +3 -0
- package/lib/commands/add-platform.js +1 -0
- package/lib/commands/apple-login.js +1 -0
- package/lib/commands/appstore-list.js +1 -0
- package/lib/commands/appstore-upload.js +3 -0
- package/lib/commands/build.js +3 -2
- package/lib/commands/clean.js +22 -1
- package/lib/commands/command-base.js +1 -0
- package/lib/commands/config.js +4 -0
- package/lib/commands/create-project.js +6 -0
- package/lib/commands/debug.js +6 -1
- package/lib/commands/deploy.js +3 -2
- package/lib/commands/embedding/embed.js +7 -0
- package/lib/commands/extensibility/install-extension.js +1 -0
- package/lib/commands/extensibility/list-extensions.js +1 -0
- package/lib/commands/extensibility/uninstall-extension.js +1 -0
- package/lib/commands/fonts.js +1 -0
- package/lib/commands/generate-assets.js +1 -0
- package/lib/commands/generate-help.js +1 -0
- package/lib/commands/generate.js +48 -1
- package/lib/commands/info.js +1 -0
- package/lib/commands/install.js +1 -0
- package/lib/commands/list-platforms.js +1 -0
- package/lib/commands/migrate.js +1 -0
- package/lib/commands/native-add.js +5 -0
- package/lib/commands/platform-clean.js +1 -0
- package/lib/commands/plugin/add-plugin.js +1 -0
- package/lib/commands/plugin/build-plugin.js +1 -0
- package/lib/commands/plugin/create-plugin.js +5 -0
- package/lib/commands/plugin/list-plugins.js +1 -0
- package/lib/commands/plugin/remove-plugin.js +2 -0
- package/lib/commands/plugin/update-plugin.js +1 -0
- package/lib/commands/post-install.js +6 -0
- package/lib/commands/prepare.js +4 -3
- package/lib/commands/preview.js +2 -0
- package/lib/commands/remove-platform.js +1 -0
- package/lib/commands/resources/resources-update.js +2 -0
- package/lib/commands/run.js +1 -0
- package/lib/commands/setup.js +1 -0
- package/lib/commands/start.js +1 -0
- package/lib/commands/test-init.js +4 -0
- package/lib/commands/test.js +9 -2
- package/lib/commands/typings.js +2 -1
- package/lib/commands/update-platform.js +5 -0
- package/lib/commands/update.js +2 -0
- package/lib/commands/widget.js +20 -1
- package/lib/common/bootstrap.js +1 -0
- package/lib/common/child-process.js +3 -0
- package/lib/common/codeGeneration/code-entity.js +1 -0
- package/lib/common/codeGeneration/code-printer.js +1 -0
- package/lib/common/command-params.js +1 -0
- package/lib/common/commands/analytics.js +3 -0
- package/lib/common/commands/autocompletion.js +3 -0
- package/lib/common/commands/device/device-log-stream.js +1 -0
- package/lib/common/commands/device/get-file.js +2 -0
- package/lib/common/commands/device/list-applications.js +1 -0
- package/lib/common/commands/device/list-devices.js +3 -0
- package/lib/common/commands/device/list-files.js +2 -0
- package/lib/common/commands/device/put-file.js +2 -0
- package/lib/common/commands/device/run-application.js +1 -0
- package/lib/common/commands/device/stop-application.js +1 -0
- package/lib/common/commands/device/uninstall-application.js +1 -0
- package/lib/common/commands/doctor.js +3 -2
- package/lib/common/commands/generate-messages.js +1 -0
- package/lib/common/commands/help.js +1 -0
- package/lib/common/commands/package-manager-get.js +1 -0
- package/lib/common/commands/package-manager-set.js +1 -0
- package/lib/common/commands/post-install.js +1 -0
- package/lib/common/commands/preuninstall.js +11 -2
- package/lib/common/commands/proxy/proxy-base.js +4 -0
- package/lib/common/commands/proxy/proxy-clear.js +1 -0
- package/lib/common/commands/proxy/proxy-get.js +1 -0
- package/lib/common/commands/proxy/proxy-set.js +1 -0
- package/lib/common/common-lib.js +1 -0
- package/lib/common/constants.js +11 -0
- package/lib/common/decorators.js +48 -0
- package/lib/common/dispatchers.js +10 -1
- package/lib/common/errors.js +13 -3
- package/lib/common/file-system.js +13 -2
- package/lib/common/header.js +3 -0
- package/lib/common/helpers.js +89 -3
- package/lib/common/host-info.js +4 -0
- package/lib/common/http-client.js +20 -0
- package/lib/common/logger/appenders/cli-appender.js +4 -0
- package/lib/common/logger/appenders/emit-appender.js +4 -0
- package/lib/common/logger/layouts/cli-layout.js +1 -0
- package/lib/common/logger/logger.js +5 -0
- package/lib/common/messages/messages.js +6 -0
- package/lib/common/mobile/android/android-application-manager.js +20 -1
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
- package/lib/common/mobile/android/android-debug-bridge.js +6 -0
- package/lib/common/mobile/android/android-device-file-system.js +4 -0
- package/lib/common/mobile/android/android-device-hash-service.js +3 -0
- package/lib/common/mobile/android/android-device.js +8 -0
- package/lib/common/mobile/android/android-emulator-services.js +11 -8
- package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
- package/lib/common/mobile/android/android-log-filter.js +4 -0
- package/lib/common/mobile/android/android-virtual-device-service.js +26 -0
- package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
- package/lib/common/mobile/android/genymotion/genymotion-service.js +6 -1
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
- package/lib/common/mobile/android/logcat-helper.js +13 -0
- package/lib/common/mobile/application-manager-base.js +6 -0
- package/lib/common/mobile/device-emitter.js +4 -0
- package/lib/common/mobile/device-log-emitter.js +1 -0
- package/lib/common/mobile/device-log-provider-base.js +1 -0
- package/lib/common/mobile/device-log-provider.js +23 -0
- package/lib/common/mobile/device-platforms-constants.js +1 -0
- package/lib/common/mobile/emulator-helper.js +4 -0
- package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
- package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
- package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
- package/lib/common/mobile/ios/device/ios-device.js +4 -0
- package/lib/common/mobile/ios/ios-device-base.js +1 -0
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
- package/lib/common/mobile/ios/ios-log-filter.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
- package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
- package/lib/common/mobile/log-filter.js +2 -0
- package/lib/common/mobile/logging-levels.js +1 -0
- package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
- package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
- package/lib/common/mobile/mobile-core/devices-service.js +69 -0
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-helper.js +1 -0
- package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
- package/lib/common/opener.js +1 -0
- package/lib/common/os-info.js +1 -0
- package/lib/common/plist-parser.js +1 -0
- package/lib/common/project-helper.js +1 -0
- package/lib/common/prompter.js +9 -1
- package/lib/common/queue.js +1 -0
- package/lib/common/resource-loader.js +1 -0
- package/lib/common/services/auto-completion-service.js +13 -1
- package/lib/common/services/cancellation.js +2 -1
- package/lib/common/services/commands-service.js +17 -6
- package/lib/common/services/help-service.js +11 -3
- package/lib/common/services/hooks-service.js +13 -0
- package/lib/common/services/ios-notification-service.js +1 -0
- package/lib/common/services/json-file-settings-service.js +6 -0
- package/lib/common/services/lock-service.js +6 -0
- package/lib/common/services/message-contract-generator.js +1 -0
- package/lib/common/services/messages-service.js +1 -0
- package/lib/common/services/micro-templating-service.js +6 -0
- package/lib/common/services/net-service.js +3 -0
- package/lib/common/services/project-files-manager.js +5 -0
- package/lib/common/services/project-files-provider-base.js +1 -0
- package/lib/common/services/proxy-service.js +1 -0
- package/lib/common/services/qr.js +1 -0
- package/lib/common/services/settings-service.js +1 -0
- package/lib/common/services/xcode-select-service.js +1 -0
- package/lib/common/utils.js +1 -0
- package/lib/common/validators/project-name-validator.js +1 -0
- package/lib/common/validators/validation-result.js +1 -0
- package/lib/common/verify-node-version.js +8 -1
- package/lib/common/yok.js +32 -11
- package/lib/config.js +22 -1
- package/lib/constants-provider.js +1 -0
- package/lib/constants.js +53 -0
- package/lib/controllers/build-controller.js +4 -3
- package/lib/controllers/debug-controller.js +8 -3
- package/lib/controllers/deploy-controller.js +1 -0
- package/lib/controllers/migrate-controller.js +90 -4
- package/lib/controllers/platform-controller.js +9 -1
- package/lib/controllers/prepare-controller.js +17 -4
- package/lib/controllers/run-controller.js +17 -1
- package/lib/controllers/update-controller-base.js +1 -0
- package/lib/controllers/update-controller.js +11 -0
- package/lib/data/build-data.js +1 -0
- package/lib/data/controller-data-base.js +1 -0
- package/lib/data/debug-data.js +1 -0
- package/lib/data/platform-data.js +1 -0
- package/lib/data/prepare-data.js +1 -0
- package/lib/data/run-data.js +1 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
- package/lib/detached-processes/cleanup-process.js +18 -14
- package/lib/detached-processes/file-log-service.js +2 -1
- package/lib/device-path-provider.js +1 -0
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
- package/lib/device-sockets/ios/notification.js +3 -0
- package/lib/device-sockets/ios/socket-request-executor.js +3 -0
- package/lib/helpers/android-bundle-validator-helper.js +2 -1
- package/lib/helpers/deploy-command-helper.js +1 -0
- package/lib/helpers/key-command-helper.js +4 -2
- package/lib/helpers/livesync-command-helper.js +4 -1
- package/lib/helpers/network-connectivity-validator.js +1 -0
- package/lib/helpers/options-track-helper.js +3 -2
- package/lib/helpers/package-path-helper.js +1 -0
- package/lib/helpers/platform-command-helper.js +7 -2
- package/lib/helpers/version-validator-helper.js +1 -0
- package/lib/key-commands/bootstrap.js +3 -2
- package/lib/key-commands/index.js +5 -4
- package/lib/nativescript-cli-lib-bootstrap.js +4 -0
- package/lib/nativescript-cli-lib.js +1 -0
- package/lib/nativescript-cli.js +10 -1
- package/lib/node/pbxproj-dom-xcode.js +1 -0
- package/lib/node/xcode.js +1 -0
- package/lib/node-package-manager.js +11 -1
- package/lib/options.js +144 -119
- package/lib/package-installation-manager.js +8 -1
- package/lib/package-manager.js +2 -0
- package/lib/platform-command-param.js +1 -0
- package/lib/pnpm-package-manager.js +4 -1
- package/lib/project-data.js +12 -0
- package/lib/providers/project-files-provider.js +1 -0
- package/lib/resolvers/livesync-service-resolver.js +1 -0
- package/lib/services/analytics/analytics-broker-process.js +10 -6
- package/lib/services/analytics/analytics-broker.js +2 -1
- package/lib/services/analytics/analytics-service.js +29 -25
- package/lib/services/analytics/google-analytics-provider.js +13 -12
- package/lib/services/analytics-settings-service.js +5 -0
- package/lib/services/android/android-bundle-tool-service.js +1 -0
- package/lib/services/android/gradle-build-args-service.js +3 -0
- package/lib/services/android/gradle-build-service.js +1 -0
- package/lib/services/android/gradle-command-service.js +1 -0
- package/lib/services/android-device-debug-service.js +6 -0
- package/lib/services/android-plugin-build-service.js +31 -2
- package/lib/services/android-project-service.js +71 -4
- package/lib/services/android-resources-migration-service.js +7 -0
- package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
- package/lib/services/apple-portal/srp/srp-wrapper.js +4 -1
- package/lib/services/assets-generation/assets-generation-service.js +10 -5
- package/lib/services/build-artifacts-service.js +2 -1
- package/lib/services/build-data-service.js +1 -0
- package/lib/services/build-info-file-service.js +1 -0
- package/lib/services/bundler/bundler-compiler-service.js +45 -1
- package/lib/services/bundler/bundler.js +1 -0
- package/lib/services/cleanup-service.js +13 -9
- package/lib/services/cocoapods-platform-manager.js +9 -0
- package/lib/services/cocoapods-service.js +21 -1
- package/lib/services/debug-data-service.js +1 -0
- package/lib/services/debug-service-base.js +7 -0
- package/lib/services/device/device-install-app-service.js +2 -1
- package/lib/services/doctor-service.js +21 -6
- package/lib/services/extensibility-service.js +8 -0
- package/lib/services/files-hash-service.js +1 -0
- package/lib/services/hmr-status-service.js +2 -0
- package/lib/services/info-service.js +1 -0
- package/lib/services/initialize-service.js +5 -1
- package/lib/services/ios/export-options-plist-service.js +4 -0
- package/lib/services/ios/ios-signing-service.js +4 -0
- package/lib/services/ios/spm-service.js +11 -0
- package/lib/services/ios/xcodebuild-args-service.js +9 -0
- package/lib/services/ios/xcodebuild-command-service.js +1 -0
- package/lib/services/ios/xcodebuild-service.js +2 -1
- package/lib/services/ios-debugger-port-service.js +1 -0
- package/lib/services/ios-device-debug-service.js +1 -0
- package/lib/services/ios-entitlements-service.js +1 -0
- package/lib/services/ios-extensions-service.js +1 -0
- package/lib/services/ios-log-filter.js +20 -0
- package/lib/services/ios-native-target-service.js +6 -4
- package/lib/services/ios-project-service.js +91 -1
- package/lib/services/ios-provision-service.js +3 -0
- package/lib/services/ios-watch-app-service.js +1 -0
- package/lib/services/ip-service.js +2 -0
- package/lib/services/itmstransporter-service.js +1 -0
- package/lib/services/karma-execution.js +2 -0
- package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
- package/lib/services/livesync/android-device-livesync-service.js +2 -0
- package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
- package/lib/services/livesync/android-livesync-service.js +1 -0
- package/lib/services/livesync/android-livesync-tool.js +4 -0
- package/lib/services/livesync/device-livesync-service-base.js +2 -0
- package/lib/services/livesync/ios-device-livesync-service.js +7 -0
- package/lib/services/livesync/ios-livesync-service.js +2 -0
- package/lib/services/livesync/livesync-socket.js +1 -0
- package/lib/services/livesync/platform-livesync-service-base.js +5 -0
- package/lib/services/livesync-process-data-service.js +1 -0
- package/lib/services/log-parser-service.js +1 -0
- package/lib/services/log-source-map-service.js +15 -0
- package/lib/services/marking-mode-service.js +8 -5
- package/lib/services/metadata-filtering-service.js +1 -0
- package/lib/services/npm-config-service.js +4 -0
- package/lib/services/pacote-service.js +7 -0
- package/lib/services/performance-service.js +3 -1
- package/lib/services/platform/add-platform-service.js +49 -2
- package/lib/services/platform/platform-validation-service.js +1 -0
- package/lib/services/platform/prepare-native-platform-service.js +5 -2
- package/lib/services/platform-environment-requirements.js +8 -3
- package/lib/services/platform-project-service-base.js +1 -0
- package/lib/services/platforms-data-service.js +1 -0
- package/lib/services/plugins-service.js +20 -2
- package/lib/services/prepare-data-service.js +1 -0
- package/lib/services/project-backup-service.js +4 -0
- package/lib/services/project-changes-service.js +14 -3
- package/lib/services/project-cleanup-service.js +2 -0
- package/lib/services/project-config-service.js +21 -2
- package/lib/services/project-data-service.js +36 -7
- package/lib/services/project-name-service.js +1 -0
- package/lib/services/project-service.js +10 -0
- package/lib/services/project-templates-service.js +3 -2
- package/lib/services/qr-code-terminal-service.js +1 -0
- package/lib/services/require-service.js +1 -0
- package/lib/services/start-service.js +1 -0
- package/lib/services/temp-service.js +1 -0
- package/lib/services/terminal-spinner-service.js +2 -0
- package/lib/services/test-execution-service.js +9 -2
- package/lib/services/test-initialization-service.js +4 -0
- package/lib/services/timeline-profiler-service.js +1 -0
- package/lib/services/user-settings-service.js +1 -0
- package/lib/services/versions-service.js +6 -4
- package/lib/services/watch-ignore-list-service.js +1 -0
- package/lib/services/xcconfig-service.js +2 -0
- package/lib/services/xcproj-service.js +1 -0
- package/lib/shared-event-bus.js +6 -0
- package/lib/sys-info.js +2 -1
- package/lib/tools/config-manipulation/config-transformer.js +12 -0
- package/lib/tools/node-modules/node-modules-builder.js +1 -0
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
- package/lib/yarn-package-manager.js +1 -0
- package/lib/yarn2-package-manager.js +3 -0
- package/package.json +6 -4
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
// NOTE: This file is used to call JS functions when cleaning resources used by CLI, after the CLI is killed.
|
|
5
|
+
// The instances here are not shared with the ones in main CLI process.
|
|
4
6
|
const fs = require("fs");
|
|
5
7
|
const uuid_1 = require("uuid");
|
|
6
8
|
const file_log_service_1 = require("./file-log-service");
|
|
@@ -9,6 +11,7 @@ const pathToBootstrap = process.argv[2];
|
|
|
9
11
|
if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
|
|
10
12
|
throw new Error("Invalid path to bootstrap.");
|
|
11
13
|
}
|
|
14
|
+
// After requiring the bootstrap we can use $injector
|
|
12
15
|
require(pathToBootstrap);
|
|
13
16
|
const logFile = process.argv[3];
|
|
14
17
|
const jsFilePath = process.argv[4];
|
|
@@ -32,6 +35,7 @@ catch (err) {
|
|
|
32
35
|
const logMessage = (msg, type) => {
|
|
33
36
|
fileLogService.logData({ message: `[${uniqueId}] ${msg}`, type });
|
|
34
37
|
};
|
|
38
|
+
/* tslint:disable:no-floating-promises */
|
|
35
39
|
(async () => {
|
|
36
40
|
try {
|
|
37
41
|
logMessage(`Requiring file ${jsFilePath}`);
|
|
@@ -43,11 +47,13 @@ const logMessage = (msg, type) => {
|
|
|
43
47
|
logMessage(`Finished execution with data: ${JSON.stringify(data)} to the default function exported by currently required file ${jsFilePath}`);
|
|
44
48
|
}
|
|
45
49
|
catch (err) {
|
|
46
|
-
logMessage(`Unable to execute action of file ${jsFilePath} when passed data is ${JSON.stringify(data)}. Error is: ${err}.`, "Error");
|
|
50
|
+
logMessage(`Unable to execute action of file ${jsFilePath} when passed data is ${JSON.stringify(data)}. Error is: ${err}.`, "Error" /* FileLogMessageType.Error */);
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
catch (err) {
|
|
51
|
-
logMessage(`Unable to require file: ${jsFilePath}. Error is: ${err}.`, "Error");
|
|
55
|
+
logMessage(`Unable to require file: ${jsFilePath}. Error is: ${err}.`, "Error" /* FileLogMessageType.Error */);
|
|
52
56
|
}
|
|
53
57
|
})();
|
|
58
|
+
/* tslint:enable:no-floating-promises */
|
|
59
|
+
//# sourceMappingURL=cleanup-js-subprocess.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// NOTE: This file is used to clean up resources used by CLI, when the CLI is killed.
|
|
4
|
+
// The instances here are not shared with the ones in main CLI process.
|
|
3
5
|
const fs = require("fs");
|
|
4
6
|
const path = require("path");
|
|
5
7
|
const shelljs = require("shelljs");
|
|
@@ -11,6 +13,7 @@ if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
|
|
|
11
13
|
throw new Error("Invalid path to bootstrap.");
|
|
12
14
|
}
|
|
13
15
|
const logFile = process.argv[3];
|
|
16
|
+
// After requiring the bootstrap we can use $injector
|
|
14
17
|
require(pathToBootstrap);
|
|
15
18
|
const fileLogService = yok_1.injector.resolve(file_log_service_1.FileLogService, {
|
|
16
19
|
logFile,
|
|
@@ -63,7 +66,7 @@ const executeJSCleanup = async (jsCommand) => {
|
|
|
63
66
|
catch (err) {
|
|
64
67
|
fileLogService.logData({
|
|
65
68
|
message: `Unable to execute action for file ${jsCommand.filePath} with data ${JSON.stringify(jsCommand.data)}. Error is: ${err}.`,
|
|
66
|
-
type: "Error"
|
|
69
|
+
type: "Error" /* FileLogMessageType.Error */,
|
|
67
70
|
});
|
|
68
71
|
}
|
|
69
72
|
};
|
|
@@ -88,7 +91,7 @@ const executeCleanup = async () => {
|
|
|
88
91
|
catch (err) {
|
|
89
92
|
fileLogService.logData({
|
|
90
93
|
message: `Unable to execute command: ${JSON.stringify(commandInfo)}. Error is: ${err}.`,
|
|
91
|
-
type: "Error"
|
|
94
|
+
type: "Error" /* FileLogMessageType.Error */,
|
|
92
95
|
});
|
|
93
96
|
}
|
|
94
97
|
}
|
|
@@ -102,7 +105,7 @@ const executeCleanup = async () => {
|
|
|
102
105
|
catch (err) {
|
|
103
106
|
fileLogService.logData({
|
|
104
107
|
message: `Unable to delete files: ${JSON.stringify(filesToDelete)}. Error is: ${err}.`,
|
|
105
|
-
type: "Error"
|
|
108
|
+
type: "Error" /* FileLogMessageType.Error */,
|
|
106
109
|
});
|
|
107
110
|
}
|
|
108
111
|
}
|
|
@@ -224,36 +227,36 @@ process.on("message", async (cleanupProcessMessage) => {
|
|
|
224
227
|
message: `cleanup-process received message of type: ${JSON.stringify(cleanupProcessMessage)}`,
|
|
225
228
|
});
|
|
226
229
|
switch (cleanupProcessMessage.messageType) {
|
|
227
|
-
case "AddCleanCommand"
|
|
230
|
+
case "AddCleanCommand" /* CleanupProcessMessage.AddCleanCommand */:
|
|
228
231
|
addCleanupAction(cleanupProcessMessage.commandInfo);
|
|
229
232
|
break;
|
|
230
|
-
case "RemoveCleanCommand"
|
|
233
|
+
case "RemoveCleanCommand" /* CleanupProcessMessage.RemoveCleanCommand */:
|
|
231
234
|
removeCleanupAction(cleanupProcessMessage.commandInfo);
|
|
232
235
|
break;
|
|
233
|
-
case "AddRequest"
|
|
236
|
+
case "AddRequest" /* CleanupProcessMessage.AddRequest */:
|
|
234
237
|
addRequest(cleanupProcessMessage.requestInfo);
|
|
235
238
|
break;
|
|
236
|
-
case "RemoveRequest"
|
|
239
|
+
case "RemoveRequest" /* CleanupProcessMessage.RemoveRequest */:
|
|
237
240
|
removeRequest(cleanupProcessMessage.requestInfo);
|
|
238
241
|
break;
|
|
239
|
-
case "AddDeleteFileAction"
|
|
242
|
+
case "AddDeleteFileAction" /* CleanupProcessMessage.AddDeleteFileAction */:
|
|
240
243
|
addDeleteAction(cleanupProcessMessage.filePath);
|
|
241
244
|
break;
|
|
242
|
-
case "RemoveDeleteFileAction"
|
|
245
|
+
case "RemoveDeleteFileAction" /* CleanupProcessMessage.RemoveDeleteFileAction */:
|
|
243
246
|
removeDeleteAction(cleanupProcessMessage.filePath);
|
|
244
247
|
break;
|
|
245
|
-
case "AddJSFileToRequire"
|
|
248
|
+
case "AddJSFileToRequire" /* CleanupProcessMessage.AddJSFileToRequire */:
|
|
246
249
|
const jsCleanupMessage = cleanupProcessMessage;
|
|
247
250
|
addJSFile(jsCleanupMessage.jsCommand);
|
|
248
251
|
break;
|
|
249
|
-
case "RemoveJSFileToRequire"
|
|
252
|
+
case "RemoveJSFileToRequire" /* CleanupProcessMessage.RemoveJSFileToRequire */:
|
|
250
253
|
const msgToRemove = cleanupProcessMessage;
|
|
251
254
|
removeJSFile(msgToRemove.jsCommand);
|
|
252
255
|
break;
|
|
253
256
|
default:
|
|
254
257
|
fileLogService.logData({
|
|
255
258
|
message: `Unable to handle message of type ${cleanupProcessMessage.messageType}. Full message is ${JSON.stringify(cleanupProcessMessage)}`,
|
|
256
|
-
type: "Error"
|
|
259
|
+
type: "Error" /* FileLogMessageType.Error */,
|
|
257
260
|
});
|
|
258
261
|
break;
|
|
259
262
|
}
|
|
@@ -267,6 +270,7 @@ process.on("disconnect", async () => {
|
|
|
267
270
|
process.exit();
|
|
268
271
|
});
|
|
269
272
|
fileLogService.logData({
|
|
270
|
-
message: `cleanup-process will send ${"ProcessReadyToReceive"} message`,
|
|
273
|
+
message: `cleanup-process will send ${"ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */} message`,
|
|
271
274
|
});
|
|
272
|
-
process.send("ProcessReadyToReceive");
|
|
275
|
+
process.send("ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */);
|
|
276
|
+
//# sourceMappingURL=cleanup-process.js.map
|
|
@@ -11,10 +11,11 @@ class FileLogService {
|
|
|
11
11
|
logData(fileLoggingMessage) {
|
|
12
12
|
if (this.logFile && fileLoggingMessage && fileLoggingMessage.message) {
|
|
13
13
|
fileLoggingMessage.type =
|
|
14
|
-
fileLoggingMessage.type || "Info"
|
|
14
|
+
fileLoggingMessage.type || "Info" /* FileLogMessageType.Info */;
|
|
15
15
|
const formattedDate = (0, helpers_1.getFixedLengthDateString)();
|
|
16
16
|
this.$fs.appendFile(this.logFile, `[${formattedDate}] [${fileLoggingMessage.type}] ${fileLoggingMessage.message}${os_1.EOL}`);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.FileLogService = FileLogService;
|
|
21
|
+
//# sourceMappingURL=file-log-service.js.map
|
|
@@ -76,6 +76,7 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
|
|
|
76
76
|
const existingWebProxy = this.deviceWebServers[`${device.deviceInfo.identifier}-${appId}`];
|
|
77
77
|
const result = existingWebProxy ||
|
|
78
78
|
(await this.addWebSocketProxy(device, appId, projectName, projectDir));
|
|
79
|
+
// TODO: do not remove till VSCode waits for this message in order to reattach
|
|
79
80
|
this.$logger.info("Opened localhost " + result.options.port);
|
|
80
81
|
return result;
|
|
81
82
|
}
|
|
@@ -86,8 +87,13 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
|
|
|
86
87
|
if (existingServer) {
|
|
87
88
|
this.$errors.fail(`Web socket proxy is already running for device '${device.deviceInfo.identifier}' and app '${appId}'`);
|
|
88
89
|
}
|
|
90
|
+
// NOTE: We will try to provide command line options to select ports, at least on the localhost.
|
|
89
91
|
const localPort = await this.$net.getAvailablePortInRange(41000);
|
|
90
92
|
this.$logger.info("\nSetting up debugger proxy...\nPress Ctrl + C to terminate, or disconnect.\n");
|
|
93
|
+
// NB: When the inspector frontend connects we might not have connected to the inspector backend yet.
|
|
94
|
+
// That's why we use the verifyClient callback of the websocket server to stall the upgrade request until we connect.
|
|
95
|
+
// We store the socket that connects us to the device in the upgrade request object itself and later on retrieve it
|
|
96
|
+
// in the connection callback.
|
|
91
97
|
let currentAppSocket = null;
|
|
92
98
|
let currentWebSocket = null;
|
|
93
99
|
const server = new ws.Server({
|
|
@@ -200,3 +206,4 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
|
|
|
200
206
|
}
|
|
201
207
|
exports.AppDebugSocketProxyFactory = AppDebugSocketProxyFactory;
|
|
202
208
|
yok_1.injector.register("appDebugSocketProxyFactory", AppDebugSocketProxyFactory);
|
|
209
|
+
//# sourceMappingURL=app-debug-socket-proxy-factory.js.map
|
|
@@ -6,6 +6,8 @@ const constants_1 = require("../../common/constants");
|
|
|
6
6
|
const yok_1 = require("../../common/yok");
|
|
7
7
|
class IOSNotification extends events_1.EventEmitter {
|
|
8
8
|
getAttachRequest(appId, deviceId) {
|
|
9
|
+
// It could be too early to emit this event, but we rely that if you construct attach request,
|
|
10
|
+
// you will execute it immediately.
|
|
9
11
|
this.emit(constants_1.ATTACH_REQUEST_EVENT_NAME, { deviceId, appId });
|
|
10
12
|
return this.formatNotification(IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME, appId);
|
|
11
13
|
}
|
|
@@ -28,3 +30,4 @@ IOSNotification.APP_REFRESH_STARTED_NOTIFICATION_NAME = "AppRefreshStarted";
|
|
|
28
30
|
IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME = "AttachRequest";
|
|
29
31
|
IOSNotification.READY_FOR_ATTACH_NOTIFICATION_NAME = "ReadyForAttach";
|
|
30
32
|
yok_1.injector.register("iOSNotification", IOSNotification);
|
|
33
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -25,6 +25,8 @@ class IOSSocketRequestExecutor {
|
|
|
25
25
|
async executeRequest(mainRequestName, successfulyExecutedNotificationName, appId, deviceId, timeout) {
|
|
26
26
|
let isSuccessful = false;
|
|
27
27
|
try {
|
|
28
|
+
// We should create this promise here because we need to send the ObserveNotification on the device
|
|
29
|
+
// before we send the PostNotification.
|
|
28
30
|
const socket = await this.$iOSNotificationService.postNotification(deviceId, successfulyExecutedNotificationName, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
|
|
29
31
|
const notificationPromise = this.$iOSNotificationService.awaitNotification(deviceId, +socket, timeout);
|
|
30
32
|
await this.$iOSNotificationService.postNotification(deviceId, mainRequestName);
|
|
@@ -39,3 +41,4 @@ class IOSSocketRequestExecutor {
|
|
|
39
41
|
}
|
|
40
42
|
exports.IOSSocketRequestExecutor = IOSSocketRequestExecutor;
|
|
41
43
|
yok_1.injector.register("iOSSocketRequestExecutor", IOSSocketRequestExecutor);
|
|
44
|
+
//# sourceMappingURL=socket-request-executor.js.map
|
|
@@ -22,7 +22,7 @@ class AndroidBundleValidatorHelper extends version_validator_helper_1.VersionVal
|
|
|
22
22
|
}
|
|
23
23
|
validateRuntimeVersion(projectData) {
|
|
24
24
|
if (this.$options.aab) {
|
|
25
|
-
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android");
|
|
25
|
+
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android" /* PlatformTypes.android */);
|
|
26
26
|
const androidRuntimeVersion = runtimePackage
|
|
27
27
|
? runtimePackage.version
|
|
28
28
|
: "";
|
|
@@ -50,3 +50,4 @@ exports.AndroidBundleValidatorHelper = AndroidBundleValidatorHelper;
|
|
|
50
50
|
AndroidBundleValidatorHelper.MIN_RUNTIME_VERSION = "5.0.0";
|
|
51
51
|
AndroidBundleValidatorHelper.MIN_ANDROID_WITH_AAB_SUPPORT = "4.4.0";
|
|
52
52
|
yok_1.injector.register("androidBundleValidatorHelper", AndroidBundleValidatorHelper);
|
|
53
|
+
//# sourceMappingURL=android-bundle-validator-helper.js.map
|
|
@@ -8,7 +8,8 @@ class KeyCommandHelper {
|
|
|
8
8
|
this.overrides = {};
|
|
9
9
|
this.onKeyPressed = async (data) => {
|
|
10
10
|
const key = data.toString();
|
|
11
|
-
|
|
11
|
+
// Allow Ctrl + C always.
|
|
12
|
+
if (this.keyCommandExecutionBlocked && key !== "\u0003" /* SpecialKeys.CtrlC */)
|
|
12
13
|
return;
|
|
13
14
|
try {
|
|
14
15
|
const exists = yok_1.injector.getRegisteredKeyCommandsNames().includes(key);
|
|
@@ -31,7 +32,7 @@ class KeyCommandHelper {
|
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
if (keyCommand.key !== "\u0003") {
|
|
35
|
+
if (keyCommand.key !== "\u0003" /* SpecialKeys.CtrlC */) {
|
|
35
36
|
const line = ` ${color_1.color.dim("→")} ${color_1.color.bold(keyCommand.key)} — ${keyCommand.description}`;
|
|
36
37
|
const lineLength = (0, color_1.stripColors)(line).length - 1;
|
|
37
38
|
console.log(color_1.color.dim(` ┌${"─".repeat(lineLength)}┐`));
|
|
@@ -113,3 +114,4 @@ class KeyCommandHelper {
|
|
|
113
114
|
}
|
|
114
115
|
exports.default = KeyCommandHelper;
|
|
115
116
|
yok_1.injector.register("keyCommandHelper", KeyCommandHelper);
|
|
117
|
+
//# sourceMappingURL=key-command-helper.js.map
|
|
@@ -25,6 +25,7 @@ class LiveSyncCommandHelper {
|
|
|
25
25
|
get $platformsDataService() {
|
|
26
26
|
return this.$injector.resolve("platformsDataService");
|
|
27
27
|
}
|
|
28
|
+
// TODO: Remove this and replace it with buildData
|
|
28
29
|
getLiveSyncData(projectDir) {
|
|
29
30
|
const liveSyncInfo = {
|
|
30
31
|
projectDir,
|
|
@@ -54,6 +55,7 @@ class LiveSyncCommandHelper {
|
|
|
54
55
|
return devices;
|
|
55
56
|
}
|
|
56
57
|
async createDeviceDescriptors(devices, platform, additionalOptions) {
|
|
58
|
+
// Now let's take data for each device:
|
|
57
59
|
const deviceDescriptors = devices.map((d) => {
|
|
58
60
|
const outputPath = additionalOptions &&
|
|
59
61
|
additionalOptions.getOutputDirectory &&
|
|
@@ -133,7 +135,7 @@ class LiveSyncCommandHelper {
|
|
|
133
135
|
const remainingDevicesToSync = devices.map((d) => d.deviceInfo.identifier);
|
|
134
136
|
_.remove(remainingDevicesToSync, (d) => d === data.deviceIdentifier);
|
|
135
137
|
if (remainingDevicesToSync.length === 0 && !data.keepProcessAlive) {
|
|
136
|
-
process.exit(134);
|
|
138
|
+
process.exit(134 /* ErrorCodes.ALL_DEVICES_DISCONNECTED */);
|
|
137
139
|
}
|
|
138
140
|
});
|
|
139
141
|
}
|
|
@@ -203,3 +205,4 @@ class LiveSyncCommandHelper {
|
|
|
203
205
|
}
|
|
204
206
|
exports.LiveSyncCommandHelper = LiveSyncCommandHelper;
|
|
205
207
|
yok_1.injector.register("liveSyncCommandHelper", LiveSyncCommandHelper);
|
|
208
|
+
//# sourceMappingURL=livesync-command-helper.js.map
|
|
@@ -34,3 +34,4 @@ NetworkConnectivityValidator.DNS_LOOKUP_URL = "play.nativescript.org";
|
|
|
34
34
|
NetworkConnectivityValidator.NO_INTERNET_ERROR_CODE = "ENOTFOUND";
|
|
35
35
|
NetworkConnectivityValidator.NO_INTERNET_ERROR_MESSAGE = "No internet connection. Check your internet settings and try again.";
|
|
36
36
|
yok_1.injector.register("networkConnectivityValidator", NetworkConnectivityValidator);
|
|
37
|
+
//# sourceMappingURL=network-connectivity-validator.js.map
|
|
@@ -11,7 +11,7 @@ class OptionsTracker {
|
|
|
11
11
|
async trackOptions(options) {
|
|
12
12
|
const trackObject = this.getTrackObject(options);
|
|
13
13
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
14
|
-
action: "Options"
|
|
14
|
+
action: "Options" /* TrackActionNames.Options */,
|
|
15
15
|
additionalData: JSON.stringify(trackObject),
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -58,7 +58,7 @@ class OptionsTracker {
|
|
|
58
58
|
return true;
|
|
59
59
|
}
|
|
60
60
|
const optionDef = options[key];
|
|
61
|
-
if (optionDef && optionDef.type === "boolean") {
|
|
61
|
+
if (optionDef && optionDef.type === "boolean" /* OptionType.Boolean */) {
|
|
62
62
|
if ((optionDef.default !== true && value === false) ||
|
|
63
63
|
(optionDef.default === true && value === true)) {
|
|
64
64
|
return true;
|
|
@@ -75,3 +75,4 @@ OptionsTracker.PRIVATE_REPLACE_VALUE = "private";
|
|
|
75
75
|
OptionsTracker.PATH_REPLACE_VALUE = "_localpath";
|
|
76
76
|
OptionsTracker.SIZE_EXEEDED_REPLACE_VALUE = "sizeExceeded";
|
|
77
77
|
yok_1.injector.register("optionsTracker", OptionsTracker);
|
|
78
|
+
//# sourceMappingURL=options-track-helper.js.map
|
|
@@ -4,3 +4,4 @@ exports.resolvePackageJSONPath = exports.resolvePackagePath = void 0;
|
|
|
4
4
|
const resolve_package_path_1 = require("@rigor789/resolve-package-path");
|
|
5
5
|
Object.defineProperty(exports, "resolvePackagePath", { enumerable: true, get: function () { return resolve_package_path_1.resolvePackagePath; } });
|
|
6
6
|
Object.defineProperty(exports, "resolvePackageJSONPath", { enumerable: true, get: function () { return resolve_package_path_1.resolvePackageJSONPath; } });
|
|
7
|
+
//# sourceMappingURL=package-path-helper.js.map
|
|
@@ -70,6 +70,10 @@ class PlatformCommandHelper {
|
|
|
70
70
|
const platformDir = path.join(projectData.platformsDir, platform.toLowerCase());
|
|
71
71
|
this.$fs.deleteDirectory(platformDir);
|
|
72
72
|
await this.$packageInstallationManager.uninstall(platformData.frameworkPackageName, projectData.projectDir);
|
|
73
|
+
// this.$projectDataService.removeNSProperty(
|
|
74
|
+
// projectData.projectDir,
|
|
75
|
+
// platformData.frameworkPackageName
|
|
76
|
+
// );
|
|
73
77
|
this.$logger.info(`Platform ${platform} successfully removed.`);
|
|
74
78
|
}
|
|
75
79
|
catch (err) {
|
|
@@ -108,7 +112,7 @@ class PlatformCommandHelper {
|
|
|
108
112
|
const installedPlatforms = this.getInstalledPlatforms(projectData);
|
|
109
113
|
return _.filter(this.$mobileHelper.platformNames, (p) => {
|
|
110
114
|
return (installedPlatforms.indexOf(p) < 0 &&
|
|
111
|
-
this.$platformValidationService.isPlatformSupportedForOS(p, projectData));
|
|
115
|
+
this.$platformValidationService.isPlatformSupportedForOS(p, projectData)); // Only those not already installed
|
|
112
116
|
});
|
|
113
117
|
}
|
|
114
118
|
getPreparedPlatforms(projectData) {
|
|
@@ -132,7 +136,7 @@ class PlatformCommandHelper {
|
|
|
132
136
|
return true;
|
|
133
137
|
}
|
|
134
138
|
return (prepareInfo.nativePlatformStatus !==
|
|
135
|
-
"1");
|
|
139
|
+
"1" /* constants.NativePlatformStatus.requiresPlatformAdd */);
|
|
136
140
|
}
|
|
137
141
|
async updatePlatform(platform, version, projectData) {
|
|
138
142
|
const platformData = this.$platformsDataService.getPlatformData(platform, projectData);
|
|
@@ -178,3 +182,4 @@ class PlatformCommandHelper {
|
|
|
178
182
|
}
|
|
179
183
|
exports.PlatformCommandHelper = PlatformCommandHelper;
|
|
180
184
|
yok_1.injector.register("platformCommandHelper", PlatformCommandHelper);
|
|
185
|
+
//# sourceMappingURL=platform-command-helper.js.map
|
|
@@ -13,9 +13,10 @@ yok_1.injector.requireKeyCommand("R", path);
|
|
|
13
13
|
yok_1.injector.requireKeyCommand("w", path);
|
|
14
14
|
yok_1.injector.requireKeyCommand("c", path);
|
|
15
15
|
yok_1.injector.requireKeyCommand("n", path);
|
|
16
|
-
yok_1.injector.requireKeyCommand("?"
|
|
17
|
-
yok_1.injector.requireKeyCommand("\u0003"
|
|
16
|
+
yok_1.injector.requireKeyCommand("?" /* SpecialKeys.QuestionMark */, path);
|
|
17
|
+
yok_1.injector.requireKeyCommand("\u0003" /* SpecialKeys.CtrlC */, path);
|
|
18
18
|
yok_1.injector.requireCommand("open|ios", path);
|
|
19
19
|
yok_1.injector.requireCommand("open|android", path);
|
|
20
20
|
yok_1.injector.requireCommand("open|visionos", path);
|
|
21
21
|
yok_1.injector.requireCommand("open|vision", path);
|
|
22
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -294,7 +294,7 @@ class ShiftR {
|
|
|
294
294
|
exports.ShiftR = ShiftR;
|
|
295
295
|
class CtrlC {
|
|
296
296
|
constructor() {
|
|
297
|
-
this.key = "\u0003"
|
|
297
|
+
this.key = "\u0003" /* SpecialKeys.CtrlC */;
|
|
298
298
|
this.platform = "all";
|
|
299
299
|
this.group = "Development Workflow";
|
|
300
300
|
this.willBlockKeyCommandExecution = false;
|
|
@@ -365,7 +365,7 @@ exports.N = N;
|
|
|
365
365
|
class QuestionMark {
|
|
366
366
|
constructor($keyCommandHelper) {
|
|
367
367
|
this.$keyCommandHelper = $keyCommandHelper;
|
|
368
|
-
this.key = "?"
|
|
368
|
+
this.key = "?" /* SpecialKeys.QuestionMark */;
|
|
369
369
|
this.platform = "all";
|
|
370
370
|
this.description = "Show this help";
|
|
371
371
|
this.group = "Development Workflow";
|
|
@@ -405,9 +405,10 @@ yok_1.injector.registerKeyCommand("w", W);
|
|
|
405
405
|
yok_1.injector.registerKeyCommand("c", C);
|
|
406
406
|
yok_1.injector.registerKeyCommand("A", ShiftA);
|
|
407
407
|
yok_1.injector.registerKeyCommand("n", N);
|
|
408
|
-
yok_1.injector.registerKeyCommand("?"
|
|
409
|
-
yok_1.injector.registerKeyCommand("\u0003"
|
|
408
|
+
yok_1.injector.registerKeyCommand("?" /* SpecialKeys.QuestionMark */, QuestionMark);
|
|
409
|
+
yok_1.injector.registerKeyCommand("\u0003" /* SpecialKeys.CtrlC */, CtrlC);
|
|
410
410
|
yok_1.injector.registerCommand("open|ios", OpenIOSCommand);
|
|
411
411
|
yok_1.injector.registerCommand("open|visionos", OpenVisionOSCommand);
|
|
412
412
|
yok_1.injector.registerCommand("open|vision", OpenVisionOSCommand);
|
|
413
413
|
yok_1.injector.registerCommand("open|android", OpenAndroidCommand);
|
|
414
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const yok_1 = require("./common/yok");
|
|
4
4
|
require("./bootstrap");
|
|
5
5
|
yok_1.injector.overrideAlreadyRequiredModule = true;
|
|
6
|
+
// Temporary!!! Should not require appbuilder's entry point of mobile-cli-lib,
|
|
7
|
+
// but once we separate logics in mobile-cli-lib, we should be able to require only specific bootstrap.
|
|
8
|
+
// Use this hack for now, as this will allow requiring {N} CLI as library directly and executing some device specific operations.
|
|
6
9
|
yok_1.injector.requirePublicClass("deviceEmitter", "./common/mobile/device-emitter");
|
|
7
10
|
yok_1.injector.requirePublicClass("deviceLogProvider", "./common/mobile/device-log-emitter");
|
|
8
11
|
yok_1.injector.resolve("staticConfig").disableAnalytics = true;
|
|
12
|
+
//# sourceMappingURL=nativescript-cli-lib-bootstrap.js.map
|
package/lib/nativescript-cli.js
CHANGED
|
@@ -9,7 +9,7 @@ const errors_1 = require("./common/errors");
|
|
|
9
9
|
const helpers_1 = require("./common/helpers");
|
|
10
10
|
const yok_1 = require("./common/yok");
|
|
11
11
|
const color_1 = require("./color");
|
|
12
|
-
(0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120));
|
|
12
|
+
(0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120 /* ErrorCodes.UNCAUGHT */));
|
|
13
13
|
const logger = yok_1.injector.resolve("logger");
|
|
14
14
|
exports.originalProcessOn = process.on.bind(process);
|
|
15
15
|
process.on = (event, listener) => {
|
|
@@ -23,8 +23,10 @@ process.on = (event, listener) => {
|
|
|
23
23
|
return (0, exports.originalProcessOn)(event, listener);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
+
/* tslint:disable:no-floating-promises */
|
|
26
27
|
(async () => {
|
|
27
28
|
if (process.argv.includes("--get-yargs-completions")) {
|
|
29
|
+
// This is a special case when we want to get the yargs completions as fast as possible...
|
|
28
30
|
yok_1.injector.resolve("$options");
|
|
29
31
|
return;
|
|
30
32
|
}
|
|
@@ -41,6 +43,13 @@ process.on = (event, listener) => {
|
|
|
41
43
|
logger.trace("Unable to load extensions. Error is: ", err);
|
|
42
44
|
}
|
|
43
45
|
const commandDispatcher = yok_1.injector.resolve("commandDispatcher");
|
|
46
|
+
// unused...
|
|
47
|
+
// const messages: IMessagesService = injector.resolve("$messagesService");
|
|
48
|
+
// messages.pathsToMessageJsonFiles = [
|
|
49
|
+
// /* Place client-specific json message file paths here */
|
|
50
|
+
// ];
|
|
44
51
|
await commandDispatcher.dispatchCommand();
|
|
45
52
|
yok_1.injector.dispose();
|
|
46
53
|
})();
|
|
54
|
+
/* tslint:enable:no-floating-promises */
|
|
55
|
+
//# sourceMappingURL=nativescript-cli.js.map
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const pbxprojDomXcodeModule = require("pbxproj-dom/xcode");
|
|
4
4
|
const yok_1 = require("../common/yok");
|
|
5
5
|
yok_1.injector.register("pbxprojDomXcode", pbxprojDomXcodeModule);
|
|
6
|
+
//# sourceMappingURL=pbxproj-dom-xcode.js.map
|
package/lib/node/xcode.js
CHANGED
|
@@ -37,8 +37,12 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
37
37
|
}
|
|
38
38
|
params = params.concat(flags);
|
|
39
39
|
const cwd = pathToSave;
|
|
40
|
+
// Npm creates `etc` directory in installation dir when --prefix is passed
|
|
41
|
+
// https://github.com/npm/npm/issues/11486
|
|
42
|
+
// we should delete it if it was created because of us
|
|
40
43
|
const etcDirectoryLocation = (0, path_1.join)(cwd, "etc");
|
|
41
44
|
const etcExistsPriorToInstallation = this.$fs.exists(etcDirectoryLocation);
|
|
45
|
+
//TODO: plamen5kov: workaround is here for a reason (remove whole file later)
|
|
42
46
|
if (config.path) {
|
|
43
47
|
let relativePathFromCwdToSource = "";
|
|
44
48
|
if (config.frameworkPath) {
|
|
@@ -54,9 +58,13 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
54
58
|
}
|
|
55
59
|
catch (err) {
|
|
56
60
|
if (err.message && err.message.indexOf("EPEERINVALID") !== -1) {
|
|
61
|
+
// Not installed peer dependencies are treated by npm 2 as errors, but npm 3 treats them as warnings.
|
|
62
|
+
// We'll show them as warnings and let the user install them in case they are needed.
|
|
57
63
|
this.$logger.warn(err.message);
|
|
58
64
|
}
|
|
59
65
|
else {
|
|
66
|
+
// All other errors should be handled by the caller code.
|
|
67
|
+
// Revert package.json contents to preserve valid state
|
|
60
68
|
this.$fs.writeJson(packageJsonPath, jsonContentBefore);
|
|
61
69
|
throw err;
|
|
62
70
|
}
|
|
@@ -78,7 +86,7 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
78
86
|
return this.$childProcess.exec(`npm search ${filter.join(" ")} ${flags}`);
|
|
79
87
|
}
|
|
80
88
|
async view(packageName, config) {
|
|
81
|
-
const wrappedConfig = _.extend({}, config, { json: true });
|
|
89
|
+
const wrappedConfig = _.extend({}, config, { json: true }); // always require view response as JSON
|
|
82
90
|
const flags = this.getFlagsString(wrappedConfig, false);
|
|
83
91
|
let viewResult;
|
|
84
92
|
try {
|
|
@@ -95,6 +103,7 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
95
103
|
}
|
|
96
104
|
}
|
|
97
105
|
async searchNpms(keyword) {
|
|
106
|
+
// TODO: Fix the generation of url - in case it contains @ or / , the call may fail.
|
|
98
107
|
const httpRequestResult = await this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
|
|
99
108
|
const result = JSON.parse(httpRequestResult.body);
|
|
100
109
|
return result;
|
|
@@ -131,3 +140,4 @@ __decorate([
|
|
|
131
140
|
(0, decorators_1.cache)()
|
|
132
141
|
], NodePackageManager.prototype, "getCachePath", null);
|
|
133
142
|
yok_1.injector.register("npm", NodePackageManager);
|
|
143
|
+
//# sourceMappingURL=node-package-manager.js.map
|