nativescript 8.7.0-rc.1 → 8.7.0-rc.2
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 +7 -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 +20 -3
- 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 +34 -22
- package/lib/commands/debug.js +6 -1
- package/lib/commands/deploy.js +3 -2
- 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/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 +3 -2
- 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 +1 -0
- 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/definitions/mobile.d.ts +1 -1
- 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 +26 -0
- 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 +20 -1
- 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 +3 -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 +72 -3
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +3 -1
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-helper.js +2 -1
- 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 +12 -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 +58 -5
- 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 +15 -5
- 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 +3 -2
- 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 +5 -2
- 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 +141 -115
- 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 +2 -1
- 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 +28 -0
- 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 +2 -1
- 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 +10 -1
- package/lib/services/ios/xcodebuild-args-service.js +13 -4
- 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 +29 -7
- 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 +47 -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 +18 -2
- package/lib/services/prepare-data-service.js +2 -1
- package/lib/services/project-backup-service.js +4 -0
- package/lib/services/project-changes-service.js +12 -3
- package/lib/services/project-cleanup-service.js +2 -0
- package/lib/services/project-config-service.js +18 -1
- 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 +1 -1
|
@@ -15,7 +15,10 @@ class DeviceEmitter extends events_1.EventEmitter {
|
|
|
15
15
|
this.$devicesService.on(constants_1.DeviceDiscoveryEventNames.DEVICE_FOUND, (device) => {
|
|
16
16
|
this.emit(constants_1.DeviceDiscoveryEventNames.DEVICE_FOUND, device.deviceInfo);
|
|
17
17
|
this.attachApplicationChangedHandlers(device);
|
|
18
|
+
// await: Do not await as this will require to mark the lambda with async keyword, but there's no way to await the lambda itself.
|
|
19
|
+
/* tslint:disable:no-floating-promises */
|
|
18
20
|
device.openDeviceLogStream();
|
|
21
|
+
/* tslint:enable:no-floating-promises */
|
|
19
22
|
});
|
|
20
23
|
this.$devicesService.on(constants_1.DeviceDiscoveryEventNames.DEVICE_LOST, (device) => {
|
|
21
24
|
this.emit(constants_1.DeviceDiscoveryEventNames.DEVICE_LOST, device.deviceInfo);
|
|
@@ -59,3 +62,4 @@ class DeviceEmitter extends events_1.EventEmitter {
|
|
|
59
62
|
}
|
|
60
63
|
exports.DeviceEmitter = DeviceEmitter;
|
|
61
64
|
yok_1.injector.register("deviceEmitter", DeviceEmitter);
|
|
65
|
+
//# sourceMappingURL=device-emitter.js.map
|
|
@@ -36,6 +36,7 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
|
|
|
36
36
|
this.colorPoolIndex = 0;
|
|
37
37
|
}
|
|
38
38
|
logData(lineText, platform, deviceIdentifier) {
|
|
39
|
+
// console.log(lineText)
|
|
39
40
|
const loggingOptions = this.getDeviceLogOptionsForDevice(deviceIdentifier);
|
|
40
41
|
let data = this.$logFilter.filterData(platform, lineText, loggingOptions);
|
|
41
42
|
data = this.$logSourceMapService.replaceWithOriginalFileLocations(platform, data, loggingOptions);
|
|
@@ -53,6 +54,7 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
|
|
|
53
54
|
return this.deviceColorMap.get(deviceIdentifier);
|
|
54
55
|
}
|
|
55
56
|
const color = this.colorPool[this.colorPoolIndex];
|
|
57
|
+
// wrap around if we have no more colors in the pool
|
|
56
58
|
this.colorPoolIndex =
|
|
57
59
|
this.colorPoolIndex === this.colorPool.length - 1
|
|
58
60
|
? 0
|
|
@@ -62,10 +64,13 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
|
|
|
62
64
|
}
|
|
63
65
|
logDataCore(data, deviceIdentifier) {
|
|
64
66
|
var _a, _b, _c;
|
|
67
|
+
// todo: use config to set logger - --env.classicLogs is temporary!
|
|
65
68
|
if ("classicLogs" in ((_a = this.$options.env) !== null && _a !== void 0 ? _a : {})) {
|
|
69
|
+
// legacy logging
|
|
66
70
|
this.$logger.info(data, { [constants_2.LoggerConfigData.skipNewLine]: true });
|
|
67
71
|
return;
|
|
68
72
|
}
|
|
73
|
+
// todo: extract into an injectable printer/logger service
|
|
69
74
|
let shouldPrepend = false;
|
|
70
75
|
let splitIndexes = [];
|
|
71
76
|
const lines = data
|
|
@@ -120,7 +125,25 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
|
|
|
120
125
|
printLine(prefix, ...parts) {
|
|
121
126
|
const fullLine = parts.join(" ");
|
|
122
127
|
console.log(prefix, fullLine);
|
|
128
|
+
/**
|
|
129
|
+
* Note: Disabled
|
|
130
|
+
*
|
|
131
|
+
* This splits the output into lines that fit within the current
|
|
132
|
+
* terminal width, however this makes copying json objects that
|
|
133
|
+
* span across multiple lines difficult, as it introduces
|
|
134
|
+
* whitespace & line breaks
|
|
135
|
+
*/
|
|
136
|
+
// const maxWidth = process.stdout.columns - 2;
|
|
137
|
+
// if (!maxWidth || maxWidth < 10 || fullLine.length < maxWidth) {
|
|
138
|
+
// console.log(prefix, fullLine);
|
|
139
|
+
// } else {
|
|
140
|
+
// for (let i = 0; i < fullLine.length; i += maxWidth) {
|
|
141
|
+
// const part = fullLine.substring(i, i + maxWidth);
|
|
142
|
+
// console.log(prefix, part);
|
|
143
|
+
// }
|
|
144
|
+
// }
|
|
123
145
|
}
|
|
124
146
|
}
|
|
125
147
|
exports.DeviceLogProvider = DeviceLogProvider;
|
|
126
148
|
yok_1.injector.register("deviceLogProvider", DeviceLogProvider);
|
|
149
|
+
//# sourceMappingURL=device-log-provider.js.map
|
|
@@ -6,6 +6,7 @@ const _ = require("lodash");
|
|
|
6
6
|
const yok_1 = require("../yok");
|
|
7
7
|
class EmulatorHelper {
|
|
8
8
|
constructor() {
|
|
9
|
+
// https://developer.android.com/guide/topics/manifest/uses-sdk-element
|
|
9
10
|
this.mapAndroidApiLevelToVersion = {
|
|
10
11
|
"android-34": "14.0.0",
|
|
11
12
|
"android-33": "13.0.0",
|
|
@@ -78,7 +79,9 @@ class EmulatorHelper {
|
|
|
78
79
|
emulator.identifier = emulatorId;
|
|
79
80
|
emulator.status = constants_1.RUNNING_EMULATOR_STATUS;
|
|
80
81
|
emulator.type = constants_1.DeviceTypes.Device;
|
|
82
|
+
//emulator.isTablet; // TODO: consider to do this here!!!
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
exports.EmulatorHelper = EmulatorHelper;
|
|
84
86
|
yok_1.injector.register("emulatorHelper", EmulatorHelper);
|
|
87
|
+
//# sourceMappingURL=emulator-helper.js.map
|
|
@@ -144,9 +144,11 @@ class IOSApplicationManager extends application_manager_base_1.ApplicationManage
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
getDebuggableApps() {
|
|
147
|
+
// Implement when we can find debuggable applications for iOS.
|
|
147
148
|
return Promise.resolve([]);
|
|
148
149
|
}
|
|
149
150
|
getDebuggableAppViews(appIdentifiers) {
|
|
151
|
+
// Implement when we can find debuggable applications for iOS.
|
|
150
152
|
return Promise.resolve(null);
|
|
151
153
|
}
|
|
152
154
|
}
|
|
@@ -157,3 +159,4 @@ __decorate([
|
|
|
157
159
|
(0, decorators_1.cache)()
|
|
158
160
|
], IOSApplicationManager.prototype, "startDeviceLog", null);
|
|
159
161
|
exports.IOSApplicationManager = IOSApplicationManager;
|
|
162
|
+
//# sourceMappingURL=ios-application-manager.js.map
|
|
@@ -58,6 +58,7 @@ class IOSDeviceOperations extends events_1.EventEmitter {
|
|
|
58
58
|
if (options && options.shouldReturnImmediateResult) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
+
// We need this because we need to make sure that we have devices.
|
|
61
62
|
yield new Promise((resolve, reject) => {
|
|
62
63
|
let iterationsCount = 0;
|
|
63
64
|
const maxIterationsCount = 3;
|
|
@@ -154,6 +155,8 @@ class IOSDeviceOperations extends events_1.EventEmitter {
|
|
|
154
155
|
});
|
|
155
156
|
}
|
|
156
157
|
dispose(signal) {
|
|
158
|
+
// We need to check if we should dispose the device lib.
|
|
159
|
+
// For example we do not want to dispose it when we start printing the device logs.
|
|
157
160
|
if (this.shouldDispose && this.deviceLib) {
|
|
158
161
|
this.deviceLib.removeAllListeners();
|
|
159
162
|
this.deviceLib.dispose(signal);
|
|
@@ -232,3 +235,4 @@ __decorate([
|
|
|
232
235
|
], IOSDeviceOperations.prototype, "attacheDeviceLogDataHandler", null);
|
|
233
236
|
exports.IOSDeviceOperations = IOSDeviceOperations;
|
|
234
237
|
yok_1.injector.register("iosDeviceOperations", IOSDeviceOperations);
|
|
238
|
+
//# sourceMappingURL=ios-device-operations.js.map
|
|
@@ -122,6 +122,7 @@ class IOSDevice extends ios_device_base_1.IOSDeviceBase {
|
|
|
122
122
|
const majorVersionAsString = productType.match(/.*?(\d+)\,(\d+)/)[1];
|
|
123
123
|
const majorVersion = parseInt(majorVersionAsString);
|
|
124
124
|
let isArm64Architecture = false;
|
|
125
|
+
//https://en.wikipedia.org/wiki/List_of_iOS_devices
|
|
125
126
|
if (_.startsWith(productType, "iphone")) {
|
|
126
127
|
isArm64Architecture = majorVersion >= 6;
|
|
127
128
|
}
|
|
@@ -132,6 +133,7 @@ class IOSDevice extends ios_device_base_1.IOSDeviceBase {
|
|
|
132
133
|
isArm64Architecture = majorVersion >= 7;
|
|
133
134
|
}
|
|
134
135
|
else if (_.startsWith(productType, "realitydevice")) {
|
|
136
|
+
// visionos
|
|
135
137
|
isArm64Architecture = true;
|
|
136
138
|
}
|
|
137
139
|
activeArchitecture = isArm64Architecture ? "arm64" : "armv7";
|
|
@@ -141,6 +143,7 @@ class IOSDevice extends ios_device_base_1.IOSDeviceBase {
|
|
|
141
143
|
getPlatform(productType) {
|
|
142
144
|
productType = productType.toLowerCase().trim();
|
|
143
145
|
if (_.startsWith(productType, "realitydevice")) {
|
|
146
|
+
// visionos
|
|
144
147
|
return this.$devicePlatformsConstants.visionOS;
|
|
145
148
|
}
|
|
146
149
|
return this.$devicePlatformsConstants.iOS;
|
|
@@ -151,3 +154,4 @@ __decorate([
|
|
|
151
154
|
], IOSDevice.prototype, "openDeviceLogStream", null);
|
|
152
155
|
exports.IOSDevice = IOSDevice;
|
|
153
156
|
yok_1.injector.register("iOSDevice", IOSDevice);
|
|
157
|
+
//# sourceMappingURL=ios-device.js.map
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const yok_1 = require("../../yok");
|
|
4
4
|
class IosDeviceProductNameMapper {
|
|
5
5
|
constructor() {
|
|
6
|
+
// http://support.hockeyapp.net/kb/client-integration-ios-mac-os-x/ios-device-types
|
|
6
7
|
this.map = {
|
|
7
8
|
"iPhone1,1": "iPhone",
|
|
8
9
|
"iPhone1,2": "iPhone 3G",
|
|
@@ -63,3 +64,4 @@ class IosDeviceProductNameMapper {
|
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
yok_1.injector.register("iOSDeviceProductNameMapper", IosDeviceProductNameMapper);
|
|
67
|
+
//# sourceMappingURL=ios-device-product-name-mapper.js.map
|
|
@@ -28,6 +28,7 @@ class IosEmulatorServices {
|
|
|
28
28
|
try {
|
|
29
29
|
if (options.platform === this.$devicePlatformsConstants.visionOS &&
|
|
30
30
|
!options.emulatorIdOrName) {
|
|
31
|
+
// find first available visionOS simulator (for now).
|
|
31
32
|
const { devices } = yield this.tryGetiOSSimDevices();
|
|
32
33
|
options.emulatorIdOrName = (_a = devices.find((device) => device.platform === this.$devicePlatformsConstants.visionOS)) === null || _a === void 0 ? void 0 : _a.id;
|
|
33
34
|
}
|
|
@@ -73,6 +74,8 @@ class IosEmulatorServices {
|
|
|
73
74
|
connectToPort(data) {
|
|
74
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
76
|
try {
|
|
77
|
+
// node v17+ resolves localhost to ::1 (ipv6) instead of 127.0.0.1 (ipv4)
|
|
78
|
+
// so we explicitly pass ipv4
|
|
76
79
|
const socket = net.connect(data.port, "127.0.0.1");
|
|
77
80
|
return socket;
|
|
78
81
|
}
|
|
@@ -137,3 +140,4 @@ class IosEmulatorServices {
|
|
|
137
140
|
}
|
|
138
141
|
}
|
|
139
142
|
yok_1.injector.register("iOSEmulatorServices", IosEmulatorServices);
|
|
143
|
+
//# sourceMappingURL=ios-emulator-services.js.map
|
|
@@ -21,3 +21,4 @@ IOSSimResolver.iOSSimName = "ios-sim-portable";
|
|
|
21
21
|
IOSSimResolver.iOSStandaloneExecutableName = "ios-sim-standalone.js";
|
|
22
22
|
exports.IOSSimResolver = IOSSimResolver;
|
|
23
23
|
yok_1.injector.register("iOSSimResolver", IOSSimResolver);
|
|
24
|
+
//# sourceMappingURL=ios-sim-resolver.js.map
|
|
@@ -95,9 +95,14 @@ class IOSSimulatorApplicationManager extends application_manager_base_1.Applicat
|
|
|
95
95
|
}
|
|
96
96
|
getDebuggableAppViews(appIdentifiers) {
|
|
97
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
// Implement when we can find debuggable applications for iOS.
|
|
98
99
|
return Promise.resolve(null);
|
|
99
100
|
});
|
|
100
101
|
}
|
|
102
|
+
// iOS will kill the app if we freeze it in the NativeScript Runtime and wait for debug-brk.
|
|
103
|
+
// In order to avoid that, we are attaching lldb and passing it "process continue".
|
|
104
|
+
// In this way, iOS will not kill the app because it has a native debugger attached
|
|
105
|
+
// and the users will be able to attach a debug session using the debug-brk flag.
|
|
101
106
|
attachNativeDebugger(appId, pid) {
|
|
102
107
|
this._lldbProcesses[appId] = this.$childProcess.spawn("lldb", ["-p", pid]);
|
|
103
108
|
if (log4js.levels.TRACE.isGreaterThanOrEqualTo(this.$logger.getLevel())) {
|
|
@@ -145,3 +150,4 @@ __decorate([
|
|
|
145
150
|
(0, decorators_1.cache)()
|
|
146
151
|
], IOSSimulatorApplicationManager.prototype, "startDeviceLog", null);
|
|
147
152
|
exports.IOSSimulatorApplicationManager = IOSSimulatorApplicationManager;
|
|
153
|
+
//# sourceMappingURL=ios-simulator-application-manager.js.map
|
|
@@ -80,11 +80,15 @@ class IOSSimulator extends ios_device_base_1.IOSDeviceBase {
|
|
|
80
80
|
let socket;
|
|
81
81
|
const attachRequestMessage = this.$iOSNotification.getAttachRequest(appId, this.deviceInfo.identifier);
|
|
82
82
|
yield this.$iOSEmulatorServices.postDarwinNotification(attachRequestMessage, this.deviceInfo.identifier);
|
|
83
|
+
// Retry posting the notification every five seconds, in case the AttachRequest
|
|
84
|
+
// event handler wasn't registered when the first one was sent
|
|
83
85
|
const postNotificationRetryInterval = setInterval(() => {
|
|
84
86
|
this.$iOSEmulatorServices
|
|
85
87
|
.postDarwinNotification(attachRequestMessage, this.deviceInfo.identifier)
|
|
86
88
|
.catch((e) => this.$logger.error(e));
|
|
87
89
|
}, 5e3);
|
|
90
|
+
// the internal retry-mechanism of getDebuggerPort will ensure the above
|
|
91
|
+
// interval has a chance to execute multiple times
|
|
88
92
|
const port = yield _super.getDebuggerPort.call(this, appId).finally(() => {
|
|
89
93
|
clearInterval(postNotificationRetryInterval);
|
|
90
94
|
});
|
|
@@ -104,3 +108,4 @@ __decorate([
|
|
|
104
108
|
(0, decorators_1.cache)()
|
|
105
109
|
], IOSSimulator.prototype, "openDeviceLogStream", null);
|
|
106
110
|
exports.IOSSimulator = IOSSimulator;
|
|
111
|
+
//# sourceMappingURL=ios-simulator-device.js.map
|
|
@@ -24,6 +24,7 @@ class LogFilter {
|
|
|
24
24
|
if (deviceLogFilter) {
|
|
25
25
|
return deviceLogFilter.filterData(data, loggingOptions);
|
|
26
26
|
}
|
|
27
|
+
// In case the platform is not valid, just return the data without filtering.
|
|
27
28
|
return data;
|
|
28
29
|
}
|
|
29
30
|
getDeviceLogFilterInstance(platform) {
|
|
@@ -49,3 +50,4 @@ class LogFilter {
|
|
|
49
50
|
}
|
|
50
51
|
exports.LogFilter = LogFilter;
|
|
51
52
|
yok_1.injector.register("logFilter", LogFilter);
|
|
53
|
+
//# sourceMappingURL=log-filter.js.map
|
|
@@ -54,6 +54,7 @@ class AndroidDeviceDiscovery extends device_discovery_1.DeviceDiscovery {
|
|
|
54
54
|
checkCurrentData(result) {
|
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
56
|
const currentDevices = result.map((element) => {
|
|
57
|
+
// http://developer.android.com/tools/help/adb.html#devicestatus
|
|
57
58
|
const data = element.split("\t");
|
|
58
59
|
const identifier = data[0];
|
|
59
60
|
const status = data[1];
|
|
@@ -89,3 +90,4 @@ class AndroidDeviceDiscovery extends device_discovery_1.DeviceDiscovery {
|
|
|
89
90
|
}
|
|
90
91
|
exports.AndroidDeviceDiscovery = AndroidDeviceDiscovery;
|
|
91
92
|
yok_1.injector.register("androidDeviceDiscovery", AndroidDeviceDiscovery);
|
|
93
|
+
//# sourceMappingURL=android-device-discovery.js.map
|
|
@@ -31,9 +31,11 @@ class AndroidEmulatorDiscovery extends events_1.EventEmitter {
|
|
|
31
31
|
const availableEmulatorsOutput = yield this.$androidEmulatorServices.getEmulatorImages();
|
|
32
32
|
const currentEmulators = availableEmulatorsOutput.devices;
|
|
33
33
|
const cachedEmulators = _.values(this._emulators);
|
|
34
|
+
// Remove old emulators
|
|
34
35
|
const lostEmulators = _(cachedEmulators)
|
|
35
36
|
.reject((e) => _.some(currentEmulators, (emulator) => emulator && e && emulator.imageIdentifier === e.imageIdentifier))
|
|
36
37
|
.value();
|
|
38
|
+
// Add new emulators
|
|
37
39
|
const foundEmulators = _(currentEmulators)
|
|
38
40
|
.reject((e) => _.some(cachedEmulators, (emulator) => emulator && e && emulator.imageIdentifier === e.imageIdentifier))
|
|
39
41
|
.value();
|
|
@@ -63,3 +65,4 @@ class AndroidEmulatorDiscovery extends events_1.EventEmitter {
|
|
|
63
65
|
}
|
|
64
66
|
exports.AndroidEmulatorDiscovery = AndroidEmulatorDiscovery;
|
|
65
67
|
yok_1.injector.register("androidEmulatorDiscovery", AndroidEmulatorDiscovery);
|
|
68
|
+
//# sourceMappingURL=android-emulator-discovery.js.map
|
|
@@ -87,6 +87,19 @@ class AndroidProcessService {
|
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
88
|
const adb = this.getAdb(deviceIdentifier);
|
|
89
89
|
const androidWebViewPortInformation = (yield this.getAbstractPortsInformation(adb)).split(os_1.EOL);
|
|
90
|
+
// TODO: Add tests and make sure only unique names are returned. Input before groupBy is:
|
|
91
|
+
// [ { deviceIdentifier: 'SH26BW100473',
|
|
92
|
+
// appIdentifier: 'com.telerik.EmptyNS',
|
|
93
|
+
// framework: 'NativeScript' },
|
|
94
|
+
// { deviceIdentifier: 'SH26BW100473',
|
|
95
|
+
// appIdentifier: 'com.telerik.EmptyNS',
|
|
96
|
+
// framework: 'Cordova' },
|
|
97
|
+
// { deviceIdentifier: 'SH26BW100473',
|
|
98
|
+
// appIdentifier: 'chrome',
|
|
99
|
+
// framework: 'Cordova' },
|
|
100
|
+
// { deviceIdentifier: 'SH26BW100473',
|
|
101
|
+
// appIdentifier: 'chrome',
|
|
102
|
+
// framework: 'Cordova' } ]
|
|
90
103
|
const portInformation = yield Promise.all(_.map(androidWebViewPortInformation, (line) => __awaiter(this, void 0, void 0, function* () {
|
|
91
104
|
return (yield this.getApplicationInfoFromWebViewPortInformation(adb, deviceIdentifier, line)) ||
|
|
92
105
|
(yield this.getNativeScriptApplicationInformation(adb, deviceIdentifier, line));
|
|
@@ -135,6 +148,7 @@ class AndroidProcessService {
|
|
|
135
148
|
}
|
|
136
149
|
getApplicationInfoFromWebViewPortInformation(adb, deviceIdentifier, information) {
|
|
137
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
// Need to search by processId to check for old Android webviews (@webview_devtools_remote_<processId>).
|
|
138
152
|
const processIdRegExp = /@webview_devtools_remote_(.+)/g;
|
|
139
153
|
const processIdMatches = processIdRegExp.exec(information);
|
|
140
154
|
let cordovaAppIdentifier;
|
|
@@ -143,6 +157,7 @@ class AndroidProcessService {
|
|
|
143
157
|
cordovaAppIdentifier = yield this.getApplicationIdentifierFromPid(adb, processId);
|
|
144
158
|
}
|
|
145
159
|
else {
|
|
160
|
+
// Search for appIdentifier (@<appIdentifier>_devtools_remote).
|
|
146
161
|
const chromeAppIdentifierRegExp = /@(.+)_devtools_remote\s?/g;
|
|
147
162
|
const chromeAppIdentifierMatches = chromeAppIdentifierRegExp.exec(information);
|
|
148
163
|
if (chromeAppIdentifierMatches && chromeAppIdentifierMatches.length > 0) {
|
|
@@ -161,6 +176,7 @@ class AndroidProcessService {
|
|
|
161
176
|
}
|
|
162
177
|
getNativeScriptApplicationInformation(adb, deviceIdentifier, information) {
|
|
163
178
|
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
// Search for appIdentifier (@<appIdentifier-debug>).
|
|
164
180
|
const nativeScriptAppIdentifierRegExp = /@(.+)-(debug|inspectorServer)/g;
|
|
165
181
|
const nativeScriptAppIdentifierMatches = nativeScriptAppIdentifierRegExp.exec(information);
|
|
166
182
|
if (nativeScriptAppIdentifierMatches &&
|
|
@@ -177,6 +193,10 @@ class AndroidProcessService {
|
|
|
177
193
|
}
|
|
178
194
|
getAbstractPortForApplication(adb, processId, appIdentifier, abstractPortsInformation, framework) {
|
|
179
195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
// The result will look like this (without the columns names):
|
|
197
|
+
// Num RefCount Protocol Flags Type St Inode Path
|
|
198
|
+
// 0000000000000000: 00000002 00000000 00010000 0001 01 189004 @webview_devtools_remote_25512
|
|
199
|
+
// The Path column is the abstract port.
|
|
180
200
|
framework = framework || "";
|
|
181
201
|
switch (framework.toLowerCase()) {
|
|
182
202
|
case constants_1.TARGET_FRAMEWORK_IDENTIFIERS.Cordova.toLowerCase():
|
|
@@ -207,6 +227,9 @@ class AndroidProcessService {
|
|
|
207
227
|
}
|
|
208
228
|
getProcessIds(adb, appIdentifiers) {
|
|
209
229
|
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
// Process information will look like this (without the columns names):
|
|
231
|
+
// USER PID PPID VSIZE RSS WCHAN PC NAME
|
|
232
|
+
// u0_a63 25512 1334 1519560 96040 ffffffff f76a8f75 S com.telerik.appbuildertabstest
|
|
210
233
|
const result = {};
|
|
211
234
|
const processIdInformation = yield adb.executeShellCommand(["ps"]);
|
|
212
235
|
_.each(appIdentifiers, (appIdentifier) => {
|
|
@@ -219,6 +242,11 @@ class AndroidProcessService {
|
|
|
219
242
|
getAlreadyMappedPort(adb, deviceIdentifier, abstractPort, adbForwardList) {
|
|
220
243
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
244
|
const allForwardedPorts = adbForwardList || (yield adb.executeCommand(["forward", "--list"])) || "";
|
|
245
|
+
// Sample output:
|
|
246
|
+
// 5e2e580b tcp:62503 localabstract:webview_devtools_remote_7985
|
|
247
|
+
// 5e2e580b tcp:62524 localabstract:webview_devtools_remote_7986
|
|
248
|
+
// 5e2e580b tcp:63160 localabstract:webview_devtools_remote_7987
|
|
249
|
+
// 5e2e580b tcp:57577 localabstract:com.telerik.nrel-debug
|
|
222
250
|
const regex = new RegExp(`${deviceIdentifier}\\s+?tcp:(\\d+?)\\s+?.*?${abstractPort}$`);
|
|
223
251
|
return this.getFirstMatchingGroupFromMultilineResult(allForwardedPorts, regex);
|
|
224
252
|
});
|
|
@@ -234,6 +262,9 @@ class AndroidProcessService {
|
|
|
234
262
|
getApplicationIdentifierFromPid(adb, pid, psData) {
|
|
235
263
|
return __awaiter(this, void 0, void 0, function* () {
|
|
236
264
|
psData = psData || (yield adb.executeShellCommand(["ps"]));
|
|
265
|
+
// Process information will look like this (without the columns names):
|
|
266
|
+
// USER PID PPID VSIZE RSS WCHAN PC NAME
|
|
267
|
+
// u0_a63 25512 1334 1519560 96040 ffffffff f76a8f75 S com.telerik.appbuildertabstest
|
|
237
268
|
return this.getFirstMatchingGroupFromMultilineResult(psData, new RegExp(`\\s+${pid}(?:\\s+\\d+){3}\\s+.*\\s+(.*?)$`));
|
|
238
269
|
});
|
|
239
270
|
}
|
|
@@ -257,3 +288,4 @@ __decorate([
|
|
|
257
288
|
], AndroidProcessService.prototype, "getAppProcessId", null);
|
|
258
289
|
exports.AndroidProcessService = AndroidProcessService;
|
|
259
290
|
yok_1.injector.register("androidProcessService", AndroidProcessService);
|
|
291
|
+
//# sourceMappingURL=android-process-service.js.map
|