nativescript 8.8.0 → 8.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/test-deps-versions-generated.json +1 -1
- package/lib/android-tools-info.js +12 -0
- package/lib/base-package-manager.js +11 -1
- package/lib/bootstrap.js +5 -1
- package/lib/bun-package-manager.js +17 -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 +4 -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 +3 -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 +12 -2
- 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/common/bootstrap.js +1 -0
- package/lib/common/child-process.js +3 -0
- package/lib/common/codeGeneration/code-entity.js +1 -0
- package/lib/common/codeGeneration/code-printer.js +1 -0
- package/lib/common/command-params.js +1 -0
- package/lib/common/commands/analytics.js +3 -0
- package/lib/common/commands/autocompletion.js +3 -0
- package/lib/common/commands/device/device-log-stream.js +1 -0
- package/lib/common/commands/device/get-file.js +2 -0
- package/lib/common/commands/device/list-applications.js +1 -0
- package/lib/common/commands/device/list-devices.js +3 -0
- package/lib/common/commands/device/list-files.js +2 -0
- package/lib/common/commands/device/put-file.js +2 -0
- package/lib/common/commands/device/run-application.js +1 -0
- package/lib/common/commands/device/stop-application.js +1 -0
- package/lib/common/commands/device/uninstall-application.js +1 -0
- package/lib/common/commands/doctor.js +3 -2
- package/lib/common/commands/generate-messages.js +1 -0
- package/lib/common/commands/help.js +1 -0
- package/lib/common/commands/package-manager-get.js +1 -0
- package/lib/common/commands/package-manager-set.js +1 -0
- package/lib/common/commands/post-install.js +1 -0
- package/lib/common/commands/preuninstall.js +11 -2
- package/lib/common/commands/proxy/proxy-base.js +4 -0
- package/lib/common/commands/proxy/proxy-clear.js +1 -0
- package/lib/common/commands/proxy/proxy-get.js +1 -0
- package/lib/common/commands/proxy/proxy-set.js +1 -0
- package/lib/common/common-lib.js +1 -0
- package/lib/common/constants.js +11 -0
- package/lib/common/decorators.js +48 -0
- package/lib/common/dispatchers.js +10 -1
- package/lib/common/errors.js +13 -3
- package/lib/common/file-system.js +13 -2
- package/lib/common/header.js +3 -0
- package/lib/common/helpers.js +89 -3
- package/lib/common/host-info.js +4 -0
- package/lib/common/http-client.js +20 -0
- package/lib/common/logger/appenders/cli-appender.js +4 -0
- package/lib/common/logger/appenders/emit-appender.js +4 -0
- package/lib/common/logger/layouts/cli-layout.js +1 -0
- package/lib/common/logger/logger.js +5 -0
- package/lib/common/messages/messages.js +6 -0
- package/lib/common/mobile/android/android-application-manager.js +20 -1
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
- package/lib/common/mobile/android/android-debug-bridge.js +6 -0
- package/lib/common/mobile/android/android-device-file-system.js +4 -0
- package/lib/common/mobile/android/android-device-hash-service.js +3 -0
- package/lib/common/mobile/android/android-device.js +8 -0
- package/lib/common/mobile/android/android-emulator-services.js +2 -1
- package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
- package/lib/common/mobile/android/android-log-filter.js +4 -0
- package/lib/common/mobile/android/android-virtual-device-service.js +30 -1
- package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
- package/lib/common/mobile/android/genymotion/genymotion-service.js +5 -0
- 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 +91 -3
- 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 +143 -118
- 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 +6 -1
- package/lib/services/android-device-debug-service.js +6 -0
- package/lib/services/android-plugin-build-service.js +33 -1
- 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/assets-generation/assets-generation-service.js +16 -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/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 +9 -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 +1 -0
- 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 +94 -2
- 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 +22 -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/webpack/webpack-compiler-service.js +42 -1
- 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/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
- package/node_modules/rimraf/CHANGELOG.md +65 -0
- package/node_modules/stringify-package/CHANGELOG.md +16 -0
- package/package.json +2 -2
package/lib/data/run-data.js
CHANGED
|
@@ -10,6 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
// NOTE: This file is used to call JS functions when cleaning resources used by CLI, after the CLI is killed.
|
|
14
|
+
// The instances here are not shared with the ones in main CLI process.
|
|
13
15
|
const fs = require("fs");
|
|
14
16
|
const uuid_1 = require("uuid");
|
|
15
17
|
const file_log_service_1 = require("./file-log-service");
|
|
@@ -18,6 +20,7 @@ const pathToBootstrap = process.argv[2];
|
|
|
18
20
|
if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
|
|
19
21
|
throw new Error("Invalid path to bootstrap.");
|
|
20
22
|
}
|
|
23
|
+
// After requiring the bootstrap we can use $injector
|
|
21
24
|
require(pathToBootstrap);
|
|
22
25
|
const logFile = process.argv[3];
|
|
23
26
|
const jsFilePath = process.argv[4];
|
|
@@ -41,6 +44,7 @@ catch (err) {
|
|
|
41
44
|
const logMessage = (msg, type) => {
|
|
42
45
|
fileLogService.logData({ message: `[${uniqueId}] ${msg}`, type });
|
|
43
46
|
};
|
|
47
|
+
/* tslint:disable:no-floating-promises */
|
|
44
48
|
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
49
|
try {
|
|
46
50
|
logMessage(`Requiring file ${jsFilePath}`);
|
|
@@ -52,11 +56,13 @@ const logMessage = (msg, type) => {
|
|
|
52
56
|
logMessage(`Finished execution with data: ${JSON.stringify(data)} to the default function exported by currently required file ${jsFilePath}`);
|
|
53
57
|
}
|
|
54
58
|
catch (err) {
|
|
55
|
-
logMessage(`Unable to execute action of file ${jsFilePath} when passed data is ${JSON.stringify(data)}. Error is: ${err}.`, "Error");
|
|
59
|
+
logMessage(`Unable to execute action of file ${jsFilePath} when passed data is ${JSON.stringify(data)}. Error is: ${err}.`, "Error" /* FileLogMessageType.Error */);
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
catch (err) {
|
|
60
|
-
logMessage(`Unable to require file: ${jsFilePath}. Error is: ${err}.`, "Error");
|
|
64
|
+
logMessage(`Unable to require file: ${jsFilePath}. Error is: ${err}.`, "Error" /* FileLogMessageType.Error */);
|
|
61
65
|
}
|
|
62
66
|
}))();
|
|
67
|
+
/* tslint:enable:no-floating-promises */
|
|
68
|
+
//# sourceMappingURL=cleanup-js-subprocess.js.map
|
|
@@ -9,6 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
// NOTE: This file is used to clean up resources used by CLI, when the CLI is killed.
|
|
13
|
+
// The instances here are not shared with the ones in main CLI process.
|
|
12
14
|
const fs = require("fs");
|
|
13
15
|
const path = require("path");
|
|
14
16
|
const shelljs = require("shelljs");
|
|
@@ -20,6 +22,7 @@ if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
|
|
|
20
22
|
throw new Error("Invalid path to bootstrap.");
|
|
21
23
|
}
|
|
22
24
|
const logFile = process.argv[3];
|
|
25
|
+
// After requiring the bootstrap we can use $injector
|
|
23
26
|
require(pathToBootstrap);
|
|
24
27
|
const fileLogService = yok_1.injector.resolve(file_log_service_1.FileLogService, {
|
|
25
28
|
logFile,
|
|
@@ -72,7 +75,7 @@ const executeJSCleanup = (jsCommand) => __awaiter(void 0, void 0, void 0, functi
|
|
|
72
75
|
catch (err) {
|
|
73
76
|
fileLogService.logData({
|
|
74
77
|
message: `Unable to execute action for file ${jsCommand.filePath} with data ${JSON.stringify(jsCommand.data)}. Error is: ${err}.`,
|
|
75
|
-
type: "Error"
|
|
78
|
+
type: "Error" /* FileLogMessageType.Error */,
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
81
|
});
|
|
@@ -97,7 +100,7 @@ const executeCleanup = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
97
100
|
catch (err) {
|
|
98
101
|
fileLogService.logData({
|
|
99
102
|
message: `Unable to execute command: ${JSON.stringify(commandInfo)}. Error is: ${err}.`,
|
|
100
|
-
type: "Error"
|
|
103
|
+
type: "Error" /* FileLogMessageType.Error */,
|
|
101
104
|
});
|
|
102
105
|
}
|
|
103
106
|
}
|
|
@@ -111,7 +114,7 @@ const executeCleanup = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
111
114
|
catch (err) {
|
|
112
115
|
fileLogService.logData({
|
|
113
116
|
message: `Unable to delete files: ${JSON.stringify(filesToDelete)}. Error is: ${err}.`,
|
|
114
|
-
type: "Error"
|
|
117
|
+
type: "Error" /* FileLogMessageType.Error */,
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
120
|
}
|
|
@@ -233,36 +236,36 @@ process.on("message", (cleanupProcessMessage) => __awaiter(void 0, void 0, void
|
|
|
233
236
|
message: `cleanup-process received message of type: ${JSON.stringify(cleanupProcessMessage)}`,
|
|
234
237
|
});
|
|
235
238
|
switch (cleanupProcessMessage.messageType) {
|
|
236
|
-
case "AddCleanCommand"
|
|
239
|
+
case "AddCleanCommand" /* CleanupProcessMessage.AddCleanCommand */:
|
|
237
240
|
addCleanupAction(cleanupProcessMessage.commandInfo);
|
|
238
241
|
break;
|
|
239
|
-
case "RemoveCleanCommand"
|
|
242
|
+
case "RemoveCleanCommand" /* CleanupProcessMessage.RemoveCleanCommand */:
|
|
240
243
|
removeCleanupAction(cleanupProcessMessage.commandInfo);
|
|
241
244
|
break;
|
|
242
|
-
case "AddRequest"
|
|
245
|
+
case "AddRequest" /* CleanupProcessMessage.AddRequest */:
|
|
243
246
|
addRequest(cleanupProcessMessage.requestInfo);
|
|
244
247
|
break;
|
|
245
|
-
case "RemoveRequest"
|
|
248
|
+
case "RemoveRequest" /* CleanupProcessMessage.RemoveRequest */:
|
|
246
249
|
removeRequest(cleanupProcessMessage.requestInfo);
|
|
247
250
|
break;
|
|
248
|
-
case "AddDeleteFileAction"
|
|
251
|
+
case "AddDeleteFileAction" /* CleanupProcessMessage.AddDeleteFileAction */:
|
|
249
252
|
addDeleteAction(cleanupProcessMessage.filePath);
|
|
250
253
|
break;
|
|
251
|
-
case "RemoveDeleteFileAction"
|
|
254
|
+
case "RemoveDeleteFileAction" /* CleanupProcessMessage.RemoveDeleteFileAction */:
|
|
252
255
|
removeDeleteAction(cleanupProcessMessage.filePath);
|
|
253
256
|
break;
|
|
254
|
-
case "AddJSFileToRequire"
|
|
257
|
+
case "AddJSFileToRequire" /* CleanupProcessMessage.AddJSFileToRequire */:
|
|
255
258
|
const jsCleanupMessage = cleanupProcessMessage;
|
|
256
259
|
addJSFile(jsCleanupMessage.jsCommand);
|
|
257
260
|
break;
|
|
258
|
-
case "RemoveJSFileToRequire"
|
|
261
|
+
case "RemoveJSFileToRequire" /* CleanupProcessMessage.RemoveJSFileToRequire */:
|
|
259
262
|
const msgToRemove = cleanupProcessMessage;
|
|
260
263
|
removeJSFile(msgToRemove.jsCommand);
|
|
261
264
|
break;
|
|
262
265
|
default:
|
|
263
266
|
fileLogService.logData({
|
|
264
267
|
message: `Unable to handle message of type ${cleanupProcessMessage.messageType}. Full message is ${JSON.stringify(cleanupProcessMessage)}`,
|
|
265
|
-
type: "Error"
|
|
268
|
+
type: "Error" /* FileLogMessageType.Error */,
|
|
266
269
|
});
|
|
267
270
|
break;
|
|
268
271
|
}
|
|
@@ -276,6 +279,7 @@ process.on("disconnect", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
276
279
|
process.exit();
|
|
277
280
|
}));
|
|
278
281
|
fileLogService.logData({
|
|
279
|
-
message: `cleanup-process will send ${"ProcessReadyToReceive"} message`,
|
|
282
|
+
message: `cleanup-process will send ${"ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */} message`,
|
|
280
283
|
});
|
|
281
|
-
process.send("ProcessReadyToReceive");
|
|
284
|
+
process.send("ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */);
|
|
285
|
+
//# 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
|
|
@@ -88,6 +88,7 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
|
|
|
88
88
|
const existingWebProxy = this.deviceWebServers[`${device.deviceInfo.identifier}-${appId}`];
|
|
89
89
|
const result = existingWebProxy ||
|
|
90
90
|
(yield this.addWebSocketProxy(device, appId, projectName, projectDir));
|
|
91
|
+
// TODO: do not remove till VSCode waits for this message in order to reattach
|
|
91
92
|
this.$logger.info("Opened localhost " + result.options.port);
|
|
92
93
|
return result;
|
|
93
94
|
});
|
|
@@ -100,8 +101,13 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
|
|
|
100
101
|
if (existingServer) {
|
|
101
102
|
this.$errors.fail(`Web socket proxy is already running for device '${device.deviceInfo.identifier}' and app '${appId}'`);
|
|
102
103
|
}
|
|
104
|
+
// NOTE: We will try to provide command line options to select ports, at least on the localhost.
|
|
103
105
|
const localPort = yield this.$net.getAvailablePortInRange(41000);
|
|
104
106
|
this.$logger.info("\nSetting up debugger proxy...\nPress Ctrl + C to terminate, or disconnect.\n");
|
|
107
|
+
// NB: When the inspector frontend connects we might not have connected to the inspector backend yet.
|
|
108
|
+
// That's why we use the verifyClient callback of the websocket server to stall the upgrade request until we connect.
|
|
109
|
+
// We store the socket that connects us to the device in the upgrade request object itself and later on retrieve it
|
|
110
|
+
// in the connection callback.
|
|
105
111
|
let currentAppSocket = null;
|
|
106
112
|
let currentWebSocket = null;
|
|
107
113
|
const server = new ws.Server({
|
|
@@ -215,3 +221,4 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
|
|
|
215
221
|
}
|
|
216
222
|
exports.AppDebugSocketProxyFactory = AppDebugSocketProxyFactory;
|
|
217
223
|
yok_1.injector.register("appDebugSocketProxyFactory", AppDebugSocketProxyFactory);
|
|
224
|
+
//# 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.ATTACH_REQUEST_NOTIFICATION_NAME = "AttachRequest";
|
|
|
28
30
|
IOSNotification.READY_FOR_ATTACH_NOTIFICATION_NAME = "ReadyForAttach";
|
|
29
31
|
exports.IOSNotification = IOSNotification;
|
|
30
32
|
yok_1.injector.register("iOSNotification", IOSNotification);
|
|
33
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -39,6 +39,8 @@ class IOSSocketRequestExecutor {
|
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
let isSuccessful = false;
|
|
41
41
|
try {
|
|
42
|
+
// We should create this promise here because we need to send the ObserveNotification on the device
|
|
43
|
+
// before we send the PostNotification.
|
|
42
44
|
const socket = yield this.$iOSNotificationService.postNotification(deviceId, successfulyExecutedNotificationName, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
|
|
43
45
|
const notificationPromise = this.$iOSNotificationService.awaitNotification(deviceId, +socket, timeout);
|
|
44
46
|
yield this.$iOSNotificationService.postNotification(deviceId, mainRequestName);
|
|
@@ -54,3 +56,4 @@ class IOSSocketRequestExecutor {
|
|
|
54
56
|
}
|
|
55
57
|
exports.IOSSocketRequestExecutor = IOSSocketRequestExecutor;
|
|
56
58
|
yok_1.injector.register("iOSSocketRequestExecutor", IOSSocketRequestExecutor);
|
|
59
|
+
//# 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 @@ AndroidBundleValidatorHelper.MIN_RUNTIME_VERSION = "5.0.0";
|
|
|
50
50
|
AndroidBundleValidatorHelper.MIN_ANDROID_WITH_AAB_SUPPORT = "4.4.0";
|
|
51
51
|
exports.AndroidBundleValidatorHelper = AndroidBundleValidatorHelper;
|
|
52
52
|
yok_1.injector.register("androidBundleValidatorHelper", AndroidBundleValidatorHelper);
|
|
53
|
+
//# sourceMappingURL=android-bundle-validator-helper.js.map
|
|
@@ -17,7 +17,8 @@ class KeyCommandHelper {
|
|
|
17
17
|
this.overrides = {};
|
|
18
18
|
this.onKeyPressed = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const key = data.toString();
|
|
20
|
-
|
|
20
|
+
// Allow Ctrl + C always.
|
|
21
|
+
if (this.keyCommandExecutionBlocked && key !== "\u0003" /* SpecialKeys.CtrlC */)
|
|
21
22
|
return;
|
|
22
23
|
try {
|
|
23
24
|
const exists = yok_1.injector.getRegisteredKeyCommandsNames().includes(key);
|
|
@@ -40,7 +41,7 @@ class KeyCommandHelper {
|
|
|
40
41
|
return;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
if (keyCommand.key !== "\u0003") {
|
|
44
|
+
if (keyCommand.key !== "\u0003" /* SpecialKeys.CtrlC */) {
|
|
44
45
|
const line = ` ${color_1.color.dim("→")} ${color_1.color.bold(keyCommand.key)} — ${keyCommand.description}`;
|
|
45
46
|
const lineLength = (0, color_1.stripColors)(line).length - 1;
|
|
46
47
|
console.log(color_1.color.dim(` ┌${"─".repeat(lineLength)}┐`));
|
|
@@ -122,3 +123,4 @@ class KeyCommandHelper {
|
|
|
122
123
|
}
|
|
123
124
|
exports.default = KeyCommandHelper;
|
|
124
125
|
yok_1.injector.register("keyCommandHelper", KeyCommandHelper);
|
|
126
|
+
//# sourceMappingURL=key-command-helper.js.map
|
|
@@ -34,6 +34,7 @@ class LiveSyncCommandHelper {
|
|
|
34
34
|
get $platformsDataService() {
|
|
35
35
|
return this.$injector.resolve("platformsDataService");
|
|
36
36
|
}
|
|
37
|
+
// TODO: Remove this and replace it with buildData
|
|
37
38
|
getLiveSyncData(projectDir) {
|
|
38
39
|
const liveSyncInfo = {
|
|
39
40
|
projectDir,
|
|
@@ -66,6 +67,7 @@ class LiveSyncCommandHelper {
|
|
|
66
67
|
}
|
|
67
68
|
createDeviceDescriptors(devices, platform, additionalOptions) {
|
|
68
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
// Now let's take data for each device:
|
|
69
71
|
const deviceDescriptors = devices.map((d) => {
|
|
70
72
|
const outputPath = additionalOptions &&
|
|
71
73
|
additionalOptions.getOutputDirectory &&
|
|
@@ -139,7 +141,7 @@ class LiveSyncCommandHelper {
|
|
|
139
141
|
const remainingDevicesToSync = devices.map((d) => d.deviceInfo.identifier);
|
|
140
142
|
_.remove(remainingDevicesToSync, (d) => d === data.deviceIdentifier);
|
|
141
143
|
if (remainingDevicesToSync.length === 0 && !data.keepProcessAlive) {
|
|
142
|
-
process.exit(134);
|
|
144
|
+
process.exit(134 /* ErrorCodes.ALL_DEVICES_DISCONNECTED */);
|
|
143
145
|
}
|
|
144
146
|
}));
|
|
145
147
|
});
|
|
@@ -218,3 +220,4 @@ class LiveSyncCommandHelper {
|
|
|
218
220
|
}
|
|
219
221
|
exports.LiveSyncCommandHelper = LiveSyncCommandHelper;
|
|
220
222
|
yok_1.injector.register("liveSyncCommandHelper", LiveSyncCommandHelper);
|
|
223
|
+
//# sourceMappingURL=livesync-command-helper.js.map
|
|
@@ -45,3 +45,4 @@ NetworkConnectivityValidator.NO_INTERNET_ERROR_CODE = "ENOTFOUND";
|
|
|
45
45
|
NetworkConnectivityValidator.NO_INTERNET_ERROR_MESSAGE = "No internet connection. Check your internet settings and try again.";
|
|
46
46
|
exports.NetworkConnectivityValidator = NetworkConnectivityValidator;
|
|
47
47
|
yok_1.injector.register("networkConnectivityValidator", NetworkConnectivityValidator);
|
|
48
|
+
//# sourceMappingURL=network-connectivity-validator.js.map
|
|
@@ -21,7 +21,7 @@ class OptionsTracker {
|
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const trackObject = this.getTrackObject(options);
|
|
23
23
|
yield this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
24
|
-
action: "Options"
|
|
24
|
+
action: "Options" /* TrackActionNames.Options */,
|
|
25
25
|
additionalData: JSON.stringify(trackObject),
|
|
26
26
|
});
|
|
27
27
|
});
|
|
@@ -69,7 +69,7 @@ class OptionsTracker {
|
|
|
69
69
|
return true;
|
|
70
70
|
}
|
|
71
71
|
const optionDef = options[key];
|
|
72
|
-
if (optionDef && optionDef.type === "boolean") {
|
|
72
|
+
if (optionDef && optionDef.type === "boolean" /* OptionType.Boolean */) {
|
|
73
73
|
if ((optionDef.default !== true && value === false) ||
|
|
74
74
|
(optionDef.default === true && value === true)) {
|
|
75
75
|
return true;
|
|
@@ -86,3 +86,4 @@ OptionsTracker.PATH_REPLACE_VALUE = "_localpath";
|
|
|
86
86
|
OptionsTracker.SIZE_EXEEDED_REPLACE_VALUE = "sizeExceeded";
|
|
87
87
|
exports.OptionsTracker = OptionsTracker;
|
|
88
88
|
yok_1.injector.register("optionsTracker", OptionsTracker);
|
|
89
|
+
//# 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
|
|
@@ -84,6 +84,10 @@ class PlatformCommandHelper {
|
|
|
84
84
|
const platformDir = path.join(projectData.platformsDir, platform.toLowerCase());
|
|
85
85
|
this.$fs.deleteDirectory(platformDir);
|
|
86
86
|
yield this.$packageInstallationManager.uninstall(platformData.frameworkPackageName, projectData.projectDir);
|
|
87
|
+
// this.$projectDataService.removeNSProperty(
|
|
88
|
+
// projectData.projectDir,
|
|
89
|
+
// platformData.frameworkPackageName
|
|
90
|
+
// );
|
|
87
91
|
this.$logger.info(`Platform ${platform} successfully removed.`);
|
|
88
92
|
}
|
|
89
93
|
catch (err) {
|
|
@@ -125,7 +129,7 @@ class PlatformCommandHelper {
|
|
|
125
129
|
const installedPlatforms = this.getInstalledPlatforms(projectData);
|
|
126
130
|
return _.filter(this.$mobileHelper.platformNames, (p) => {
|
|
127
131
|
return (installedPlatforms.indexOf(p) < 0 &&
|
|
128
|
-
this.$platformValidationService.isPlatformSupportedForOS(p, projectData));
|
|
132
|
+
this.$platformValidationService.isPlatformSupportedForOS(p, projectData)); // Only those not already installed
|
|
129
133
|
});
|
|
130
134
|
}
|
|
131
135
|
getPreparedPlatforms(projectData) {
|
|
@@ -149,7 +153,7 @@ class PlatformCommandHelper {
|
|
|
149
153
|
return true;
|
|
150
154
|
}
|
|
151
155
|
return (prepareInfo.nativePlatformStatus !==
|
|
152
|
-
"1");
|
|
156
|
+
"1" /* constants.NativePlatformStatus.requiresPlatformAdd */);
|
|
153
157
|
}
|
|
154
158
|
updatePlatform(platform, version, projectData) {
|
|
155
159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -199,3 +203,4 @@ class PlatformCommandHelper {
|
|
|
199
203
|
}
|
|
200
204
|
exports.PlatformCommandHelper = PlatformCommandHelper;
|
|
201
205
|
yok_1.injector.register("platformCommandHelper", PlatformCommandHelper);
|
|
206
|
+
//# 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
|
|
@@ -327,7 +327,7 @@ class ShiftR {
|
|
|
327
327
|
exports.ShiftR = ShiftR;
|
|
328
328
|
class CtrlC {
|
|
329
329
|
constructor() {
|
|
330
|
-
this.key = "\u0003"
|
|
330
|
+
this.key = "\u0003" /* SpecialKeys.CtrlC */;
|
|
331
331
|
this.platform = "all";
|
|
332
332
|
this.group = "Development Workflow";
|
|
333
333
|
this.willBlockKeyCommandExecution = false;
|
|
@@ -406,7 +406,7 @@ exports.N = N;
|
|
|
406
406
|
class QuestionMark {
|
|
407
407
|
constructor($keyCommandHelper) {
|
|
408
408
|
this.$keyCommandHelper = $keyCommandHelper;
|
|
409
|
-
this.key = "?"
|
|
409
|
+
this.key = "?" /* SpecialKeys.QuestionMark */;
|
|
410
410
|
this.platform = "all";
|
|
411
411
|
this.description = "Show this help";
|
|
412
412
|
this.group = "Development Workflow";
|
|
@@ -448,9 +448,10 @@ yok_1.injector.registerKeyCommand("w", W);
|
|
|
448
448
|
yok_1.injector.registerKeyCommand("c", C);
|
|
449
449
|
yok_1.injector.registerKeyCommand("A", ShiftA);
|
|
450
450
|
yok_1.injector.registerKeyCommand("n", N);
|
|
451
|
-
yok_1.injector.registerKeyCommand("?"
|
|
452
|
-
yok_1.injector.registerKeyCommand("\u0003"
|
|
451
|
+
yok_1.injector.registerKeyCommand("?" /* SpecialKeys.QuestionMark */, QuestionMark);
|
|
452
|
+
yok_1.injector.registerKeyCommand("\u0003" /* SpecialKeys.CtrlC */, CtrlC);
|
|
453
453
|
yok_1.injector.registerCommand("open|ios", OpenIOSCommand);
|
|
454
454
|
yok_1.injector.registerCommand("open|visionos", OpenVisionOSCommand);
|
|
455
455
|
yok_1.injector.registerCommand("open|vision", OpenVisionOSCommand);
|
|
456
456
|
yok_1.injector.registerCommand("open|android", OpenAndroidCommand);
|
|
457
|
+
//# 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
|
@@ -18,7 +18,7 @@ const errors_1 = require("./common/errors");
|
|
|
18
18
|
const helpers_1 = require("./common/helpers");
|
|
19
19
|
const yok_1 = require("./common/yok");
|
|
20
20
|
const color_1 = require("./color");
|
|
21
|
-
(0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120));
|
|
21
|
+
(0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120 /* ErrorCodes.UNCAUGHT */));
|
|
22
22
|
const logger = yok_1.injector.resolve("logger");
|
|
23
23
|
exports.originalProcessOn = process.on.bind(process);
|
|
24
24
|
process.on = (event, listener) => {
|
|
@@ -32,8 +32,10 @@ process.on = (event, listener) => {
|
|
|
32
32
|
return (0, exports.originalProcessOn)(event, listener);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
+
/* tslint:disable:no-floating-promises */
|
|
35
36
|
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
37
|
if (process.argv.includes("--get-yargs-completions")) {
|
|
38
|
+
// This is a special case when we want to get the yargs completions as fast as possible...
|
|
37
39
|
yok_1.injector.resolve("$options");
|
|
38
40
|
return;
|
|
39
41
|
}
|
|
@@ -50,6 +52,13 @@ process.on = (event, listener) => {
|
|
|
50
52
|
logger.trace("Unable to load extensions. Error is: ", err);
|
|
51
53
|
}
|
|
52
54
|
const commandDispatcher = yok_1.injector.resolve("commandDispatcher");
|
|
55
|
+
// unused...
|
|
56
|
+
// const messages: IMessagesService = injector.resolve("$messagesService");
|
|
57
|
+
// messages.pathsToMessageJsonFiles = [
|
|
58
|
+
// /* Place client-specific json message file paths here */
|
|
59
|
+
// ];
|
|
53
60
|
yield commandDispatcher.dispatchCommand();
|
|
54
61
|
yok_1.injector.dispose();
|
|
55
62
|
}))();
|
|
63
|
+
/* tslint:enable:no-floating-promises */
|
|
64
|
+
//# 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
|
@@ -47,8 +47,12 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
47
47
|
}
|
|
48
48
|
params = params.concat(flags);
|
|
49
49
|
const cwd = pathToSave;
|
|
50
|
+
// Npm creates `etc` directory in installation dir when --prefix is passed
|
|
51
|
+
// https://github.com/npm/npm/issues/11486
|
|
52
|
+
// we should delete it if it was created because of us
|
|
50
53
|
const etcDirectoryLocation = (0, path_1.join)(cwd, "etc");
|
|
51
54
|
const etcExistsPriorToInstallation = this.$fs.exists(etcDirectoryLocation);
|
|
55
|
+
//TODO: plamen5kov: workaround is here for a reason (remove whole file later)
|
|
52
56
|
if (config.path) {
|
|
53
57
|
let relativePathFromCwdToSource = "";
|
|
54
58
|
if (config.frameworkPath) {
|
|
@@ -64,9 +68,13 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
64
68
|
}
|
|
65
69
|
catch (err) {
|
|
66
70
|
if (err.message && err.message.indexOf("EPEERINVALID") !== -1) {
|
|
71
|
+
// Not installed peer dependencies are treated by npm 2 as errors, but npm 3 treats them as warnings.
|
|
72
|
+
// We'll show them as warnings and let the user install them in case they are needed.
|
|
67
73
|
this.$logger.warn(err.message);
|
|
68
74
|
}
|
|
69
75
|
else {
|
|
76
|
+
// All other errors should be handled by the caller code.
|
|
77
|
+
// Revert package.json contents to preserve valid state
|
|
70
78
|
this.$fs.writeJson(packageJsonPath, jsonContentBefore);
|
|
71
79
|
throw err;
|
|
72
80
|
}
|
|
@@ -94,7 +102,7 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
94
102
|
}
|
|
95
103
|
view(packageName, config) {
|
|
96
104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
const wrappedConfig = _.extend({}, config, { json: true });
|
|
105
|
+
const wrappedConfig = _.extend({}, config, { json: true }); // always require view response as JSON
|
|
98
106
|
const flags = this.getFlagsString(wrappedConfig, false);
|
|
99
107
|
let viewResult;
|
|
100
108
|
try {
|
|
@@ -113,6 +121,7 @@ class NodePackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
113
121
|
}
|
|
114
122
|
searchNpms(keyword) {
|
|
115
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
// TODO: Fix the generation of url - in case it contains @ or / , the call may fail.
|
|
116
125
|
const httpRequestResult = yield this.$httpClient.httpRequest(`https://api.npms.io/v2/search?q=keywords:${keyword}`);
|
|
117
126
|
const result = JSON.parse(httpRequestResult.body);
|
|
118
127
|
return result;
|
|
@@ -154,3 +163,4 @@ __decorate([
|
|
|
154
163
|
], NodePackageManager.prototype, "getCachePath", null);
|
|
155
164
|
exports.NodePackageManager = NodePackageManager;
|
|
156
165
|
yok_1.injector.register("npm", NodePackageManager);
|
|
166
|
+
//# sourceMappingURL=node-package-manager.js.map
|