nativescript 9.1.0-alpha.14 → 9.1.0-alpha.16
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/docs/build-jekyll-md.sh +1 -1
- package/docs/man_pages/config/config-set.md +2 -0
- 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 +3 -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 +2 -6
- package/lib/commands/deploy.js +3 -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 +5 -5
- 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 +3 -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 +0 -18
- 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 +3 -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 +14 -12
- package/lib/common/declarations.d.ts +37 -117
- package/lib/common/decorators.js +0 -48
- package/lib/common/definitions/key-commands.js +8 -0
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/enums.js +42 -0
- package/lib/common/errors.js +4 -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 -9
- 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/analytics/google-analytics-custom-dimensions.js +13 -0
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +2 -2
- package/lib/common/services/commands-service.js +8 -17
- package/lib/common/services/help-service.js +4 -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 +2 -8
- package/lib/common/yok.js +12 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +54 -58
- 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 +2 -9
- package/lib/controllers/prepare-controller.js +8 -24
- package/lib/controllers/run-controller.js +1 -81
- 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/definitions/project.d.ts +1 -6
- package/lib/definitions/system-warnings.js +8 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +3 -8
- package/lib/detached-processes/cleanup-process.js +15 -18
- package/lib/detached-processes/detached-process-enums.js +24 -0
- package/lib/detached-processes/file-log-service.js +2 -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 +3 -4
- package/lib/helpers/livesync-command-helper.js +2 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +4 -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 +3 -3
- package/lib/key-commands/index.js +5 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +2 -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 +121 -145
- 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 +8 -10
- package/lib/services/analytics/analytics-broker.js +2 -2
- package/lib/services/analytics/analytics-service.js +29 -29
- package/lib/services/analytics/google-analytics-provider.js +16 -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 +13 -11
- 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 +26 -157
- package/lib/services/bundler/bundler.js +0 -1
- package/lib/services/cleanup-service.js +10 -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 +2 -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 +10 -120
- package/lib/services/ios/xcodebuild-args-service.js +0 -29
- package/lib/services/ios/xcodebuild-command-service.js +0 -3
- 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 +5 -6
- package/lib/services/ios-project-service.js +7 -133
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +10 -60
- 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 -55
- 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 +10 -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 +2 -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 +3 -5
- package/lib/services/platform-environment-requirements.js +4 -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 +3 -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 +5 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/xcconfig-service.js +45 -12
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +2 -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 +9 -20
- package/lib/.d.ts +0 -504
- package/lib/common/definitions/key-commands.d.ts +0 -62
- package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +0 -16
- package/lib/definitions/system-warnings.d.ts +0 -4
- package/lib/detached-processes/detached-process-enums.d.ts +0 -70
- package/lib/services/analytics/google-analytics-cross-client-custom-dimensions.d.ts +0 -6
|
@@ -20,19 +20,8 @@ class SPMService {
|
|
|
20
20
|
const spmPackages = this.$projectConfigService.getValue(`${platform}.SPMPackages`, []);
|
|
21
21
|
return spmPackages;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Merges plugin SPM packages with app SPM packages.
|
|
25
|
-
* App packages take precedence over plugin packages with the same name.
|
|
26
|
-
* @param appPackages - Array of app SPM packages (modified in place)
|
|
27
|
-
* @param pluginPackages - Array of plugin SPM packages to merge
|
|
28
|
-
*/
|
|
29
23
|
mergePluginSPMPackages(appPackages, pluginPackages) {
|
|
30
|
-
// include swift packages from plugin configs
|
|
31
|
-
// but allow app packages to override plugin packages with the same name
|
|
32
24
|
const appPackageNames = new Set(appPackages.map((pkg) => pkg.name));
|
|
33
|
-
// multiple plugins may declare the same package (e.g. a shared shim) —
|
|
34
|
-
// only the first declaration is added; a second same-name package would
|
|
35
|
-
// produce duplicate (and possibly conflicting) references in the pbxproj.
|
|
36
25
|
const addedPluginPackageNames = new Set();
|
|
37
26
|
for (const pluginPkg of pluginPackages) {
|
|
38
27
|
if (appPackageNames.has(pluginPkg.name)) {
|
|
@@ -47,10 +36,6 @@ class SPMService {
|
|
|
47
36
|
}
|
|
48
37
|
}
|
|
49
38
|
}
|
|
50
|
-
// note: this is not used anywhere at the moment.
|
|
51
|
-
// public hasSPMPackages(projectData: IProjectData): boolean {
|
|
52
|
-
// return this.getSPMPackages(projectData).length > 0;
|
|
53
|
-
// }
|
|
54
39
|
async applySPMPackages(platformData, projectData, pluginSpmPackages) {
|
|
55
40
|
var _a, _b;
|
|
56
41
|
try {
|
|
@@ -62,12 +47,7 @@ class SPMService {
|
|
|
62
47
|
this.$logger.trace("SPM: no SPM packages to apply.");
|
|
63
48
|
return;
|
|
64
49
|
}
|
|
65
|
-
|
|
66
|
-
// when resolution is slow or fails, this is the first thing needed
|
|
67
|
-
// to tell WHICH dependency is responsible.
|
|
68
|
-
this.$logger.info(`Swift Packages: ${spmPackages
|
|
69
|
-
.map((pkg) => this.describePackageSource(pkg))
|
|
70
|
-
.join(", ")}`);
|
|
50
|
+
this.$logger.info(this.formatPackageListing(spmPackages));
|
|
71
51
|
const project = new trapezedev_project_1.MobileProject(platformData.projectRoot, {
|
|
72
52
|
ios: {
|
|
73
53
|
path: ".",
|
|
@@ -75,26 +55,20 @@ class SPMService {
|
|
|
75
55
|
enableAndroid: false,
|
|
76
56
|
});
|
|
77
57
|
await project.load();
|
|
78
|
-
// note: in trapeze both visionOS and iOS are handled by the ios project.
|
|
79
58
|
if (!project.ios) {
|
|
80
59
|
this.$logger.trace("SPM: no iOS project found via trapeze.");
|
|
81
60
|
return;
|
|
82
61
|
}
|
|
83
|
-
// todo: handle removing packages? Or just warn and require a clean?
|
|
84
62
|
for (const pkg of spmPackages) {
|
|
85
63
|
if ("path" in pkg) {
|
|
86
|
-
// resolve the path relative to the project root
|
|
87
64
|
this.$logger.trace("SPM: resolving path for package: ", pkg.path);
|
|
88
65
|
pkg.path = path.resolve(projectData.projectDir, pkg.path);
|
|
89
66
|
if (!this.$fs.exists(pkg.path)) {
|
|
90
|
-
// surface this now — otherwise the only symptom is a cryptic
|
|
91
|
-
// xcodebuild resolution failure much later.
|
|
92
67
|
this.$logger.warn(`SPM: local package path for "${pkg.name}" does not exist: ${pkg.path} — Xcode will fail to resolve it.`);
|
|
93
68
|
}
|
|
94
69
|
}
|
|
95
70
|
this.$logger.trace(`SPM: adding package ${pkg.name} to project.`, pkg);
|
|
96
71
|
await project.ios.addSPMPackage(projectData.projectName, pkg);
|
|
97
|
-
// Add to other Targets if specified (like widgets, etc.)
|
|
98
72
|
if ((_a = pkg.targets) === null || _a === void 0 ? void 0 : _a.length) {
|
|
99
73
|
for (const target of pkg.targets) {
|
|
100
74
|
await project.ios.addSPMPackage(target, pkg);
|
|
@@ -102,29 +76,15 @@ class SPMService {
|
|
|
102
76
|
}
|
|
103
77
|
}
|
|
104
78
|
await project.commit();
|
|
105
|
-
// finally resolve the dependencies
|
|
106
79
|
await this.resolveSPMDependencies(platformData, projectData, {
|
|
107
80
|
showProgress: true,
|
|
108
81
|
});
|
|
109
82
|
}
|
|
110
83
|
catch (err) {
|
|
111
|
-
// best-effort, but don't bury the failure below trace level — a red
|
|
112
|
-
// resolve spinner with no visible reason is confusing. Warn with the
|
|
113
|
-
// message, keep the full error at trace.
|
|
114
84
|
this.$logger.warn(`Failed to apply Swift Package dependencies: ${(_b = err === null || err === void 0 ? void 0 : err.message) !== null && _b !== void 0 ? _b : err}`);
|
|
115
85
|
this.$logger.trace("SPM: error applying SPM packages: ", err);
|
|
116
86
|
}
|
|
117
87
|
}
|
|
118
|
-
/**
|
|
119
|
-
* Resolves (downloads + pins) the Swift Package dependencies referenced by
|
|
120
|
-
* the Xcode project. On a first build this is where the NativeScript runtime
|
|
121
|
-
* (now distributed as a remote Swift package) and any other SPM packages are
|
|
122
|
-
* actually downloaded — which can take a while. Pass `showProgress` to render
|
|
123
|
-
* a live spinner so the CLI doesn't look stalled while that happens.
|
|
124
|
-
*
|
|
125
|
-
* In verbose mode (`--log trace`) the condensed spinner is bypassed and
|
|
126
|
-
* xcodebuild's raw resolution log is streamed straight through instead.
|
|
127
|
-
*/
|
|
128
88
|
async resolveSPMDependencies(platformData, projectData, options) {
|
|
129
89
|
const args = this.$xcodebuildArgsService
|
|
130
90
|
.getXcodeProjectArgs(platformData, projectData)
|
|
@@ -133,9 +93,6 @@ class SPMService {
|
|
|
133
93
|
"generic/platform=iOS",
|
|
134
94
|
"-resolvePackageDependencies",
|
|
135
95
|
]);
|
|
136
|
-
// Without progress, or when verbose: let xcodebuild's own resolution log
|
|
137
|
-
// stream straight to the terminal (inherited stdio). Verbose users want
|
|
138
|
-
// the raw log, not a condensed spinner that hides it.
|
|
139
96
|
if (!(options === null || options === void 0 ? void 0 : options.showProgress) || this.$logger.isVerbose()) {
|
|
140
97
|
await this.$xcodebuildCommandService.executeCommand(args, {
|
|
141
98
|
cwd: projectData.projectDir,
|
|
@@ -147,14 +104,9 @@ class SPMService {
|
|
|
147
104
|
const startedAt = Date.now();
|
|
148
105
|
let activity = "Resolving Swift Package dependencies";
|
|
149
106
|
let lineBuffer = "";
|
|
150
|
-
// package currently being git-fetched (short name), if any — used to
|
|
151
|
-
// measure its growing clone in the SwiftPM cache so a long silent fetch
|
|
152
|
-
// shows visible progress ("2.31 GB of git history fetched") instead of
|
|
153
|
-
// looking hung.
|
|
154
107
|
let fetchingPackageRef = null;
|
|
155
108
|
let fetchedBytes = 0;
|
|
156
109
|
let largeCloneNoted = false;
|
|
157
|
-
// rolling tail of raw xcodebuild output for the failure report.
|
|
158
110
|
const outputTail = [];
|
|
159
111
|
const render = () => {
|
|
160
112
|
const elapsed = Math.round((Date.now() - startedAt) / 1000);
|
|
@@ -163,9 +115,6 @@ class SPMService {
|
|
|
163
115
|
: "";
|
|
164
116
|
spinner.text = `${activity}…${fetched} ${color_1.color.dim(`(${this.formatElapsed(elapsed)})`)}`;
|
|
165
117
|
};
|
|
166
|
-
// keep the elapsed timer ticking even when xcodebuild is silent (e.g.
|
|
167
|
-
// while a repository clones or a binary artifact downloads) so the user
|
|
168
|
-
// can see it's alive. Every 5th tick, measure the in-progress clone.
|
|
169
118
|
let tickCount = 0;
|
|
170
119
|
const ticker = setInterval(() => {
|
|
171
120
|
tickCount++;
|
|
@@ -174,12 +123,10 @@ class SPMService {
|
|
|
174
123
|
if (!largeCloneNoted &&
|
|
175
124
|
fetchedBytes >= SPMService.LARGE_CLONE_NOTE_BYTES) {
|
|
176
125
|
largeCloneNoted = true;
|
|
177
|
-
// persist a one-time explanation above the spinner: this is the
|
|
178
|
-
// point where users otherwise assume the CLI is stuck.
|
|
179
126
|
spinner.stopAndPersist({
|
|
180
127
|
symbol: color_1.color.yellow("ℹ"),
|
|
181
128
|
text: color_1.color.yellow(`the "${fetchingPackageRef}" package is hosted in a repository with a large git history — ` +
|
|
182
|
-
`SwiftPM clones the entire repository on first fetch, which can take a long time
|
|
129
|
+
`SwiftPM clones the entire repository on first fetch, which can take a long time.${os.EOL}` +
|
|
183
130
|
` cache: ${SPMService.SWIFTPM_REPO_CACHE}`),
|
|
184
131
|
});
|
|
185
132
|
spinner.start();
|
|
@@ -189,8 +136,7 @@ class SPMService {
|
|
|
189
136
|
}, 1000);
|
|
190
137
|
const onProgress = (chunk) => {
|
|
191
138
|
lineBuffer += chunk.data;
|
|
192
|
-
const lines = lineBuffer.split(
|
|
193
|
-
// keep the last (possibly partial) line in the buffer
|
|
139
|
+
const lines = lineBuffer.split(/\r?\n/);
|
|
194
140
|
lineBuffer = lines.pop();
|
|
195
141
|
for (const line of lines) {
|
|
196
142
|
const trimmed = line.trim();
|
|
@@ -204,9 +150,6 @@ class SPMService {
|
|
|
204
150
|
const described = this.describeSPMActivity(line);
|
|
205
151
|
if (described) {
|
|
206
152
|
activity = described;
|
|
207
|
-
// track which package a "Fetching <url>" line refers to so the
|
|
208
|
-
// ticker can measure its clone; any other activity means the
|
|
209
|
-
// fetch finished.
|
|
210
153
|
if (/^Fetching\b/i.test(trimmed)) {
|
|
211
154
|
fetchingPackageRef = this.shortenPackageRef(trimmed);
|
|
212
155
|
}
|
|
@@ -231,8 +174,6 @@ class SPMService {
|
|
|
231
174
|
}
|
|
232
175
|
catch (err) {
|
|
233
176
|
spinner.fail(color_1.color.red("Failed to resolve Swift Package dependencies"));
|
|
234
|
-
// the spinner swallowed the raw log — replay the tail so the actual
|
|
235
|
-
// xcodebuild error is visible without rerunning in verbose mode.
|
|
236
177
|
if (outputTail.length) {
|
|
237
178
|
this.$logger.info(color_1.color.dim("xcodebuild output (last lines):"));
|
|
238
179
|
for (const line of outputTail) {
|
|
@@ -245,12 +186,6 @@ class SPMService {
|
|
|
245
186
|
clearInterval(ticker);
|
|
246
187
|
}
|
|
247
188
|
}
|
|
248
|
-
/**
|
|
249
|
-
* Best-effort pre-resolve before a build so the (potentially slow) first-time
|
|
250
|
-
* Swift package download happens under a clear progress indicator instead of
|
|
251
|
-
* silently inside the subsequent "Xcode build..." step. No-op when the
|
|
252
|
-
* project has no SPM references or they're already resolved.
|
|
253
|
-
*/
|
|
254
189
|
async ensureSPMDependenciesResolved(platformData, projectData) {
|
|
255
190
|
if (!this.hasSPMReferences(platformData, projectData)) {
|
|
256
191
|
this.$logger.trace("SPM: project has no Swift Package references.");
|
|
@@ -266,22 +201,14 @@ class SPMService {
|
|
|
266
201
|
});
|
|
267
202
|
}
|
|
268
203
|
catch (err) {
|
|
269
|
-
// non-fatal: the build itself will resolve packages and surface the
|
|
270
|
-
// authoritative error if something is genuinely wrong.
|
|
271
204
|
this.$logger.trace("SPM: pre-resolve failed (continuing): ", err);
|
|
272
205
|
}
|
|
273
206
|
}
|
|
274
|
-
/**
|
|
275
|
-
* Maps a raw xcodebuild/SwiftPM resolution log line to a concise,
|
|
276
|
-
* user-facing activity description (or null for lines we don't surface).
|
|
277
|
-
*/
|
|
278
207
|
describeSPMActivity(line) {
|
|
279
208
|
const trimmed = line.trim();
|
|
280
209
|
if (!trimmed) {
|
|
281
210
|
return null;
|
|
282
211
|
}
|
|
283
|
-
// the big, otherwise-silent wait on a first build: a binary artifact
|
|
284
|
-
// (the NativeScript runtime xcframework) downloading.
|
|
285
212
|
if (/Downloading binary artifact/i.test(trimmed)) {
|
|
286
213
|
if (/ios-spm|nativescript/i.test(trimmed)) {
|
|
287
214
|
return "Downloading the NativeScript runtime (first build only)";
|
|
@@ -305,20 +232,12 @@ class SPMService {
|
|
|
305
232
|
}
|
|
306
233
|
return null;
|
|
307
234
|
}
|
|
308
|
-
/**
|
|
309
|
-
* Builds a stable, self-explanatory activity label with the package being
|
|
310
|
-
* worked on in parentheses, e.g. "Fetching Swift Packages (Auth0.swift)".
|
|
311
|
-
*/
|
|
312
235
|
describePackageActivity(verb, line) {
|
|
313
236
|
const packageRef = this.shortenPackageRef(line);
|
|
314
237
|
return packageRef
|
|
315
238
|
? `${verb} Swift Packages (${packageRef})`
|
|
316
239
|
: `${verb} Swift Packages`;
|
|
317
240
|
}
|
|
318
|
-
/**
|
|
319
|
-
* Extracts a short, readable name from a SwiftPM repo URL/log line, or null
|
|
320
|
-
* when the line contains no URL to name the package by.
|
|
321
|
-
*/
|
|
322
241
|
shortenPackageRef(line) {
|
|
323
242
|
const match = line.match(/https?:\/\/\S+/);
|
|
324
243
|
if (!match) {
|
|
@@ -329,28 +248,23 @@ class SPMService {
|
|
|
329
248
|
.replace(/\.git$/, "")
|
|
330
249
|
.replace(/[)\s].*$/, "");
|
|
331
250
|
}
|
|
332
|
-
/** Formats an elapsed duration in whole seconds as "5m 15s". */
|
|
333
251
|
formatElapsed(totalSeconds) {
|
|
334
252
|
const minutes = Math.floor(totalSeconds / 60);
|
|
335
253
|
const seconds = totalSeconds % 60;
|
|
336
254
|
return `${minutes}m ${seconds}s`;
|
|
337
255
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
256
|
+
formatPackageListing(spmPackages) {
|
|
257
|
+
return [
|
|
258
|
+
"Swift Packages:",
|
|
259
|
+
...spmPackages.map((pkg) => ` ${this.describePackageSource(pkg)}`),
|
|
260
|
+
].join(os.EOL);
|
|
261
|
+
}
|
|
343
262
|
describePackageSource(pkg) {
|
|
344
263
|
if ("path" in pkg) {
|
|
345
264
|
return `${pkg.name} (local: ${pkg.path})`;
|
|
346
265
|
}
|
|
347
266
|
return `${pkg.name} (${pkg.version} · ${pkg.repositoryURL})`;
|
|
348
267
|
}
|
|
349
|
-
/**
|
|
350
|
-
* Size on disk of the SwiftPM cache clone(s) for a package ref (the short
|
|
351
|
-
* name produced by shortenPackageRef). Cache entries are named
|
|
352
|
-
* "<repo-name>-<hash>". Returns 0 when nothing is there (yet).
|
|
353
|
-
*/
|
|
354
268
|
getPackageCloneSizeBytes(packageRef) {
|
|
355
269
|
let entries;
|
|
356
270
|
try {
|
|
@@ -364,18 +278,12 @@ class SPMService {
|
|
|
364
278
|
let total = 0;
|
|
365
279
|
for (const entry of entries) {
|
|
366
280
|
if (entry.isDirectory() &&
|
|
367
|
-
(entry.name === packageRef ||
|
|
368
|
-
entry.name.startsWith(`${packageRef}-`))) {
|
|
281
|
+
(entry.name === packageRef || entry.name.startsWith(`${packageRef}-`))) {
|
|
369
282
|
total += this.getDirectorySizeBytes(path.join(SPMService.SWIFTPM_REPO_CACHE, entry.name));
|
|
370
283
|
}
|
|
371
284
|
}
|
|
372
285
|
return total;
|
|
373
286
|
}
|
|
374
|
-
/**
|
|
375
|
-
* Recursive directory size via the raw fs API. Tolerates files vanishing
|
|
376
|
-
* mid-walk (git renames its temp packfiles while cloning) and does not
|
|
377
|
-
* follow symlinks.
|
|
378
|
-
*/
|
|
379
287
|
getDirectorySizeBytes(dirPath) {
|
|
380
288
|
let total = 0;
|
|
381
289
|
const pending = [dirPath];
|
|
@@ -399,13 +307,11 @@ class SPMService {
|
|
|
399
307
|
}
|
|
400
308
|
}
|
|
401
309
|
catch (err) {
|
|
402
|
-
// entry disappeared between readdir and stat — ignore
|
|
403
310
|
}
|
|
404
311
|
}
|
|
405
312
|
}
|
|
406
313
|
return total;
|
|
407
314
|
}
|
|
408
|
-
/** Formats a byte count as a short human-readable size ("2.31 GB"). */
|
|
409
315
|
formatBytes(bytes) {
|
|
410
316
|
const GB = 1024 ** 3;
|
|
411
317
|
const MB = 1024 ** 2;
|
|
@@ -417,7 +323,6 @@ class SPMService {
|
|
|
417
323
|
}
|
|
418
324
|
return `${Math.round(bytes / 1024)} KB`;
|
|
419
325
|
}
|
|
420
|
-
/** True when the Xcode project references any Swift packages. */
|
|
421
326
|
hasSPMReferences(platformData, projectData) {
|
|
422
327
|
const pbxprojPath = path.join(platformData.projectRoot, `${projectData.projectName}.xcodeproj`, "project.pbxproj");
|
|
423
328
|
if (!this.$fs.exists(pbxprojPath)) {
|
|
@@ -428,11 +333,6 @@ class SPMService {
|
|
|
428
333
|
contents.includes("XCLocalSwiftPackageReference") ||
|
|
429
334
|
contents.includes("packageReferences"));
|
|
430
335
|
}
|
|
431
|
-
/**
|
|
432
|
-
* True when a Package.resolved already exists for the project — i.e. packages
|
|
433
|
-
* have been resolved at least once, so the build's own resolve step will be a
|
|
434
|
-
* fast no-op rather than a slow, silent first-time download.
|
|
435
|
-
*/
|
|
436
336
|
arePackagesResolved(platformData, projectData) {
|
|
437
337
|
const candidates = [
|
|
438
338
|
path.join(platformData.projectRoot, `${projectData.projectName}.xcworkspace`, "xcshareddata", "swiftpm", "Package.resolved"),
|
|
@@ -442,17 +342,7 @@ class SPMService {
|
|
|
442
342
|
}
|
|
443
343
|
}
|
|
444
344
|
exports.SPMService = SPMService;
|
|
445
|
-
// SwiftPM keeps one bare clone per source package here (shared by Xcode and
|
|
446
|
-
// xcodebuild). Watching a package's clone grow is the only visibility into
|
|
447
|
-
// an otherwise silent long fetch — SwiftPM clones a repository's ENTIRE git
|
|
448
|
-
// history to read Package.swift, so a package hosted in a multi-GB repo can
|
|
449
|
-
// legitimately "fetch" for tens of minutes with no output.
|
|
450
345
|
SPMService.SWIFTPM_REPO_CACHE = path.join(os.homedir(), "Library", "Caches", "org.swift.swiftpm", "repositories");
|
|
451
|
-
// Once a single package's clone passes this size, surface a one-time note
|
|
452
|
-
// explaining why the fetch is slow (250 MB is already far beyond any
|
|
453
|
-
// reasonably-hosted Swift package).
|
|
454
346
|
SPMService.LARGE_CLONE_NOTE_BYTES = 250 * 1024 * 1024;
|
|
455
|
-
// Lines of raw xcodebuild output kept for the failure report.
|
|
456
347
|
SPMService.OUTPUT_TAIL_LINES = 25;
|
|
457
348
|
yok_1.injector.register("spmService", SPMService);
|
|
458
|
-
//# sourceMappingURL=spm-service.js.map
|
|
@@ -72,8 +72,6 @@ class XcodebuildArgsService {
|
|
|
72
72
|
.concat(architectures)
|
|
73
73
|
.concat(this.getBuildCommonArgs(platformData, projectData, isvisionOS ? ios_project_service_1.VisionDevicePlatformSdkName : ios_project_service_1.DevicePlatformSdkName))
|
|
74
74
|
.concat(this.getBuildLoggingArgs());
|
|
75
|
-
// pbxproj-dom sets CODE_SIGN_IDENTITY[sdk=iphoneos*] which doesn't match
|
|
76
|
-
// the xros SDK used by visionOS builds — pass it explicitly as an override
|
|
77
75
|
if (isvisionOS) {
|
|
78
76
|
args.push(`CODE_SIGN_IDENTITY=${buildConfig.release ? "Apple Distribution" : "Apple Development"}`);
|
|
79
77
|
}
|
|
@@ -82,8 +80,6 @@ class XcodebuildArgsService {
|
|
|
82
80
|
async getArchitecturesArgs(buildConfig) {
|
|
83
81
|
const args = [];
|
|
84
82
|
if (this.$devicePlatformsConstants.isvisionOS(buildConfig.platform)) {
|
|
85
|
-
// visionOS builds (device/simulator) are arm64-only; rely on destination for arch
|
|
86
|
-
// and explicitly exclude x86_64 to avoid accidental selection
|
|
87
83
|
args.push("ONLY_ACTIVE_ARCH=YES", "EXCLUDED_ARCHS=x86_64");
|
|
88
84
|
return args;
|
|
89
85
|
}
|
|
@@ -97,14 +93,7 @@ class XcodebuildArgsService {
|
|
|
97
93
|
}
|
|
98
94
|
getXcodeProjectArgs(platformData, projectData) {
|
|
99
95
|
const xcworkspacePath = path.join(platformData.projectRoot, `${projectData.projectName}.xcworkspace`);
|
|
100
|
-
// Introduced in Xcode 14+
|
|
101
|
-
// ref: https://forums.swift.org/t/telling-xcode-14-beta-4-to-trust-build-tool-plugins-programatically/59305/5
|
|
102
96
|
const skipPackageValidation = "-skipPackagePluginValidation";
|
|
103
|
-
// Introduced in Xcode 15+ to trust Swift macros (compiler plugins)
|
|
104
|
-
// non-interactively. Required for SPM packages that ship macros
|
|
105
|
-
// (e.g. apple/RealityKitScripting), otherwise the build fails with:
|
|
106
|
-
// "Macro '...' from package '...' must be enabled before it can be used"
|
|
107
|
-
// ref: https://developer.apple.com/documentation/xcode/writing-swift-macros
|
|
108
97
|
const skipMacroValidation = "-skipMacroValidation";
|
|
109
98
|
const extraArgs = [
|
|
110
99
|
"-scheme",
|
|
@@ -113,20 +102,6 @@ class XcodebuildArgsService {
|
|
|
113
102
|
skipMacroValidation,
|
|
114
103
|
];
|
|
115
104
|
const BUILD_SETTINGS_FILE_PATH = path.join(projectData.appResourcesDirectoryPath, platformData.normalizedPlatformName, constants.BUILD_XCCONFIG_FILE_NAME);
|
|
116
|
-
// Only include explicit properties from build.xcconfig
|
|
117
|
-
// Note: we could include entire file via -xcconfig flag
|
|
118
|
-
// however doing so introduces unwanted side effects
|
|
119
|
-
// like cocoapods issues related to ASSETCATALOG_COMPILER_APPICON_NAME
|
|
120
|
-
// references: https://medium.com/@iostechset/why-cocoapods-eats-app-icons-79fe729808d4
|
|
121
|
-
// https://github.com/CocoaPods/CocoaPods/issues/7003
|
|
122
|
-
// Xcode 26 makes Swift "explicitly built modules" the default. A
|
|
123
|
-
// regression there prevents macro/compiler-plugin SPM targets from
|
|
124
|
-
// resolving their swift-syntax module dependencies, failing with:
|
|
125
|
-
// "Unable to resolve module dependency: 'SwiftSyntax'" (and SwiftParser,
|
|
126
|
-
// SwiftSyntaxMacros, SwiftCompilerPlugin, SwiftDiagnostics).
|
|
127
|
-
// Passed as a command-line build setting so it overrides ALL targets,
|
|
128
|
-
// including the package targets we don't control.
|
|
129
|
-
// ref: https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516
|
|
130
105
|
const explicitModulesProperty = "SWIFT_ENABLE_EXPLICIT_MODULES";
|
|
131
106
|
const explicitModulesValue = this.$xcconfigService.readPropertyValue(BUILD_SETTINGS_FILE_PATH, explicitModulesProperty) || "NO";
|
|
132
107
|
extraArgs.push(`${explicitModulesProperty}=${explicitModulesValue}`);
|
|
@@ -140,9 +115,6 @@ class XcodebuildArgsService {
|
|
|
140
115
|
if (swiftUIBootValue) {
|
|
141
116
|
extraArgs.push(`${swiftUIBootProperty}=${swiftUIBootValue}`);
|
|
142
117
|
}
|
|
143
|
-
// Swift macro/compiler-plugin SPM targets must be code-signed with a
|
|
144
|
-
// development team when building for a device. Pass DEVELOPMENT_TEAM as a
|
|
145
|
-
// command-line build setting so it applies to SPM package targets too.
|
|
146
118
|
const developmentTeamProperty = "DEVELOPMENT_TEAM";
|
|
147
119
|
const developmentTeamValue = this.$xcconfigService.readPropertyValue(BUILD_SETTINGS_FILE_PATH, developmentTeamProperty);
|
|
148
120
|
if (developmentTeamValue) {
|
|
@@ -187,4 +159,3 @@ class XcodebuildArgsService {
|
|
|
187
159
|
}
|
|
188
160
|
exports.XcodebuildArgsService = XcodebuildArgsService;
|
|
189
161
|
yok_1.injector.register("xcodebuildArgsService", XcodebuildArgsService);
|
|
190
|
-
//# sourceMappingURL=xcodebuild-args-service.js.map
|
|
@@ -11,8 +11,6 @@ class XcodebuildCommandService {
|
|
|
11
11
|
}
|
|
12
12
|
async executeCommand(args, options) {
|
|
13
13
|
const { message, cwd, stdio, spawnOptions, onProgress } = options;
|
|
14
|
-
// A caller rendering its own progress UI owns stdout, so skip the
|
|
15
|
-
// default "Xcode build..." line that would otherwise clobber it.
|
|
16
14
|
if (!onProgress) {
|
|
17
15
|
this.$logger.info(message || "Xcode build...");
|
|
18
16
|
}
|
|
@@ -43,4 +41,3 @@ class XcodebuildCommandService {
|
|
|
43
41
|
}
|
|
44
42
|
exports.XcodebuildCommandService = XcodebuildCommandService;
|
|
45
43
|
yok_1.injector.register("xcodebuildCommandService", XcodebuildCommandService);
|
|
46
|
-
//# sourceMappingURL=xcodebuild-command-service.js.map
|
|
@@ -64,7 +64,7 @@ class XcodebuildService {
|
|
|
64
64
|
output.exportFileDir,
|
|
65
65
|
"-exportOptionsPlist",
|
|
66
66
|
output.exportOptionsPlistFilePath,
|
|
67
|
-
provision ? "" : "-allowProvisioningUpdates",
|
|
67
|
+
provision ? "" : "-allowProvisioningUpdates",
|
|
68
68
|
];
|
|
69
69
|
await this.$xcodebuildCommandService.executeCommand(args, {
|
|
70
70
|
cwd: platformData.projectRoot,
|
|
@@ -74,4 +74,3 @@ class XcodebuildService {
|
|
|
74
74
|
}
|
|
75
75
|
exports.XcodebuildService = XcodebuildService;
|
|
76
76
|
yok_1.injector.register("xcodebuildService", XcodebuildService);
|
|
77
|
-
//# sourceMappingURL=xcodebuild-service.js.map
|
|
@@ -67,4 +67,3 @@ class IOSEntitlementsService {
|
|
|
67
67
|
exports.IOSEntitlementsService = IOSEntitlementsService;
|
|
68
68
|
IOSEntitlementsService.DefaultEntitlementsName = "app.entitlements";
|
|
69
69
|
yok_1.injector.register("iOSEntitlementsService", IOSEntitlementsService);
|
|
70
|
-
//# sourceMappingURL=ios-entitlements-service.js.map
|
|
@@ -5,20 +5,8 @@ const yok_1 = require("../common/yok");
|
|
|
5
5
|
class IOSLogFilter {
|
|
6
6
|
constructor($loggingLevels) {
|
|
7
7
|
this.$loggingLevels = $loggingLevels;
|
|
8
|
-
// Used to recognize output related to the current project
|
|
9
|
-
// This looks for artifacts like: AppName[22432] or AppName(SomeTextHere)[23123]
|
|
10
8
|
this.appOutputRegex = /([^\s\(\)]+)(?:\(([^\s]+)\))?\[[0-9]+\]/;
|
|
11
|
-
// Used to trim the passed messages to a simpler output
|
|
12
|
-
// Example:
|
|
13
|
-
// This: "May 24 15:54:52 Dragons-iPhone NativeScript250(NativeScript)[356] <Notice>: CONSOLE ERROR file:///app/tns_modules/@angular/core/bundles/core.umd.js:3477:36: ORIGINAL STACKTRACE:"
|
|
14
|
-
// Becomes: CONSOLE ERROR file:///app/tns_modules/@angular/core/bundles/core.umd.js:3477:36: ORIGINAL STACKTRACE:
|
|
15
9
|
this.infoFilterRegex = new RegExp(`^.*(?:<Notice>:[ \t]?|<Error>:[ \t]?|<Warning>:[ \t]?|\\(NativeScript\\)[ \t]?|${this.appOutputRegex.source}:[ \t]?){1}`);
|
|
16
|
-
// Used to post filter messages that slip through but are not coming from NativeScript itself.
|
|
17
|
-
// Looks for text in parenthesis at the beginning
|
|
18
|
-
// Example:
|
|
19
|
-
// (RunningBoardServices) [com.apple.runningboard:connection] Identity resolved as application<...>
|
|
20
|
-
// ^(~~capture group~~~)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
21
|
-
// we then use this to filter out non-NativeScript lines
|
|
22
10
|
this.postFilterRegex = /^\((.+)\) \[com\.apple.+\]/;
|
|
23
11
|
this.filterActive = true;
|
|
24
12
|
this.partialLine = null;
|
|
@@ -41,15 +29,11 @@ class IOSLogFilter {
|
|
|
41
29
|
this.partialLine = currentLine;
|
|
42
30
|
break;
|
|
43
31
|
}
|
|
44
|
-
// Legacy filter moved to preFilter
|
|
45
32
|
if (this.preFilter(data, currentLine)) {
|
|
46
33
|
continue;
|
|
47
34
|
}
|
|
48
35
|
const matchResult = this.appOutputRegex.exec(currentLine);
|
|
49
36
|
if (matchResult && matchResult.length > 1) {
|
|
50
|
-
// Check if the name of the app equals the name of the CLI project and turn on the filter if not.
|
|
51
|
-
// We call initializeProjectData in order to obtain the current project name as the instance
|
|
52
|
-
// of this filter may be used accross multiple projects.
|
|
53
37
|
const projectName = loggingOptions && loggingOptions.projectName;
|
|
54
38
|
this.filterActive = matchResult[1] !== projectName;
|
|
55
39
|
if (matchResult === null || matchResult === void 0 ? void 0 : matchResult[2]) {
|
|
@@ -64,11 +48,8 @@ class IOSLogFilter {
|
|
|
64
48
|
currentLine = currentLine.replace(filteredLineInfo[0], "");
|
|
65
49
|
}
|
|
66
50
|
currentLine = currentLine
|
|
67
|
-
// remove lading space before CONSOLE
|
|
68
51
|
.replace(/^\s*CONSOLE/, "CONSOLE")
|
|
69
|
-
// trim trailing spaces only to preserve indentation
|
|
70
52
|
.trimEnd();
|
|
71
|
-
// post filtering: (<anything>) check if <anything> is not "NativeScript"
|
|
72
53
|
const postFilterMatch = this.postFilterRegex.exec(currentLine);
|
|
73
54
|
if (postFilterMatch && (postFilterMatch === null || postFilterMatch === void 0 ? void 0 : postFilterMatch[1]) !== "NativeScript") {
|
|
74
55
|
continue;
|
|
@@ -87,4 +68,3 @@ class IOSLogFilter {
|
|
|
87
68
|
}
|
|
88
69
|
exports.IOSLogFilter = IOSLogFilter;
|
|
89
70
|
yok_1.injector.register("iOSLogFilter", IOSLogFilter);
|
|
90
|
-
//# sourceMappingURL=ios-log-filter.js.map
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.IOSNativeTargetService = void 0;
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const _ = require("lodash");
|
|
6
|
+
const constants_1 = require("../constants");
|
|
6
7
|
const yok_1 = require("../common/yok");
|
|
7
8
|
class IOSNativeTargetService {
|
|
8
9
|
constructor($fs, $pbxprojDomXcode, $logger) {
|
|
@@ -58,8 +59,8 @@ class IOSNativeTargetService {
|
|
|
58
59
|
setXcodeTargetBuildConfigurationProperties(properties, targetName, project) {
|
|
59
60
|
properties.forEach((property) => {
|
|
60
61
|
const buildNames = property.buildNames || [
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
constants_1.BuildNames.debug,
|
|
63
|
+
constants_1.BuildNames.release,
|
|
63
64
|
];
|
|
64
65
|
buildNames.forEach((buildName) => {
|
|
65
66
|
project.addBuildProperty(property.name, property.value, buildName, targetName);
|
|
@@ -76,7 +77,6 @@ class IOSNativeTargetService {
|
|
|
76
77
|
project.addToBuildSettings("ASSETCATALOG_COMPILER_APPICON_NAME", configurationJson.assetcatalogCompilerAppiconName, targetUuid);
|
|
77
78
|
}
|
|
78
79
|
const properties = [];
|
|
79
|
-
// Set for both release and debug
|
|
80
80
|
if (configurationJson.targetBuildConfigurationProperties) {
|
|
81
81
|
_.forEach(configurationJson.targetBuildConfigurationProperties, (value, name) => properties.push({ value, name }));
|
|
82
82
|
}
|
|
@@ -85,11 +85,11 @@ class IOSNativeTargetService {
|
|
|
85
85
|
var buildName = null;
|
|
86
86
|
switch (name) {
|
|
87
87
|
case "debug": {
|
|
88
|
-
buildName =
|
|
88
|
+
buildName = constants_1.BuildNames.debug;
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
91
|
case "release": {
|
|
92
|
-
buildName =
|
|
92
|
+
buildName = constants_1.BuildNames.release;
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
95
|
default: {
|
|
@@ -107,4 +107,3 @@ class IOSNativeTargetService {
|
|
|
107
107
|
}
|
|
108
108
|
exports.IOSNativeTargetService = IOSNativeTargetService;
|
|
109
109
|
yok_1.injector.register("iOSNativeTargetService", IOSNativeTargetService);
|
|
110
|
-
//# sourceMappingURL=ios-native-target-service.js.map
|