nativescript 9.0.4-dev.0 → 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 +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 +1 -100
- 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
|
@@ -74,10 +74,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
74
74
|
this._platformsDirCache = null;
|
|
75
75
|
this._platformOverrideCache = null;
|
|
76
76
|
this._platformData = null;
|
|
77
|
-
// Track added frameworks by name to prevent duplicates in monorepo/workspace setups
|
|
78
|
-
// where the same plugin may exist in multiple node_modules paths
|
|
79
77
|
this._addedFrameworks = new Set();
|
|
80
|
-
// Track added static libraries by name to prevent duplicates in monorepo/workspace setups
|
|
81
78
|
this._addedStaticLibs = new Set();
|
|
82
79
|
}
|
|
83
80
|
getPlatformData(projectData) {
|
|
@@ -146,7 +143,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
146
143
|
".ico",
|
|
147
144
|
".cur",
|
|
148
145
|
".xbm",
|
|
149
|
-
],
|
|
146
|
+
],
|
|
150
147
|
};
|
|
151
148
|
this._platformsDirCache = projectData.platformsDir;
|
|
152
149
|
this._platformOverrideCache = currentOverride;
|
|
@@ -195,11 +192,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
195
192
|
this.$fs.ensureDirectoryExists(path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER));
|
|
196
193
|
shell.cp("-R", path.join(frameworkDir, "*"), this.getPlatformData(projectData).projectRoot);
|
|
197
194
|
}
|
|
198
|
-
//TODO: plamen5kov: revisit this method, might have unnecessary/obsolete logic
|
|
199
195
|
async interpolateData(projectData) {
|
|
200
196
|
const projectRootFilePath = path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER);
|
|
201
|
-
// Starting with NativeScript for iOS 1.6.0, the project Info.plist file resides not in the platform project,
|
|
202
|
-
// but in the hello-world app template as a platform specific resource.
|
|
203
197
|
if (this.$fs.exists(path.join(projectRootFilePath, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER + "-Info.plist"))) {
|
|
204
198
|
this.replaceFileName("-Info.plist", projectRootFilePath, projectData);
|
|
205
199
|
}
|
|
@@ -289,9 +283,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
289
283
|
return await isDynamicFrameworkBundle(frameworkPath, frameworkName);
|
|
290
284
|
}
|
|
291
285
|
}
|
|
292
|
-
/**
|
|
293
|
-
* Clears the framework and static library tracking sets. Should be called at the start of a new prepare cycle.
|
|
294
|
-
*/
|
|
295
286
|
clearFrameworksCache() {
|
|
296
287
|
this._addedFrameworks.clear();
|
|
297
288
|
this._addedStaticLibs.clear();
|
|
@@ -300,7 +291,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
300
291
|
if (this.$hostInfo.isWindows) {
|
|
301
292
|
return;
|
|
302
293
|
}
|
|
303
|
-
// Check if framework with same name already added (prevents duplicate output errors in monorepos)
|
|
304
294
|
const frameworkName = path.basename(frameworkPath);
|
|
305
295
|
if (this._addedFrameworks.has(frameworkName)) {
|
|
306
296
|
this.$logger.trace(`Framework ${frameworkName} already added, skipping duplicate from ${frameworkPath}`);
|
|
@@ -316,38 +306,21 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
316
306
|
frameworkAddOptions["sign"] = true;
|
|
317
307
|
}
|
|
318
308
|
if (this.$options.hostProjectPath) {
|
|
319
|
-
// always mark xcframeworks for embedding
|
|
320
309
|
frameworkAddOptions["embed"] = true;
|
|
321
310
|
frameworkAddOptions["sign"] = false;
|
|
322
311
|
}
|
|
323
|
-
// Note: we used to prepend "$(SRCROOT)/" to the framework path, but seems like it's not needed anymore
|
|
324
|
-
// "$(SRCROOT)/" +
|
|
325
312
|
const frameworkRelativePath = this.getLibSubpathRelativeToProjectPath(frameworkPath, projectData);
|
|
326
313
|
project.addFramework(frameworkRelativePath, frameworkAddOptions);
|
|
327
|
-
// filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
|
|
328
|
-
// project.addBuildPhase(
|
|
329
|
-
// [],
|
|
330
|
-
// "PBXShellScriptBuildPhase",
|
|
331
|
-
// "Debug SRCROOT",
|
|
332
|
-
// undefined,
|
|
333
|
-
// {
|
|
334
|
-
// shellPath: "/bin/sh",
|
|
335
|
-
// shellScript: `echo "SRCROOT: $SRCROOT"`,
|
|
336
|
-
// }
|
|
337
|
-
// );
|
|
338
314
|
this.savePbxProj(project, projectData);
|
|
339
315
|
}
|
|
340
316
|
async addStaticLibrary(staticLibPath, projectData) {
|
|
341
|
-
// Check if static library with same name already added (prevents duplicate errors in monorepos)
|
|
342
317
|
const libraryName = path.basename(staticLibPath, ".a");
|
|
343
318
|
if (this._addedStaticLibs.has(libraryName)) {
|
|
344
319
|
this.$logger.trace(`Static library ${libraryName} already added, skipping duplicate from ${staticLibPath}`);
|
|
345
320
|
return;
|
|
346
321
|
}
|
|
347
322
|
this._addedStaticLibs.add(libraryName);
|
|
348
|
-
// Copy files to lib folder.
|
|
349
323
|
const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName);
|
|
350
|
-
// Add static library to project file and setup header search paths
|
|
351
324
|
const project = this.createPbxProj(projectData);
|
|
352
325
|
const relativeStaticLibPath = this.getLibSubpathRelativeToProjectPath(staticLibPath, projectData);
|
|
353
326
|
project.addFramework(relativeStaticLibPath);
|
|
@@ -382,58 +355,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
382
355
|
filesRelativeToProject: true,
|
|
383
356
|
uuid: "NATIVESCRIPTNATIVESCRIPT",
|
|
384
357
|
});
|
|
385
|
-
/**
|
|
386
|
-
* 1. Add platforms/ios/{projectname}/app build to the host app
|
|
387
|
-
*/
|
|
388
|
-
// Note: allow customization of this targetFolderName
|
|
389
|
-
// const targetFolderName = "app";
|
|
390
358
|
const buildFolderPath = path.join(this.$options.hostProjectPath, projectData.projectName);
|
|
391
359
|
project.addResourceFile(buildFolderPath, {}, "NATIVESCRIPTNATIVESCRIPT");
|
|
392
|
-
// filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
|
|
393
|
-
// project.addBuildPhase(
|
|
394
|
-
// [],
|
|
395
|
-
// "PBXShellScriptBuildPhase",
|
|
396
|
-
// "Copy Metadata (DEBUG)",
|
|
397
|
-
// undefined,
|
|
398
|
-
// {
|
|
399
|
-
// shellPath: "/bin/sh",
|
|
400
|
-
// shellScript: `cp ./platforms/ios/build/Debug-iphonesimulator/metadata-arm64.bin $CONFIGURATION_BUILD_DIR`,
|
|
401
|
-
// outputPaths: [
|
|
402
|
-
// JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64.bin"),
|
|
403
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64e.bin"),
|
|
404
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-i386.bin"),
|
|
405
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-x86_64.bin"),
|
|
406
|
-
// ],
|
|
407
|
-
// }
|
|
408
|
-
// );
|
|
409
360
|
const metadataPath = path.relative(this.$options.hostProjectPath, buildFolderPath);
|
|
410
361
|
project.addToOtherLinkerFlags(JSON.stringify(`-sectcreate __DATA __TNSMetadata "${metadataPath}/metadata-arm64.bin"`));
|
|
411
|
-
// // no shorthand way to get UUID of build phase that i can tell
|
|
412
|
-
// // methods return the phase as an object but ommitted the actual key (uuid we need)
|
|
413
|
-
// // this does it same way nativescript-dev-xcode does but gets the uuid we need
|
|
414
|
-
// const resourcesBuildPhaseKeys = Object.keys(
|
|
415
|
-
// project.hash.project.objects["PBXResourcesBuildPhase"]
|
|
416
|
-
// );
|
|
417
|
-
// // console.log('resourcesBuildPhaseKeys:', resourcesBuildPhaseKeys);
|
|
418
|
-
// const buildPhaseUUID = resourcesBuildPhaseKeys[0];
|
|
419
|
-
// const comment = `${targetFolderName} in Resources`;
|
|
420
|
-
// project.hash.project.objects["PBXResourcesBuildPhase"][
|
|
421
|
-
// buildPhaseUUID
|
|
422
|
-
// ].files.forEach((f: any) => {
|
|
423
|
-
// console.log(f);
|
|
424
|
-
// });
|
|
425
|
-
// if (
|
|
426
|
-
// !project.hash.project.objects["PBXResourcesBuildPhase"][
|
|
427
|
-
// buildPhaseUUID
|
|
428
|
-
// ].files.find((f: any) => f.comment === comment)
|
|
429
|
-
// ) {
|
|
430
|
-
// project.addResourceFile(buildFolderPath, {}, buildPhaseUUID);
|
|
431
|
-
// }
|
|
432
|
-
/**
|
|
433
|
-
* 2. Ensure metadata is copied as a file
|
|
434
|
-
* The apps metadata-{arch}.bin should be added as a file reference.
|
|
435
|
-
*/
|
|
436
|
-
// TODO
|
|
437
362
|
this.savePbxProj(project, projectData);
|
|
438
363
|
}
|
|
439
364
|
catch (err) {
|
|
@@ -486,12 +411,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
486
411
|
this.$fs.deleteDirectory(platformsAppResourcesPath);
|
|
487
412
|
this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
|
|
488
413
|
const platformAppResourcesPath = path.join(projectAppResourcesPath, platformData.normalizedPlatformName);
|
|
489
|
-
// this allows App_Resources/visionOS
|
|
490
414
|
if (this.$fs.exists(platformAppResourcesPath)) {
|
|
491
415
|
this.$fs.copyFile(path.join(platformAppResourcesPath, "*"), platformsAppResourcesPath);
|
|
492
416
|
}
|
|
493
417
|
else {
|
|
494
|
-
// otherwise falls back to App_Resources/iOS
|
|
495
418
|
this.$fs.copyFile(path.join(projectAppResourcesPath, this.$devicePlatformsConstants.iOS, "*"), platformsAppResourcesPath);
|
|
496
419
|
}
|
|
497
420
|
this.$fs.deleteFile(path.join(platformsAppResourcesPath, platformData.configurationFileName));
|
|
@@ -590,12 +513,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
590
513
|
getLibSubpathRelativeToProjectPath(targetPath, projectData) {
|
|
591
514
|
const projectRoot = this.getPlatformData(projectData).projectRoot;
|
|
592
515
|
const frameworkPath = path.relative(projectRoot, targetPath);
|
|
593
|
-
// console.log({
|
|
594
|
-
// targetPath,
|
|
595
|
-
// projectRoot,
|
|
596
|
-
// frameworkPath,
|
|
597
|
-
// resolved: path.resolve(projectRoot, frameworkPath),
|
|
598
|
-
// });
|
|
599
516
|
return frameworkPath;
|
|
600
517
|
}
|
|
601
518
|
getPbxProjPath(projectData) {
|
|
@@ -633,7 +550,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
633
550
|
this.$cocoapodsService.removePodfileFromProject(pluginData.name, this.$cocoapodsService.getPluginPodfilePath(pluginData), projectData, projectRoot);
|
|
634
551
|
}
|
|
635
552
|
async handleNativeDependenciesChange(projectData, opts) {
|
|
636
|
-
// Clear framework tracking for fresh duplicate detection
|
|
637
553
|
this.clearFrameworksCache();
|
|
638
554
|
const platformData = this.getPlatformData(projectData);
|
|
639
555
|
const pluginsData = this.getAllProductionPlugins(projectData);
|
|
@@ -645,10 +561,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
645
561
|
const projectPodfilePath = this.$cocoapodsService.getProjectPodfilePath(platformData.projectRoot);
|
|
646
562
|
if (this.$fs.exists(projectPodfilePath)) {
|
|
647
563
|
await this.$cocoapodsService.executePodInstall(platformData.projectRoot, this.$xcprojService.getXcodeprojPath(projectData, platformData.projectRoot));
|
|
648
|
-
// The `pod install` command adds a new target to the .pbxproject. This target adds additional build phases to Xcode project.
|
|
649
|
-
// Some of these phases relies on env variables (like PODS_PODFILE_DIR_PATH or PODS_ROOT).
|
|
650
|
-
// These variables are produced from merge of pod's xcconfig file and project's xcconfig file.
|
|
651
|
-
// So the correct order is `pod install` to be executed before merging pod's xcconfig file.
|
|
652
564
|
await this.$cocoapodsService.mergePodXcconfigFile(projectData, platformData, opts);
|
|
653
565
|
}
|
|
654
566
|
const pluginSpmPackages = [];
|
|
@@ -674,7 +586,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
674
586
|
const hasProvision = provision !== undefined;
|
|
675
587
|
const hasTeamId = teamId !== undefined;
|
|
676
588
|
if (hasProvision || hasTeamId) {
|
|
677
|
-
// Check if the native project's signing is set to the provided provision...
|
|
678
589
|
const pbxprojPath = this.getPbxProjPath(projectData);
|
|
679
590
|
if (this.$fs.exists(pbxprojPath)) {
|
|
680
591
|
const xcode = this.$pbxprojDomXcode.Xcode.open(pbxprojPath);
|
|
@@ -690,9 +601,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
690
601
|
}
|
|
691
602
|
}
|
|
692
603
|
else {
|
|
693
|
-
// Specifying provisioning profile requires "Manual" signing style.
|
|
694
|
-
// If the current signing style was not "Manual" it was probably "Automatic" or,
|
|
695
|
-
// it was not uniform for the debug and release build configurations.
|
|
696
604
|
changesInfo.signingChanged = true;
|
|
697
605
|
}
|
|
698
606
|
}
|
|
@@ -706,8 +614,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
706
614
|
}
|
|
707
615
|
}
|
|
708
616
|
else {
|
|
709
|
-
// Specifying team id or name requires "Automatic" signing style.
|
|
710
|
-
// If the current signing style was not "Automatic" it was probably "Manual".
|
|
711
617
|
changesInfo.signingChanged = true;
|
|
712
618
|
}
|
|
713
619
|
}
|
|
@@ -924,14 +830,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
924
830
|
}
|
|
925
831
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
926
832
|
if (!this.$fs.exists(pluginsXcconfigFilePath)) {
|
|
927
|
-
// We need the pluginsXcconfig file to exist in platforms dir as it is required in the native template:
|
|
928
|
-
// https://github.com/NativeScript/ios-runtime/blob/9c2b7b5f70b9bee8452b7a24aa6b646214c7d2be/build/project-template/__PROJECT_NAME__/build-debug.xcconfig#L3
|
|
929
|
-
// From Xcode 10 in case the file is missing, this include fails and the build itself fails (was a warning in previous Xcode versions).
|
|
930
833
|
this.$fs.writeFile(pluginsXcconfigFilePath, "");
|
|
931
834
|
}
|
|
932
835
|
}
|
|
933
836
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
934
|
-
// Set Entitlements Property to point to default file if not set explicitly by the user.
|
|
935
837
|
const entitlementsPropertyValue = this.$xcconfigService.readPropertyValue(pluginsXcconfigFilePath, constants.CODE_SIGN_ENTITLEMENTS);
|
|
936
838
|
if (entitlementsPropertyValue === null &&
|
|
937
839
|
this.$fs.exists(this.$iOSEntitlementsService.getPlatformsEntitlementsPath(projectData))) {
|
|
@@ -976,4 +878,3 @@ __decorate([
|
|
|
976
878
|
(0, helpers_2.hook)("buildIOS")
|
|
977
879
|
], IOSProjectService.prototype, "buildProject", null);
|
|
978
880
|
yok_1.injector.register("iOSProjectService", IOSProjectService);
|
|
979
|
-
//# 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
|
|
@@ -24,7 +24,6 @@ class PacoteService {
|
|
|
24
24
|
this.$proxyService = $proxyService;
|
|
25
25
|
}
|
|
26
26
|
get $packageManager() {
|
|
27
|
-
// need to be resolved here due to cyclic dependency
|
|
28
27
|
return this.$injector.resolve("packageManager");
|
|
29
28
|
}
|
|
30
29
|
async manifest(packageName, options) {
|
|
@@ -40,8 +39,6 @@ class PacoteService {
|
|
|
40
39
|
return result;
|
|
41
40
|
}
|
|
42
41
|
async extractPackage(packageName, destinationDirectory, options) {
|
|
43
|
-
// strip: Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. More info: https://github.com/npm/node-tar/blob/e89c4d37519b1c20133a9f49d5f6b85fa34c203b/README.md
|
|
44
|
-
// C: Create an archive
|
|
45
42
|
this.$logger.trace(`Calling pacoteService.extractPackage for packageName: '${packageName}', destinationDir: '${destinationDirectory}' and options: ${options}`);
|
|
46
43
|
const extractOptions = { strip: 1, C: destinationDirectory };
|
|
47
44
|
if (options) {
|
|
@@ -59,7 +56,6 @@ class PacoteService {
|
|
|
59
56
|
});
|
|
60
57
|
this.$logger.trace(`Creating extract tar stream with options: ${JSON.stringify(extractOptions, null, 2)}`);
|
|
61
58
|
const destination = tar.x(extractOptions);
|
|
62
|
-
// Initiate the source
|
|
63
59
|
const sourceStream = new stream_1.PassThrough();
|
|
64
60
|
sourceStream.end(source);
|
|
65
61
|
sourceStream.pipe(destination);
|
|
@@ -74,9 +70,7 @@ class PacoteService {
|
|
|
74
70
|
});
|
|
75
71
|
}
|
|
76
72
|
async getPacoteBaseOptions() {
|
|
77
|
-
// In case `ns create myapp --template https://github.com/NativeScript/template-hello-world.git` command is executed, pacote module throws an error if cache option is not provided.
|
|
78
73
|
const cachePath = await this.$packageManager.getCachePath();
|
|
79
|
-
// Add NPM Configuration to our Manifest options
|
|
80
74
|
const npmConfig = this.$npmConfigService.getConfig();
|
|
81
75
|
const pacoteOptions = _.extend(npmConfig, { cache: cachePath, Arborist: arborist_1.Arborist });
|
|
82
76
|
const proxySettings = await this.$proxyService.getCache();
|
|
@@ -98,4 +92,3 @@ __decorate([
|
|
|
98
92
|
(0, decorators_1.cache)()
|
|
99
93
|
], PacoteService.prototype, "$packageManager", null);
|
|
100
94
|
yok_1.injector.register("pacoteService", PacoteService);
|
|
101
|
-
//# sourceMappingURL=pacote-service.js.map
|