nativescript 9.0.0-alpha.2 → 9.0.0-alpha.4
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 +14 -1
- 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
|
@@ -5,8 +5,20 @@ const yok_1 = require("../common/yok");
|
|
|
5
5
|
class IOSLogFilter {
|
|
6
6
|
constructor($loggingLevels) {
|
|
7
7
|
this.$loggingLevels = $loggingLevels;
|
|
8
|
+
// Used to recognize output related to the current project
|
|
9
|
+
// This looks for artifacts like: AppName[22432] or AppName(SomeTextHere)[23123]
|
|
8
10
|
this.appOutputRegex = /([^\s\(\)]+)(?:\(([^\s]+)\))?\[[0-9]+\]/;
|
|
11
|
+
// Used to trim the passed messages to a simpler output
|
|
12
|
+
// Example:
|
|
13
|
+
// This: "May 24 15:54:52 Dragons-iPhone NativeScript250(NativeScript)[356] <Notice>: CONSOLE ERROR file:///app/tns_modules/@angular/core/bundles/core.umd.js:3477:36: ORIGINAL STACKTRACE:"
|
|
14
|
+
// Becomes: CONSOLE ERROR file:///app/tns_modules/@angular/core/bundles/core.umd.js:3477:36: ORIGINAL STACKTRACE:
|
|
9
15
|
this.infoFilterRegex = new RegExp(`^.*(?:<Notice>:[ \t]?|<Error>:[ \t]?|<Warning>:[ \t]?|\\(NativeScript\\)[ \t]?|${this.appOutputRegex.source}:[ \t]?){1}`);
|
|
16
|
+
// Used to post filter messages that slip through but are not coming from NativeScript itself.
|
|
17
|
+
// Looks for text in parenthesis at the beginning
|
|
18
|
+
// Example:
|
|
19
|
+
// (RunningBoardServices) [com.apple.runningboard:connection] Identity resolved as application<...>
|
|
20
|
+
// ^(~~capture group~~~)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
21
|
+
// we then use this to filter out non-NativeScript lines
|
|
10
22
|
this.postFilterRegex = /^\((.+)\) \[com\.apple.+\]/;
|
|
11
23
|
this.filterActive = true;
|
|
12
24
|
this.partialLine = null;
|
|
@@ -29,11 +41,15 @@ class IOSLogFilter {
|
|
|
29
41
|
this.partialLine = currentLine;
|
|
30
42
|
break;
|
|
31
43
|
}
|
|
44
|
+
// Legacy filter moved to preFilter
|
|
32
45
|
if (this.preFilter(data, currentLine)) {
|
|
33
46
|
continue;
|
|
34
47
|
}
|
|
35
48
|
const matchResult = this.appOutputRegex.exec(currentLine);
|
|
36
49
|
if (matchResult && matchResult.length > 1) {
|
|
50
|
+
// Check if the name of the app equals the name of the CLI project and turn on the filter if not.
|
|
51
|
+
// We call initializeProjectData in order to obtain the current project name as the instance
|
|
52
|
+
// of this filter may be used accross multiple projects.
|
|
37
53
|
const projectName = loggingOptions && loggingOptions.projectName;
|
|
38
54
|
this.filterActive = matchResult[1] !== projectName;
|
|
39
55
|
if (matchResult === null || matchResult === void 0 ? void 0 : matchResult[2]) {
|
|
@@ -48,8 +64,11 @@ class IOSLogFilter {
|
|
|
48
64
|
currentLine = currentLine.replace(filteredLineInfo[0], "");
|
|
49
65
|
}
|
|
50
66
|
currentLine = currentLine
|
|
67
|
+
// remove lading space before CONSOLE
|
|
51
68
|
.replace(/^\s*CONSOLE/, "CONSOLE")
|
|
69
|
+
// trim trailing spaces only to preserve indentation
|
|
52
70
|
.trimEnd();
|
|
71
|
+
// post filtering: (<anything>) check if <anything> is not "NativeScript"
|
|
53
72
|
const postFilterMatch = this.postFilterRegex.exec(currentLine);
|
|
54
73
|
if (postFilterMatch && (postFilterMatch === null || postFilterMatch === void 0 ? void 0 : postFilterMatch[1]) !== "NativeScript") {
|
|
55
74
|
continue;
|
|
@@ -68,3 +87,4 @@ class IOSLogFilter {
|
|
|
68
87
|
}
|
|
69
88
|
exports.IOSLogFilter = IOSLogFilter;
|
|
70
89
|
yok_1.injector.register("iOSLogFilter", IOSLogFilter);
|
|
90
|
+
//# sourceMappingURL=ios-log-filter.js.map
|
|
@@ -58,8 +58,8 @@ class IOSNativeTargetService {
|
|
|
58
58
|
setXcodeTargetBuildConfigurationProperties(properties, targetName, project) {
|
|
59
59
|
properties.forEach((property) => {
|
|
60
60
|
const buildNames = property.buildNames || [
|
|
61
|
-
"Debug"
|
|
62
|
-
"Release"
|
|
61
|
+
"Debug" /* BuildNames.debug */,
|
|
62
|
+
"Release" /* BuildNames.release */,
|
|
63
63
|
];
|
|
64
64
|
buildNames.forEach((buildName) => {
|
|
65
65
|
project.addBuildProperty(property.name, property.value, buildName, targetName);
|
|
@@ -76,6 +76,7 @@ class IOSNativeTargetService {
|
|
|
76
76
|
project.addToBuildSettings("ASSETCATALOG_COMPILER_APPICON_NAME", configurationJson.assetcatalogCompilerAppiconName, targetUuid);
|
|
77
77
|
}
|
|
78
78
|
const properties = [];
|
|
79
|
+
// Set for both release and debug
|
|
79
80
|
if (configurationJson.targetBuildConfigurationProperties) {
|
|
80
81
|
_.forEach(configurationJson.targetBuildConfigurationProperties, (value, name) => properties.push({ value, name }));
|
|
81
82
|
}
|
|
@@ -84,11 +85,11 @@ class IOSNativeTargetService {
|
|
|
84
85
|
var buildName = null;
|
|
85
86
|
switch (name) {
|
|
86
87
|
case "debug": {
|
|
87
|
-
buildName = "Debug"
|
|
88
|
+
buildName = "Debug" /* BuildNames.debug */;
|
|
88
89
|
break;
|
|
89
90
|
}
|
|
90
91
|
case "release": {
|
|
91
|
-
buildName = "Release"
|
|
92
|
+
buildName = "Release" /* BuildNames.release */;
|
|
92
93
|
break;
|
|
93
94
|
}
|
|
94
95
|
default: {
|
|
@@ -106,3 +107,4 @@ class IOSNativeTargetService {
|
|
|
106
107
|
}
|
|
107
108
|
exports.IOSNativeTargetService = IOSNativeTargetService;
|
|
108
109
|
yok_1.injector.register("iOSNativeTargetService", IOSNativeTargetService);
|
|
110
|
+
//# sourceMappingURL=ios-native-target-service.js.map
|
|
@@ -138,7 +138,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
138
138
|
".ico",
|
|
139
139
|
".cur",
|
|
140
140
|
".xbm",
|
|
141
|
-
],
|
|
141
|
+
], // https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
return this._platformData;
|
|
@@ -185,8 +185,11 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
185
185
|
this.$fs.ensureDirectoryExists(path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER));
|
|
186
186
|
shell.cp("-R", path.join(frameworkDir, "*"), this.getPlatformData(projectData).projectRoot);
|
|
187
187
|
}
|
|
188
|
+
//TODO: plamen5kov: revisit this method, might have unnecessary/obsolete logic
|
|
188
189
|
async interpolateData(projectData) {
|
|
189
190
|
const projectRootFilePath = path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER);
|
|
191
|
+
// Starting with NativeScript for iOS 1.6.0, the project Info.plist file resides not in the platform project,
|
|
192
|
+
// but in the hello-world app template as a platform specific resource.
|
|
190
193
|
if (this.$fs.exists(path.join(projectRootFilePath, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER + "-Info.plist"))) {
|
|
191
194
|
this.replaceFileName("-Info.plist", projectRootFilePath, projectData);
|
|
192
195
|
}
|
|
@@ -289,16 +292,32 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
289
292
|
frameworkAddOptions["sign"] = true;
|
|
290
293
|
}
|
|
291
294
|
if (this.$options.hostProjectPath) {
|
|
295
|
+
// always mark xcframeworks for embedding
|
|
292
296
|
frameworkAddOptions["embed"] = true;
|
|
293
297
|
frameworkAddOptions["sign"] = false;
|
|
294
298
|
}
|
|
299
|
+
// Note: we used to prepend "$(SRCROOT)/" to the framework path, but seems like it's not needed anymore
|
|
300
|
+
// "$(SRCROOT)/" +
|
|
295
301
|
const frameworkRelativePath = this.getLibSubpathRelativeToProjectPath(frameworkPath, projectData);
|
|
296
302
|
project.addFramework(frameworkRelativePath, frameworkAddOptions);
|
|
303
|
+
// filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
|
|
304
|
+
// project.addBuildPhase(
|
|
305
|
+
// [],
|
|
306
|
+
// "PBXShellScriptBuildPhase",
|
|
307
|
+
// "Debug SRCROOT",
|
|
308
|
+
// undefined,
|
|
309
|
+
// {
|
|
310
|
+
// shellPath: "/bin/sh",
|
|
311
|
+
// shellScript: `echo "SRCROOT: $SRCROOT"`,
|
|
312
|
+
// }
|
|
313
|
+
// );
|
|
297
314
|
this.savePbxProj(project, projectData);
|
|
298
315
|
}
|
|
299
316
|
async addStaticLibrary(staticLibPath, projectData) {
|
|
317
|
+
// Copy files to lib folder.
|
|
300
318
|
const libraryName = path.basename(staticLibPath, ".a");
|
|
301
319
|
const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName);
|
|
320
|
+
// Add static library to project file and setup header search paths
|
|
302
321
|
const project = this.createPbxProj(projectData);
|
|
303
322
|
const relativeStaticLibPath = this.getLibSubpathRelativeToProjectPath(staticLibPath, projectData);
|
|
304
323
|
project.addFramework(relativeStaticLibPath);
|
|
@@ -333,10 +352,58 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
333
352
|
filesRelativeToProject: true,
|
|
334
353
|
uuid: "NATIVESCRIPTNATIVESCRIPT",
|
|
335
354
|
});
|
|
355
|
+
/**
|
|
356
|
+
* 1. Add platforms/ios/{projectname}/app build to the host app
|
|
357
|
+
*/
|
|
358
|
+
// Note: allow customization of this targetFolderName
|
|
359
|
+
// const targetFolderName = "app";
|
|
336
360
|
const buildFolderPath = path.join(this.$options.hostProjectPath, projectData.projectName);
|
|
337
361
|
project.addResourceFile(buildFolderPath, {}, "NATIVESCRIPTNATIVESCRIPT");
|
|
362
|
+
// filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
|
|
363
|
+
// project.addBuildPhase(
|
|
364
|
+
// [],
|
|
365
|
+
// "PBXShellScriptBuildPhase",
|
|
366
|
+
// "Copy Metadata (DEBUG)",
|
|
367
|
+
// undefined,
|
|
368
|
+
// {
|
|
369
|
+
// shellPath: "/bin/sh",
|
|
370
|
+
// shellScript: `cp ./platforms/ios/build/Debug-iphonesimulator/metadata-arm64.bin $CONFIGURATION_BUILD_DIR`,
|
|
371
|
+
// outputPaths: [
|
|
372
|
+
// JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64.bin"),
|
|
373
|
+
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64e.bin"),
|
|
374
|
+
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-i386.bin"),
|
|
375
|
+
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-x86_64.bin"),
|
|
376
|
+
// ],
|
|
377
|
+
// }
|
|
378
|
+
// );
|
|
338
379
|
const metadataPath = path.relative(this.$options.hostProjectPath, buildFolderPath);
|
|
339
380
|
project.addToOtherLinkerFlags(JSON.stringify(`-sectcreate __DATA __TNSMetadata "${metadataPath}/metadata-arm64.bin"`));
|
|
381
|
+
// // no shorthand way to get UUID of build phase that i can tell
|
|
382
|
+
// // methods return the phase as an object but ommitted the actual key (uuid we need)
|
|
383
|
+
// // this does it same way nativescript-dev-xcode does but gets the uuid we need
|
|
384
|
+
// const resourcesBuildPhaseKeys = Object.keys(
|
|
385
|
+
// project.hash.project.objects["PBXResourcesBuildPhase"]
|
|
386
|
+
// );
|
|
387
|
+
// // console.log('resourcesBuildPhaseKeys:', resourcesBuildPhaseKeys);
|
|
388
|
+
// const buildPhaseUUID = resourcesBuildPhaseKeys[0];
|
|
389
|
+
// const comment = `${targetFolderName} in Resources`;
|
|
390
|
+
// project.hash.project.objects["PBXResourcesBuildPhase"][
|
|
391
|
+
// buildPhaseUUID
|
|
392
|
+
// ].files.forEach((f: any) => {
|
|
393
|
+
// console.log(f);
|
|
394
|
+
// });
|
|
395
|
+
// if (
|
|
396
|
+
// !project.hash.project.objects["PBXResourcesBuildPhase"][
|
|
397
|
+
// buildPhaseUUID
|
|
398
|
+
// ].files.find((f: any) => f.comment === comment)
|
|
399
|
+
// ) {
|
|
400
|
+
// project.addResourceFile(buildFolderPath, {}, buildPhaseUUID);
|
|
401
|
+
// }
|
|
402
|
+
/**
|
|
403
|
+
* 2. Ensure metadata is copied as a file
|
|
404
|
+
* The apps metadata-{arch}.bin should be added as a file reference.
|
|
405
|
+
*/
|
|
406
|
+
// TODO
|
|
340
407
|
this.savePbxProj(project, projectData);
|
|
341
408
|
}
|
|
342
409
|
catch (err) {
|
|
@@ -389,10 +456,12 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
389
456
|
this.$fs.deleteDirectory(platformsAppResourcesPath);
|
|
390
457
|
this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
|
|
391
458
|
const platformAppResourcesPath = path.join(projectAppResourcesPath, platformData.normalizedPlatformName);
|
|
459
|
+
// this allows App_Resources/visionOS
|
|
392
460
|
if (this.$fs.exists(platformAppResourcesPath)) {
|
|
393
461
|
this.$fs.copyFile(path.join(platformAppResourcesPath, "*"), platformsAppResourcesPath);
|
|
394
462
|
}
|
|
395
463
|
else {
|
|
464
|
+
// otherwise falls back to App_Resources/iOS
|
|
396
465
|
this.$fs.copyFile(path.join(projectAppResourcesPath, this.$devicePlatformsConstants.iOS, "*"), platformsAppResourcesPath);
|
|
397
466
|
}
|
|
398
467
|
this.$fs.deleteFile(path.join(platformsAppResourcesPath, platformData.configurationFileName));
|
|
@@ -491,6 +560,12 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
491
560
|
getLibSubpathRelativeToProjectPath(targetPath, projectData) {
|
|
492
561
|
const projectRoot = this.getPlatformData(projectData).projectRoot;
|
|
493
562
|
const frameworkPath = path.relative(projectRoot, targetPath);
|
|
563
|
+
// console.log({
|
|
564
|
+
// targetPath,
|
|
565
|
+
// projectRoot,
|
|
566
|
+
// frameworkPath,
|
|
567
|
+
// resolved: path.resolve(projectRoot, frameworkPath),
|
|
568
|
+
// });
|
|
494
569
|
return frameworkPath;
|
|
495
570
|
}
|
|
496
571
|
getPbxProjPath(projectData) {
|
|
@@ -538,6 +613,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
538
613
|
const projectPodfilePath = this.$cocoapodsService.getProjectPodfilePath(platformData.projectRoot);
|
|
539
614
|
if (this.$fs.exists(projectPodfilePath)) {
|
|
540
615
|
await this.$cocoapodsService.executePodInstall(platformData.projectRoot, this.$xcprojService.getXcodeprojPath(projectData, platformData.projectRoot));
|
|
616
|
+
// The `pod install` command adds a new target to the .pbxproject. This target adds additional build phases to Xcode project.
|
|
617
|
+
// Some of these phases relies on env variables (like PODS_PODFILE_DIR_PATH or PODS_ROOT).
|
|
618
|
+
// These variables are produced from merge of pod's xcconfig file and project's xcconfig file.
|
|
619
|
+
// So the correct order is `pod install` to be executed before merging pod's xcconfig file.
|
|
541
620
|
await this.$cocoapodsService.mergePodXcconfigFile(projectData, platformData, opts);
|
|
542
621
|
}
|
|
543
622
|
const pluginSpmPackages = [];
|
|
@@ -563,6 +642,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
563
642
|
const hasProvision = provision !== undefined;
|
|
564
643
|
const hasTeamId = teamId !== undefined;
|
|
565
644
|
if (hasProvision || hasTeamId) {
|
|
645
|
+
// Check if the native project's signing is set to the provided provision...
|
|
566
646
|
const pbxprojPath = this.getPbxProjPath(projectData);
|
|
567
647
|
if (this.$fs.exists(pbxprojPath)) {
|
|
568
648
|
const xcode = this.$pbxprojDomXcode.Xcode.open(pbxprojPath);
|
|
@@ -578,6 +658,9 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
578
658
|
}
|
|
579
659
|
}
|
|
580
660
|
else {
|
|
661
|
+
// Specifying provisioning profile requires "Manual" signing style.
|
|
662
|
+
// If the current signing style was not "Manual" it was probably "Automatic" or,
|
|
663
|
+
// it was not uniform for the debug and release build configurations.
|
|
581
664
|
changesInfo.signingChanged = true;
|
|
582
665
|
}
|
|
583
666
|
}
|
|
@@ -591,6 +674,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
591
674
|
}
|
|
592
675
|
}
|
|
593
676
|
else {
|
|
677
|
+
// Specifying team id or name requires "Automatic" signing style.
|
|
678
|
+
// If the current signing style was not "Automatic" it was probably "Manual".
|
|
594
679
|
changesInfo.signingChanged = true;
|
|
595
680
|
}
|
|
596
681
|
}
|
|
@@ -807,10 +892,14 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
807
892
|
}
|
|
808
893
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
809
894
|
if (!this.$fs.exists(pluginsXcconfigFilePath)) {
|
|
895
|
+
// We need the pluginsXcconfig file to exist in platforms dir as it is required in the native template:
|
|
896
|
+
// https://github.com/NativeScript/ios-runtime/blob/9c2b7b5f70b9bee8452b7a24aa6b646214c7d2be/build/project-template/__PROJECT_NAME__/build-debug.xcconfig#L3
|
|
897
|
+
// From Xcode 10 in case the file is missing, this include fails and the build itself fails (was a warning in previous Xcode versions).
|
|
810
898
|
this.$fs.writeFile(pluginsXcconfigFilePath, "");
|
|
811
899
|
}
|
|
812
900
|
}
|
|
813
901
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
902
|
+
// Set Entitlements Property to point to default file if not set explicitly by the user.
|
|
814
903
|
const entitlementsPropertyValue = this.$xcconfigService.readPropertyValue(pluginsXcconfigFilePath, constants.CODE_SIGN_ENTITLEMENTS);
|
|
815
904
|
if (entitlementsPropertyValue === null &&
|
|
816
905
|
this.$fs.exists(this.$iOSEntitlementsService.getPlatformsEntitlementsPath(projectData))) {
|
|
@@ -855,3 +944,4 @@ __decorate([
|
|
|
855
944
|
(0, helpers_2.hook)("buildIOS")
|
|
856
945
|
], IOSProjectService.prototype, "buildProject", null);
|
|
857
946
|
yok_1.injector.register("iOSProjectService", IOSProjectService);
|
|
947
|
+
//# sourceMappingURL=ios-project-service.js.map
|
|
@@ -127,6 +127,8 @@ class IOSProvisionService {
|
|
|
127
127
|
}
|
|
128
128
|
async getDevelopmentTeams() {
|
|
129
129
|
const teams = {};
|
|
130
|
+
// NOTE: We are reading all provisioning profiles and collect team information from them.
|
|
131
|
+
// It would be better if we can check the Apple ID registered in Xcode and read the teams associated with it.
|
|
130
132
|
mobileprovision.provision.read().forEach((provision) => provision.TeamIdentifier &&
|
|
131
133
|
provision.TeamIdentifier.forEach((id) => {
|
|
132
134
|
if (!teams[provision.TeamName]) {
|
|
@@ -150,3 +152,4 @@ class IOSProvisionService {
|
|
|
150
152
|
}
|
|
151
153
|
exports.IOSProvisionService = IOSProvisionService;
|
|
152
154
|
yok_1.injector.register("iOSProvisionService", IOSProvisionService);
|
|
155
|
+
//# sourceMappingURL=ios-provision-service.js.map
|
|
@@ -63,3 +63,4 @@ exports.IOSWatchAppService = IOSWatchAppService;
|
|
|
63
63
|
IOSWatchAppService.WATCH_APP_IDENTIFIER = "watchkitapp";
|
|
64
64
|
IOSWatchAppService.WACTCH_EXTENSION_IDENTIFIER = "watchkitextension";
|
|
65
65
|
yok_1.injector.register("iOSWatchAppService", IOSWatchAppService);
|
|
66
|
+
//# sourceMappingURL=ios-watch-app-service.js.map
|
|
@@ -38,6 +38,7 @@ class IPService {
|
|
|
38
38
|
return ipAddress;
|
|
39
39
|
}
|
|
40
40
|
async getIPAddressFromIpifyOrgAPI() {
|
|
41
|
+
// https://www.ipify.org/
|
|
41
42
|
const ipifyOrgAPIEndpoint = "https://api.ipify.org";
|
|
42
43
|
let ipAddress = null;
|
|
43
44
|
try {
|
|
@@ -61,3 +62,4 @@ __decorate([
|
|
|
61
62
|
(0, decorators_1.cache)()
|
|
62
63
|
], IPService.prototype, "getCurrentIPv4Address", null);
|
|
63
64
|
yok_1.injector.register("ipService", IPService);
|
|
65
|
+
//# sourceMappingURL=ip-service.js.map
|
|
@@ -9,8 +9,10 @@ process.on("message", (data) => {
|
|
|
9
9
|
});
|
|
10
10
|
const KarmaServer = require(path.join(pathToKarma, "lib/server"));
|
|
11
11
|
const karma = new KarmaServer(data.karmaConfig, (exitCode) => {
|
|
12
|
+
// Exit with the correct exit code and signal the manager process.
|
|
12
13
|
process.exit(exitCode);
|
|
13
14
|
});
|
|
14
15
|
karma.start();
|
|
15
16
|
}
|
|
16
17
|
});
|
|
18
|
+
//# sourceMappingURL=karma-execution.js.map
|
|
@@ -97,6 +97,7 @@ class AndroidDeviceLiveSyncService extends android_device_livesync_service_base_
|
|
|
97
97
|
]);
|
|
98
98
|
const regex = new RegExp(`^-.*${deviceRootBasename}$`, "m");
|
|
99
99
|
const matchingFile = (listResult || "").match(regex);
|
|
100
|
+
// Check if there is already a file with deviceRootBasename. If so, delete it as it breaks LiveSyncing.
|
|
100
101
|
if (matchingFile && matchingFile[0] && _.startsWith(matchingFile[0], "-")) {
|
|
101
102
|
await this.device.adb.executeShellCommand(["rm", "-f", deviceRootPath]);
|
|
102
103
|
}
|
|
@@ -172,3 +173,4 @@ __decorate([
|
|
|
172
173
|
__decorate([
|
|
173
174
|
(0, decorators_1.performanceLog)()
|
|
174
175
|
], AndroidDeviceLiveSyncService.prototype, "removeFiles", null);
|
|
176
|
+
//# sourceMappingURL=android-device-livesync-service.js.map
|
|
@@ -95,6 +95,8 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
|
|
|
95
95
|
await this.$cleanupService.removeCleanupCommand(cleanupCommand);
|
|
96
96
|
};
|
|
97
97
|
await this.$cleanupService.addCleanupCommand(cleanupCommand);
|
|
98
|
+
// We need to clear resources when the action fails
|
|
99
|
+
// But we also need the real result of the action.
|
|
98
100
|
await doSyncPromise.then(actionOnEnd.bind(this), actionOnEnd.bind(this));
|
|
99
101
|
result = await doSyncPromise;
|
|
100
102
|
}
|
|
@@ -164,3 +166,4 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
|
|
|
164
166
|
exports.AndroidDeviceSocketsLiveSyncService = AndroidDeviceSocketsLiveSyncService;
|
|
165
167
|
AndroidDeviceSocketsLiveSyncService.STATUS_UPDATE_INTERVAL = 10000;
|
|
166
168
|
AndroidDeviceSocketsLiveSyncService.MINIMAL_VERSION_LONG_LIVING_CONNECTION = "0.2.0";
|
|
169
|
+
//# sourceMappingURL=android-device-livesync-sockets-service.js.map
|
|
@@ -140,9 +140,12 @@ class AndroidLivesyncTool {
|
|
|
140
140
|
error =
|
|
141
141
|
error ||
|
|
142
142
|
this.getErrorWithMessage("Socket connection ended before sync operation is complete.");
|
|
143
|
+
//remove listeners and delete this.socketConnection
|
|
143
144
|
this.cleanState(socketUid);
|
|
145
|
+
//call end of the connection (close and error callbacks won't be called - listeners removed)
|
|
144
146
|
socket.end();
|
|
145
147
|
socket.destroy();
|
|
148
|
+
//reject all pending sync requests and clear timeouts
|
|
146
149
|
this.rejectPendingSyncOperations(socketUid, error);
|
|
147
150
|
}
|
|
148
151
|
}
|
|
@@ -402,3 +405,4 @@ AndroidLivesyncTool.SOCKET_CONNECTION_ALREADY_EXISTS_ERROR = "Socket connection
|
|
|
402
405
|
AndroidLivesyncTool.SOCKET_CONNECTION_TIMED_OUT_ERROR = "Socket connection timed out.";
|
|
403
406
|
AndroidLivesyncTool.NO_SOCKET_CONNECTION_AVAILABLE_ERROR = "No socket connection available.";
|
|
404
407
|
yok_1.injector.register("androidLivesyncTool", AndroidLivesyncTool);
|
|
408
|
+
//# sourceMappingURL=android-livesync-tool.js.map
|
|
@@ -40,6 +40,7 @@ class DeviceLiveSyncServiceBase {
|
|
|
40
40
|
return transferredFiles;
|
|
41
41
|
}
|
|
42
42
|
async finalizeSync(liveSyncInfo, projectData) {
|
|
43
|
+
//implement in case a sync point for all remove/create operation is needed
|
|
43
44
|
return {
|
|
44
45
|
didRefresh: true,
|
|
45
46
|
operationId: "",
|
|
@@ -54,3 +55,4 @@ __decorate([
|
|
|
54
55
|
__decorate([
|
|
55
56
|
(0, decorators_2.performanceLog)()
|
|
56
57
|
], DeviceLiveSyncServiceBase.prototype, "transferFiles", null);
|
|
58
|
+
//# sourceMappingURL=device-livesync-service-base.js.map
|
|
@@ -37,11 +37,13 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
|
|
|
37
37
|
return canRefresh;
|
|
38
38
|
}
|
|
39
39
|
async setupSocketIfNeeded(projectData) {
|
|
40
|
+
// TODO: persist the sockets per app in order to support LiveSync on multiple apps on the same device
|
|
40
41
|
if (this.socket) {
|
|
41
42
|
return true;
|
|
42
43
|
}
|
|
43
44
|
const appId = projectData.projectIdentifiers.ios;
|
|
44
45
|
try {
|
|
46
|
+
// TODO: temp workaround till we setup the sockets along with the app start
|
|
45
47
|
const ensureAppStarted = true;
|
|
46
48
|
this.socket = await this.device.getDebugSocket(appId, projectData.projectName, projectData.projectDir, ensureAppStarted);
|
|
47
49
|
}
|
|
@@ -121,6 +123,7 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
|
|
|
121
123
|
projectDir: projectData.projectDir,
|
|
122
124
|
});
|
|
123
125
|
if (liveSyncInfo.useHotModuleReload) {
|
|
126
|
+
// enable HOT updates
|
|
124
127
|
await this.setupSocketIfNeeded(projectData);
|
|
125
128
|
}
|
|
126
129
|
}
|
|
@@ -177,6 +180,9 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
|
|
|
177
180
|
}
|
|
178
181
|
async destroySocket() {
|
|
179
182
|
if (this.socket) {
|
|
183
|
+
// we do not support LiveSync on multiple apps on the same device
|
|
184
|
+
// in order to do that, we should cache the socket per app
|
|
185
|
+
// and destroy just the current app socket when possible
|
|
180
186
|
await this.device.destroyAllSockets();
|
|
181
187
|
this.socket = null;
|
|
182
188
|
}
|
|
@@ -187,3 +193,4 @@ IOSDeviceLiveSyncService.MIN_RUNTIME_VERSION_WITH_REFRESH_NOTIFICATION = "6.1.0"
|
|
|
187
193
|
__decorate([
|
|
188
194
|
(0, decorators_1.performanceLog)()
|
|
189
195
|
], IOSDeviceLiveSyncService.prototype, "removeFiles", null);
|
|
196
|
+
//# sourceMappingURL=ios-device-livesync-service.js.map
|
|
@@ -58,6 +58,7 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
|
|
|
58
58
|
}
|
|
59
59
|
async syncAfterInstall(device, liveSyncInfo) {
|
|
60
60
|
if (!device.isEmulator) {
|
|
61
|
+
// In this case we should execute fullsync because iOS Runtime requires the full content of app dir to be extracted in the root of sync dir.
|
|
61
62
|
await this.fullSync({
|
|
62
63
|
projectData: liveSyncInfo.projectData,
|
|
63
64
|
device,
|
|
@@ -77,3 +78,4 @@ __decorate([
|
|
|
77
78
|
(0, decorators_1.performanceLog)()
|
|
78
79
|
], IOSLiveSyncService.prototype, "fullSync", null);
|
|
79
80
|
yok_1.injector.register("iOSLiveSyncService", IOSLiveSyncService);
|
|
81
|
+
//# sourceMappingURL=ios-livesync-service.js.map
|
|
@@ -40,6 +40,7 @@ class PlatformLiveSyncServiceBase {
|
|
|
40
40
|
return shouldRestart;
|
|
41
41
|
}
|
|
42
42
|
async syncAfterInstall(device, liveSyncInfo) {
|
|
43
|
+
/* intentionally left blank */
|
|
43
44
|
}
|
|
44
45
|
async restartApplication(projectData, liveSyncInfo) {
|
|
45
46
|
const deviceLiveSyncService = this.getDeviceLiveSyncService(liveSyncInfo.deviceAppData.device, projectData);
|
|
@@ -85,6 +86,8 @@ class PlatformLiveSyncServiceBase {
|
|
|
85
86
|
let modifiedLocalToDevicePaths = [];
|
|
86
87
|
if (liveSyncInfo.filesToSync.length) {
|
|
87
88
|
const filesToSync = liveSyncInfo.filesToSync;
|
|
89
|
+
// const mappedFiles = _.map(filesToSync, filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData));
|
|
90
|
+
// Some plugins modify platforms dir on afterPrepare (check nativescript-dev-sass) - we want to sync only existing file.
|
|
88
91
|
const existingFiles = filesToSync.filter((m) => m && this.$fs.exists(m));
|
|
89
92
|
this.$logger.trace("Will execute livesync for files: ", existingFiles);
|
|
90
93
|
const skippedFiles = _.difference(filesToSync, existingFiles);
|
|
@@ -103,6 +106,7 @@ class PlatformLiveSyncServiceBase {
|
|
|
103
106
|
const filePaths = liveSyncInfo.filesToRemove;
|
|
104
107
|
const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
|
|
105
108
|
const mappedFiles = _(filePaths)
|
|
109
|
+
// .map(filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData))
|
|
106
110
|
.filter((filePath) => !!filePath)
|
|
107
111
|
.value();
|
|
108
112
|
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants_1.APP_FOLDER_NAME);
|
|
@@ -154,3 +158,4 @@ exports.PlatformLiveSyncServiceBase = PlatformLiveSyncServiceBase;
|
|
|
154
158
|
__decorate([
|
|
155
159
|
(0, decorators_1.performanceLog)()
|
|
156
160
|
], PlatformLiveSyncServiceBase.prototype, "liveSyncWatchAction", null);
|
|
161
|
+
//# sourceMappingURL=platform-livesync-service-base.js.map
|
|
@@ -31,6 +31,7 @@ class LogSourceMapService {
|
|
|
31
31
|
if (!this.$fs.getFsStats(filePath).isDirectory()) {
|
|
32
32
|
const mapFile = filePath + ".map";
|
|
33
33
|
let sourceMapRaw;
|
|
34
|
+
// Skip files bigger than 50MB
|
|
34
35
|
if (this.$fs.getFileSize(filePath) > 50 * 1000 * 1000) {
|
|
35
36
|
this.$logger.trace(`Skipping source map for file ${filePath} because it is too big (> 50MB).`);
|
|
36
37
|
return;
|
|
@@ -155,6 +156,8 @@ class LogSourceMapService {
|
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
parseAndroidLog(projectData, rawMessage) {
|
|
159
|
+
// "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap (file:///data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
|
|
160
|
+
// "System.err: File: "file:///data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
|
|
158
161
|
const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
|
|
159
162
|
const deviceProjectPath = util.format(constants_1.ANDROID_DEVICE_APP_ROOT_TEMPLATE, projectData.projectIdentifiers.android);
|
|
160
163
|
let separator = ",";
|
|
@@ -162,18 +165,25 @@ class LogSourceMapService {
|
|
|
162
165
|
let parts, filePath, line, column, messagePrefix;
|
|
163
166
|
if (fileIndex >= 0) {
|
|
164
167
|
const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
|
|
168
|
+
//"data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
|
|
165
169
|
parts = fileSubstring.split(separator);
|
|
166
170
|
if (parts.length >= 3) {
|
|
171
|
+
// "data/data/org.nativescript.sourceMap/files/app/bundle.js"
|
|
167
172
|
parts[0] = parts[0].replace("'", "");
|
|
173
|
+
// " line: 304"
|
|
168
174
|
parts[1] = parts[1].replace(" line: ", "");
|
|
175
|
+
// " column: 8"
|
|
169
176
|
parts[2] = parts[2].replace(" column: ", "");
|
|
170
177
|
}
|
|
171
178
|
else {
|
|
179
|
+
// "data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
|
|
172
180
|
separator = ":";
|
|
173
181
|
parts = fileSubstring.split(separator);
|
|
174
182
|
}
|
|
175
183
|
if (parts.length >= 3) {
|
|
184
|
+
// "/data/data/org.nativescript.sourceMap/files/app/"
|
|
176
185
|
const devicePath = `${deviceProjectPath}/${constants_1.APP_FOLDER_NAME}/`;
|
|
186
|
+
// "bundle.js"
|
|
177
187
|
filePath = path.relative(devicePath, `${"/"}${parts[0]}`);
|
|
178
188
|
line = parseInt(parts[1]);
|
|
179
189
|
column = parseInt(parts[2]);
|
|
@@ -181,20 +191,24 @@ class LogSourceMapService {
|
|
|
181
191
|
for (let i = 3; i < parts.length; i++) {
|
|
182
192
|
messageSuffix += `${parts[i]}${i === parts.length - 1 ? "" : separator}`;
|
|
183
193
|
}
|
|
194
|
+
// "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap ("
|
|
184
195
|
messagePrefix = _.trimEnd(messagePrefix, "(");
|
|
185
196
|
}
|
|
186
197
|
}
|
|
187
198
|
return { filePath, line, column, messagePrefix, messageSuffix };
|
|
188
199
|
}
|
|
189
200
|
parseIosLog(rawMessage) {
|
|
201
|
+
// "CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
|
|
190
202
|
const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
|
|
191
203
|
let messageSuffix = "";
|
|
192
204
|
let parts, filePath, line, column, messagePrefix;
|
|
193
205
|
if (fileIndex >= 0) {
|
|
206
|
+
// "app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
|
|
194
207
|
const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
|
|
195
208
|
parts = fileSubstring.split(":");
|
|
196
209
|
if (parts && parts.length >= 3) {
|
|
197
210
|
filePath = parts[0];
|
|
211
|
+
// "app/vendor.js"
|
|
198
212
|
if (_.startsWith(filePath, constants_1.APP_FOLDER_NAME)) {
|
|
199
213
|
filePath = path.relative(constants_1.APP_FOLDER_NAME, parts[0]);
|
|
200
214
|
}
|
|
@@ -223,3 +237,4 @@ LogSourceMapService.FILE_PREFIX = "file:///";
|
|
|
223
237
|
LogSourceMapService.FILE_PREFIX_REPLACEMENT = "file: ";
|
|
224
238
|
LogSourceMapService.MEMOIZE_FUNCTION_RANDOM_KEY_FOR_JOIN = "__some_random_value__";
|
|
225
239
|
yok_1.injector.register("logSourceMapService", LogSourceMapService);
|
|
240
|
+
//# sourceMappingURL=log-source-map-service.js.map
|
|
@@ -6,7 +6,7 @@ const constants_1 = require("../constants");
|
|
|
6
6
|
const yok_1 = require("../common/yok");
|
|
7
7
|
const semver = require("semver/preload");
|
|
8
8
|
const MARKING_MODE_PROP = "markingMode";
|
|
9
|
-
const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full"}" is no longer supported.`;
|
|
9
|
+
const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full" /* MarkingMode.Full */}" is no longer supported.`;
|
|
10
10
|
class MarkingModeService {
|
|
11
11
|
constructor($logger, $projectConfigService, $projectHelper, $projectDataService) {
|
|
12
12
|
this.$logger = $logger;
|
|
@@ -18,11 +18,13 @@ class MarkingModeService {
|
|
|
18
18
|
const markingModeValue = this.$projectConfigService.getValue("android.markingMode");
|
|
19
19
|
const { skipWarnings, forceSwitch } = options;
|
|
20
20
|
if (forceSwitch) {
|
|
21
|
-
await this.setMarkingMode("none");
|
|
21
|
+
await this.setMarkingMode("none" /* MarkingMode.None */);
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none") {
|
|
25
|
-
|
|
24
|
+
if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none" /* MarkingMode.None */) {
|
|
25
|
+
// only warn if runtime is less than 7.0.0-rc.5 - where the default has been changed to None
|
|
26
|
+
// if version is null - we are about to add the latest runtime, so no need to warn
|
|
27
|
+
const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android" /* PlatformTypes.android */);
|
|
26
28
|
const isMarkingModeFullDefault = version && semver.lt(semver.coerce(version), "7.0.0-rc.5");
|
|
27
29
|
if (isMarkingModeFullDefault) {
|
|
28
30
|
this.showMarkingModeFullWarning();
|
|
@@ -33,7 +35,7 @@ class MarkingModeService {
|
|
|
33
35
|
await this.$projectConfigService.setValue("android.markingMode", newMode);
|
|
34
36
|
}
|
|
35
37
|
showMarkingModeFullWarning() {
|
|
36
|
-
const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${"full"}".${os_1.EOL}${os_1.EOL}${MARKING_MODE_FULL_DEPRECATION_MSG}${os_1.EOL}${os_1.EOL}You should update your marking mode by executing 'ns update --markingMode'.`;
|
|
38
|
+
const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${"full" /* MarkingMode.Full */}".${os_1.EOL}${os_1.EOL}${MARKING_MODE_FULL_DEPRECATION_MSG}${os_1.EOL}${os_1.EOL}You should update your marking mode by executing 'ns update --markingMode'.`;
|
|
37
39
|
this.$logger.warn(markingModeFullWarning, {
|
|
38
40
|
[constants_1.LoggerConfigData.wrapMessageWithBorders]: true,
|
|
39
41
|
});
|
|
@@ -41,3 +43,4 @@ class MarkingModeService {
|
|
|
41
43
|
}
|
|
42
44
|
exports.MarkingModeService = MarkingModeService;
|
|
43
45
|
yok_1.injector.register("markingModeService", MarkingModeService);
|
|
46
|
+
//# sourceMappingURL=marking-mode-service.js.map
|