nativescript 9.0.0-alpha.2 → 9.0.0-alpha.3
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 +12 -0
- package/lib/base-package-manager.js +7 -0
- package/lib/bootstrap.js +5 -1
- package/lib/bun-package-manager.js +14 -1
- package/lib/color.js +3 -0
- package/lib/commands/add-platform.js +1 -0
- package/lib/commands/apple-login.js +1 -0
- package/lib/commands/appstore-list.js +1 -0
- package/lib/commands/appstore-upload.js +3 -0
- package/lib/commands/build.js +3 -2
- package/lib/commands/clean.js +22 -1
- package/lib/commands/command-base.js +1 -0
- package/lib/commands/config.js +4 -0
- package/lib/commands/create-project.js +6 -0
- package/lib/commands/debug.js +6 -1
- package/lib/commands/deploy.js +3 -2
- package/lib/commands/embedding/embed.js +7 -0
- package/lib/commands/extensibility/install-extension.js +1 -0
- package/lib/commands/extensibility/list-extensions.js +1 -0
- package/lib/commands/extensibility/uninstall-extension.js +1 -0
- package/lib/commands/fonts.js +1 -0
- package/lib/commands/generate-assets.js +1 -0
- package/lib/commands/generate-help.js +1 -0
- package/lib/commands/generate.js +48 -1
- package/lib/commands/info.js +1 -0
- package/lib/commands/install.js +1 -0
- package/lib/commands/list-platforms.js +1 -0
- package/lib/commands/migrate.js +1 -0
- package/lib/commands/native-add.js +5 -0
- package/lib/commands/platform-clean.js +1 -0
- package/lib/commands/plugin/add-plugin.js +1 -0
- package/lib/commands/plugin/build-plugin.js +1 -0
- package/lib/commands/plugin/create-plugin.js +5 -0
- package/lib/commands/plugin/list-plugins.js +1 -0
- package/lib/commands/plugin/remove-plugin.js +2 -0
- package/lib/commands/plugin/update-plugin.js +1 -0
- package/lib/commands/post-install.js +6 -0
- package/lib/commands/prepare.js +4 -3
- package/lib/commands/preview.js +2 -0
- package/lib/commands/remove-platform.js +1 -0
- package/lib/commands/resources/resources-update.js +2 -0
- package/lib/commands/run.js +1 -0
- package/lib/commands/setup.js +1 -0
- package/lib/commands/start.js +1 -0
- package/lib/commands/test-init.js +4 -0
- package/lib/commands/test.js +9 -2
- package/lib/commands/typings.js +2 -1
- package/lib/commands/update-platform.js +5 -0
- package/lib/commands/update.js +2 -0
- package/lib/commands/widget.js +20 -1
- package/lib/common/bootstrap.js +1 -0
- package/lib/common/child-process.js +3 -0
- package/lib/common/codeGeneration/code-entity.js +1 -0
- package/lib/common/codeGeneration/code-printer.js +1 -0
- package/lib/common/command-params.js +1 -0
- package/lib/common/commands/analytics.js +3 -0
- package/lib/common/commands/autocompletion.js +3 -0
- package/lib/common/commands/device/device-log-stream.js +1 -0
- package/lib/common/commands/device/get-file.js +2 -0
- package/lib/common/commands/device/list-applications.js +1 -0
- package/lib/common/commands/device/list-devices.js +3 -0
- package/lib/common/commands/device/list-files.js +2 -0
- package/lib/common/commands/device/put-file.js +2 -0
- package/lib/common/commands/device/run-application.js +1 -0
- package/lib/common/commands/device/stop-application.js +1 -0
- package/lib/common/commands/device/uninstall-application.js +1 -0
- package/lib/common/commands/doctor.js +3 -2
- package/lib/common/commands/generate-messages.js +1 -0
- package/lib/common/commands/help.js +1 -0
- package/lib/common/commands/package-manager-get.js +1 -0
- package/lib/common/commands/package-manager-set.js +1 -0
- package/lib/common/commands/post-install.js +1 -0
- package/lib/common/commands/preuninstall.js +11 -2
- package/lib/common/commands/proxy/proxy-base.js +4 -0
- package/lib/common/commands/proxy/proxy-clear.js +1 -0
- package/lib/common/commands/proxy/proxy-get.js +1 -0
- package/lib/common/commands/proxy/proxy-set.js +1 -0
- package/lib/common/common-lib.js +1 -0
- package/lib/common/constants.js +11 -0
- package/lib/common/decorators.js +48 -0
- package/lib/common/dispatchers.js +10 -1
- package/lib/common/errors.js +13 -3
- package/lib/common/file-system.js +13 -2
- package/lib/common/header.js +3 -0
- package/lib/common/helpers.js +89 -3
- package/lib/common/host-info.js +4 -0
- package/lib/common/http-client.js +20 -0
- package/lib/common/logger/appenders/cli-appender.js +4 -0
- package/lib/common/logger/appenders/emit-appender.js +4 -0
- package/lib/common/logger/layouts/cli-layout.js +1 -0
- package/lib/common/logger/logger.js +5 -0
- package/lib/common/messages/messages.js +6 -0
- package/lib/common/mobile/android/android-application-manager.js +20 -1
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
- package/lib/common/mobile/android/android-debug-bridge.js +6 -0
- package/lib/common/mobile/android/android-device-file-system.js +4 -0
- package/lib/common/mobile/android/android-device-hash-service.js +3 -0
- package/lib/common/mobile/android/android-device.js +8 -0
- package/lib/common/mobile/android/android-emulator-services.js +11 -8
- package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
- package/lib/common/mobile/android/android-log-filter.js +4 -0
- package/lib/common/mobile/android/android-virtual-device-service.js +26 -0
- package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
- package/lib/common/mobile/android/genymotion/genymotion-service.js +6 -1
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
- package/lib/common/mobile/android/logcat-helper.js +13 -0
- package/lib/common/mobile/application-manager-base.js +6 -0
- package/lib/common/mobile/device-emitter.js +4 -0
- package/lib/common/mobile/device-log-emitter.js +1 -0
- package/lib/common/mobile/device-log-provider-base.js +1 -0
- package/lib/common/mobile/device-log-provider.js +23 -0
- package/lib/common/mobile/device-platforms-constants.js +1 -0
- package/lib/common/mobile/emulator-helper.js +4 -0
- package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
- package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
- package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
- package/lib/common/mobile/ios/device/ios-device.js +4 -0
- package/lib/common/mobile/ios/ios-device-base.js +1 -0
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
- package/lib/common/mobile/ios/ios-log-filter.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
- package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
- package/lib/common/mobile/log-filter.js +2 -0
- package/lib/common/mobile/logging-levels.js +1 -0
- package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
- package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
- package/lib/common/mobile/mobile-core/devices-service.js +69 -0
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-helper.js +1 -0
- package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
- package/lib/common/opener.js +1 -0
- package/lib/common/os-info.js +1 -0
- package/lib/common/plist-parser.js +1 -0
- package/lib/common/project-helper.js +1 -0
- package/lib/common/prompter.js +9 -1
- package/lib/common/queue.js +1 -0
- package/lib/common/resource-loader.js +1 -0
- package/lib/common/services/auto-completion-service.js +13 -1
- package/lib/common/services/cancellation.js +2 -1
- package/lib/common/services/commands-service.js +17 -6
- package/lib/common/services/help-service.js +11 -3
- package/lib/common/services/hooks-service.js +13 -0
- package/lib/common/services/ios-notification-service.js +1 -0
- package/lib/common/services/json-file-settings-service.js +6 -0
- package/lib/common/services/lock-service.js +6 -0
- package/lib/common/services/message-contract-generator.js +1 -0
- package/lib/common/services/messages-service.js +1 -0
- package/lib/common/services/micro-templating-service.js +6 -0
- package/lib/common/services/net-service.js +3 -0
- package/lib/common/services/project-files-manager.js +5 -0
- package/lib/common/services/project-files-provider-base.js +1 -0
- package/lib/common/services/proxy-service.js +1 -0
- package/lib/common/services/qr.js +1 -0
- package/lib/common/services/settings-service.js +1 -0
- package/lib/common/services/xcode-select-service.js +1 -0
- package/lib/common/utils.js +1 -0
- package/lib/common/validators/project-name-validator.js +1 -0
- package/lib/common/validators/validation-result.js +1 -0
- package/lib/common/verify-node-version.js +8 -1
- package/lib/common/yok.js +32 -11
- package/lib/config.js +22 -1
- package/lib/constants-provider.js +1 -0
- package/lib/constants.js +53 -0
- package/lib/controllers/build-controller.js +4 -3
- package/lib/controllers/debug-controller.js +8 -3
- package/lib/controllers/deploy-controller.js +1 -0
- package/lib/controllers/migrate-controller.js +90 -4
- package/lib/controllers/platform-controller.js +9 -1
- package/lib/controllers/prepare-controller.js +17 -4
- package/lib/controllers/run-controller.js +17 -1
- package/lib/controllers/update-controller-base.js +1 -0
- package/lib/controllers/update-controller.js +11 -0
- package/lib/data/build-data.js +1 -0
- package/lib/data/controller-data-base.js +1 -0
- package/lib/data/debug-data.js +1 -0
- package/lib/data/platform-data.js +1 -0
- package/lib/data/prepare-data.js +1 -0
- package/lib/data/run-data.js +1 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
- package/lib/detached-processes/cleanup-process.js +18 -14
- package/lib/detached-processes/file-log-service.js +2 -1
- package/lib/device-path-provider.js +1 -0
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
- package/lib/device-sockets/ios/notification.js +3 -0
- package/lib/device-sockets/ios/socket-request-executor.js +3 -0
- package/lib/helpers/android-bundle-validator-helper.js +2 -1
- package/lib/helpers/deploy-command-helper.js +1 -0
- package/lib/helpers/key-command-helper.js +4 -2
- package/lib/helpers/livesync-command-helper.js +4 -1
- package/lib/helpers/network-connectivity-validator.js +1 -0
- package/lib/helpers/options-track-helper.js +3 -2
- package/lib/helpers/package-path-helper.js +1 -0
- package/lib/helpers/platform-command-helper.js +7 -2
- package/lib/helpers/version-validator-helper.js +1 -0
- package/lib/key-commands/bootstrap.js +3 -2
- package/lib/key-commands/index.js +5 -4
- package/lib/nativescript-cli-lib-bootstrap.js +4 -0
- package/lib/nativescript-cli-lib.js +1 -0
- package/lib/nativescript-cli.js +10 -1
- package/lib/node/pbxproj-dom-xcode.js +1 -0
- package/lib/node/xcode.js +1 -0
- package/lib/node-package-manager.js +11 -1
- package/lib/options.js +144 -119
- package/lib/package-installation-manager.js +8 -1
- package/lib/package-manager.js +2 -0
- package/lib/platform-command-param.js +1 -0
- package/lib/pnpm-package-manager.js +4 -1
- package/lib/project-data.js +12 -0
- package/lib/providers/project-files-provider.js +1 -0
- package/lib/resolvers/livesync-service-resolver.js +1 -0
- package/lib/services/analytics/analytics-broker-process.js +10 -6
- package/lib/services/analytics/analytics-broker.js +2 -1
- package/lib/services/analytics/analytics-service.js +29 -25
- package/lib/services/analytics/google-analytics-provider.js +13 -12
- package/lib/services/analytics-settings-service.js +5 -0
- package/lib/services/android/android-bundle-tool-service.js +1 -0
- package/lib/services/android/gradle-build-args-service.js +3 -0
- package/lib/services/android/gradle-build-service.js +1 -0
- package/lib/services/android/gradle-command-service.js +1 -0
- package/lib/services/android-device-debug-service.js +6 -0
- package/lib/services/android-plugin-build-service.js +31 -2
- package/lib/services/android-project-service.js +71 -4
- package/lib/services/android-resources-migration-service.js +7 -0
- package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
- package/lib/services/apple-portal/srp/srp-wrapper.js +4 -1
- package/lib/services/assets-generation/assets-generation-service.js +10 -5
- package/lib/services/build-artifacts-service.js +2 -1
- package/lib/services/build-data-service.js +1 -0
- package/lib/services/build-info-file-service.js +1 -0
- package/lib/services/bundler/bundler-compiler-service.js +45 -1
- package/lib/services/bundler/bundler.js +1 -0
- package/lib/services/cleanup-service.js +13 -9
- package/lib/services/cocoapods-platform-manager.js +9 -0
- package/lib/services/cocoapods-service.js +21 -1
- package/lib/services/debug-data-service.js +1 -0
- package/lib/services/debug-service-base.js +7 -0
- package/lib/services/device/device-install-app-service.js +2 -1
- package/lib/services/doctor-service.js +21 -6
- package/lib/services/extensibility-service.js +8 -0
- package/lib/services/files-hash-service.js +1 -0
- package/lib/services/hmr-status-service.js +2 -0
- package/lib/services/info-service.js +1 -0
- package/lib/services/initialize-service.js +5 -1
- package/lib/services/ios/export-options-plist-service.js +4 -0
- package/lib/services/ios/ios-signing-service.js +4 -0
- package/lib/services/ios/spm-service.js +11 -0
- package/lib/services/ios/xcodebuild-args-service.js +9 -0
- package/lib/services/ios/xcodebuild-command-service.js +1 -0
- package/lib/services/ios/xcodebuild-service.js +2 -1
- package/lib/services/ios-debugger-port-service.js +1 -0
- package/lib/services/ios-device-debug-service.js +1 -0
- package/lib/services/ios-entitlements-service.js +1 -0
- package/lib/services/ios-extensions-service.js +1 -0
- package/lib/services/ios-log-filter.js +20 -0
- package/lib/services/ios-native-target-service.js +6 -4
- package/lib/services/ios-project-service.js +91 -1
- package/lib/services/ios-provision-service.js +3 -0
- package/lib/services/ios-watch-app-service.js +1 -0
- package/lib/services/ip-service.js +2 -0
- package/lib/services/itmstransporter-service.js +1 -0
- package/lib/services/karma-execution.js +2 -0
- package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
- package/lib/services/livesync/android-device-livesync-service.js +2 -0
- package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
- package/lib/services/livesync/android-livesync-service.js +1 -0
- package/lib/services/livesync/android-livesync-tool.js +4 -0
- package/lib/services/livesync/device-livesync-service-base.js +2 -0
- package/lib/services/livesync/ios-device-livesync-service.js +7 -0
- package/lib/services/livesync/ios-livesync-service.js +2 -0
- package/lib/services/livesync/livesync-socket.js +1 -0
- package/lib/services/livesync/platform-livesync-service-base.js +5 -0
- package/lib/services/livesync-process-data-service.js +1 -0
- package/lib/services/log-parser-service.js +1 -0
- package/lib/services/log-source-map-service.js +15 -0
- package/lib/services/marking-mode-service.js +8 -5
- package/lib/services/metadata-filtering-service.js +1 -0
- package/lib/services/npm-config-service.js +4 -0
- package/lib/services/pacote-service.js +7 -0
- package/lib/services/performance-service.js +3 -1
- package/lib/services/platform/add-platform-service.js +49 -2
- package/lib/services/platform/platform-validation-service.js +1 -0
- package/lib/services/platform/prepare-native-platform-service.js +5 -2
- package/lib/services/platform-environment-requirements.js +8 -3
- package/lib/services/platform-project-service-base.js +1 -0
- package/lib/services/platforms-data-service.js +1 -0
- package/lib/services/plugins-service.js +20 -2
- package/lib/services/prepare-data-service.js +1 -0
- package/lib/services/project-backup-service.js +4 -0
- package/lib/services/project-changes-service.js +14 -3
- package/lib/services/project-cleanup-service.js +2 -0
- package/lib/services/project-config-service.js +21 -2
- package/lib/services/project-data-service.js +36 -7
- package/lib/services/project-name-service.js +1 -0
- package/lib/services/project-service.js +10 -0
- package/lib/services/project-templates-service.js +3 -2
- package/lib/services/qr-code-terminal-service.js +1 -0
- package/lib/services/require-service.js +1 -0
- package/lib/services/start-service.js +1 -0
- package/lib/services/temp-service.js +1 -0
- package/lib/services/terminal-spinner-service.js +2 -0
- package/lib/services/test-execution-service.js +9 -2
- package/lib/services/test-initialization-service.js +4 -0
- package/lib/services/timeline-profiler-service.js +1 -0
- package/lib/services/user-settings-service.js +1 -0
- package/lib/services/versions-service.js +6 -4
- package/lib/services/watch-ignore-list-service.js +1 -0
- package/lib/services/xcconfig-service.js +2 -0
- package/lib/services/xcproj-service.js +1 -0
- package/lib/shared-event-bus.js +6 -0
- package/lib/sys-info.js +2 -1
- package/lib/tools/config-manipulation/config-transformer.js +12 -0
- package/lib/tools/node-modules/node-modules-builder.js +1 -0
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
- package/lib/yarn-package-manager.js +1 -0
- package/lib/yarn2-package-manager.js +3 -0
- package/package.json +6 -4
|
@@ -20,56 +20,56 @@ class CleanupService {
|
|
|
20
20
|
async addCleanupCommand(commandInfo) {
|
|
21
21
|
const cleanupProcess = await this.getCleanupProcess();
|
|
22
22
|
cleanupProcess.send({
|
|
23
|
-
messageType: "AddCleanCommand"
|
|
23
|
+
messageType: "AddCleanCommand" /* CleanupProcessMessage.AddCleanCommand */,
|
|
24
24
|
commandInfo,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
async removeCleanupCommand(commandInfo) {
|
|
28
28
|
const cleanupProcess = await this.getCleanupProcess();
|
|
29
29
|
cleanupProcess.send({
|
|
30
|
-
messageType: "RemoveCleanCommand"
|
|
30
|
+
messageType: "RemoveCleanCommand" /* CleanupProcessMessage.RemoveCleanCommand */,
|
|
31
31
|
commandInfo,
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
async addRequest(requestInfo) {
|
|
35
35
|
const cleanupProcess = await this.getCleanupProcess();
|
|
36
36
|
cleanupProcess.send({
|
|
37
|
-
messageType: "AddRequest"
|
|
37
|
+
messageType: "AddRequest" /* CleanupProcessMessage.AddRequest */,
|
|
38
38
|
requestInfo,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
async removeRequest(requestInfo) {
|
|
42
42
|
const cleanupProcess = await this.getCleanupProcess();
|
|
43
43
|
cleanupProcess.send({
|
|
44
|
-
messageType: "RemoveRequest"
|
|
44
|
+
messageType: "RemoveRequest" /* CleanupProcessMessage.RemoveRequest */,
|
|
45
45
|
requestInfo,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
async addCleanupDeleteAction(filePath) {
|
|
49
49
|
const cleanupProcess = await this.getCleanupProcess();
|
|
50
50
|
cleanupProcess.send({
|
|
51
|
-
messageType: "AddDeleteFileAction"
|
|
51
|
+
messageType: "AddDeleteFileAction" /* CleanupProcessMessage.AddDeleteFileAction */,
|
|
52
52
|
filePath,
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
async removeCleanupDeleteAction(filePath) {
|
|
56
56
|
const cleanupProcess = await this.getCleanupProcess();
|
|
57
57
|
cleanupProcess.send({
|
|
58
|
-
messageType: "RemoveDeleteFileAction"
|
|
58
|
+
messageType: "RemoveDeleteFileAction" /* CleanupProcessMessage.RemoveDeleteFileAction */,
|
|
59
59
|
filePath,
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
async addCleanupJS(jsCommand) {
|
|
63
63
|
const cleanupProcess = await this.getCleanupProcess();
|
|
64
64
|
cleanupProcess.send({
|
|
65
|
-
messageType: "AddJSFileToRequire"
|
|
65
|
+
messageType: "AddJSFileToRequire" /* CleanupProcessMessage.AddJSFileToRequire */,
|
|
66
66
|
jsCommand,
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
async removeCleanupJS(jsCommand) {
|
|
70
70
|
const cleanupProcess = await this.getCleanupProcess();
|
|
71
71
|
cleanupProcess.send({
|
|
72
|
-
messageType: "RemoveJSFileToRequire"
|
|
72
|
+
messageType: "RemoveJSFileToRequire" /* CleanupProcessMessage.RemoveJSFileToRequire */,
|
|
73
73
|
jsCommand,
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -92,6 +92,8 @@ class CleanupService {
|
|
|
92
92
|
setShouldDispose(shouldDispose) {
|
|
93
93
|
this.shouldDispose = shouldDispose;
|
|
94
94
|
}
|
|
95
|
+
// TODO: Consider extracting this method to a separate service
|
|
96
|
+
// as it has the same logic as the one used in analytics-service
|
|
95
97
|
getCleanupProcess() {
|
|
96
98
|
return new Promise((resolve, reject) => {
|
|
97
99
|
const cleanupProcessArgs = this.getCleanupProcessArgs();
|
|
@@ -110,11 +112,12 @@ class CleanupService {
|
|
|
110
112
|
clearTimeout(timeoutId);
|
|
111
113
|
if (!isSettled) {
|
|
112
114
|
isSettled = true;
|
|
115
|
+
// In case we throw error here, CLI will break its execution.
|
|
113
116
|
reject(err);
|
|
114
117
|
}
|
|
115
118
|
});
|
|
116
119
|
cleanupProcess.on("message", (data) => {
|
|
117
|
-
if (data === "ProcessReadyToReceive") {
|
|
120
|
+
if (data === "ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */) {
|
|
118
121
|
clearTimeout(timeoutId);
|
|
119
122
|
if (!isSettled) {
|
|
120
123
|
isSettled = true;
|
|
@@ -163,3 +166,4 @@ __decorate([
|
|
|
163
166
|
(0, decorators_1.cache)()
|
|
164
167
|
], CleanupService.prototype, "getCleanupProcess", null);
|
|
165
168
|
yok_1.injector.register("cleanupService", CleanupService);
|
|
169
|
+
//# sourceMappingURL=cleanup-service.js.map
|
|
@@ -82,6 +82,7 @@ class CocoaPodsPlatformManager {
|
|
|
82
82
|
_.each(allPodfiles, (podfileContent) => {
|
|
83
83
|
const platformMatch = platformRowRegExp.exec(podfileContent);
|
|
84
84
|
const podfilePathMatch = podfilePathRegExp.exec(podfileContent) || [];
|
|
85
|
+
// platform without version -> select it with highest priority
|
|
85
86
|
if (platformMatch && platformMatch[0] && !platformMatch[2]) {
|
|
86
87
|
selectedPlatformData = {
|
|
87
88
|
version: null,
|
|
@@ -90,6 +91,7 @@ class CocoaPodsPlatformManager {
|
|
|
90
91
|
};
|
|
91
92
|
return false;
|
|
92
93
|
}
|
|
94
|
+
// platform with version
|
|
93
95
|
if (platformMatch && platformMatch[0] && platformMatch[2]) {
|
|
94
96
|
if (!selectedPlatformData ||
|
|
95
97
|
semver.gt(semver.coerce(platformMatch[2]), semver.coerce(selectedPlatformData.version))) {
|
|
@@ -104,6 +106,12 @@ class CocoaPodsPlatformManager {
|
|
|
104
106
|
return selectedPlatformData;
|
|
105
107
|
}
|
|
106
108
|
shouldReplacePlatformSection(projectData, oldPodfilePlatformData, currentPodfilePlatformData) {
|
|
109
|
+
// The selected platform should be replaced in the following cases:
|
|
110
|
+
// 1. When the pod file is from App_Resources and the selected platform is not from App_Resources
|
|
111
|
+
// 2. When the pod file is from App_Resources, the selected platform is also from App_Resources
|
|
112
|
+
// and the pod's version is greater than the selected one
|
|
113
|
+
// 3. When the pod file doesn't have platform's version -> `platform :ios`
|
|
114
|
+
// 4. When the pod file has a version greater than the selected platform's version
|
|
107
115
|
const appResourcesPodfilePath = path.join(projectData.getAppResourcesDirectoryPath(), "iOS", constants_1.PODFILE_NAME);
|
|
108
116
|
const isFromAppResources = oldPodfilePlatformData.path !== appResourcesPodfilePath &&
|
|
109
117
|
currentPodfilePlatformData.path === appResourcesPodfilePath;
|
|
@@ -135,3 +143,4 @@ class CocoaPodsPlatformManager {
|
|
|
135
143
|
}
|
|
136
144
|
exports.CocoaPodsPlatformManager = CocoaPodsPlatformManager;
|
|
137
145
|
yok_1.injector.register("cocoaPodsPlatformManager", CocoaPodsPlatformManager);
|
|
146
|
+
//# sourceMappingURL=cocoapods-platform-manager.js.map
|
|
@@ -34,6 +34,12 @@ class CocoaPodsService {
|
|
|
34
34
|
let podTool = this.$config.USE_POD_SANDBOX ? "sandbox-pod" : "pod";
|
|
35
35
|
const args = ["install"];
|
|
36
36
|
if (process.platform === "darwin" && process.arch === "arm64") {
|
|
37
|
+
// check if pod is installed as an x86_64 binary or a native arm64 one
|
|
38
|
+
// we run the following:
|
|
39
|
+
// arch -x86_64 pod --version
|
|
40
|
+
// if it's an arm64 binary, we'll get something like this as a result:
|
|
41
|
+
// arch: posix_spawnp: pod: Bad CPU type in executable
|
|
42
|
+
// in which case, we should run it natively.
|
|
37
43
|
const res = await this.$childProcess
|
|
38
44
|
.exec("arch -x86_64 pod --version", null, {
|
|
39
45
|
showStderr: true,
|
|
@@ -47,8 +53,11 @@ class CocoaPodsService {
|
|
|
47
53
|
podTool = "arch";
|
|
48
54
|
}
|
|
49
55
|
}
|
|
56
|
+
// cocoapods print a lot of non-error information on stderr. Pipe the `stderr` to `stdout`, so we won't polute CLI's stderr output.
|
|
50
57
|
const podInstallResult = await this.$childProcess.spawnFromEvent(podTool, args, "close", { cwd: projectRoot, stdio: ["pipe", process.stdout, process.stdout] }, { throwError: false });
|
|
51
58
|
if (podInstallResult.exitCode !== 0) {
|
|
59
|
+
// https://github.com/CocoaPods/CocoaPods/blob/92aaf0f1120d32f3487960b485fb69fcaf61486c/lib/cocoapods/resolver.rb#L498
|
|
60
|
+
// TODO add article
|
|
52
61
|
const versionResolutionHint = podInstallResult.exitCode === 31
|
|
53
62
|
? `For more information on resolving CocoaPod issues in NativeScript read.`
|
|
54
63
|
: "";
|
|
@@ -80,6 +89,7 @@ ${versionResolutionHint}`);
|
|
|
80
89
|
}
|
|
81
90
|
async applyPodfileArchExclusions(projectData, platformData) {
|
|
82
91
|
const xcodeVersionData = await this.$xcodeSelectService.getXcodeVersion();
|
|
92
|
+
// only apply EXCLUDED_ARCHS workaround on XCode 12
|
|
83
93
|
if (+xcodeVersionData.major !== 12) {
|
|
84
94
|
return;
|
|
85
95
|
}
|
|
@@ -98,6 +108,7 @@ end`.trim();
|
|
|
98
108
|
this.$fs.writeFile(exclusionsPodfile, exclusions);
|
|
99
109
|
}
|
|
100
110
|
await this.applyPodfileToProject("NativeScript-CLI-Architecture-Exclusions", exclusionsPodfile, projectData, platformData);
|
|
111
|
+
// clean up
|
|
101
112
|
this.$fs.deleteFile(exclusionsPodfile);
|
|
102
113
|
}
|
|
103
114
|
async applyPodfileFromExtensions(projectData, platformData) {
|
|
@@ -120,6 +131,7 @@ end`.trim();
|
|
|
120
131
|
podfilePath: path.join(extensionFolderPath, name, constants.PODFILE_NAME),
|
|
121
132
|
}));
|
|
122
133
|
extensionsPodfile.forEach(({ targetName, podfilePath }) => {
|
|
134
|
+
// Remove the data between #Begin Podfile and #EndPodfile
|
|
123
135
|
const regExpToRemove = new RegExp(`${this.getExtensionPodfileHeader(podfilePath, targetName)}[\\s\\S]*?${this.getExtensionPodfileEnd()}`, "mg");
|
|
124
136
|
projectPodFileContent = projectPodFileContent.replace(regExpToRemove, "");
|
|
125
137
|
if (this.$fs.exists(podfilePath)) {
|
|
@@ -146,6 +158,7 @@ end`.trim();
|
|
|
146
158
|
? this.$fs.readText(pathToProjectPodfile).trim()
|
|
147
159
|
: "";
|
|
148
160
|
if (projectPodfileContent.indexOf(podfileContent) === -1) {
|
|
161
|
+
// Remove old occurences of the plugin from the project's Podfile.
|
|
149
162
|
this.removePodfileFromProject(moduleName, podfilePath, projectData, nativeProjectPath);
|
|
150
163
|
let finalPodfileContent = this.$fs.exists(pathToProjectPodfile)
|
|
151
164
|
? this.getPodfileContentWithoutTarget(projectData, this.$fs.readText(pathToProjectPodfile))
|
|
@@ -163,6 +176,7 @@ end`.trim();
|
|
|
163
176
|
removePodfileFromProject(moduleName, podfilePath, projectData, projectRoot) {
|
|
164
177
|
if (this.$fs.exists(this.getProjectPodfilePath(projectRoot))) {
|
|
165
178
|
let projectPodFileContent = this.$fs.readText(this.getProjectPodfilePath(projectRoot));
|
|
179
|
+
// Remove the data between #Begin Podfile and #EndPodfile
|
|
166
180
|
const regExpToRemove = new RegExp(`${this.getPluginPodfileHeader(podfilePath)}[\\s\\S]*?${this.getPluginPodfileEnd()}`, "mg");
|
|
167
181
|
projectPodFileContent = projectPodFileContent.replace(regExpToRemove, "");
|
|
168
182
|
projectPodFileContent = this.removePostInstallHook(moduleName, projectPodFileContent);
|
|
@@ -183,7 +197,7 @@ end`.trim();
|
|
|
183
197
|
}
|
|
184
198
|
}
|
|
185
199
|
getPluginPodfilePath(pluginData) {
|
|
186
|
-
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath("ios");
|
|
200
|
+
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath("ios" /* PlatformTypes.ios */);
|
|
187
201
|
const pluginPodFilePath = path.join(pluginPlatformsFolderPath, constants_1.PODFILE_NAME);
|
|
188
202
|
return pluginPodFilePath;
|
|
189
203
|
}
|
|
@@ -219,6 +233,7 @@ end`.trim();
|
|
|
219
233
|
if (_.startsWith(projectPodfileContent, podFileHeader)) {
|
|
220
234
|
projectPodfileContent = projectPodfileContent.substr(podFileHeader.length);
|
|
221
235
|
const podFileFooter = this.getPodfileFooter();
|
|
236
|
+
// Only remove the final end in case the file starts with the podFileHeader
|
|
222
237
|
if (_.endsWith(projectPodfileContent, podFileFooter)) {
|
|
223
238
|
projectPodfileContent = projectPodfileContent.substr(0, projectPodfileContent.length - podFileFooter.length);
|
|
224
239
|
}
|
|
@@ -239,6 +254,8 @@ end`.trim();
|
|
|
239
254
|
return projectPodFileContent;
|
|
240
255
|
}
|
|
241
256
|
getHookBasicFuncNameForPlugin(hookName, pluginName) {
|
|
257
|
+
// nativescript-hook and nativescript_hook should have different names, so replace all _ with ___ first and then replace all special symbols with _
|
|
258
|
+
// This will lead to a clash in case plugins are called nativescript-hook and nativescript___hook
|
|
242
259
|
const replacedPluginName = pluginName
|
|
243
260
|
.replace(/_/g, "___")
|
|
244
261
|
.replace(/[^A-Za-z0-9_]/g, "_");
|
|
@@ -252,6 +269,7 @@ end`.trim();
|
|
|
252
269
|
const newFunctionName = `${this.getHookBasicFuncNameForPlugin(hookName, pluginName)}_${newFunctions.length}`;
|
|
253
270
|
let newDefinition = `def ${newFunctionName}`;
|
|
254
271
|
const rubyFunction = { functionName: newFunctionName };
|
|
272
|
+
// firstGroup is the block parameter, secondGroup is the block parameter name.
|
|
255
273
|
if (firstGroup && secondGroup) {
|
|
256
274
|
newDefinition = `${newDefinition} (${secondGroup})`;
|
|
257
275
|
rubyFunction.functionParameters = secondGroup;
|
|
@@ -262,6 +280,7 @@ end`.trim();
|
|
|
262
280
|
return { replacedContent, newFunctions };
|
|
263
281
|
}
|
|
264
282
|
getPluginPodfileHeader(pluginPodFilePath) {
|
|
283
|
+
// escape special + from the podfile path (pnpm)
|
|
265
284
|
pluginPodFilePath = pluginPodFilePath.replace(/\+/g, "\\+");
|
|
266
285
|
return `# Begin Podfile - ${pluginPodFilePath}`;
|
|
267
286
|
}
|
|
@@ -331,3 +350,4 @@ exports.CocoaPodsService = CocoaPodsService;
|
|
|
331
350
|
CocoaPodsService.PODFILE_POST_INSTALL_SECTION_NAME = "post_install";
|
|
332
351
|
CocoaPodsService.INSTALLER_BLOCK_PARAMETER_NAME = "installer";
|
|
333
352
|
yok_1.injector.register("cocoapodsService", CocoaPodsService);
|
|
353
|
+
//# sourceMappingURL=cocoapods-service.js.map
|
|
@@ -27,6 +27,12 @@ class DebugServiceBase extends events_1.EventEmitter {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
getChromeDebugUrl(debugOptions, port) {
|
|
30
|
+
// corresponds to 55.0.2883 Chrome version
|
|
31
|
+
// SHA is taken from https://chromium.googlesource.com/chromium/src/+/55.0.2883.100
|
|
32
|
+
// This SHA is old and does not support debugging with HMR.
|
|
33
|
+
// In case we want to stick with concrete SHA, get it from one of the tags https://chromium.googlesource.com/chromium/src/
|
|
34
|
+
// IMPORTANT: When you get the SHA, ensure you are using the `parent` commit, not the actual one.
|
|
35
|
+
// Using the actual commit will result in 404 error in the remote serve.
|
|
30
36
|
const commitSHA = debugOptions.devToolsCommit || "02e6bde1bbe34e43b309d4ef774b1168d25fd024";
|
|
31
37
|
const devToolsProtocol = `devtools`;
|
|
32
38
|
let chromeDevToolsPrefix = `${devToolsProtocol}://devtools/remote/serve_file/@${commitSHA}`;
|
|
@@ -42,3 +48,4 @@ class DebugServiceBase extends events_1.EventEmitter {
|
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
exports.DebugServiceBase = DebugServiceBase;
|
|
51
|
+
//# sourceMappingURL=debug-service-base.js.map
|
|
@@ -21,7 +21,7 @@ class DeviceInstallAppService {
|
|
|
21
21
|
const projectData = this.$projectDataService.getProjectData(buildData.projectDir);
|
|
22
22
|
const platformData = this.$platformsDataService.getPlatformData(platform, projectData);
|
|
23
23
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
24
|
-
action: "Deploy"
|
|
24
|
+
action: "Deploy" /* TrackActionNames.Deploy */,
|
|
25
25
|
device,
|
|
26
26
|
projectDir: projectData.projectDir,
|
|
27
27
|
});
|
|
@@ -77,3 +77,4 @@ class DeviceInstallAppService {
|
|
|
77
77
|
}
|
|
78
78
|
exports.DeviceInstallAppService = DeviceInstallAppService;
|
|
79
79
|
yok_1.injector.register("deviceInstallAppService", DeviceInstallAppService);
|
|
80
|
+
//# sourceMappingURL=device-install-app-service.js.map
|
|
@@ -52,9 +52,13 @@ class DoctorService {
|
|
|
52
52
|
this.printPackageManagerTip();
|
|
53
53
|
}
|
|
54
54
|
if (!configOptions || configOptions.trackResult) {
|
|
55
|
+
// TODO(Analytics): Consider sending this information to Google Analytics
|
|
56
|
+
// await this.$analyticsService.track("DoctorEnvironmentSetup", hasWarnings ? "incorrect" : "correct");
|
|
55
57
|
}
|
|
56
58
|
if (hasWarnings) {
|
|
57
59
|
this.$logger.info("There seem to be issues with your configuration.");
|
|
60
|
+
// cleanup the cache file as there seems to be issues with the current config
|
|
61
|
+
// all projects need to be rechecked
|
|
58
62
|
this.$fs.deleteFile(this.jsonFileSettingsPath);
|
|
59
63
|
}
|
|
60
64
|
else {
|
|
@@ -68,6 +72,7 @@ class DoctorService {
|
|
|
68
72
|
catch (err) {
|
|
69
73
|
this.$logger.error("Cannot get the latest versions information from npm. Please try again later.");
|
|
70
74
|
}
|
|
75
|
+
// todo: check for deprecated imports from `tns-core-modules`
|
|
71
76
|
this.checkForDeprecatedShortImportsInAppDir(configOptions.projectDir);
|
|
72
77
|
await this.$injector
|
|
73
78
|
.resolve("platformEnvironmentRequirements")
|
|
@@ -80,12 +85,12 @@ class DoctorService {
|
|
|
80
85
|
}
|
|
81
86
|
async runSetupScript() {
|
|
82
87
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
83
|
-
action: "Run Setup Script"
|
|
88
|
+
action: "Run Setup Script" /* TrackActionNames.RunSetupScript */,
|
|
84
89
|
additionalData: "Starting",
|
|
85
90
|
});
|
|
86
91
|
if (this.$hostInfo.isLinux) {
|
|
87
92
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
88
|
-
action: "Run Setup Script"
|
|
93
|
+
action: "Run Setup Script" /* TrackActionNames.RunSetupScript */,
|
|
89
94
|
additionalData: "Skipped as OS is Linux",
|
|
90
95
|
});
|
|
91
96
|
return;
|
|
@@ -98,13 +103,13 @@ class DoctorService {
|
|
|
98
103
|
await this.runSetupScriptCore(DoctorService.WindowsSetupScriptExecutable, DoctorService.WindowsSetupScriptArguments);
|
|
99
104
|
}
|
|
100
105
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
101
|
-
action: "Run Setup Script"
|
|
106
|
+
action: "Run Setup Script" /* TrackActionNames.RunSetupScript */,
|
|
102
107
|
additionalData: "Finished",
|
|
103
108
|
});
|
|
104
109
|
}
|
|
105
110
|
async canExecuteLocalBuild(configuration) {
|
|
106
111
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
107
|
-
action: "Check Local Build Setup"
|
|
112
|
+
action: "Check Local Build Setup" /* TrackActionNames.CheckLocalBuildSetup */,
|
|
108
113
|
additionalData: "Starting",
|
|
109
114
|
});
|
|
110
115
|
const sysInfoConfig = {
|
|
@@ -116,9 +121,11 @@ class DoctorService {
|
|
|
116
121
|
const warnings = this.filterInfosByType(infos, doctor_1.constants.WARNING_TYPE_NAME);
|
|
117
122
|
const hasWarnings = warnings.length > 0;
|
|
118
123
|
if (hasWarnings) {
|
|
124
|
+
// cleanup the cache file as there seems to be issues with the current config
|
|
125
|
+
// all projects need to be rechecked
|
|
119
126
|
this.$fs.deleteFile(this.jsonFileSettingsPath);
|
|
120
127
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
121
|
-
action: "Check Local Build Setup"
|
|
128
|
+
action: "Check Local Build Setup" /* TrackActionNames.CheckLocalBuildSetup */,
|
|
122
129
|
additionalData: `Warnings:${warnings.map((w) => w.message).join("__")}`,
|
|
123
130
|
});
|
|
124
131
|
this.printInfosCore(infos);
|
|
@@ -128,7 +135,7 @@ class DoctorService {
|
|
|
128
135
|
await this.$jsonFileSettingsService.saveSetting(this.getKeyForConfiguration(sysInfoConfig), infos);
|
|
129
136
|
}
|
|
130
137
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
131
|
-
action: "Check Local Build Setup"
|
|
138
|
+
action: "Check Local Build Setup" /* TrackActionNames.CheckLocalBuildSetup */,
|
|
132
139
|
additionalData: `Finished: Is setup correct: ${!hasWarnings}`,
|
|
133
140
|
});
|
|
134
141
|
return !hasWarnings;
|
|
@@ -176,6 +183,13 @@ class DoctorService {
|
|
|
176
183
|
.getFsStats(path.join(pathToTnsCoreModules, entry))
|
|
177
184
|
.isDirectory());
|
|
178
185
|
const stringRegularExpressionsPerDir = coreModulesSubDirs.map((c) => {
|
|
186
|
+
// require("text");
|
|
187
|
+
// require("text/smth");
|
|
188
|
+
// require( "text/smth");
|
|
189
|
+
// require( "text/smth" );
|
|
190
|
+
// import * as text from "text";
|
|
191
|
+
// import { a } from "text";
|
|
192
|
+
// import {a } from "text/abc"
|
|
179
193
|
const subDirPart = `[\"\']${c}[\"\'/]`;
|
|
180
194
|
return `(\\brequire\\s*?\\(\\s*?${subDirPart})|(\\bimport\\b.*?from\\s*?${subDirPart})`;
|
|
181
195
|
});
|
|
@@ -273,3 +287,4 @@ __decorate([
|
|
|
273
287
|
(0, decorators_1.cache)()
|
|
274
288
|
], DoctorService.prototype, "$jsonFileSettingsService", null);
|
|
275
289
|
yok_1.injector.register("doctorService", DoctorService);
|
|
290
|
+
//# sourceMappingURL=doctor-service.js.map
|
|
@@ -119,12 +119,17 @@ class ExtensibilityService {
|
|
|
119
119
|
for (const extensionData of allExtensions) {
|
|
120
120
|
const extensionName = extensionData.package.name;
|
|
121
121
|
try {
|
|
122
|
+
// now get full package.json for the latest version of the package
|
|
122
123
|
const registryData = await this.$packageManager.getRegistryPackageData(extensionName);
|
|
123
124
|
const latestPackageData = registryData.versions[registryData["dist-tags"].latest];
|
|
124
125
|
const commands = latestPackageData &&
|
|
125
126
|
latestPackageData.nativescript &&
|
|
126
127
|
latestPackageData.nativescript.commands;
|
|
127
128
|
if (commands && commands.length) {
|
|
129
|
+
// For each default command we need to add its short syntax in the array of commands.
|
|
130
|
+
// For example in case there's a default command called devices list, the commands array will contain devices|*list.
|
|
131
|
+
// However, in case the user executes just tns devices, CLI will still execute the tns devices list command.
|
|
132
|
+
// So we need to add the devices command as well.
|
|
128
133
|
_.filter(commands, (command) => command.indexOf(inputOpts.defaultCommandDelimiter) !== -1).forEach((defaultCommand) => {
|
|
129
134
|
commands.push(defaultCommand.replace(defaultCommandRegExp, ""));
|
|
130
135
|
});
|
|
@@ -146,6 +151,7 @@ class ExtensibilityService {
|
|
|
146
151
|
}
|
|
147
152
|
}
|
|
148
153
|
catch (err) {
|
|
154
|
+
// We do not want to stop the whole process in case we are unable to find data for one of the extensions.
|
|
149
155
|
this.$logger.trace(`Unable to get data for ${extensionName}. Error is: ${err}`);
|
|
150
156
|
}
|
|
151
157
|
}
|
|
@@ -178,6 +184,7 @@ class ExtensibilityService {
|
|
|
178
184
|
this.assertExtensionsDirExists();
|
|
179
185
|
if (!this.$fs.exists(this.pathToPackageJson)) {
|
|
180
186
|
this.$logger.trace(`Creating ${this.pathToPackageJson}.`);
|
|
187
|
+
// create default package.json
|
|
181
188
|
this.$fs.writeJson(this.pathToPackageJson, {
|
|
182
189
|
name: "nativescript-extensibility",
|
|
183
190
|
version: "1.0.0",
|
|
@@ -199,3 +206,4 @@ __decorate([
|
|
|
199
206
|
(0, decorators_1.cache)()
|
|
200
207
|
], ExtensibilityService.prototype, "assertPackageJsonExists", null);
|
|
201
208
|
yok_1.injector.register("extensibilityService", ExtensibilityService);
|
|
209
|
+
//# sourceMappingURL=extensibility-service.js.map
|
|
@@ -56,6 +56,7 @@ class HmrStatusService {
|
|
|
56
56
|
name: "failedLiveSync",
|
|
57
57
|
platform: this.$devicePlatformsConstants.iOS.toLowerCase(),
|
|
58
58
|
});
|
|
59
|
+
// webpack5
|
|
59
60
|
const statusStringMap = {
|
|
60
61
|
success: constants_1.HmrConstants.HMR_SUCCESS_STATUS,
|
|
61
62
|
failure: constants_1.HmrConstants.HMR_ERROR_STATUS,
|
|
@@ -126,3 +127,4 @@ __decorate([
|
|
|
126
127
|
(0, decorators_1.cache)()
|
|
127
128
|
], HmrStatusService.prototype, "attachToHmrStatusEvent", null);
|
|
128
129
|
yok_1.injector.register("hmrStatusService", HmrStatusService);
|
|
130
|
+
//# sourceMappingURL=hmr-status-service.js.map
|
|
@@ -6,6 +6,8 @@ const _ = require("lodash");
|
|
|
6
6
|
const constants_1 = require("../constants");
|
|
7
7
|
const yok_1 = require("../common/yok");
|
|
8
8
|
class InitializeService {
|
|
9
|
+
// NOTE: Do not inject anything here, use $injector.resolve in the code
|
|
10
|
+
// Injecting something may lead to logger initialization, but we want to initialize it from here.
|
|
9
11
|
constructor($injector) {
|
|
10
12
|
this.$injector = $injector;
|
|
11
13
|
}
|
|
@@ -33,6 +35,7 @@ class InitializeService {
|
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
if ($options.json) {
|
|
38
|
+
// speed up --json commands by not gathering system warnings...
|
|
36
39
|
$logger.trace("Skipping system warnings for --json commands");
|
|
37
40
|
}
|
|
38
41
|
else {
|
|
@@ -44,7 +47,7 @@ class InitializeService {
|
|
|
44
47
|
const systemWarnings = await $sysInfo.getSystemWarnings();
|
|
45
48
|
_.each(systemWarnings, (systemWarning) => {
|
|
46
49
|
const message = `${os_1.EOL}${systemWarning.message}${os_1.EOL}`;
|
|
47
|
-
if (systemWarning.severity === "high") {
|
|
50
|
+
if (systemWarning.severity === "high" /* SystemWarningsSeverity.high */) {
|
|
48
51
|
$logger.error(message);
|
|
49
52
|
}
|
|
50
53
|
else {
|
|
@@ -55,3 +58,4 @@ class InitializeService {
|
|
|
55
58
|
}
|
|
56
59
|
exports.InitializeService = InitializeService;
|
|
57
60
|
yok_1.injector.register("initializeService", InitializeService);
|
|
61
|
+
//# sourceMappingURL=initialize-service.js.map
|
|
@@ -54,11 +54,13 @@ class ExportOptionsPlistService {
|
|
|
54
54
|
plistTemplate += `
|
|
55
55
|
</dict>
|
|
56
56
|
</plist>`;
|
|
57
|
+
// Save the options...
|
|
57
58
|
const exportOptionsPlistFilePath = await this.$tempService.path({
|
|
58
59
|
prefix: "export-",
|
|
59
60
|
suffix: ".plist",
|
|
60
61
|
});
|
|
61
62
|
this.$fs.writeFile(exportOptionsPlistFilePath, plistTemplate);
|
|
63
|
+
// The xcodebuild exportPath expects directory and writes the <project-name>.ipa at that directory.
|
|
62
64
|
const exportFileDir = path.resolve(path.dirname(archivePath));
|
|
63
65
|
const exportFilePath = path.join(exportFileDir, projectData.projectName + ".ipa");
|
|
64
66
|
return { exportFileDir, exportFilePath, exportOptionsPlistFilePath };
|
|
@@ -96,6 +98,7 @@ class ExportOptionsPlistService {
|
|
|
96
98
|
<false/>
|
|
97
99
|
</dict>
|
|
98
100
|
</plist>`;
|
|
101
|
+
// Save the options...
|
|
99
102
|
const exportOptionsPlistFilePath = await this.$tempService.path({
|
|
100
103
|
prefix: "export-",
|
|
101
104
|
suffix: ".plist",
|
|
@@ -118,3 +121,4 @@ class ExportOptionsPlistService {
|
|
|
118
121
|
}
|
|
119
122
|
exports.ExportOptionsPlistService = ExportOptionsPlistService;
|
|
120
123
|
yok_1.injector.register("exportOptionsPlistService", ExportOptionsPlistService);
|
|
124
|
+
//# sourceMappingURL=export-options-plist-service.js.map
|
|
@@ -45,6 +45,7 @@ class IOSSigningService {
|
|
|
45
45
|
let shouldUpdateXcode = false;
|
|
46
46
|
if (signing && signing.style === "Automatic") {
|
|
47
47
|
if (signing.team !== teamId) {
|
|
48
|
+
// Maybe the provided team is name such as "Telerik AD" and we need to convert it to CH******37
|
|
48
49
|
const teamIdsForName = await this.$iOSProvisionService.getTeamIdsWithName(teamId);
|
|
49
50
|
if (!teamIdsForName.some((id) => id === signing.team)) {
|
|
50
51
|
shouldUpdateXcode = true;
|
|
@@ -78,6 +79,7 @@ class IOSSigningService {
|
|
|
78
79
|
}
|
|
79
80
|
async setupSigningFromProvision(projectRoot, projectData, provision, mobileProvisionData) {
|
|
80
81
|
if (!provision) {
|
|
82
|
+
// read uuid from Xcode an cache...
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
85
|
const xcode = this.$pbxprojDomXcode.Xcode.open(this.getPbxProjPath(projectData, projectRoot));
|
|
@@ -110,6 +112,7 @@ class IOSSigningService {
|
|
|
110
112
|
this.$logger.trace(`Set Manual signing style and provisioning profile: ${configuration.name} (${configuration.uuid})`);
|
|
111
113
|
});
|
|
112
114
|
xcode.save();
|
|
115
|
+
// this.cache(uuid);
|
|
113
116
|
}
|
|
114
117
|
else {
|
|
115
118
|
this.$logger.trace(`The specified provisioning profile is already set in the Xcode: ${provision}`);
|
|
@@ -266,3 +269,4 @@ class IOSSigningService {
|
|
|
266
269
|
}
|
|
267
270
|
exports.IOSSigningService = IOSSigningService;
|
|
268
271
|
yok_1.injector.register("iOSSigningService", IOSSigningService);
|
|
272
|
+
//# sourceMappingURL=ios-signing-service.js.map
|
|
@@ -15,11 +15,16 @@ class SPMService {
|
|
|
15
15
|
const spmPackages = this.$projectConfigService.getValue(`${platform}.SPMPackages`, []);
|
|
16
16
|
return spmPackages;
|
|
17
17
|
}
|
|
18
|
+
// note: this is not used anywhere at the moment.
|
|
19
|
+
// public hasSPMPackages(projectData: IProjectData): boolean {
|
|
20
|
+
// return this.getSPMPackages(projectData).length > 0;
|
|
21
|
+
// }
|
|
18
22
|
async applySPMPackages(platformData, projectData, pluginSpmPackages) {
|
|
19
23
|
var _a;
|
|
20
24
|
try {
|
|
21
25
|
const spmPackages = this.getSPMPackages(projectData, platformData.platformNameLowerCase);
|
|
22
26
|
if (pluginSpmPackages === null || pluginSpmPackages === void 0 ? void 0 : pluginSpmPackages.length) {
|
|
27
|
+
// include swift packages from plugin configs
|
|
23
28
|
spmPackages.push(...pluginSpmPackages);
|
|
24
29
|
}
|
|
25
30
|
if (!spmPackages.length) {
|
|
@@ -33,17 +38,21 @@ class SPMService {
|
|
|
33
38
|
enableAndroid: false,
|
|
34
39
|
});
|
|
35
40
|
await project.load();
|
|
41
|
+
// note: in trapeze both visionOS and iOS are handled by the ios project.
|
|
36
42
|
if (!project.ios) {
|
|
37
43
|
this.$logger.trace("SPM: no iOS project found via trapeze.");
|
|
38
44
|
return;
|
|
39
45
|
}
|
|
46
|
+
// todo: handle removing packages? Or just warn and require a clean?
|
|
40
47
|
for (const pkg of spmPackages) {
|
|
41
48
|
if ("path" in pkg) {
|
|
49
|
+
// resolve the path relative to the project root
|
|
42
50
|
this.$logger.trace("SPM: resolving path for package: ", pkg.path);
|
|
43
51
|
pkg.path = path.resolve(projectData.projectDir, pkg.path);
|
|
44
52
|
}
|
|
45
53
|
this.$logger.trace(`SPM: adding package ${pkg.name} to project.`, pkg);
|
|
46
54
|
await project.ios.addSPMPackage(projectData.projectName, pkg);
|
|
55
|
+
// Add to other Targets if specified (like widgets, etc.)
|
|
47
56
|
if ((_a = pkg.targets) === null || _a === void 0 ? void 0 : _a.length) {
|
|
48
57
|
for (const target of pkg.targets) {
|
|
49
58
|
await project.ios.addSPMPackage(target, pkg);
|
|
@@ -51,6 +60,7 @@ class SPMService {
|
|
|
51
60
|
}
|
|
52
61
|
}
|
|
53
62
|
await project.commit();
|
|
63
|
+
// finally resolve the dependencies
|
|
54
64
|
await this.resolveSPMDependencies(platformData, projectData);
|
|
55
65
|
}
|
|
56
66
|
catch (err) {
|
|
@@ -72,3 +82,4 @@ class SPMService {
|
|
|
72
82
|
}
|
|
73
83
|
exports.SPMService = SPMService;
|
|
74
84
|
yok_1.injector.register("spmService", SPMService);
|
|
85
|
+
//# sourceMappingURL=spm-service.js.map
|
|
@@ -88,6 +88,8 @@ class XcodebuildArgsService {
|
|
|
88
88
|
}
|
|
89
89
|
getXcodeProjectArgs(platformData, projectData) {
|
|
90
90
|
const xcworkspacePath = path.join(platformData.projectRoot, `${projectData.projectName}.xcworkspace`);
|
|
91
|
+
// Introduced in Xcode 14+
|
|
92
|
+
// ref: https://forums.swift.org/t/telling-xcode-14-beta-4-to-trust-build-tool-plugins-programatically/59305/5
|
|
91
93
|
const skipPackageValidation = "-skipPackagePluginValidation";
|
|
92
94
|
const extraArgs = [
|
|
93
95
|
"-scheme",
|
|
@@ -95,6 +97,12 @@ class XcodebuildArgsService {
|
|
|
95
97
|
skipPackageValidation,
|
|
96
98
|
];
|
|
97
99
|
const BUILD_SETTINGS_FILE_PATH = path.join(projectData.appResourcesDirectoryPath, platformData.normalizedPlatformName, constants.BUILD_XCCONFIG_FILE_NAME);
|
|
100
|
+
// Only include explicit properties from build.xcconfig
|
|
101
|
+
// Note: we could include entire file via -xcconfig flag
|
|
102
|
+
// however doing so introduces unwanted side effects
|
|
103
|
+
// like cocoapods issues related to ASSETCATALOG_COMPILER_APPICON_NAME
|
|
104
|
+
// references: https://medium.com/@iostechset/why-cocoapods-eats-app-icons-79fe729808d4
|
|
105
|
+
// https://github.com/CocoaPods/CocoaPods/issues/7003
|
|
98
106
|
const deployTargetProperty = "IPHONEOS_DEPLOYMENT_TARGET";
|
|
99
107
|
const deployTargetVersion = this.$xcconfigService.readPropertyValue(BUILD_SETTINGS_FILE_PATH, deployTargetProperty);
|
|
100
108
|
if (deployTargetVersion) {
|
|
@@ -144,3 +152,4 @@ class XcodebuildArgsService {
|
|
|
144
152
|
}
|
|
145
153
|
exports.XcodebuildArgsService = XcodebuildArgsService;
|
|
146
154
|
yok_1.injector.register("xcodebuildArgsService", XcodebuildArgsService);
|
|
155
|
+
//# sourceMappingURL=xcodebuild-args-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", // no profiles specificed so let xcode decide.
|
|
68
68
|
];
|
|
69
69
|
await this.$xcodebuildCommandService.executeCommand(args, {
|
|
70
70
|
cwd: platformData.projectRoot,
|
|
@@ -74,3 +74,4 @@ class XcodebuildService {
|
|
|
74
74
|
}
|
|
75
75
|
exports.XcodebuildService = XcodebuildService;
|
|
76
76
|
yok_1.injector.register("xcodebuildService", XcodebuildService);
|
|
77
|
+
//# sourceMappingURL=xcodebuild-service.js.map
|
|
@@ -65,3 +65,4 @@ class IOSEntitlementsService {
|
|
|
65
65
|
exports.IOSEntitlementsService = IOSEntitlementsService;
|
|
66
66
|
IOSEntitlementsService.DefaultEntitlementsName = "app.entitlements";
|
|
67
67
|
yok_1.injector.register("iOSEntitlementsService", IOSEntitlementsService);
|
|
68
|
+
//# sourceMappingURL=ios-entitlements-service.js.map
|