nativescript 8.7.2 → 8.8.0-embed.0
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 -17
- package/lib/color.js +0 -3
- package/lib/commands/add-platform.js +1 -2
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.js +0 -4
- 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 -3
- 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/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 +2 -12
- 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/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 +2 -3
- 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/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 +0 -5
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +1 -20
- 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 +3 -91
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +10 -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 +2 -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 +1 -1
- package/lib/data/run-data.js +0 -1
- package/lib/declarations.d.ts +12 -2
- package/lib/definitions/platform.d.ts +1 -0
- 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 +17 -10
- 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 -10
- 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 +123 -141
- 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 +1 -2
- 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 +12 -34
- package/lib/services/android-project-service.js +22 -86
- 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/assets-generation/assets-generation-service.js +13 -17
- 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/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 +3 -3
- 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 +0 -4
- package/lib/services/ios/spm-service.js +0 -9
- package/lib/services/ios/xcodebuild-args-service.js +0 -9
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +0 -1
- 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 +0 -1
- 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 +24 -26
- 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 +3 -7
- package/lib/services/livesync/android-livesync-service.js +2 -3
- 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 +2 -4
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.js +4 -8
- 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 +3 -17
- 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 +9 -48
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.js +8 -8
- package/lib/services/platform-environment-requirements.js +6 -9
- 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 +9 -19
- 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 +11 -13
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +1 -18
- 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 -1
- 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/webpack/webpack-compiler-service.js +15 -48
- package/lib/services/xcconfig-service.js +0 -2
- package/lib/services/xcproj-service.js +12 -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 +2 -2
- package/vendor/gradle-plugin/build.gradle +21 -6
- package/vendor/gradle-plugin/settings.gradle +13 -3
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +0 -15
- package/node_modules/rimraf/CHANGELOG.md +0 -65
- package/node_modules/stringify-package/CHANGELOG.md +0 -16
|
@@ -90,7 +90,9 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
90
90
|
projectData.platformsDir &&
|
|
91
91
|
this._platformsDirCache !== projectData.platformsDir) {
|
|
92
92
|
const platform = this.$mobileHelper.normalizePlatformName((_a = this.$options.platformOverride) !== null && _a !== void 0 ? _a : this.$devicePlatformsConstants.iOS);
|
|
93
|
-
const projectRoot =
|
|
93
|
+
const projectRoot = this.$options.nativeHost
|
|
94
|
+
? this.$options.nativeHost
|
|
95
|
+
: path.join(projectData.platformsDir, platform.toLowerCase());
|
|
94
96
|
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, platform.toLowerCase());
|
|
95
97
|
this._platformData = {
|
|
96
98
|
frameworkPackageName: runtimePackage.name,
|
|
@@ -143,7 +145,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
143
145
|
".ico",
|
|
144
146
|
".cur",
|
|
145
147
|
".xbm",
|
|
146
|
-
],
|
|
148
|
+
],
|
|
147
149
|
};
|
|
148
150
|
}
|
|
149
151
|
return this._platformData;
|
|
@@ -196,12 +198,9 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
196
198
|
shell.cp("-R", path.join(frameworkDir, "*"), this.getPlatformData(projectData).projectRoot);
|
|
197
199
|
});
|
|
198
200
|
}
|
|
199
|
-
//TODO: plamen5kov: revisit this method, might have unnecessary/obsolete logic
|
|
200
201
|
interpolateData(projectData) {
|
|
201
202
|
return __awaiter(this, void 0, void 0, function* () {
|
|
202
203
|
const projectRootFilePath = path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER);
|
|
203
|
-
// Starting with NativeScript for iOS 1.6.0, the project Info.plist file resides not in the platform project,
|
|
204
|
-
// but in the hello-world app template as a platform specific resource.
|
|
205
204
|
if (this.$fs.exists(path.join(projectRootFilePath, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER + "-Info.plist"))) {
|
|
206
205
|
this.replaceFileName("-Info.plist", projectRootFilePath, projectData);
|
|
207
206
|
}
|
|
@@ -318,10 +317,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
318
317
|
}
|
|
319
318
|
addStaticLibrary(staticLibPath, projectData) {
|
|
320
319
|
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
-
// Copy files to lib folder.
|
|
322
320
|
const libraryName = path.basename(staticLibPath, ".a");
|
|
323
321
|
const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName);
|
|
324
|
-
// Add static library to project file and setup header search paths
|
|
325
322
|
const project = this.createPbxProj(projectData);
|
|
326
323
|
const relativeStaticLibPath = this.getLibSubpathRelativeToProjectPath(staticLibPath, projectData);
|
|
327
324
|
project.addFramework(relativeStaticLibPath);
|
|
@@ -333,7 +330,9 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
333
330
|
}
|
|
334
331
|
prepareProject(projectData, prepareData) {
|
|
335
332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
-
const projectRoot =
|
|
333
|
+
const projectRoot = this.$options.nativeHost
|
|
334
|
+
? this.$options.nativeHost
|
|
335
|
+
: path.join(projectData.platformsDir, this.$devicePlatformsConstants.iOS.toLowerCase());
|
|
337
336
|
const platformData = this.getPlatformData(projectData);
|
|
338
337
|
const pluginsData = this.getAllProductionPlugins(projectData);
|
|
339
338
|
const pbxProjPath = this.getPbxProjPath(projectData);
|
|
@@ -350,7 +349,16 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
350
349
|
}
|
|
351
350
|
const project = this.createPbxProj(projectData);
|
|
352
351
|
const resources = project.pbxGroupByName("Resources");
|
|
353
|
-
if (
|
|
352
|
+
if (this.$options.nativeHost) {
|
|
353
|
+
try {
|
|
354
|
+
project.addResourceFile(path.join(this.$options.nativeHost, projectData.projectName));
|
|
355
|
+
this.savePbxProj(project, projectData);
|
|
356
|
+
}
|
|
357
|
+
catch (err) {
|
|
358
|
+
console.log(err);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if (resources && !this.$options.nativeHost) {
|
|
354
362
|
const references = project.pbxFileReferenceSection();
|
|
355
363
|
const xcodeProjectImages = _.map(resources.children, (resource) => this.replace(references[resource.value].name));
|
|
356
364
|
this.$logger.trace("Images from Xcode project");
|
|
@@ -390,12 +398,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
390
398
|
this.$fs.deleteDirectory(platformsAppResourcesPath);
|
|
391
399
|
this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
|
|
392
400
|
const platformAppResourcesPath = path.join(projectAppResourcesPath, platformData.normalizedPlatformName);
|
|
393
|
-
// this allows App_Resources/visionOS
|
|
394
401
|
if (this.$fs.exists(platformAppResourcesPath)) {
|
|
395
402
|
this.$fs.copyFile(path.join(platformAppResourcesPath, "*"), platformsAppResourcesPath);
|
|
396
403
|
}
|
|
397
404
|
else {
|
|
398
|
-
// otherwise falls back to App_Resources/iOS
|
|
399
405
|
this.$fs.copyFile(path.join(projectAppResourcesPath, this.$devicePlatformsConstants.iOS, "*"), platformsAppResourcesPath);
|
|
400
406
|
}
|
|
401
407
|
this.$fs.deleteFile(path.join(platformsAppResourcesPath, platformData.configurationFileName));
|
|
@@ -500,6 +506,13 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
500
506
|
return frameworkPath;
|
|
501
507
|
}
|
|
502
508
|
getPbxProjPath(projectData) {
|
|
509
|
+
if (this.$options.nativeHost) {
|
|
510
|
+
let xcodeProjectPath = this.$xcprojService.findXcodeProject(this.$options.nativeHost);
|
|
511
|
+
if (!xcodeProjectPath) {
|
|
512
|
+
this.$errors.fail("Xcode project not found at the specified directory");
|
|
513
|
+
}
|
|
514
|
+
return path.join(xcodeProjectPath, "project.pbxproj");
|
|
515
|
+
}
|
|
503
516
|
return path.join(this.$xcprojService.getXcodeprojPath(projectData, this.getPlatformData(projectData).projectRoot), "project.pbxproj");
|
|
504
517
|
}
|
|
505
518
|
createPbxProj(projectData) {
|
|
@@ -542,10 +555,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
542
555
|
const projectPodfilePath = this.$cocoapodsService.getProjectPodfilePath(platformData.projectRoot);
|
|
543
556
|
if (this.$fs.exists(projectPodfilePath)) {
|
|
544
557
|
yield this.$cocoapodsService.executePodInstall(platformData.projectRoot, this.$xcprojService.getXcodeprojPath(projectData, platformData.projectRoot));
|
|
545
|
-
// The `pod install` command adds a new target to the .pbxproject. This target adds additional build phases to Xcode project.
|
|
546
|
-
// Some of these phases relies on env variables (like PODS_PODFILE_DIR_PATH or PODS_ROOT).
|
|
547
|
-
// These variables are produced from merge of pod's xcconfig file and project's xcconfig file.
|
|
548
|
-
// So the correct order is `pod install` to be executed before merging pod's xcconfig file.
|
|
549
558
|
yield this.$cocoapodsService.mergePodXcconfigFile(projectData, platformData, opts);
|
|
550
559
|
}
|
|
551
560
|
yield this.$spmService.applySPMPackages(platformData, projectData);
|
|
@@ -560,7 +569,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
560
569
|
const hasProvision = provision !== undefined;
|
|
561
570
|
const hasTeamId = teamId !== undefined;
|
|
562
571
|
if (hasProvision || hasTeamId) {
|
|
563
|
-
// Check if the native project's signing is set to the provided provision...
|
|
564
572
|
const pbxprojPath = this.getPbxProjPath(projectData);
|
|
565
573
|
if (this.$fs.exists(pbxprojPath)) {
|
|
566
574
|
const xcode = this.$pbxprojDomXcode.Xcode.open(pbxprojPath);
|
|
@@ -576,9 +584,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
576
584
|
}
|
|
577
585
|
}
|
|
578
586
|
else {
|
|
579
|
-
// Specifying provisioning profile requires "Manual" signing style.
|
|
580
|
-
// If the current signing style was not "Manual" it was probably "Automatic" or,
|
|
581
|
-
// it was not uniform for the debug and release build configurations.
|
|
582
587
|
changesInfo.signingChanged = true;
|
|
583
588
|
}
|
|
584
589
|
}
|
|
@@ -592,8 +597,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
592
597
|
}
|
|
593
598
|
}
|
|
594
599
|
else {
|
|
595
|
-
// Specifying team id or name requires "Automatic" signing style.
|
|
596
|
-
// If the current signing style was not "Automatic" it was probably "Manual".
|
|
597
600
|
changesInfo.signingChanged = true;
|
|
598
601
|
}
|
|
599
602
|
}
|
|
@@ -812,14 +815,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
812
815
|
}
|
|
813
816
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
814
817
|
if (!this.$fs.exists(pluginsXcconfigFilePath)) {
|
|
815
|
-
// We need the pluginsXcconfig file to exist in platforms dir as it is required in the native template:
|
|
816
|
-
// https://github.com/NativeScript/ios-runtime/blob/9c2b7b5f70b9bee8452b7a24aa6b646214c7d2be/build/project-template/__PROJECT_NAME__/build-debug.xcconfig#L3
|
|
817
|
-
// From Xcode 10 in case the file is missing, this include fails and the build itself fails (was a warning in previous Xcode versions).
|
|
818
818
|
this.$fs.writeFile(pluginsXcconfigFilePath, "");
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
822
|
-
// Set Entitlements Property to point to default file if not set explicitly by the user.
|
|
823
822
|
const entitlementsPropertyValue = this.$xcconfigService.readPropertyValue(pluginsXcconfigFilePath, constants.CODE_SIGN_ENTITLEMENTS);
|
|
824
823
|
if (entitlementsPropertyValue === null &&
|
|
825
824
|
this.$fs.exists(this.$iOSEntitlementsService.getPlatformsEntitlementsPath(projectData))) {
|
|
@@ -867,4 +866,3 @@ __decorate([
|
|
|
867
866
|
], IOSProjectService.prototype, "buildProject", null);
|
|
868
867
|
exports.IOSProjectService = IOSProjectService;
|
|
869
868
|
yok_1.injector.register("iOSProjectService", IOSProjectService);
|
|
870
|
-
//# sourceMappingURL=ios-project-service.js.map
|
|
@@ -145,8 +145,6 @@ class IOSProvisionService {
|
|
|
145
145
|
getDevelopmentTeams() {
|
|
146
146
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
147
|
const teams = {};
|
|
148
|
-
// NOTE: We are reading all provisioning profiles and collect team information from them.
|
|
149
|
-
// It would be better if we can check the Apple ID registered in Xcode and read the teams associated with it.
|
|
150
148
|
mobileprovision.provision.read().forEach((provision) => provision.TeamIdentifier &&
|
|
151
149
|
provision.TeamIdentifier.forEach((id) => {
|
|
152
150
|
if (!teams[provision.TeamName]) {
|
|
@@ -173,4 +171,3 @@ class IOSProvisionService {
|
|
|
173
171
|
}
|
|
174
172
|
exports.IOSProvisionService = IOSProvisionService;
|
|
175
173
|
yok_1.injector.register("iOSProvisionService", IOSProvisionService);
|
|
176
|
-
//# sourceMappingURL=ios-provision-service.js.map
|
|
@@ -74,4 +74,3 @@ IOSWatchAppService.WATCH_APP_IDENTIFIER = "watchkitapp";
|
|
|
74
74
|
IOSWatchAppService.WACTCH_EXTENSION_IDENTIFIER = "watchkitextension";
|
|
75
75
|
exports.IOSWatchAppService = IOSWatchAppService;
|
|
76
76
|
yok_1.injector.register("iOSWatchAppService", IOSWatchAppService);
|
|
77
|
-
//# sourceMappingURL=ios-watch-app-service.js.map
|
|
@@ -52,7 +52,6 @@ class IPService {
|
|
|
52
52
|
}
|
|
53
53
|
getIPAddressFromIpifyOrgAPI() {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
// https://www.ipify.org/
|
|
56
55
|
const ipifyOrgAPIEndpoint = "https://api.ipify.org";
|
|
57
56
|
let ipAddress = null;
|
|
58
57
|
try {
|
|
@@ -77,4 +76,3 @@ __decorate([
|
|
|
77
76
|
], IPService.prototype, "getCurrentIPv4Address", null);
|
|
78
77
|
exports.IPService = IPService;
|
|
79
78
|
yok_1.injector.register("ipService", IPService);
|
|
80
|
-
//# sourceMappingURL=ip-service.js.map
|
|
@@ -214,4 +214,3 @@ __decorate([
|
|
|
214
214
|
], ITMSTransporterService.prototype, "getITMSTransporterPath", null);
|
|
215
215
|
exports.ITMSTransporterService = ITMSTransporterService;
|
|
216
216
|
yok_1.injector.register("itmsTransporterService", ITMSTransporterService);
|
|
217
|
-
//# sourceMappingURL=itmstransporter-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
|
|
@@ -119,7 +119,6 @@ class AndroidDeviceLiveSyncService extends android_device_livesync_service_base_
|
|
|
119
119
|
]);
|
|
120
120
|
const regex = new RegExp(`^-.*${deviceRootBasename}$`, "m");
|
|
121
121
|
const matchingFile = (listResult || "").match(regex);
|
|
122
|
-
// Check if there is already a file with deviceRootBasename. If so, delete it as it breaks LiveSyncing.
|
|
123
122
|
if (matchingFile && matchingFile[0] && _.startsWith(matchingFile[0], "-")) {
|
|
124
123
|
yield this.device.adb.executeShellCommand(["rm", "-f", deviceRootPath]);
|
|
125
124
|
}
|
|
@@ -202,4 +201,3 @@ __decorate([
|
|
|
202
201
|
(0, decorators_1.performanceLog)()
|
|
203
202
|
], AndroidDeviceLiveSyncService.prototype, "removeFiles", null);
|
|
204
203
|
exports.AndroidDeviceLiveSyncService = AndroidDeviceLiveSyncService;
|
|
205
|
-
//# sourceMappingURL=android-device-livesync-service.js.map
|
|
@@ -11,8 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AndroidDeviceSocketsLiveSyncService = void 0;
|
|
13
13
|
const android_device_livesync_service_base_1 = require("./android-device-livesync-service-base");
|
|
14
|
-
const constants_1 = require("../../constants");
|
|
15
|
-
const constants_2 = require("../../common/constants");
|
|
14
|
+
const constants_1 = require("../../common/constants");
|
|
16
15
|
const android_livesync_tool_1 = require("./android-livesync-tool");
|
|
17
16
|
const path = require("path");
|
|
18
17
|
const semver = require("semver");
|
|
@@ -57,7 +56,7 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
|
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
58
|
getPathToLiveSyncFileOnDevice(appIdentifier) {
|
|
60
|
-
return `${
|
|
59
|
+
return `${constants_1.LiveSyncPaths.ANDROID_TMP_DIR_NAME}/${appIdentifier}-livesync-in-progress`;
|
|
61
60
|
}
|
|
62
61
|
finalizeSync(liveSyncInfo, projectData) {
|
|
63
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -112,8 +111,6 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
|
|
|
112
111
|
yield this.$cleanupService.removeCleanupCommand(cleanupCommand);
|
|
113
112
|
});
|
|
114
113
|
yield this.$cleanupService.addCleanupCommand(cleanupCommand);
|
|
115
|
-
// We need to clear resources when the action fails
|
|
116
|
-
// But we also need the real result of the action.
|
|
117
114
|
yield doSyncPromise.then(actionOnEnd.bind(this), actionOnEnd.bind(this));
|
|
118
115
|
result = yield doSyncPromise;
|
|
119
116
|
}
|
|
@@ -183,7 +180,7 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
|
|
|
183
180
|
connectLivesyncTool(appIdentifier, connectTimeout) {
|
|
184
181
|
return __awaiter(this, void 0, void 0, function* () {
|
|
185
182
|
const platformData = this.platformsDataService.getPlatformData(this.$devicePlatformsConstants.Android, this.data);
|
|
186
|
-
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath,
|
|
183
|
+
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, this.$options.nativeHostModule);
|
|
187
184
|
if (!this.livesyncTool.hasConnection()) {
|
|
188
185
|
yield this.livesyncTool.connect({
|
|
189
186
|
appIdentifier,
|
|
@@ -198,4 +195,3 @@ class AndroidDeviceSocketsLiveSyncService extends android_device_livesync_servic
|
|
|
198
195
|
AndroidDeviceSocketsLiveSyncService.STATUS_UPDATE_INTERVAL = 10000;
|
|
199
196
|
AndroidDeviceSocketsLiveSyncService.MINIMAL_VERSION_LONG_LIVING_CONNECTION = "0.2.0";
|
|
200
197
|
exports.AndroidDeviceSocketsLiveSyncService = AndroidDeviceSocketsLiveSyncService;
|
|
201
|
-
//# sourceMappingURL=android-device-livesync-sockets-service.js.map
|
|
@@ -24,8 +24,8 @@ const semver = require("semver");
|
|
|
24
24
|
const _ = require("lodash");
|
|
25
25
|
const yok_1 = require("../../common/yok");
|
|
26
26
|
class AndroidLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSyncServiceBase {
|
|
27
|
-
constructor($platformsDataService, $projectFilesManager, $injector, $devicePathProvider, $fs, $logger) {
|
|
28
|
-
super($fs, $logger, $platformsDataService, $projectFilesManager, $devicePathProvider);
|
|
27
|
+
constructor($platformsDataService, $projectFilesManager, $injector, $devicePathProvider, $fs, $logger, $options) {
|
|
28
|
+
super($fs, $logger, $platformsDataService, $projectFilesManager, $devicePathProvider, $options);
|
|
29
29
|
this.$platformsDataService = $platformsDataService;
|
|
30
30
|
this.$projectFilesManager = $projectFilesManager;
|
|
31
31
|
this.$injector = $injector;
|
|
@@ -74,4 +74,3 @@ __decorate([
|
|
|
74
74
|
], AndroidLiveSyncService.prototype, "fullSync", null);
|
|
75
75
|
exports.AndroidLiveSyncService = AndroidLiveSyncService;
|
|
76
76
|
yok_1.injector.register("androidLiveSyncService", AndroidLiveSyncService);
|
|
77
|
-
//# sourceMappingURL=android-livesync-service.js.map
|
|
@@ -159,12 +159,9 @@ class AndroidLivesyncTool {
|
|
|
159
159
|
error =
|
|
160
160
|
error ||
|
|
161
161
|
this.getErrorWithMessage("Socket connection ended before sync operation is complete.");
|
|
162
|
-
//remove listeners and delete this.socketConnection
|
|
163
162
|
this.cleanState(socketUid);
|
|
164
|
-
//call end of the connection (close and error callbacks won't be called - listeners removed)
|
|
165
163
|
socket.end();
|
|
166
164
|
socket.destroy();
|
|
167
|
-
//reject all pending sync requests and clear timeouts
|
|
168
165
|
this.rejectPendingSyncOperations(socketUid, error);
|
|
169
166
|
}
|
|
170
167
|
}
|
|
@@ -428,4 +425,3 @@ AndroidLivesyncTool.SOCKET_CONNECTION_TIMED_OUT_ERROR = "Socket connection timed
|
|
|
428
425
|
AndroidLivesyncTool.NO_SOCKET_CONNECTION_AVAILABLE_ERROR = "No socket connection available.";
|
|
429
426
|
exports.AndroidLivesyncTool = AndroidLivesyncTool;
|
|
430
427
|
yok_1.injector.register("androidLivesyncTool", AndroidLivesyncTool);
|
|
431
|
-
//# sourceMappingURL=android-livesync-tool.js.map
|
|
@@ -52,7 +52,6 @@ class DeviceLiveSyncServiceBase {
|
|
|
52
52
|
}
|
|
53
53
|
finalizeSync(liveSyncInfo, projectData) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
//implement in case a sync point for all remove/create operation is needed
|
|
56
55
|
return {
|
|
57
56
|
didRefresh: true,
|
|
58
57
|
operationId: "",
|
|
@@ -68,4 +67,3 @@ __decorate([
|
|
|
68
67
|
(0, decorators_2.performanceLog)()
|
|
69
68
|
], DeviceLiveSyncServiceBase.prototype, "transferFiles", null);
|
|
70
69
|
exports.DeviceLiveSyncServiceBase = DeviceLiveSyncServiceBase;
|
|
71
|
-
//# sourceMappingURL=device-livesync-service-base.js.map
|
|
@@ -47,13 +47,11 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
|
|
|
47
47
|
}
|
|
48
48
|
setupSocketIfNeeded(projectData) {
|
|
49
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
// TODO: persist the sockets per app in order to support LiveSync on multiple apps on the same device
|
|
51
50
|
if (this.socket) {
|
|
52
51
|
return true;
|
|
53
52
|
}
|
|
54
53
|
const appId = projectData.projectIdentifiers.ios;
|
|
55
54
|
try {
|
|
56
|
-
// TODO: temp workaround till we setup the sockets along with the app start
|
|
57
55
|
const ensureAppStarted = true;
|
|
58
56
|
this.socket = yield this.device.getDebugSocket(appId, projectData.projectName, projectData.projectDir, ensureAppStarted);
|
|
59
57
|
}
|
|
@@ -145,7 +143,6 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
|
|
|
145
143
|
projectDir: projectData.projectDir,
|
|
146
144
|
});
|
|
147
145
|
if (liveSyncInfo.useHotModuleReload) {
|
|
148
|
-
// enable HOT updates
|
|
149
146
|
yield this.setupSocketIfNeeded(projectData);
|
|
150
147
|
}
|
|
151
148
|
});
|
|
@@ -208,9 +205,6 @@ class IOSDeviceLiveSyncService extends device_livesync_service_base_1.DeviceLive
|
|
|
208
205
|
destroySocket() {
|
|
209
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
210
207
|
if (this.socket) {
|
|
211
|
-
// we do not support LiveSync on multiple apps on the same device
|
|
212
|
-
// in order to do that, we should cache the socket per app
|
|
213
|
-
// and destroy just the current app socket when possible
|
|
214
208
|
yield this.device.destroyAllSockets();
|
|
215
209
|
this.socket = null;
|
|
216
210
|
}
|
|
@@ -222,4 +216,3 @@ __decorate([
|
|
|
222
216
|
(0, decorators_1.performanceLog)()
|
|
223
217
|
], IOSDeviceLiveSyncService.prototype, "removeFiles", null);
|
|
224
218
|
exports.IOSDeviceLiveSyncService = IOSDeviceLiveSyncService;
|
|
225
|
-
//# sourceMappingURL=ios-device-livesync-service.js.map
|
|
@@ -23,8 +23,8 @@ const constants_1 = require("../../constants");
|
|
|
23
23
|
const decorators_1 = require("../../common/decorators");
|
|
24
24
|
const yok_1 = require("../../common/yok");
|
|
25
25
|
class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSyncServiceBase {
|
|
26
|
-
constructor($fs, $platformsDataService, $projectFilesManager, $injector, $tempService, $devicePathProvider, $logger) {
|
|
27
|
-
super($fs, $logger, $platformsDataService, $projectFilesManager, $devicePathProvider);
|
|
26
|
+
constructor($fs, $platformsDataService, $projectFilesManager, $injector, $tempService, $devicePathProvider, $logger, $options) {
|
|
27
|
+
super($fs, $logger, $platformsDataService, $projectFilesManager, $devicePathProvider, $options);
|
|
28
28
|
this.$fs = $fs;
|
|
29
29
|
this.$platformsDataService = $platformsDataService;
|
|
30
30
|
this.$projectFilesManager = $projectFilesManager;
|
|
@@ -73,7 +73,6 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
|
|
|
73
73
|
syncAfterInstall(device, liveSyncInfo) {
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
75
|
if (!device.isEmulator) {
|
|
76
|
-
// 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.
|
|
77
76
|
yield this.fullSync({
|
|
78
77
|
projectData: liveSyncInfo.projectData,
|
|
79
78
|
device,
|
|
@@ -94,4 +93,3 @@ __decorate([
|
|
|
94
93
|
], IOSLiveSyncService.prototype, "fullSync", null);
|
|
95
94
|
exports.IOSLiveSyncService = IOSLiveSyncService;
|
|
96
95
|
yok_1.injector.register("iOSLiveSyncService", IOSLiveSyncService);
|
|
97
|
-
//# sourceMappingURL=ios-livesync-service.js.map
|
|
@@ -24,12 +24,13 @@ const helpers_1 = require("../../common/helpers");
|
|
|
24
24
|
const decorators_1 = require("../../common/decorators");
|
|
25
25
|
const color_1 = require("../../color");
|
|
26
26
|
class PlatformLiveSyncServiceBase {
|
|
27
|
-
constructor($fs, $logger, $platformsDataService, $projectFilesManager, $devicePathProvider) {
|
|
27
|
+
constructor($fs, $logger, $platformsDataService, $projectFilesManager, $devicePathProvider, $options) {
|
|
28
28
|
this.$fs = $fs;
|
|
29
29
|
this.$logger = $logger;
|
|
30
30
|
this.$platformsDataService = $platformsDataService;
|
|
31
31
|
this.$projectFilesManager = $projectFilesManager;
|
|
32
32
|
this.$devicePathProvider = $devicePathProvider;
|
|
33
|
+
this.$options = $options;
|
|
33
34
|
this._deviceLiveSyncServicesCache = {};
|
|
34
35
|
}
|
|
35
36
|
getDeviceLiveSyncService(device, projectData) {
|
|
@@ -51,7 +52,6 @@ class PlatformLiveSyncServiceBase {
|
|
|
51
52
|
}
|
|
52
53
|
syncAfterInstall(device, liveSyncInfo) {
|
|
53
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
/* intentionally left blank */
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
restartApplication(projectData, liveSyncInfo) {
|
|
@@ -82,7 +82,7 @@ class PlatformLiveSyncServiceBase {
|
|
|
82
82
|
if (deviceLiveSyncService.beforeLiveSyncAction) {
|
|
83
83
|
yield deviceLiveSyncService.beforeLiveSyncAction(deviceAppData);
|
|
84
84
|
}
|
|
85
|
-
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath,
|
|
85
|
+
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, this.$options.nativeHostModule);
|
|
86
86
|
const localToDevicePaths = yield this.$projectFilesManager.createLocalToDevicePaths(deviceAppData, projectFilesPath, null, []);
|
|
87
87
|
const modifiedFilesData = yield this.transferFiles(deviceAppData, localToDevicePaths, projectFilesPath, projectData, syncInfo.liveSyncDeviceData, { isFullSync: true, force: syncInfo.force });
|
|
88
88
|
return {
|
|
@@ -105,8 +105,6 @@ class PlatformLiveSyncServiceBase {
|
|
|
105
105
|
let modifiedLocalToDevicePaths = [];
|
|
106
106
|
if (liveSyncInfo.filesToSync.length) {
|
|
107
107
|
const filesToSync = liveSyncInfo.filesToSync;
|
|
108
|
-
// const mappedFiles = _.map(filesToSync, filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData));
|
|
109
|
-
// Some plugins modify platforms dir on afterPrepare (check nativescript-dev-sass) - we want to sync only existing file.
|
|
110
108
|
const existingFiles = filesToSync.filter((m) => m && this.$fs.exists(m));
|
|
111
109
|
this.$logger.trace("Will execute livesync for files: ", existingFiles);
|
|
112
110
|
const skippedFiles = _.difference(filesToSync, existingFiles);
|
|
@@ -115,7 +113,7 @@ class PlatformLiveSyncServiceBase {
|
|
|
115
113
|
}
|
|
116
114
|
if (existingFiles.length) {
|
|
117
115
|
const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
|
|
118
|
-
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath,
|
|
116
|
+
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, this.$options.nativeHostModule);
|
|
119
117
|
const localToDevicePaths = yield this.$projectFilesManager.createLocalToDevicePaths(deviceAppData, projectFilesPath, existingFiles, []);
|
|
120
118
|
modifiedLocalToDevicePaths.push(...localToDevicePaths);
|
|
121
119
|
modifiedLocalToDevicePaths = yield this.transferFiles(deviceAppData, localToDevicePaths, projectFilesPath, projectData, liveSyncInfo.liveSyncDeviceData, { isFullSync: false, force: liveSyncInfo.force });
|
|
@@ -125,7 +123,6 @@ class PlatformLiveSyncServiceBase {
|
|
|
125
123
|
const filePaths = liveSyncInfo.filesToRemove;
|
|
126
124
|
const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
|
|
127
125
|
const mappedFiles = _(filePaths)
|
|
128
|
-
// .map(filePath => this.$projectFilesProvider.mapFilePath(filePath, device.deviceInfo.platform, projectData))
|
|
129
126
|
.filter((filePath) => !!filePath)
|
|
130
127
|
.value();
|
|
131
128
|
const projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants_1.APP_FOLDER_NAME);
|
|
@@ -182,4 +179,3 @@ __decorate([
|
|
|
182
179
|
(0, decorators_1.performanceLog)()
|
|
183
180
|
], PlatformLiveSyncServiceBase.prototype, "liveSyncWatchAction", null);
|
|
184
181
|
exports.PlatformLiveSyncServiceBase = PlatformLiveSyncServiceBase;
|
|
185
|
-
//# sourceMappingURL=platform-livesync-service-base.js.map
|
|
@@ -23,10 +23,11 @@ class LogSourceMapService {
|
|
|
23
23
|
get $platformsDataService() {
|
|
24
24
|
return this.$injector.resolve("platformsDataService");
|
|
25
25
|
}
|
|
26
|
-
constructor($fs, $projectDataService, $injector, $devicePlatformsConstants, $logger) {
|
|
26
|
+
constructor($fs, $projectDataService, $injector, $options, $devicePlatformsConstants, $logger) {
|
|
27
27
|
this.$fs = $fs;
|
|
28
28
|
this.$projectDataService = $projectDataService;
|
|
29
29
|
this.$injector = $injector;
|
|
30
|
+
this.$options = $options;
|
|
30
31
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
31
32
|
this.$logger = $logger;
|
|
32
33
|
this.cache = {};
|
|
@@ -40,7 +41,6 @@ class LogSourceMapService {
|
|
|
40
41
|
if (!this.$fs.getFsStats(filePath).isDirectory()) {
|
|
41
42
|
const mapFile = filePath + ".map";
|
|
42
43
|
let sourceMapRaw;
|
|
43
|
-
// Skip files bigger than 50MB
|
|
44
44
|
if (this.$fs.getFileSize(filePath) > 50 * 1000 * 1000) {
|
|
45
45
|
this.$logger.trace(`Skipping source map for file ${filePath} because it is too big (> 50MB).`);
|
|
46
46
|
return;
|
|
@@ -122,7 +122,7 @@ class LogSourceMapService {
|
|
|
122
122
|
return runtimeVersion;
|
|
123
123
|
}
|
|
124
124
|
getOriginalFileLocation(platform, parsedLine, projectData) {
|
|
125
|
-
const fileLocation = path.join(this.getFilesLocation(platform, projectData),
|
|
125
|
+
const fileLocation = path.join(this.getFilesLocation(platform, projectData), this.$options.nativeHostModule);
|
|
126
126
|
if (parsedLine && parsedLine.filePath) {
|
|
127
127
|
const sourceMapFile = path.join(fileLocation, parsedLine.filePath);
|
|
128
128
|
const smc = this.cache[sourceMapFile];
|
|
@@ -166,8 +166,6 @@ class LogSourceMapService {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
parseAndroidLog(projectData, rawMessage) {
|
|
169
|
-
// "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap (file:///data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
|
|
170
|
-
// "System.err: File: "file:///data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
|
|
171
169
|
const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
|
|
172
170
|
const deviceProjectPath = util.format(constants_1.ANDROID_DEVICE_APP_ROOT_TEMPLATE, projectData.projectIdentifiers.android);
|
|
173
171
|
let separator = ",";
|
|
@@ -175,25 +173,18 @@ class LogSourceMapService {
|
|
|
175
173
|
let parts, filePath, line, column, messagePrefix;
|
|
176
174
|
if (fileIndex >= 0) {
|
|
177
175
|
const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
|
|
178
|
-
//"data/data/org.nativescript.sourceMap/files/app/bundle.js, line: 304, column: 8"
|
|
179
176
|
parts = fileSubstring.split(separator);
|
|
180
177
|
if (parts.length >= 3) {
|
|
181
|
-
// "data/data/org.nativescript.sourceMap/files/app/bundle.js"
|
|
182
178
|
parts[0] = parts[0].replace("'", "");
|
|
183
|
-
// " line: 304"
|
|
184
179
|
parts[1] = parts[1].replace(" line: ", "");
|
|
185
|
-
// " column: 8"
|
|
186
180
|
parts[2] = parts[2].replace(" column: ", "");
|
|
187
181
|
}
|
|
188
182
|
else {
|
|
189
|
-
// "data/data/org.nativescript.sourceMap/files/app/bundle.js:303:17)"
|
|
190
183
|
separator = ":";
|
|
191
184
|
parts = fileSubstring.split(separator);
|
|
192
185
|
}
|
|
193
186
|
if (parts.length >= 3) {
|
|
194
|
-
// "/data/data/org.nativescript.sourceMap/files/app/"
|
|
195
187
|
const devicePath = `${deviceProjectPath}/${constants_1.APP_FOLDER_NAME}/`;
|
|
196
|
-
// "bundle.js"
|
|
197
188
|
filePath = path.relative(devicePath, `${"/"}${parts[0]}`);
|
|
198
189
|
line = parseInt(parts[1]);
|
|
199
190
|
column = parseInt(parts[2]);
|
|
@@ -201,24 +192,20 @@ class LogSourceMapService {
|
|
|
201
192
|
for (let i = 3; i < parts.length; i++) {
|
|
202
193
|
messageSuffix += `${parts[i]}${i === parts.length - 1 ? "" : separator}`;
|
|
203
194
|
}
|
|
204
|
-
// "JS: at module.exports.push../main-view-model.ts.HelloWorldModel.onTap ("
|
|
205
195
|
messagePrefix = _.trimEnd(messagePrefix, "(");
|
|
206
196
|
}
|
|
207
197
|
}
|
|
208
198
|
return { filePath, line, column, messagePrefix, messageSuffix };
|
|
209
199
|
}
|
|
210
200
|
parseIosLog(rawMessage) {
|
|
211
|
-
// "CONSOLE INFO file:///app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
|
|
212
201
|
const fileIndex = rawMessage.lastIndexOf(LogSourceMapService.FILE_PREFIX);
|
|
213
202
|
let messageSuffix = "";
|
|
214
203
|
let parts, filePath, line, column, messagePrefix;
|
|
215
204
|
if (fileIndex >= 0) {
|
|
216
|
-
// "app/vendor.js:131:36: HMR: Hot Module Replacement Enabled. Waiting for signal."
|
|
217
205
|
const fileSubstring = rawMessage.substring(fileIndex + LogSourceMapService.FILE_PREFIX.length);
|
|
218
206
|
parts = fileSubstring.split(":");
|
|
219
207
|
if (parts && parts.length >= 3) {
|
|
220
208
|
filePath = parts[0];
|
|
221
|
-
// "app/vendor.js"
|
|
222
209
|
if (_.startsWith(filePath, constants_1.APP_FOLDER_NAME)) {
|
|
223
210
|
filePath = path.relative(constants_1.APP_FOLDER_NAME, parts[0]);
|
|
224
211
|
}
|
|
@@ -247,4 +234,3 @@ LogSourceMapService.FILE_PREFIX_REPLACEMENT = "file: ";
|
|
|
247
234
|
LogSourceMapService.MEMOIZE_FUNCTION_RANDOM_KEY_FOR_JOIN = "__some_random_value__";
|
|
248
235
|
exports.LogSourceMapService = LogSourceMapService;
|
|
249
236
|
yok_1.injector.register("logSourceMapService", LogSourceMapService);
|
|
250
|
-
//# sourceMappingURL=log-source-map-service.js.map
|
|
@@ -15,7 +15,7 @@ const constants_1 = require("../constants");
|
|
|
15
15
|
const yok_1 = require("../common/yok");
|
|
16
16
|
const semver = require("semver/preload");
|
|
17
17
|
const MARKING_MODE_PROP = "markingMode";
|
|
18
|
-
const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full"
|
|
18
|
+
const MARKING_MODE_FULL_DEPRECATION_MSG = `In the current version of NativeScript "${MARKING_MODE_PROP}:${"full"}" is no longer supported.`;
|
|
19
19
|
class MarkingModeService {
|
|
20
20
|
constructor($logger, $projectConfigService, $projectHelper, $projectDataService) {
|
|
21
21
|
this.$logger = $logger;
|
|
@@ -28,13 +28,11 @@ class MarkingModeService {
|
|
|
28
28
|
const markingModeValue = this.$projectConfigService.getValue("android.markingMode");
|
|
29
29
|
const { skipWarnings, forceSwitch } = options;
|
|
30
30
|
if (forceSwitch) {
|
|
31
|
-
yield this.setMarkingMode("none"
|
|
31
|
+
yield this.setMarkingMode("none");
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none"
|
|
35
|
-
|
|
36
|
-
// if version is null - we are about to add the latest runtime, so no need to warn
|
|
37
|
-
const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android" /* PlatformTypes.android */);
|
|
34
|
+
if (!skipWarnings && (markingModeValue === null || markingModeValue === void 0 ? void 0 : markingModeValue.toLowerCase()) !== "none") {
|
|
35
|
+
const { version } = this.$projectDataService.getRuntimePackage(this.$projectHelper.projectDir, "android");
|
|
38
36
|
const isMarkingModeFullDefault = version && semver.lt(semver.coerce(version), "7.0.0-rc.5");
|
|
39
37
|
if (isMarkingModeFullDefault) {
|
|
40
38
|
this.showMarkingModeFullWarning();
|
|
@@ -48,7 +46,7 @@ class MarkingModeService {
|
|
|
48
46
|
});
|
|
49
47
|
}
|
|
50
48
|
showMarkingModeFullWarning() {
|
|
51
|
-
const markingModeFullWarning = `You are using the deprecated "${MARKING_MODE_PROP}:${"full"
|
|
49
|
+
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'.`;
|
|
52
50
|
this.$logger.warn(markingModeFullWarning, {
|
|
53
51
|
[constants_1.LoggerConfigData.wrapMessageWithBorders]: true,
|
|
54
52
|
});
|
|
@@ -56,4 +54,3 @@ class MarkingModeService {
|
|
|
56
54
|
}
|
|
57
55
|
exports.MarkingModeService = MarkingModeService;
|
|
58
56
|
yok_1.injector.register("markingModeService", MarkingModeService);
|
|
59
|
-
//# 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
|
], NpmConfigService.prototype, "readConfig", null);
|
|
41
38
|
exports.NpmConfigService = NpmConfigService;
|
|
42
39
|
yok_1.injector.register("npmConfigService", NpmConfigService);
|
|
43
|
-
//# sourceMappingURL=npm-config-service.js.map
|