nativescript 9.0.3 → 9.0.4-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android-tools-info.js +0 -12
- package/lib/base-package-manager.js +0 -7
- package/lib/bootstrap.js +1 -5
- package/lib/bun-package-manager.js +1 -14
- package/lib/color.js +0 -4
- package/lib/commands/add-platform.js +0 -1
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.js +0 -3
- package/lib/commands/build.js +2 -3
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.js +0 -5
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.js +1 -6
- package/lib/commands/deploy.js +2 -3
- package/lib/commands/embedding/embed.js +0 -7
- package/lib/commands/extensibility/install-extension.js +0 -1
- package/lib/commands/extensibility/list-extensions.js +0 -1
- package/lib/commands/extensibility/uninstall-extension.js +0 -1
- package/lib/commands/fonts.js +0 -1
- package/lib/commands/generate-assets.js +0 -1
- package/lib/commands/generate-help.js +0 -1
- package/lib/commands/generate.js +1 -48
- package/lib/commands/hooks/common.js +1 -2
- package/lib/commands/hooks/hooks-lock.js +0 -1
- package/lib/commands/hooks/hooks.js +0 -1
- package/lib/commands/info.js +0 -1
- package/lib/commands/install.js +0 -1
- package/lib/commands/list-platforms.js +0 -1
- package/lib/commands/migrate.js +0 -1
- package/lib/commands/native-add.js +0 -5
- package/lib/commands/platform-clean.js +0 -1
- package/lib/commands/plugin/add-plugin.js +0 -1
- package/lib/commands/plugin/build-plugin.js +0 -1
- package/lib/commands/plugin/create-plugin.js +0 -5
- package/lib/commands/plugin/list-plugins.js +0 -1
- package/lib/commands/plugin/remove-plugin.js +0 -2
- package/lib/commands/plugin/update-plugin.js +0 -1
- package/lib/commands/post-install.js +0 -6
- package/lib/commands/prepare.js +3 -4
- package/lib/commands/preview.js +0 -2
- package/lib/commands/remove-platform.js +0 -1
- package/lib/commands/resources/resources-update.js +0 -2
- package/lib/commands/run.js +0 -1
- package/lib/commands/setup.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/commands/test-init.js +0 -4
- package/lib/commands/test.js +2 -9
- package/lib/commands/typings.js +1 -2
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.js +0 -2
- package/lib/commands/widget.js +1 -20
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.js +0 -3
- package/lib/common/codeGeneration/code-entity.js +0 -1
- package/lib/common/codeGeneration/code-printer.js +0 -1
- package/lib/common/command-params.js +0 -1
- package/lib/common/commands/analytics.js +0 -3
- package/lib/common/commands/autocompletion.js +0 -3
- package/lib/common/commands/device/device-log-stream.js +0 -1
- package/lib/common/commands/device/get-file.js +0 -2
- package/lib/common/commands/device/list-applications.js +0 -1
- package/lib/common/commands/device/list-devices.js +0 -3
- package/lib/common/commands/device/list-files.js +0 -2
- package/lib/common/commands/device/put-file.js +0 -2
- package/lib/common/commands/device/run-application.js +0 -1
- package/lib/common/commands/device/stop-application.js +0 -1
- package/lib/common/commands/device/uninstall-application.js +0 -1
- package/lib/common/commands/doctor.js +2 -3
- package/lib/common/commands/generate-messages.js +0 -1
- package/lib/common/commands/help.js +0 -1
- package/lib/common/commands/package-manager-get.js +0 -1
- package/lib/common/commands/package-manager-set.js +0 -1
- package/lib/common/commands/post-install.js +0 -1
- package/lib/common/commands/preuninstall.js +2 -11
- package/lib/common/commands/proxy/proxy-base.js +0 -4
- package/lib/common/commands/proxy/proxy-clear.js +0 -1
- package/lib/common/commands/proxy/proxy-get.js +0 -1
- package/lib/common/commands/proxy/proxy-set.js +0 -1
- package/lib/common/common-lib.js +0 -1
- package/lib/common/constants.js +0 -11
- package/lib/common/decorators.js +0 -48
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/errors.js +3 -13
- package/lib/common/file-system.js +2 -13
- package/lib/common/header.js +0 -3
- package/lib/common/helpers.js +3 -89
- package/lib/common/host-info.js +0 -4
- package/lib/common/http-client.js +0 -20
- package/lib/common/logger/appenders/cli-appender.js +0 -4
- package/lib/common/logger/appenders/emit-appender.js +0 -4
- package/lib/common/logger/layouts/cli-layout.js +0 -1
- package/lib/common/logger/logger.js +0 -5
- package/lib/common/messages/messages.js +0 -6
- package/lib/common/mobile/android/android-application-manager.js +1 -20
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
- package/lib/common/mobile/android/android-debug-bridge.js +0 -6
- package/lib/common/mobile/android/android-device-file-system.js +0 -4
- package/lib/common/mobile/android/android-device-hash-service.js +0 -3
- package/lib/common/mobile/android/android-device.js +0 -8
- package/lib/common/mobile/android/android-emulator-services.js +1 -2
- package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
- package/lib/common/mobile/android/android-log-filter.js +0 -4
- package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
- package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
- package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +0 -13
- package/lib/common/mobile/application-manager-base.js +0 -6
- package/lib/common/mobile/device-emitter.js +0 -4
- package/lib/common/mobile/device-log-emitter.js +0 -1
- package/lib/common/mobile/device-log-provider-base.js +0 -1
- package/lib/common/mobile/device-log-provider.js +0 -23
- package/lib/common/mobile/device-platforms-constants.js +0 -1
- package/lib/common/mobile/emulator-helper.js +0 -3
- package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
- package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
- package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
- package/lib/common/mobile/ios/device/ios-device.js +0 -4
- package/lib/common/mobile/ios/ios-device-base.js +0 -1
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
- package/lib/common/mobile/ios/ios-log-filter.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
- package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
- package/lib/common/mobile/log-filter.js +0 -2
- package/lib/common/mobile/logging-levels.js +0 -1
- package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
- package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
- package/lib/common/mobile/mobile-core/devices-service.js +0 -69
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-helper.js +0 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
- package/lib/common/opener.js +0 -1
- package/lib/common/os-info.js +0 -1
- package/lib/common/plist-parser.js +0 -1
- package/lib/common/project-helper.js +0 -1
- package/lib/common/prompter.js +1 -9
- package/lib/common/queue.js +0 -1
- package/lib/common/resource-loader.js +0 -1
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +1 -2
- package/lib/common/services/commands-service.js +6 -17
- package/lib/common/services/help-service.js +3 -11
- package/lib/common/services/hooks-service.js +0 -13
- package/lib/common/services/ios-notification-service.js +0 -1
- package/lib/common/services/json-file-settings-service.js +0 -6
- package/lib/common/services/lock-service.js +0 -6
- package/lib/common/services/message-contract-generator.js +0 -1
- package/lib/common/services/messages-service.js +0 -1
- package/lib/common/services/micro-templating-service.js +0 -6
- package/lib/common/services/net-service.js +0 -3
- package/lib/common/services/project-files-manager.js +0 -5
- package/lib/common/services/project-files-provider-base.js +0 -1
- package/lib/common/services/proxy-service.js +0 -1
- package/lib/common/services/qr.js +0 -1
- package/lib/common/services/settings-service.js +0 -1
- package/lib/common/services/xcode-select-service.js +0 -1
- package/lib/common/utils.js +0 -1
- package/lib/common/validators/project-name-validator.js +0 -1
- package/lib/common/validators/validation-result.js +0 -1
- package/lib/common/verify-node-version.js +1 -8
- package/lib/common/yok.js +11 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +0 -53
- package/lib/controllers/build-controller.js +3 -4
- package/lib/controllers/debug-controller.js +3 -8
- package/lib/controllers/deploy-controller.js +0 -1
- package/lib/controllers/migrate-controller.js +4 -90
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +4 -17
- package/lib/controllers/run-controller.js +1 -17
- package/lib/controllers/update-controller-base.js +0 -1
- package/lib/controllers/update-controller.js +0 -11
- package/lib/data/build-data.js +0 -1
- package/lib/data/controller-data-base.js +0 -1
- package/lib/data/debug-data.js +0 -1
- package/lib/data/platform-data.js +0 -1
- package/lib/data/prepare-data.js +0 -1
- package/lib/data/run-data.js +0 -1
- package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
- package/lib/detached-processes/cleanup-process.js +14 -18
- package/lib/detached-processes/file-log-service.js +1 -2
- package/lib/device-path-provider.js +0 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
- package/lib/device-sockets/ios/notification.js +0 -3
- package/lib/device-sockets/ios/socket-request-executor.js +0 -3
- package/lib/helpers/android-bundle-validator-helper.js +1 -2
- package/lib/helpers/deploy-command-helper.js +0 -1
- package/lib/helpers/key-command-helper.js +2 -4
- package/lib/helpers/livesync-command-helper.js +1 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +2 -3
- package/lib/helpers/package-path-helper.js +0 -1
- package/lib/helpers/platform-command-helper.js +2 -7
- package/lib/helpers/version-validator-helper.js +0 -1
- package/lib/key-commands/bootstrap.js +2 -3
- package/lib/key-commands/index.js +4 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +1 -11
- package/lib/node/pbxproj-dom-xcode.js +0 -1
- package/lib/node/xcode.js +0 -1
- package/lib/node-package-manager.js +1 -11
- package/lib/options.js +119 -144
- package/lib/package-installation-manager.js +1 -8
- package/lib/package-manager.js +0 -2
- package/lib/platform-command-param.js +0 -1
- package/lib/pnpm-package-manager.js +1 -4
- package/lib/project-data.js +0 -12
- package/lib/providers/project-files-provider.js +0 -1
- package/lib/resolvers/livesync-service-resolver.js +0 -1
- package/lib/services/analytics/analytics-broker-process.js +6 -10
- package/lib/services/analytics/analytics-broker.js +1 -2
- package/lib/services/analytics/analytics-service.js +25 -29
- package/lib/services/analytics/google-analytics-provider.js +12 -13
- package/lib/services/analytics-settings-service.js +0 -5
- package/lib/services/android/android-bundle-tool-service.js +0 -1
- package/lib/services/android/gradle-build-args-service.js +0 -3
- package/lib/services/android/gradle-build-service.js +0 -1
- package/lib/services/android/gradle-command-service.js +0 -1
- package/lib/services/android-device-debug-service.js +0 -6
- package/lib/services/android-plugin-build-service.js +2 -31
- package/lib/services/android-project-service.js +4 -71
- package/lib/services/android-resources-migration-service.js +0 -7
- package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
- package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
- package/lib/services/assets-generation/assets-generation-service.js +5 -10
- package/lib/services/build-artifacts-service.js +1 -2
- package/lib/services/build-data-service.js +0 -1
- package/lib/services/build-info-file-service.js +0 -1
- package/lib/services/bundler/bundler-compiler-service.js +1 -68
- package/lib/services/bundler/bundler.js +0 -1
- package/lib/services/cleanup-service.js +9 -13
- package/lib/services/cocoapods-platform-manager.js +0 -9
- package/lib/services/cocoapods-service.js +1 -21
- package/lib/services/debug-data-service.js +0 -1
- package/lib/services/debug-service-base.js +0 -7
- package/lib/services/device/device-install-app-service.js +1 -2
- package/lib/services/doctor-service.js +6 -21
- package/lib/services/extensibility-service.js +0 -8
- package/lib/services/files-hash-service.js +0 -1
- package/lib/services/hmr-status-service.js +0 -2
- package/lib/services/info-service.js +0 -1
- package/lib/services/initialize-service.js +1 -5
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.js +10 -7
- package/lib/services/ios/spm-service.js +0 -18
- package/lib/services/ios/xcodebuild-args-service.js +0 -11
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +1 -2
- package/lib/services/ios-debugger-port-service.js +0 -1
- package/lib/services/ios-device-debug-service.js +0 -1
- package/lib/services/ios-entitlements-service.js +3 -2
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.js +4 -6
- package/lib/services/ios-project-service.js +11 -105
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +0 -1
- package/lib/services/ip-service.js +0 -2
- package/lib/services/itmstransporter-service.js +0 -1
- package/lib/services/karma-execution.js +0 -2
- package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
- package/lib/services/livesync/android-device-livesync-service.js +0 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
- package/lib/services/livesync/android-livesync-service.js +0 -1
- package/lib/services/livesync/android-livesync-tool.js +0 -4
- package/lib/services/livesync/device-livesync-service-base.js +0 -2
- package/lib/services/livesync/ios-device-livesync-service.js +0 -7
- package/lib/services/livesync/ios-livesync-service.js +0 -2
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.js +0 -5
- package/lib/services/livesync-process-data-service.js +0 -1
- package/lib/services/log-parser-service.js +0 -1
- package/lib/services/log-source-map-service.js +0 -15
- package/lib/services/marking-mode-service.js +5 -8
- package/lib/services/metadata-filtering-service.js +0 -1
- package/lib/services/npm-config-service.js +0 -4
- package/lib/services/pacote-service.js +0 -7
- package/lib/services/performance-service.js +1 -3
- package/lib/services/platform/add-platform-service.js +2 -49
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.js +2 -5
- package/lib/services/platform-environment-requirements.js +3 -8
- package/lib/services/platform-project-service-base.js +0 -1
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.js +2 -20
- package/lib/services/prepare-data-service.js +0 -1
- package/lib/services/project-backup-service.js +0 -4
- package/lib/services/project-changes-service.js +3 -14
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +2 -21
- package/lib/services/project-data-service.js +7 -36
- package/lib/services/project-name-service.js +0 -1
- package/lib/services/project-service.js +0 -10
- package/lib/services/project-templates-service.js +2 -3
- package/lib/services/qr-code-terminal-service.js +0 -1
- package/lib/services/require-service.js +0 -1
- package/lib/services/start-service.js +0 -1
- package/lib/services/temp-service.js +0 -3
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.js +2 -9
- package/lib/services/test-initialization-service.js +0 -4
- package/lib/services/timeline-profiler-service.js +0 -1
- package/lib/services/user-settings-service.js +0 -1
- package/lib/services/versions-service.js +4 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/xcconfig-service.js +0 -2
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +1 -2
- package/lib/tools/config-manipulation/config-transformer.js +0 -12
- package/lib/tools/node-modules/node-modules-builder.js +0 -1
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
- package/lib/yarn-package-manager.js +0 -1
- package/lib/yarn2-package-manager.js +0 -3
- package/package.json +1 -1
|
@@ -72,22 +72,22 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
72
72
|
this.$mobileHelper = $mobileHelper;
|
|
73
73
|
this.$projectConfigService = $projectConfigService;
|
|
74
74
|
this._platformsDirCache = null;
|
|
75
|
+
this._platformOverrideCache = null;
|
|
75
76
|
this._platformData = null;
|
|
76
|
-
// Track added frameworks by name to prevent duplicates in monorepo/workspace setups
|
|
77
|
-
// where the same plugin may exist in multiple node_modules paths
|
|
78
77
|
this._addedFrameworks = new Set();
|
|
79
|
-
// Track added static libraries by name to prevent duplicates in monorepo/workspace setups
|
|
80
78
|
this._addedStaticLibs = new Set();
|
|
81
79
|
}
|
|
82
80
|
getPlatformData(projectData) {
|
|
83
|
-
var _a;
|
|
81
|
+
var _a, _b;
|
|
84
82
|
if (!projectData && !this._platformData) {
|
|
85
83
|
throw new Error("First call of getPlatformData without providing projectData.");
|
|
86
84
|
}
|
|
85
|
+
const currentOverride = (_a = this.$options.platformOverride) !== null && _a !== void 0 ? _a : null;
|
|
87
86
|
if (projectData &&
|
|
88
87
|
projectData.platformsDir &&
|
|
89
|
-
this._platformsDirCache !== projectData.platformsDir
|
|
90
|
-
|
|
88
|
+
(this._platformsDirCache !== projectData.platformsDir ||
|
|
89
|
+
this._platformOverrideCache !== currentOverride)) {
|
|
90
|
+
const platform = this.$mobileHelper.normalizePlatformName((_b = this.$options.platformOverride) !== null && _b !== void 0 ? _b : this.$devicePlatformsConstants.iOS);
|
|
91
91
|
const projectRoot = this.$options.hostProjectPath
|
|
92
92
|
? this.$options.hostProjectPath
|
|
93
93
|
: path.join(projectData.platformsDir, platform.toLowerCase());
|
|
@@ -143,8 +143,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
143
143
|
".ico",
|
|
144
144
|
".cur",
|
|
145
145
|
".xbm",
|
|
146
|
-
],
|
|
146
|
+
],
|
|
147
147
|
};
|
|
148
|
+
this._platformsDirCache = projectData.platformsDir;
|
|
149
|
+
this._platformOverrideCache = currentOverride;
|
|
148
150
|
}
|
|
149
151
|
return this._platformData;
|
|
150
152
|
}
|
|
@@ -190,11 +192,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
190
192
|
this.$fs.ensureDirectoryExists(path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER));
|
|
191
193
|
shell.cp("-R", path.join(frameworkDir, "*"), this.getPlatformData(projectData).projectRoot);
|
|
192
194
|
}
|
|
193
|
-
//TODO: plamen5kov: revisit this method, might have unnecessary/obsolete logic
|
|
194
195
|
async interpolateData(projectData) {
|
|
195
196
|
const projectRootFilePath = path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER);
|
|
196
|
-
// Starting with NativeScript for iOS 1.6.0, the project Info.plist file resides not in the platform project,
|
|
197
|
-
// but in the hello-world app template as a platform specific resource.
|
|
198
197
|
if (this.$fs.exists(path.join(projectRootFilePath, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER + "-Info.plist"))) {
|
|
199
198
|
this.replaceFileName("-Info.plist", projectRootFilePath, projectData);
|
|
200
199
|
}
|
|
@@ -284,9 +283,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
284
283
|
return await isDynamicFrameworkBundle(frameworkPath, frameworkName);
|
|
285
284
|
}
|
|
286
285
|
}
|
|
287
|
-
/**
|
|
288
|
-
* Clears the framework and static library tracking sets. Should be called at the start of a new prepare cycle.
|
|
289
|
-
*/
|
|
290
286
|
clearFrameworksCache() {
|
|
291
287
|
this._addedFrameworks.clear();
|
|
292
288
|
this._addedStaticLibs.clear();
|
|
@@ -295,7 +291,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
295
291
|
if (this.$hostInfo.isWindows) {
|
|
296
292
|
return;
|
|
297
293
|
}
|
|
298
|
-
// Check if framework with same name already added (prevents duplicate output errors in monorepos)
|
|
299
294
|
const frameworkName = path.basename(frameworkPath);
|
|
300
295
|
if (this._addedFrameworks.has(frameworkName)) {
|
|
301
296
|
this.$logger.trace(`Framework ${frameworkName} already added, skipping duplicate from ${frameworkPath}`);
|
|
@@ -311,38 +306,21 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
311
306
|
frameworkAddOptions["sign"] = true;
|
|
312
307
|
}
|
|
313
308
|
if (this.$options.hostProjectPath) {
|
|
314
|
-
// always mark xcframeworks for embedding
|
|
315
309
|
frameworkAddOptions["embed"] = true;
|
|
316
310
|
frameworkAddOptions["sign"] = false;
|
|
317
311
|
}
|
|
318
|
-
// Note: we used to prepend "$(SRCROOT)/" to the framework path, but seems like it's not needed anymore
|
|
319
|
-
// "$(SRCROOT)/" +
|
|
320
312
|
const frameworkRelativePath = this.getLibSubpathRelativeToProjectPath(frameworkPath, projectData);
|
|
321
313
|
project.addFramework(frameworkRelativePath, frameworkAddOptions);
|
|
322
|
-
// filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
|
|
323
|
-
// project.addBuildPhase(
|
|
324
|
-
// [],
|
|
325
|
-
// "PBXShellScriptBuildPhase",
|
|
326
|
-
// "Debug SRCROOT",
|
|
327
|
-
// undefined,
|
|
328
|
-
// {
|
|
329
|
-
// shellPath: "/bin/sh",
|
|
330
|
-
// shellScript: `echo "SRCROOT: $SRCROOT"`,
|
|
331
|
-
// }
|
|
332
|
-
// );
|
|
333
314
|
this.savePbxProj(project, projectData);
|
|
334
315
|
}
|
|
335
316
|
async addStaticLibrary(staticLibPath, projectData) {
|
|
336
|
-
// Check if static library with same name already added (prevents duplicate errors in monorepos)
|
|
337
317
|
const libraryName = path.basename(staticLibPath, ".a");
|
|
338
318
|
if (this._addedStaticLibs.has(libraryName)) {
|
|
339
319
|
this.$logger.trace(`Static library ${libraryName} already added, skipping duplicate from ${staticLibPath}`);
|
|
340
320
|
return;
|
|
341
321
|
}
|
|
342
322
|
this._addedStaticLibs.add(libraryName);
|
|
343
|
-
// Copy files to lib folder.
|
|
344
323
|
const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName);
|
|
345
|
-
// Add static library to project file and setup header search paths
|
|
346
324
|
const project = this.createPbxProj(projectData);
|
|
347
325
|
const relativeStaticLibPath = this.getLibSubpathRelativeToProjectPath(staticLibPath, projectData);
|
|
348
326
|
project.addFramework(relativeStaticLibPath);
|
|
@@ -352,10 +330,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
352
330
|
this.savePbxProj(project, projectData);
|
|
353
331
|
}
|
|
354
332
|
async prepareProject(projectData, prepareData) {
|
|
333
|
+
const platformData = this.getPlatformData(projectData);
|
|
355
334
|
const projectRoot = this.$options.hostProjectPath
|
|
356
335
|
? this.$options.hostProjectPath
|
|
357
|
-
:
|
|
358
|
-
const platformData = this.getPlatformData(projectData);
|
|
336
|
+
: platformData.projectRoot;
|
|
359
337
|
const pluginsData = this.getAllProductionPlugins(projectData);
|
|
360
338
|
const pbxProjPath = this.getPbxProjPath(projectData);
|
|
361
339
|
this.$iOSExtensionsService.removeExtensions({ pbxProjPath });
|
|
@@ -377,58 +355,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
377
355
|
filesRelativeToProject: true,
|
|
378
356
|
uuid: "NATIVESCRIPTNATIVESCRIPT",
|
|
379
357
|
});
|
|
380
|
-
/**
|
|
381
|
-
* 1. Add platforms/ios/{projectname}/app build to the host app
|
|
382
|
-
*/
|
|
383
|
-
// Note: allow customization of this targetFolderName
|
|
384
|
-
// const targetFolderName = "app";
|
|
385
358
|
const buildFolderPath = path.join(this.$options.hostProjectPath, projectData.projectName);
|
|
386
359
|
project.addResourceFile(buildFolderPath, {}, "NATIVESCRIPTNATIVESCRIPT");
|
|
387
|
-
// filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
|
|
388
|
-
// project.addBuildPhase(
|
|
389
|
-
// [],
|
|
390
|
-
// "PBXShellScriptBuildPhase",
|
|
391
|
-
// "Copy Metadata (DEBUG)",
|
|
392
|
-
// undefined,
|
|
393
|
-
// {
|
|
394
|
-
// shellPath: "/bin/sh",
|
|
395
|
-
// shellScript: `cp ./platforms/ios/build/Debug-iphonesimulator/metadata-arm64.bin $CONFIGURATION_BUILD_DIR`,
|
|
396
|
-
// outputPaths: [
|
|
397
|
-
// JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64.bin"),
|
|
398
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64e.bin"),
|
|
399
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-i386.bin"),
|
|
400
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-x86_64.bin"),
|
|
401
|
-
// ],
|
|
402
|
-
// }
|
|
403
|
-
// );
|
|
404
360
|
const metadataPath = path.relative(this.$options.hostProjectPath, buildFolderPath);
|
|
405
361
|
project.addToOtherLinkerFlags(JSON.stringify(`-sectcreate __DATA __TNSMetadata "${metadataPath}/metadata-arm64.bin"`));
|
|
406
|
-
// // no shorthand way to get UUID of build phase that i can tell
|
|
407
|
-
// // methods return the phase as an object but ommitted the actual key (uuid we need)
|
|
408
|
-
// // this does it same way nativescript-dev-xcode does but gets the uuid we need
|
|
409
|
-
// const resourcesBuildPhaseKeys = Object.keys(
|
|
410
|
-
// project.hash.project.objects["PBXResourcesBuildPhase"]
|
|
411
|
-
// );
|
|
412
|
-
// // console.log('resourcesBuildPhaseKeys:', resourcesBuildPhaseKeys);
|
|
413
|
-
// const buildPhaseUUID = resourcesBuildPhaseKeys[0];
|
|
414
|
-
// const comment = `${targetFolderName} in Resources`;
|
|
415
|
-
// project.hash.project.objects["PBXResourcesBuildPhase"][
|
|
416
|
-
// buildPhaseUUID
|
|
417
|
-
// ].files.forEach((f: any) => {
|
|
418
|
-
// console.log(f);
|
|
419
|
-
// });
|
|
420
|
-
// if (
|
|
421
|
-
// !project.hash.project.objects["PBXResourcesBuildPhase"][
|
|
422
|
-
// buildPhaseUUID
|
|
423
|
-
// ].files.find((f: any) => f.comment === comment)
|
|
424
|
-
// ) {
|
|
425
|
-
// project.addResourceFile(buildFolderPath, {}, buildPhaseUUID);
|
|
426
|
-
// }
|
|
427
|
-
/**
|
|
428
|
-
* 2. Ensure metadata is copied as a file
|
|
429
|
-
* The apps metadata-{arch}.bin should be added as a file reference.
|
|
430
|
-
*/
|
|
431
|
-
// TODO
|
|
432
362
|
this.savePbxProj(project, projectData);
|
|
433
363
|
}
|
|
434
364
|
catch (err) {
|
|
@@ -481,12 +411,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
481
411
|
this.$fs.deleteDirectory(platformsAppResourcesPath);
|
|
482
412
|
this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
|
|
483
413
|
const platformAppResourcesPath = path.join(projectAppResourcesPath, platformData.normalizedPlatformName);
|
|
484
|
-
// this allows App_Resources/visionOS
|
|
485
414
|
if (this.$fs.exists(platformAppResourcesPath)) {
|
|
486
415
|
this.$fs.copyFile(path.join(platformAppResourcesPath, "*"), platformsAppResourcesPath);
|
|
487
416
|
}
|
|
488
417
|
else {
|
|
489
|
-
// otherwise falls back to App_Resources/iOS
|
|
490
418
|
this.$fs.copyFile(path.join(projectAppResourcesPath, this.$devicePlatformsConstants.iOS, "*"), platformsAppResourcesPath);
|
|
491
419
|
}
|
|
492
420
|
this.$fs.deleteFile(path.join(platformsAppResourcesPath, platformData.configurationFileName));
|
|
@@ -585,12 +513,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
585
513
|
getLibSubpathRelativeToProjectPath(targetPath, projectData) {
|
|
586
514
|
const projectRoot = this.getPlatformData(projectData).projectRoot;
|
|
587
515
|
const frameworkPath = path.relative(projectRoot, targetPath);
|
|
588
|
-
// console.log({
|
|
589
|
-
// targetPath,
|
|
590
|
-
// projectRoot,
|
|
591
|
-
// frameworkPath,
|
|
592
|
-
// resolved: path.resolve(projectRoot, frameworkPath),
|
|
593
|
-
// });
|
|
594
516
|
return frameworkPath;
|
|
595
517
|
}
|
|
596
518
|
getPbxProjPath(projectData) {
|
|
@@ -628,7 +550,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
628
550
|
this.$cocoapodsService.removePodfileFromProject(pluginData.name, this.$cocoapodsService.getPluginPodfilePath(pluginData), projectData, projectRoot);
|
|
629
551
|
}
|
|
630
552
|
async handleNativeDependenciesChange(projectData, opts) {
|
|
631
|
-
// Clear framework tracking for fresh duplicate detection
|
|
632
553
|
this.clearFrameworksCache();
|
|
633
554
|
const platformData = this.getPlatformData(projectData);
|
|
634
555
|
const pluginsData = this.getAllProductionPlugins(projectData);
|
|
@@ -640,10 +561,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
640
561
|
const projectPodfilePath = this.$cocoapodsService.getProjectPodfilePath(platformData.projectRoot);
|
|
641
562
|
if (this.$fs.exists(projectPodfilePath)) {
|
|
642
563
|
await this.$cocoapodsService.executePodInstall(platformData.projectRoot, this.$xcprojService.getXcodeprojPath(projectData, platformData.projectRoot));
|
|
643
|
-
// The `pod install` command adds a new target to the .pbxproject. This target adds additional build phases to Xcode project.
|
|
644
|
-
// Some of these phases relies on env variables (like PODS_PODFILE_DIR_PATH or PODS_ROOT).
|
|
645
|
-
// These variables are produced from merge of pod's xcconfig file and project's xcconfig file.
|
|
646
|
-
// So the correct order is `pod install` to be executed before merging pod's xcconfig file.
|
|
647
564
|
await this.$cocoapodsService.mergePodXcconfigFile(projectData, platformData, opts);
|
|
648
565
|
}
|
|
649
566
|
const pluginSpmPackages = [];
|
|
@@ -669,7 +586,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
669
586
|
const hasProvision = provision !== undefined;
|
|
670
587
|
const hasTeamId = teamId !== undefined;
|
|
671
588
|
if (hasProvision || hasTeamId) {
|
|
672
|
-
// Check if the native project's signing is set to the provided provision...
|
|
673
589
|
const pbxprojPath = this.getPbxProjPath(projectData);
|
|
674
590
|
if (this.$fs.exists(pbxprojPath)) {
|
|
675
591
|
const xcode = this.$pbxprojDomXcode.Xcode.open(pbxprojPath);
|
|
@@ -685,9 +601,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
685
601
|
}
|
|
686
602
|
}
|
|
687
603
|
else {
|
|
688
|
-
// Specifying provisioning profile requires "Manual" signing style.
|
|
689
|
-
// If the current signing style was not "Manual" it was probably "Automatic" or,
|
|
690
|
-
// it was not uniform for the debug and release build configurations.
|
|
691
604
|
changesInfo.signingChanged = true;
|
|
692
605
|
}
|
|
693
606
|
}
|
|
@@ -701,8 +614,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
701
614
|
}
|
|
702
615
|
}
|
|
703
616
|
else {
|
|
704
|
-
// Specifying team id or name requires "Automatic" signing style.
|
|
705
|
-
// If the current signing style was not "Automatic" it was probably "Manual".
|
|
706
617
|
changesInfo.signingChanged = true;
|
|
707
618
|
}
|
|
708
619
|
}
|
|
@@ -919,14 +830,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
919
830
|
}
|
|
920
831
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
921
832
|
if (!this.$fs.exists(pluginsXcconfigFilePath)) {
|
|
922
|
-
// We need the pluginsXcconfig file to exist in platforms dir as it is required in the native template:
|
|
923
|
-
// https://github.com/NativeScript/ios-runtime/blob/9c2b7b5f70b9bee8452b7a24aa6b646214c7d2be/build/project-template/__PROJECT_NAME__/build-debug.xcconfig#L3
|
|
924
|
-
// From Xcode 10 in case the file is missing, this include fails and the build itself fails (was a warning in previous Xcode versions).
|
|
925
833
|
this.$fs.writeFile(pluginsXcconfigFilePath, "");
|
|
926
834
|
}
|
|
927
835
|
}
|
|
928
836
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
929
|
-
// Set Entitlements Property to point to default file if not set explicitly by the user.
|
|
930
837
|
const entitlementsPropertyValue = this.$xcconfigService.readPropertyValue(pluginsXcconfigFilePath, constants.CODE_SIGN_ENTITLEMENTS);
|
|
931
838
|
if (entitlementsPropertyValue === null &&
|
|
932
839
|
this.$fs.exists(this.$iOSEntitlementsService.getPlatformsEntitlementsPath(projectData))) {
|
|
@@ -971,4 +878,3 @@ __decorate([
|
|
|
971
878
|
(0, helpers_2.hook)("buildIOS")
|
|
972
879
|
], IOSProjectService.prototype, "buildProject", null);
|
|
973
880
|
yok_1.injector.register("iOSProjectService", IOSProjectService);
|
|
974
|
-
//# sourceMappingURL=ios-project-service.js.map
|
|
@@ -127,8 +127,6 @@ 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.
|
|
132
130
|
mobileprovision.provision.read().forEach((provision) => provision.TeamIdentifier &&
|
|
133
131
|
provision.TeamIdentifier.forEach((id) => {
|
|
134
132
|
if (!teams[provision.TeamName]) {
|
|
@@ -152,4 +150,3 @@ class IOSProvisionService {
|
|
|
152
150
|
}
|
|
153
151
|
exports.IOSProvisionService = IOSProvisionService;
|
|
154
152
|
yok_1.injector.register("iOSProvisionService", IOSProvisionService);
|
|
155
|
-
//# sourceMappingURL=ios-provision-service.js.map
|
|
@@ -63,4 +63,3 @@ 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,7 +38,6 @@ class IPService {
|
|
|
38
38
|
return ipAddress;
|
|
39
39
|
}
|
|
40
40
|
async getIPAddressFromIpifyOrgAPI() {
|
|
41
|
-
// https://www.ipify.org/
|
|
42
41
|
const ipifyOrgAPIEndpoint = "https://api.ipify.org";
|
|
43
42
|
let ipAddress = null;
|
|
44
43
|
try {
|
|
@@ -62,4 +61,3 @@ __decorate([
|
|
|
62
61
|
(0, decorators_1.cache)()
|
|
63
62
|
], IPService.prototype, "getCurrentIPv4Address", null);
|
|
64
63
|
yok_1.injector.register("ipService", IPService);
|
|
65
|
-
//# sourceMappingURL=ip-service.js.map
|
|
@@ -9,10 +9,8 @@ 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.
|
|
13
12
|
process.exit(exitCode);
|
|
14
13
|
});
|
|
15
14
|
karma.start();
|
|
16
15
|
}
|
|
17
16
|
});
|
|
18
|
-
//# sourceMappingURL=karma-execution.js.map
|
|
@@ -97,7 +97,6 @@ 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.
|
|
101
100
|
if (matchingFile && matchingFile[0] && _.startsWith(matchingFile[0], "-")) {
|
|
102
101
|
await this.device.adb.executeShellCommand(["rm", "-f", deviceRootPath]);
|
|
103
102
|
}
|
|
@@ -173,4 +172,3 @@ __decorate([
|
|
|
173
172
|
__decorate([
|
|
174
173
|
(0, decorators_1.performanceLog)()
|
|
175
174
|
], AndroidDeviceLiveSyncService.prototype, "removeFiles", null);
|
|
176
|
-
//# sourceMappingURL=android-device-livesync-service.js.map
|
|
@@ -95,8 +95,6 @@ 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.
|
|
100
98
|
await doSyncPromise.then(actionOnEnd.bind(this), actionOnEnd.bind(this));
|
|
101
99
|
result = await doSyncPromise;
|
|
102
100
|
}
|
|
@@ -166,4 +164,3 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
|
|
|
166
164
|
exports.AndroidDeviceSocketsLiveSyncService = AndroidDeviceSocketsLiveSyncService;
|
|
167
165
|
AndroidDeviceSocketsLiveSyncService.STATUS_UPDATE_INTERVAL = 10000;
|
|
168
166
|
AndroidDeviceSocketsLiveSyncService.MINIMAL_VERSION_LONG_LIVING_CONNECTION = "0.2.0";
|
|
169
|
-
//# sourceMappingURL=android-device-livesync-sockets-service.js.map
|
|
@@ -140,12 +140,9 @@ 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
|
|
144
143
|
this.cleanState(socketUid);
|
|
145
|
-
//call end of the connection (close and error callbacks won't be called - listeners removed)
|
|
146
144
|
socket.end();
|
|
147
145
|
socket.destroy();
|
|
148
|
-
//reject all pending sync requests and clear timeouts
|
|
149
146
|
this.rejectPendingSyncOperations(socketUid, error);
|
|
150
147
|
}
|
|
151
148
|
}
|
|
@@ -407,4 +404,3 @@ AndroidLivesyncTool.SOCKET_CONNECTION_ALREADY_EXISTS_ERROR = "Socket connection
|
|
|
407
404
|
AndroidLivesyncTool.SOCKET_CONNECTION_TIMED_OUT_ERROR = "Socket connection timed out.";
|
|
408
405
|
AndroidLivesyncTool.NO_SOCKET_CONNECTION_AVAILABLE_ERROR = "No socket connection available.";
|
|
409
406
|
yok_1.injector.register("androidLivesyncTool", AndroidLivesyncTool);
|
|
410
|
-
//# sourceMappingURL=android-livesync-tool.js.map
|
|
@@ -40,7 +40,6 @@ 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
|
|
44
43
|
return {
|
|
45
44
|
didRefresh: true,
|
|
46
45
|
operationId: "",
|
|
@@ -55,4 +54,3 @@ __decorate([
|
|
|
55
54
|
__decorate([
|
|
56
55
|
(0, decorators_2.performanceLog)()
|
|
57
56
|
], DeviceLiveSyncServiceBase.prototype, "transferFiles", null);
|
|
58
|
-
//# sourceMappingURL=device-livesync-service-base.js.map
|
|
@@ -37,13 +37,11 @@ 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
|
|
41
40
|
if (this.socket) {
|
|
42
41
|
return true;
|
|
43
42
|
}
|
|
44
43
|
const appId = projectData.projectIdentifiers.ios;
|
|
45
44
|
try {
|
|
46
|
-
// TODO: temp workaround till we setup the sockets along with the app start
|
|
47
45
|
const ensureAppStarted = true;
|
|
48
46
|
this.socket = await this.device.getDebugSocket(appId, projectData.projectName, projectData.projectDir, ensureAppStarted);
|
|
49
47
|
}
|
|
@@ -123,7 +121,6 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
|
|
|
123
121
|
projectDir: projectData.projectDir,
|
|
124
122
|
});
|
|
125
123
|
if (liveSyncInfo.useHotModuleReload) {
|
|
126
|
-
// enable HOT updates
|
|
127
124
|
await this.setupSocketIfNeeded(projectData);
|
|
128
125
|
}
|
|
129
126
|
}
|
|
@@ -180,9 +177,6 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
|
|
|
180
177
|
}
|
|
181
178
|
async destroySocket() {
|
|
182
179
|
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
|
|
186
180
|
await this.device.destroyAllSockets();
|
|
187
181
|
this.socket = null;
|
|
188
182
|
}
|
|
@@ -193,4 +187,3 @@ IOSDeviceLiveSyncService.MIN_RUNTIME_VERSION_WITH_REFRESH_NOTIFICATION = "6.1.0"
|
|
|
193
187
|
__decorate([
|
|
194
188
|
(0, decorators_1.performanceLog)()
|
|
195
189
|
], IOSDeviceLiveSyncService.prototype, "removeFiles", null);
|
|
196
|
-
//# sourceMappingURL=ios-device-livesync-service.js.map
|
|
@@ -58,7 +58,6 @@ 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.
|
|
62
61
|
await this.fullSync({
|
|
63
62
|
projectData: liveSyncInfo.projectData,
|
|
64
63
|
device,
|
|
@@ -78,4 +77,3 @@ __decorate([
|
|
|
78
77
|
(0, decorators_1.performanceLog)()
|
|
79
78
|
], IOSLiveSyncService.prototype, "fullSync", null);
|
|
80
79
|
yok_1.injector.register("iOSLiveSyncService", IOSLiveSyncService);
|
|
81
|
-
//# sourceMappingURL=ios-livesync-service.js.map
|
|
@@ -40,7 +40,6 @@ class PlatformLiveSyncServiceBase {
|
|
|
40
40
|
return shouldRestart;
|
|
41
41
|
}
|
|
42
42
|
async syncAfterInstall(device, liveSyncInfo) {
|
|
43
|
-
/* intentionally left blank */
|
|
44
43
|
}
|
|
45
44
|
async restartApplication(projectData, liveSyncInfo) {
|
|
46
45
|
const deviceLiveSyncService = this.getDeviceLiveSyncService(liveSyncInfo.deviceAppData.device, projectData);
|
|
@@ -86,8 +85,6 @@ class PlatformLiveSyncServiceBase {
|
|
|
86
85
|
let modifiedLocalToDevicePaths = [];
|
|
87
86
|
if (liveSyncInfo.filesToSync.length) {
|
|
88
87
|
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.
|
|
91
88
|
const existingFiles = filesToSync.filter((m) => m && this.$fs.exists(m));
|
|
92
89
|
this.$logger.trace("Will execute livesync for files: ", existingFiles);
|
|
93
90
|
const skippedFiles = _.difference(filesToSync, existingFiles);
|
|
@@ -106,7 +103,6 @@ class PlatformLiveSyncServiceBase {
|
|
|
106
103
|
const filePaths = liveSyncInfo.filesToRemove;
|
|
107
104
|
const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
|
|
108
105
|
const mappedFiles = _(filePaths)
|
|
109
|
-
// .map(filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData))
|
|
110
106
|
.filter((filePath) => !!filePath)
|
|
111
107
|
.value();
|
|
112
108
|
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants_1.APP_FOLDER_NAME);
|
|
@@ -158,4 +154,3 @@ exports.PlatformLiveSyncServiceBase = PlatformLiveSyncServiceBase;
|
|
|
158
154
|
__decorate([
|
|
159
155
|
(0, decorators_1.performanceLog)()
|
|
160
156
|
], PlatformLiveSyncServiceBase.prototype, "liveSyncWatchAction", null);
|
|
161
|
-
//# sourceMappingURL=platform-livesync-service-base.js.map
|
|
@@ -31,7 +31,6 @@ 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
|
|
35
34
|
if (this.$fs.getFileSize(filePath) > 50 * 1000 * 1000) {
|
|
36
35
|
this.$logger.trace(`Skipping source map for file ${filePath} because it is too big (> 50MB).`);
|
|
37
36
|
return;
|
|
@@ -156,8 +155,6 @@ class LogSourceMapService {
|
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
157
|
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"
|
|
161
158
|
const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
|
|
162
159
|
const deviceProjectPath = util.format(constants_1.ANDROID_DEVICE_APP_ROOT_TEMPLATE, projectData.projectIdentifiers.android);
|
|
163
160
|
let separator = ",";
|
|
@@ -165,25 +162,18 @@ class LogSourceMapService {
|
|
|
165
162
|
let parts, filePath, line, column, messagePrefix;
|
|
166
163
|
if (fileIndex >= 0) {
|
|
167
164
|
const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
|
|
168
|
-
//"data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
|
|
169
165
|
parts = fileSubstring.split(separator);
|
|
170
166
|
if (parts.length >= 3) {
|
|
171
|
-
// "data/data/org.nativescript.sourceMap/files/app/bundle.js"
|
|
172
167
|
parts[0] = parts[0].replace("'", "");
|
|
173
|
-
// " line: 304"
|
|
174
168
|
parts[1] = parts[1].replace(" line: ", "");
|
|
175
|
-
// " column: 8"
|
|
176
169
|
parts[2] = parts[2].replace(" column: ", "");
|
|
177
170
|
}
|
|
178
171
|
else {
|
|
179
|
-
// "data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
|
|
180
172
|
separator = ":";
|
|
181
173
|
parts = fileSubstring.split(separator);
|
|
182
174
|
}
|
|
183
175
|
if (parts.length >= 3) {
|
|
184
|
-
// "/data/data/org.nativescript.sourceMap/files/app/"
|
|
185
176
|
const devicePath = `${deviceProjectPath}/${constants_1.APP_FOLDER_NAME}/`;
|
|
186
|
-
// "bundle.js"
|
|
187
177
|
filePath = path.relative(devicePath, `${"/"}${parts[0]}`);
|
|
188
178
|
line = parseInt(parts[1]);
|
|
189
179
|
column = parseInt(parts[2]);
|
|
@@ -191,24 +181,20 @@ class LogSourceMapService {
|
|
|
191
181
|
for (let i = 3; i < parts.length; i++) {
|
|
192
182
|
messageSuffix += `${parts[i]}${i === parts.length - 1 ? "" : separator}`;
|
|
193
183
|
}
|
|
194
|
-
// "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap ("
|
|
195
184
|
messagePrefix = _.trimEnd(messagePrefix, "(");
|
|
196
185
|
}
|
|
197
186
|
}
|
|
198
187
|
return { filePath, line, column, messagePrefix, messageSuffix };
|
|
199
188
|
}
|
|
200
189
|
parseIosLog(rawMessage) {
|
|
201
|
-
// "CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
|
|
202
190
|
const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
|
|
203
191
|
let messageSuffix = "";
|
|
204
192
|
let parts, filePath, line, column, messagePrefix;
|
|
205
193
|
if (fileIndex >= 0) {
|
|
206
|
-
// "app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
|
|
207
194
|
const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
|
|
208
195
|
parts = fileSubstring.split(":");
|
|
209
196
|
if (parts && parts.length >= 3) {
|
|
210
197
|
filePath = parts[0];
|
|
211
|
-
// "app/vendor.js"
|
|
212
198
|
if (_.startsWith(filePath, constants_1.APP_FOLDER_NAME)) {
|
|
213
199
|
filePath = path.relative(constants_1.APP_FOLDER_NAME, parts[0]);
|
|
214
200
|
}
|
|
@@ -237,4 +223,3 @@ LogSourceMapService.FILE_PREFIX = "file:///";
|
|
|
237
223
|
LogSourceMapService.FILE_PREFIX_REPLACEMENT = "file: ";
|
|
238
224
|
LogSourceMapService.MEMOIZE_FUNCTION_RANDOM_KEY_FOR_JOIN = "__some_random_value__";
|
|
239
225
|
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"
|
|
9
|
+
const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full"}" is no longer supported.`;
|
|
10
10
|
class MarkingModeService {
|
|
11
11
|
constructor($logger, $projectConfigService, $projectHelper, $projectDataService) {
|
|
12
12
|
this.$logger = $logger;
|
|
@@ -18,13 +18,11 @@ 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");
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none"
|
|
25
|
-
|
|
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 */);
|
|
24
|
+
if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none") {
|
|
25
|
+
const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android");
|
|
28
26
|
const isMarkingModeFullDefault = version && semver.lt(semver.coerce(version), "7.0.0-rc.5");
|
|
29
27
|
if (isMarkingModeFullDefault) {
|
|
30
28
|
this.showMarkingModeFullWarning();
|
|
@@ -35,7 +33,7 @@ class MarkingModeService {
|
|
|
35
33
|
await this.$projectConfigService.setValue("android.markingMode", newMode);
|
|
36
34
|
}
|
|
37
35
|
showMarkingModeFullWarning() {
|
|
38
|
-
const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${"full"
|
|
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'.`;
|
|
39
37
|
this.$logger.warn(markingModeFullWarning, {
|
|
40
38
|
[constants_1.LoggerConfigData.wrapMessageWithBorders]: true,
|
|
41
39
|
});
|
|
@@ -43,4 +41,3 @@ class MarkingModeService {
|
|
|
43
41
|
}
|
|
44
42
|
exports.MarkingModeService = MarkingModeService;
|
|
45
43
|
yok_1.injector.register("markingModeService", MarkingModeService);
|
|
46
|
-
//# sourceMappingURL=marking-mode-service.js.map
|
|
@@ -21,11 +21,8 @@ class NpmConfigService {
|
|
|
21
21
|
readConfig() {
|
|
22
22
|
try {
|
|
23
23
|
const res = (0, child_process_1.execSync)("npm config list --json --global");
|
|
24
|
-
// const data: any = npmconfig.read();
|
|
25
24
|
const data = JSON.parse(res.toString());
|
|
26
|
-
// todo: remove if not needed with npm config list --json?
|
|
27
25
|
Object.entries(data).forEach(([key, value]) => {
|
|
28
|
-
// replace env ${VARS} in strings with the process.env value
|
|
29
26
|
this.config[key] =
|
|
30
27
|
typeof value !== "string"
|
|
31
28
|
? value
|
|
@@ -40,4 +37,3 @@ __decorate([
|
|
|
40
37
|
(0, decorators_1.cache)()
|
|
41
38
|
], NpmConfigService.prototype, "readConfig", null);
|
|
42
39
|
yok_1.injector.register("npmConfigService", NpmConfigService);
|
|
43
|
-
//# sourceMappingURL=npm-config-service.js.map
|