nativescript 9.0.0-alpha.6 → 9.0.0-alpha.8
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 -4
- 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/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 -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 +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 +35 -75
- 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 +0 -4
- package/lib/services/ios/spm-service.js +0 -11
- 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 +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 -91
- 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 +3 -5
- 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 +16 -16
|
@@ -138,7 +138,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
138
138
|
".ico",
|
|
139
139
|
".cur",
|
|
140
140
|
".xbm",
|
|
141
|
-
],
|
|
141
|
+
],
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
return this._platformData;
|
|
@@ -185,11 +185,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
185
185
|
this.$fs.ensureDirectoryExists(path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER));
|
|
186
186
|
shell.cp("-R", path.join(frameworkDir, "*"), this.getPlatformData(projectData).projectRoot);
|
|
187
187
|
}
|
|
188
|
-
//TODO: plamen5kov: revisit this method, might have unnecessary/obsolete logic
|
|
189
188
|
async interpolateData(projectData) {
|
|
190
189
|
const projectRootFilePath = path.join(this.getPlatformData(projectData).projectRoot, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER);
|
|
191
|
-
// Starting with NativeScript for iOS 1.6.0, the project Info.plist file resides not in the platform project,
|
|
192
|
-
// but in the hello-world app template as a platform specific resource.
|
|
193
190
|
if (this.$fs.exists(path.join(projectRootFilePath, IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER + "-Info.plist"))) {
|
|
194
191
|
this.replaceFileName("-Info.plist", projectRootFilePath, projectData);
|
|
195
192
|
}
|
|
@@ -292,32 +289,16 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
292
289
|
frameworkAddOptions["sign"] = true;
|
|
293
290
|
}
|
|
294
291
|
if (this.$options.hostProjectPath) {
|
|
295
|
-
// always mark xcframeworks for embedding
|
|
296
292
|
frameworkAddOptions["embed"] = true;
|
|
297
293
|
frameworkAddOptions["sign"] = false;
|
|
298
294
|
}
|
|
299
|
-
// Note: we used to prepend "$(SRCROOT)/" to the framework path, but seems like it's not needed anymore
|
|
300
|
-
// "$(SRCROOT)/" +
|
|
301
295
|
const frameworkRelativePath = this.getLibSubpathRelativeToProjectPath(frameworkPath, projectData);
|
|
302
296
|
project.addFramework(frameworkRelativePath, frameworkAddOptions);
|
|
303
|
-
// filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
|
|
304
|
-
// project.addBuildPhase(
|
|
305
|
-
// [],
|
|
306
|
-
// "PBXShellScriptBuildPhase",
|
|
307
|
-
// "Debug SRCROOT",
|
|
308
|
-
// undefined,
|
|
309
|
-
// {
|
|
310
|
-
// shellPath: "/bin/sh",
|
|
311
|
-
// shellScript: `echo "SRCROOT: $SRCROOT"`,
|
|
312
|
-
// }
|
|
313
|
-
// );
|
|
314
297
|
this.savePbxProj(project, projectData);
|
|
315
298
|
}
|
|
316
299
|
async addStaticLibrary(staticLibPath, projectData) {
|
|
317
|
-
// Copy files to lib folder.
|
|
318
300
|
const libraryName = path.basename(staticLibPath, ".a");
|
|
319
301
|
const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName);
|
|
320
|
-
// Add static library to project file and setup header search paths
|
|
321
302
|
const project = this.createPbxProj(projectData);
|
|
322
303
|
const relativeStaticLibPath = this.getLibSubpathRelativeToProjectPath(staticLibPath, projectData);
|
|
323
304
|
project.addFramework(relativeStaticLibPath);
|
|
@@ -352,58 +333,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
352
333
|
filesRelativeToProject: true,
|
|
353
334
|
uuid: "NATIVESCRIPTNATIVESCRIPT",
|
|
354
335
|
});
|
|
355
|
-
/**
|
|
356
|
-
* 1. Add platforms/ios/{projectname}/app build to the host app
|
|
357
|
-
*/
|
|
358
|
-
// Note: allow customization of this targetFolderName
|
|
359
|
-
// const targetFolderName = "app";
|
|
360
336
|
const buildFolderPath = path.join(this.$options.hostProjectPath, projectData.projectName);
|
|
361
337
|
project.addResourceFile(buildFolderPath, {}, "NATIVESCRIPTNATIVESCRIPT");
|
|
362
|
-
// filePathsArray, buildPhaseType, comment, target, optionsOrFolderType, subfolderPath
|
|
363
|
-
// project.addBuildPhase(
|
|
364
|
-
// [],
|
|
365
|
-
// "PBXShellScriptBuildPhase",
|
|
366
|
-
// "Copy Metadata (DEBUG)",
|
|
367
|
-
// undefined,
|
|
368
|
-
// {
|
|
369
|
-
// shellPath: "/bin/sh",
|
|
370
|
-
// shellScript: `cp ./platforms/ios/build/Debug-iphonesimulator/metadata-arm64.bin $CONFIGURATION_BUILD_DIR`,
|
|
371
|
-
// outputPaths: [
|
|
372
|
-
// JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64.bin"),
|
|
373
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-arm64e.bin"),
|
|
374
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-i386.bin"),
|
|
375
|
-
// // JSON.stringify("$(CONFIGURATION_BUILD_DIR)/metadata-x86_64.bin"),
|
|
376
|
-
// ],
|
|
377
|
-
// }
|
|
378
|
-
// );
|
|
379
338
|
const metadataPath = path.relative(this.$options.hostProjectPath, buildFolderPath);
|
|
380
339
|
project.addToOtherLinkerFlags(JSON.stringify(`-sectcreate __DATA __TNSMetadata "${metadataPath}/metadata-arm64.bin"`));
|
|
381
|
-
// // no shorthand way to get UUID of build phase that i can tell
|
|
382
|
-
// // methods return the phase as an object but ommitted the actual key (uuid we need)
|
|
383
|
-
// // this does it same way nativescript-dev-xcode does but gets the uuid we need
|
|
384
|
-
// const resourcesBuildPhaseKeys = Object.keys(
|
|
385
|
-
// project.hash.project.objects["PBXResourcesBuildPhase"]
|
|
386
|
-
// );
|
|
387
|
-
// // console.log('resourcesBuildPhaseKeys:', resourcesBuildPhaseKeys);
|
|
388
|
-
// const buildPhaseUUID = resourcesBuildPhaseKeys[0];
|
|
389
|
-
// const comment = `${targetFolderName} in Resources`;
|
|
390
|
-
// project.hash.project.objects["PBXResourcesBuildPhase"][
|
|
391
|
-
// buildPhaseUUID
|
|
392
|
-
// ].files.forEach((f: any) => {
|
|
393
|
-
// console.log(f);
|
|
394
|
-
// });
|
|
395
|
-
// if (
|
|
396
|
-
// !project.hash.project.objects["PBXResourcesBuildPhase"][
|
|
397
|
-
// buildPhaseUUID
|
|
398
|
-
// ].files.find((f: any) => f.comment === comment)
|
|
399
|
-
// ) {
|
|
400
|
-
// project.addResourceFile(buildFolderPath, {}, buildPhaseUUID);
|
|
401
|
-
// }
|
|
402
|
-
/**
|
|
403
|
-
* 2. Ensure metadata is copied as a file
|
|
404
|
-
* The apps metadata-{arch}.bin should be added as a file reference.
|
|
405
|
-
*/
|
|
406
|
-
// TODO
|
|
407
340
|
this.savePbxProj(project, projectData);
|
|
408
341
|
}
|
|
409
342
|
catch (err) {
|
|
@@ -456,12 +389,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
456
389
|
this.$fs.deleteDirectory(platformsAppResourcesPath);
|
|
457
390
|
this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
|
|
458
391
|
const platformAppResourcesPath = path.join(projectAppResourcesPath, platformData.normalizedPlatformName);
|
|
459
|
-
// this allows App_Resources/visionOS
|
|
460
392
|
if (this.$fs.exists(platformAppResourcesPath)) {
|
|
461
393
|
this.$fs.copyFile(path.join(platformAppResourcesPath, "*"), platformsAppResourcesPath);
|
|
462
394
|
}
|
|
463
395
|
else {
|
|
464
|
-
// otherwise falls back to App_Resources/iOS
|
|
465
396
|
this.$fs.copyFile(path.join(projectAppResourcesPath, this.$devicePlatformsConstants.iOS, "*"), platformsAppResourcesPath);
|
|
466
397
|
}
|
|
467
398
|
this.$fs.deleteFile(path.join(platformsAppResourcesPath, platformData.configurationFileName));
|
|
@@ -560,12 +491,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
560
491
|
getLibSubpathRelativeToProjectPath(targetPath, projectData) {
|
|
561
492
|
const projectRoot = this.getPlatformData(projectData).projectRoot;
|
|
562
493
|
const frameworkPath = path.relative(projectRoot, targetPath);
|
|
563
|
-
// console.log({
|
|
564
|
-
// targetPath,
|
|
565
|
-
// projectRoot,
|
|
566
|
-
// frameworkPath,
|
|
567
|
-
// resolved: path.resolve(projectRoot, frameworkPath),
|
|
568
|
-
// });
|
|
569
494
|
return frameworkPath;
|
|
570
495
|
}
|
|
571
496
|
getPbxProjPath(projectData) {
|
|
@@ -613,10 +538,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
613
538
|
const projectPodfilePath = this.$cocoapodsService.getProjectPodfilePath(platformData.projectRoot);
|
|
614
539
|
if (this.$fs.exists(projectPodfilePath)) {
|
|
615
540
|
await this.$cocoapodsService.executePodInstall(platformData.projectRoot, this.$xcprojService.getXcodeprojPath(projectData, platformData.projectRoot));
|
|
616
|
-
// The `pod install` command adds a new target to the .pbxproject. This target adds additional build phases to Xcode project.
|
|
617
|
-
// Some of these phases relies on env variables (like PODS_PODFILE_DIR_PATH or PODS_ROOT).
|
|
618
|
-
// These variables are produced from merge of pod's xcconfig file and project's xcconfig file.
|
|
619
|
-
// So the correct order is `pod install` to be executed before merging pod's xcconfig file.
|
|
620
541
|
await this.$cocoapodsService.mergePodXcconfigFile(projectData, platformData, opts);
|
|
621
542
|
}
|
|
622
543
|
const pluginSpmPackages = [];
|
|
@@ -642,7 +563,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
642
563
|
const hasProvision = provision !== undefined;
|
|
643
564
|
const hasTeamId = teamId !== undefined;
|
|
644
565
|
if (hasProvision || hasTeamId) {
|
|
645
|
-
// Check if the native project's signing is set to the provided provision...
|
|
646
566
|
const pbxprojPath = this.getPbxProjPath(projectData);
|
|
647
567
|
if (this.$fs.exists(pbxprojPath)) {
|
|
648
568
|
const xcode = this.$pbxprojDomXcode.Xcode.open(pbxprojPath);
|
|
@@ -658,9 +578,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
658
578
|
}
|
|
659
579
|
}
|
|
660
580
|
else {
|
|
661
|
-
// Specifying provisioning profile requires "Manual" signing style.
|
|
662
|
-
// If the current signing style was not "Manual" it was probably "Automatic" or,
|
|
663
|
-
// it was not uniform for the debug and release build configurations.
|
|
664
581
|
changesInfo.signingChanged = true;
|
|
665
582
|
}
|
|
666
583
|
}
|
|
@@ -674,8 +591,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
674
591
|
}
|
|
675
592
|
}
|
|
676
593
|
else {
|
|
677
|
-
// Specifying team id or name requires "Automatic" signing style.
|
|
678
|
-
// If the current signing style was not "Automatic" it was probably "Manual".
|
|
679
594
|
changesInfo.signingChanged = true;
|
|
680
595
|
}
|
|
681
596
|
}
|
|
@@ -892,14 +807,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
892
807
|
}
|
|
893
808
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
894
809
|
if (!this.$fs.exists(pluginsXcconfigFilePath)) {
|
|
895
|
-
// We need the pluginsXcconfig file to exist in platforms dir as it is required in the native template:
|
|
896
|
-
// https://github.com/NativeScript/ios-runtime/blob/9c2b7b5f70b9bee8452b7a24aa6b646214c7d2be/build/project-template/__PROJECT_NAME__/build-debug.xcconfig#L3
|
|
897
|
-
// From Xcode 10 in case the file is missing, this include fails and the build itself fails (was a warning in previous Xcode versions).
|
|
898
810
|
this.$fs.writeFile(pluginsXcconfigFilePath, "");
|
|
899
811
|
}
|
|
900
812
|
}
|
|
901
813
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
902
|
-
// Set Entitlements Property to point to default file if not set explicitly by the user.
|
|
903
814
|
const entitlementsPropertyValue = this.$xcconfigService.readPropertyValue(pluginsXcconfigFilePath, constants.CODE_SIGN_ENTITLEMENTS);
|
|
904
815
|
if (entitlementsPropertyValue === null &&
|
|
905
816
|
this.$fs.exists(this.$iOSEntitlementsService.getPlatformsEntitlementsPath(projectData))) {
|
|
@@ -944,4 +855,3 @@ __decorate([
|
|
|
944
855
|
(0, helpers_2.hook)("buildIOS")
|
|
945
856
|
], IOSProjectService.prototype, "buildProject", null);
|
|
946
857
|
yok_1.injector.register("iOSProjectService", IOSProjectService);
|
|
947
|
-
//# 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
|
}
|
|
@@ -295,7 +292,9 @@ class AndroidLivesyncTool {
|
|
|
295
292
|
socket.removeAllListeners();
|
|
296
293
|
this.pendingConnectionData.socketTimer = setTimeout(tryConnect, 1000);
|
|
297
294
|
};
|
|
298
|
-
this.pendingConnectionData
|
|
295
|
+
if (this.pendingConnectionData) {
|
|
296
|
+
this.pendingConnectionData.socket = socket;
|
|
297
|
+
}
|
|
299
298
|
socket.once("data", (data) => {
|
|
300
299
|
socket.removeListener("close", tryConnectAfterTimeout);
|
|
301
300
|
socket.removeListener("error", tryConnectAfterTimeout);
|
|
@@ -405,4 +404,3 @@ AndroidLivesyncTool.SOCKET_CONNECTION_ALREADY_EXISTS_ERROR = "Socket connection
|
|
|
405
404
|
AndroidLivesyncTool.SOCKET_CONNECTION_TIMED_OUT_ERROR = "Socket connection timed out.";
|
|
406
405
|
AndroidLivesyncTool.NO_SOCKET_CONNECTION_AVAILABLE_ERROR = "No socket connection available.";
|
|
407
406
|
yok_1.injector.register("androidLivesyncTool", AndroidLivesyncTool);
|
|
408
|
-
//# 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 `tns 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
|
|
@@ -41,7 +41,7 @@ class PerformanceService {
|
|
|
41
41
|
trackAnalyticsData(methodInfo, executionTime) {
|
|
42
42
|
this.$analyticsService
|
|
43
43
|
.trackEventActionInGoogleAnalytics({
|
|
44
|
-
action: "Performance"
|
|
44
|
+
action: "Performance",
|
|
45
45
|
additionalData: methodInfo,
|
|
46
46
|
value: executionTime,
|
|
47
47
|
})
|
|
@@ -71,7 +71,6 @@ class PerformanceService {
|
|
|
71
71
|
this.$logger.info(PerformanceService.LOG_MESSAGE_TEMPLATE, methodInfo, executionTime);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
//removes any injected members of the arguments and excludes the options object even if it was renamed
|
|
75
74
|
getJsonSanitizer() {
|
|
76
75
|
const seen = new WeakSet();
|
|
77
76
|
seen.add(this.$options);
|
|
@@ -91,4 +90,3 @@ PerformanceService.LOG_MESSAGE_TEMPLATE = `Execution of method "%s" took %s ms.`
|
|
|
91
90
|
PerformanceService.FAIL_LOG_MESSAGE_TEMPLATE = `Failed to log pefromance data in file for method %s.`;
|
|
92
91
|
PerformanceService.MIN_NODE_PERFORMANCE_MODULE_VERSION = "8.5.0";
|
|
93
92
|
yok_1.injector.register("performanceService", PerformanceService);
|
|
94
|
-
//# sourceMappingURL=performance-service.js.map
|