nativescript 8.7.2 → 8.8.0-embed.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android-tools-info.js +0 -12
- package/lib/base-package-manager.js +0 -7
- package/lib/bootstrap.js +1 -5
- package/lib/bun-package-manager.js +1 -17
- package/lib/color.js +0 -3
- package/lib/commands/add-platform.js +1 -2
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.js +0 -4
- package/lib/commands/build.js +2 -3
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.js +0 -3
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.js +1 -6
- package/lib/commands/deploy.js +2 -3
- package/lib/commands/extensibility/install-extension.js +0 -1
- package/lib/commands/extensibility/list-extensions.js +0 -1
- package/lib/commands/extensibility/uninstall-extension.js +0 -1
- package/lib/commands/fonts.js +0 -1
- package/lib/commands/generate-assets.js +0 -1
- package/lib/commands/generate-help.js +0 -1
- package/lib/commands/generate.js +2 -12
- package/lib/commands/info.js +0 -1
- package/lib/commands/install.js +0 -1
- package/lib/commands/list-platforms.js +0 -1
- package/lib/commands/migrate.js +0 -1
- package/lib/commands/platform-clean.js +0 -1
- package/lib/commands/plugin/add-plugin.js +0 -1
- package/lib/commands/plugin/build-plugin.js +0 -1
- package/lib/commands/plugin/create-plugin.js +0 -5
- package/lib/commands/plugin/list-plugins.js +0 -1
- package/lib/commands/plugin/remove-plugin.js +0 -2
- package/lib/commands/plugin/update-plugin.js +0 -1
- package/lib/commands/post-install.js +0 -6
- package/lib/commands/prepare.js +2 -3
- package/lib/commands/preview.js +0 -2
- package/lib/commands/remove-platform.js +0 -1
- package/lib/commands/resources/resources-update.js +0 -2
- package/lib/commands/run.js +0 -1
- package/lib/commands/setup.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/commands/test-init.js +0 -4
- package/lib/commands/test.js +2 -9
- package/lib/commands/typings.js +1 -2
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.js +0 -2
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.js +0 -3
- package/lib/common/codeGeneration/code-entity.js +0 -1
- package/lib/common/codeGeneration/code-printer.js +0 -1
- package/lib/common/command-params.js +0 -1
- package/lib/common/commands/analytics.js +0 -3
- package/lib/common/commands/autocompletion.js +0 -3
- package/lib/common/commands/device/device-log-stream.js +0 -1
- package/lib/common/commands/device/get-file.js +0 -2
- package/lib/common/commands/device/list-applications.js +0 -1
- package/lib/common/commands/device/list-devices.js +0 -3
- package/lib/common/commands/device/list-files.js +0 -2
- package/lib/common/commands/device/put-file.js +0 -2
- package/lib/common/commands/device/run-application.js +0 -1
- package/lib/common/commands/device/stop-application.js +0 -1
- package/lib/common/commands/device/uninstall-application.js +0 -1
- package/lib/common/commands/doctor.js +2 -3
- package/lib/common/commands/generate-messages.js +0 -1
- package/lib/common/commands/help.js +0 -1
- package/lib/common/commands/package-manager-get.js +0 -1
- package/lib/common/commands/package-manager-set.js +0 -1
- package/lib/common/commands/post-install.js +0 -1
- package/lib/common/commands/preuninstall.js +2 -11
- package/lib/common/commands/proxy/proxy-base.js +0 -4
- package/lib/common/commands/proxy/proxy-clear.js +0 -1
- package/lib/common/commands/proxy/proxy-get.js +0 -1
- package/lib/common/commands/proxy/proxy-set.js +0 -1
- package/lib/common/common-lib.js +0 -1
- package/lib/common/constants.js +0 -11
- package/lib/common/decorators.js +0 -48
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/errors.js +3 -13
- package/lib/common/file-system.js +2 -13
- package/lib/common/header.js +0 -3
- package/lib/common/helpers.js +3 -89
- package/lib/common/host-info.js +0 -4
- package/lib/common/http-client.js +0 -20
- package/lib/common/logger/appenders/cli-appender.js +0 -4
- package/lib/common/logger/appenders/emit-appender.js +0 -4
- package/lib/common/logger/layouts/cli-layout.js +0 -1
- package/lib/common/logger/logger.js +0 -5
- package/lib/common/messages/messages.js +0 -6
- package/lib/common/mobile/android/android-application-manager.js +1 -20
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
- package/lib/common/mobile/android/android-debug-bridge.js +0 -6
- package/lib/common/mobile/android/android-device-file-system.js +0 -4
- package/lib/common/mobile/android/android-device-hash-service.js +0 -3
- package/lib/common/mobile/android/android-device.js +0 -8
- package/lib/common/mobile/android/android-emulator-services.js +1 -2
- package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
- package/lib/common/mobile/android/android-log-filter.js +0 -4
- package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
- package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
- package/lib/common/mobile/android/genymotion/genymotion-service.js +0 -5
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +1 -20
- package/lib/common/mobile/application-manager-base.js +0 -6
- package/lib/common/mobile/device-emitter.js +0 -4
- package/lib/common/mobile/device-log-emitter.js +0 -1
- package/lib/common/mobile/device-log-provider-base.js +0 -1
- package/lib/common/mobile/device-log-provider.js +0 -23
- package/lib/common/mobile/device-platforms-constants.js +0 -1
- package/lib/common/mobile/emulator-helper.js +0 -3
- package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
- package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
- package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
- package/lib/common/mobile/ios/device/ios-device.js +0 -4
- package/lib/common/mobile/ios/ios-device-base.js +0 -1
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
- package/lib/common/mobile/ios/ios-log-filter.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
- package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
- package/lib/common/mobile/log-filter.js +0 -2
- package/lib/common/mobile/logging-levels.js +0 -1
- package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
- package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
- package/lib/common/mobile/mobile-core/devices-service.js +0 -69
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-helper.js +0 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
- package/lib/common/opener.js +0 -1
- package/lib/common/os-info.js +0 -1
- package/lib/common/plist-parser.js +0 -1
- package/lib/common/project-helper.js +0 -1
- package/lib/common/prompter.js +1 -9
- package/lib/common/queue.js +0 -1
- package/lib/common/resource-loader.js +0 -1
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +1 -2
- package/lib/common/services/commands-service.js +6 -17
- package/lib/common/services/help-service.js +3 -11
- package/lib/common/services/hooks-service.js +0 -13
- package/lib/common/services/ios-notification-service.js +0 -1
- package/lib/common/services/json-file-settings-service.js +0 -6
- package/lib/common/services/lock-service.js +0 -6
- package/lib/common/services/message-contract-generator.js +0 -1
- package/lib/common/services/messages-service.js +0 -1
- package/lib/common/services/micro-templating-service.js +0 -6
- package/lib/common/services/net-service.js +0 -3
- package/lib/common/services/project-files-manager.js +0 -5
- package/lib/common/services/project-files-provider-base.js +0 -1
- package/lib/common/services/proxy-service.js +0 -1
- package/lib/common/services/qr.js +0 -1
- package/lib/common/services/settings-service.js +0 -1
- package/lib/common/services/xcode-select-service.js +0 -1
- package/lib/common/utils.js +0 -1
- package/lib/common/validators/project-name-validator.js +0 -1
- package/lib/common/validators/validation-result.js +0 -1
- package/lib/common/verify-node-version.js +1 -8
- package/lib/common/yok.js +11 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +0 -53
- package/lib/controllers/build-controller.js +3 -4
- package/lib/controllers/debug-controller.js +3 -8
- package/lib/controllers/deploy-controller.js +0 -1
- package/lib/controllers/migrate-controller.js +3 -91
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +10 -17
- package/lib/controllers/run-controller.js +1 -17
- package/lib/controllers/update-controller-base.js +0 -1
- package/lib/controllers/update-controller.js +0 -11
- package/lib/data/build-data.js +2 -1
- package/lib/data/controller-data-base.js +0 -1
- package/lib/data/debug-data.js +0 -1
- package/lib/data/platform-data.js +0 -1
- package/lib/data/prepare-data.js +1 -1
- package/lib/data/run-data.js +0 -1
- package/lib/declarations.d.ts +12 -2
- package/lib/definitions/platform.d.ts +1 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
- package/lib/detached-processes/cleanup-process.js +14 -18
- package/lib/detached-processes/file-log-service.js +1 -2
- package/lib/device-path-provider.js +0 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
- package/lib/device-sockets/ios/notification.js +0 -3
- package/lib/device-sockets/ios/socket-request-executor.js +0 -3
- package/lib/helpers/android-bundle-validator-helper.js +1 -2
- package/lib/helpers/deploy-command-helper.js +0 -1
- package/lib/helpers/key-command-helper.js +2 -4
- package/lib/helpers/livesync-command-helper.js +1 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +2 -3
- package/lib/helpers/package-path-helper.js +0 -1
- package/lib/helpers/platform-command-helper.js +17 -10
- package/lib/helpers/version-validator-helper.js +0 -1
- package/lib/key-commands/bootstrap.js +2 -3
- package/lib/key-commands/index.js +4 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +1 -10
- package/lib/node/pbxproj-dom-xcode.js +0 -1
- package/lib/node/xcode.js +0 -1
- package/lib/node-package-manager.js +1 -11
- package/lib/options.js +123 -141
- package/lib/package-installation-manager.js +1 -8
- package/lib/package-manager.js +0 -2
- package/lib/platform-command-param.js +0 -1
- package/lib/pnpm-package-manager.js +1 -4
- package/lib/project-data.js +0 -12
- package/lib/providers/project-files-provider.js +1 -2
- package/lib/resolvers/livesync-service-resolver.js +0 -1
- package/lib/services/analytics/analytics-broker-process.js +6 -10
- package/lib/services/analytics/analytics-broker.js +1 -2
- package/lib/services/analytics/analytics-service.js +25 -29
- package/lib/services/analytics/google-analytics-provider.js +12 -13
- package/lib/services/analytics-settings-service.js +0 -5
- package/lib/services/android/android-bundle-tool-service.js +0 -1
- package/lib/services/android/gradle-build-args-service.js +0 -3
- package/lib/services/android/gradle-build-service.js +0 -1
- package/lib/services/android/gradle-command-service.js +0 -1
- package/lib/services/android-device-debug-service.js +0 -6
- package/lib/services/android-plugin-build-service.js +12 -34
- package/lib/services/android-project-service.js +22 -86
- package/lib/services/android-resources-migration-service.js +0 -7
- package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
- package/lib/services/assets-generation/assets-generation-service.js +13 -17
- package/lib/services/build-artifacts-service.js +1 -2
- package/lib/services/build-data-service.js +0 -1
- package/lib/services/build-info-file-service.js +0 -1
- package/lib/services/cleanup-service.js +9 -13
- package/lib/services/cocoapods-platform-manager.js +0 -9
- package/lib/services/cocoapods-service.js +1 -21
- package/lib/services/debug-data-service.js +0 -1
- package/lib/services/debug-service-base.js +0 -7
- package/lib/services/device/device-install-app-service.js +1 -2
- package/lib/services/doctor-service.js +6 -21
- package/lib/services/extensibility-service.js +0 -8
- package/lib/services/files-hash-service.js +3 -3
- package/lib/services/hmr-status-service.js +0 -2
- package/lib/services/info-service.js +0 -1
- package/lib/services/initialize-service.js +1 -5
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.js +0 -4
- package/lib/services/ios/spm-service.js +0 -9
- package/lib/services/ios/xcodebuild-args-service.js +0 -9
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +0 -1
- package/lib/services/ios-debugger-port-service.js +0 -1
- package/lib/services/ios-device-debug-service.js +0 -1
- package/lib/services/ios-entitlements-service.js +0 -1
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.js +4 -6
- package/lib/services/ios-project-service.js +24 -26
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +0 -1
- package/lib/services/ip-service.js +0 -2
- package/lib/services/itmstransporter-service.js +0 -1
- package/lib/services/karma-execution.js +0 -2
- package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
- package/lib/services/livesync/android-device-livesync-service.js +0 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -7
- package/lib/services/livesync/android-livesync-service.js +2 -3
- package/lib/services/livesync/android-livesync-tool.js +0 -4
- package/lib/services/livesync/device-livesync-service-base.js +0 -2
- package/lib/services/livesync/ios-device-livesync-service.js +0 -7
- package/lib/services/livesync/ios-livesync-service.js +2 -4
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.js +4 -8
- package/lib/services/livesync-process-data-service.js +0 -1
- package/lib/services/log-parser-service.js +0 -1
- package/lib/services/log-source-map-service.js +3 -17
- package/lib/services/marking-mode-service.js +5 -8
- package/lib/services/metadata-filtering-service.js +0 -1
- package/lib/services/npm-config-service.js +0 -4
- package/lib/services/pacote-service.js +0 -7
- package/lib/services/performance-service.js +1 -3
- package/lib/services/platform/add-platform-service.js +9 -48
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.js +8 -8
- package/lib/services/platform-environment-requirements.js +6 -9
- package/lib/services/platform-project-service-base.js +0 -1
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.js +9 -19
- package/lib/services/prepare-data-service.js +0 -1
- package/lib/services/project-backup-service.js +0 -4
- package/lib/services/project-changes-service.js +11 -13
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +1 -18
- package/lib/services/project-data-service.js +7 -36
- package/lib/services/project-name-service.js +0 -1
- package/lib/services/project-service.js +0 -10
- package/lib/services/project-templates-service.js +2 -3
- package/lib/services/qr-code-terminal-service.js +0 -1
- package/lib/services/require-service.js +0 -1
- package/lib/services/start-service.js +0 -1
- package/lib/services/temp-service.js +0 -1
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.js +2 -9
- package/lib/services/test-initialization-service.js +0 -4
- package/lib/services/timeline-profiler-service.js +0 -1
- package/lib/services/user-settings-service.js +0 -1
- package/lib/services/versions-service.js +4 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/webpack/webpack-compiler-service.js +15 -48
- package/lib/services/xcconfig-service.js +0 -2
- package/lib/services/xcproj-service.js +12 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +1 -2
- package/lib/tools/config-manipulation/config-transformer.js +0 -12
- package/lib/tools/node-modules/node-modules-builder.js +0 -1
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
- package/lib/yarn-package-manager.js +0 -1
- package/lib/yarn2-package-manager.js +0 -3
- package/package.json +2 -2
- package/vendor/gradle-plugin/build.gradle +21 -6
- package/vendor/gradle-plugin/settings.gradle +13 -3
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +0 -15
- package/node_modules/rimraf/CHANGELOG.md +0 -65
- package/node_modules/stringify-package/CHANGELOG.md +0 -16
|
@@ -33,7 +33,6 @@ class PacoteService {
|
|
|
33
33
|
this.$proxyService = $proxyService;
|
|
34
34
|
}
|
|
35
35
|
get $packageManager() {
|
|
36
|
-
// need to be resolved here due to cyclic dependency
|
|
37
36
|
return this.$injector.resolve("packageManager");
|
|
38
37
|
}
|
|
39
38
|
manifest(packageName, options) {
|
|
@@ -52,8 +51,6 @@ class PacoteService {
|
|
|
52
51
|
}
|
|
53
52
|
extractPackage(packageName, destinationDirectory, options) {
|
|
54
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
// strip: Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. More info: https://github.com/npm/node-tar/blob/e89c4d37519b1c20133a9f49d5f6b85fa34c203b/README.md
|
|
56
|
-
// C: Create an archive
|
|
57
54
|
this.$logger.trace(`Calling pacoteService.extractPackage for packageName: '${packageName}', destinationDir: '${destinationDirectory}' and options: ${options}`);
|
|
58
55
|
const extractOptions = { strip: 1, C: destinationDirectory };
|
|
59
56
|
if (options) {
|
|
@@ -71,7 +68,6 @@ class PacoteService {
|
|
|
71
68
|
});
|
|
72
69
|
this.$logger.trace(`Creating extract tar stream with options: ${JSON.stringify(extractOptions, null, 2)}`);
|
|
73
70
|
const destination = tar.x(extractOptions);
|
|
74
|
-
// Initiate the source
|
|
75
71
|
const sourceStream = new stream_1.PassThrough();
|
|
76
72
|
sourceStream.end(source);
|
|
77
73
|
sourceStream.pipe(destination);
|
|
@@ -88,9 +84,7 @@ class PacoteService {
|
|
|
88
84
|
}
|
|
89
85
|
getPacoteBaseOptions() {
|
|
90
86
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
// In case `tns create myapp --template https://github.com/NativeScript/template-hello-world.git` command is executed, pacote module throws an error if cache option is not provided.
|
|
92
87
|
const cachePath = yield this.$packageManager.getCachePath();
|
|
93
|
-
// Add NPM Configuration to our Manifest options
|
|
94
88
|
const npmConfig = this.$npmConfigService.getConfig();
|
|
95
89
|
const pacoteOptions = _.extend(npmConfig, { cache: cachePath, Arborist: arborist_1.Arborist });
|
|
96
90
|
const proxySettings = yield this.$proxyService.getCache();
|
|
@@ -113,4 +107,3 @@ __decorate([
|
|
|
113
107
|
], PacoteService.prototype, "$packageManager", null);
|
|
114
108
|
exports.PacoteService = PacoteService;
|
|
115
109
|
yok_1.injector.register("pacoteService", PacoteService);
|
|
116
|
-
//# sourceMappingURL=pacote-service.js.map
|
|
@@ -41,7 +41,7 @@ class PerformanceService {
|
|
|
41
41
|
trackAnalyticsData(methodInfo, executionTime) {
|
|
42
42
|
this.$analyticsService
|
|
43
43
|
.trackEventActionInGoogleAnalytics({
|
|
44
|
-
action: "Performance"
|
|
44
|
+
action: "Performance",
|
|
45
45
|
additionalData: methodInfo,
|
|
46
46
|
value: executionTime,
|
|
47
47
|
})
|
|
@@ -71,7 +71,6 @@ class PerformanceService {
|
|
|
71
71
|
this.$logger.info(PerformanceService.LOG_MESSAGE_TEMPLATE, methodInfo, executionTime);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
//removes any injected members of the arguments and excludes the options object even if it was renamed
|
|
75
74
|
getJsonSanitizer() {
|
|
76
75
|
const seen = new WeakSet();
|
|
77
76
|
seen.add(this.$options);
|
|
@@ -91,4 +90,3 @@ PerformanceService.FAIL_LOG_MESSAGE_TEMPLATE = `Failed to log pefromance data in
|
|
|
91
90
|
PerformanceService.MIN_NODE_PERFORMANCE_MODULE_VERSION = "8.5.0";
|
|
92
91
|
exports.PerformanceService = PerformanceService;
|
|
93
92
|
yok_1.injector.register("performanceService", PerformanceService);
|
|
94
|
-
//# sourceMappingURL=performance-service.js.map
|
|
@@ -21,29 +21,25 @@ const constants_1 = require("../../constants");
|
|
|
21
21
|
const decorators_1 = require("../../common/decorators");
|
|
22
22
|
const yok_1 = require("../../common/yok");
|
|
23
23
|
class AddPlatformService {
|
|
24
|
-
constructor($fs, $logger,
|
|
25
|
-
// private $pacoteService: IPacoteService,
|
|
26
|
-
// private $projectDataService: IProjectDataService,
|
|
27
|
-
$packageManager, $terminalSpinnerService, $analyticsService // private $tempService: ITempService
|
|
28
|
-
) {
|
|
24
|
+
constructor($fs, $logger, $options, $packageManager, $terminalSpinnerService, $analyticsService) {
|
|
29
25
|
this.$fs = $fs;
|
|
30
26
|
this.$logger = $logger;
|
|
27
|
+
this.$options = $options;
|
|
31
28
|
this.$packageManager = $packageManager;
|
|
32
29
|
this.$terminalSpinnerService = $terminalSpinnerService;
|
|
33
30
|
this.$analyticsService = $analyticsService;
|
|
34
31
|
}
|
|
32
|
+
addProjectHost() {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () { });
|
|
34
|
+
}
|
|
35
35
|
addPlatformSafe(projectData, platformData, packageToInstall, addPlatformData) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const spinner = this.$terminalSpinnerService.createSpinner();
|
|
38
38
|
try {
|
|
39
39
|
spinner.start();
|
|
40
|
-
// const frameworkDirPath = addPlatformData.frameworkPath ?
|
|
41
|
-
// await this.extractPackage(packageToInstall)
|
|
42
|
-
// : await this.installPackage(projectData.projectDir, packageToInstall);
|
|
43
40
|
const frameworkDirPath = yield this.installPackage(projectData.projectDir, packageToInstall);
|
|
44
41
|
const frameworkPackageJsonContent = this.$fs.readJson(path.join(frameworkDirPath, "..", "package.json"));
|
|
45
42
|
const frameworkVersion = frameworkPackageJsonContent.version;
|
|
46
|
-
// await this.setPlatformVersion(platformData, projectData, frameworkVersion);
|
|
47
43
|
yield this.trackPlatformVersion(frameworkVersion, platformData);
|
|
48
44
|
if (!addPlatformData.nativePrepare ||
|
|
49
45
|
!addPlatformData.nativePrepare.skipNativePrepare) {
|
|
@@ -66,22 +62,10 @@ class AddPlatformService {
|
|
|
66
62
|
yield this.installPackage(projectData.projectDir, `${platformData.frameworkPackageName}@${frameworkVersion}`);
|
|
67
63
|
});
|
|
68
64
|
}
|
|
69
|
-
// private async extractPackage(pkg: string): Promise<string> {
|
|
70
|
-
// const downloadedPackagePath = await this.$tempService.mkdirSync(
|
|
71
|
-
// "runtimeDir"
|
|
72
|
-
// );
|
|
73
|
-
// await this.$pacoteService.extractPackage(pkg, downloadedPackagePath);
|
|
74
|
-
// const frameworkDir = path.join(
|
|
75
|
-
// downloadedPackagePath,
|
|
76
|
-
// PROJECT_FRAMEWORK_FOLDER_NAME
|
|
77
|
-
// );
|
|
78
|
-
// return path.resolve(frameworkDir);
|
|
79
|
-
// }
|
|
80
65
|
installPackage(projectDir, packageName) {
|
|
81
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
67
|
const frameworkDir = this.resolveFrameworkDir(projectDir, packageName);
|
|
83
68
|
if (frameworkDir && this.$fs.exists(frameworkDir)) {
|
|
84
|
-
// don't install if it's already installed
|
|
85
69
|
return frameworkDir;
|
|
86
70
|
}
|
|
87
71
|
const installedPackage = yield this.$packageManager.install(packageName, projectDir, {
|
|
@@ -98,30 +82,6 @@ class AddPlatformService {
|
|
|
98
82
|
}
|
|
99
83
|
resolveFrameworkDir(projectDir, packageName) {
|
|
100
84
|
try {
|
|
101
|
-
// strip version info if present <package>@1.2.3-rc.0 -> <package>
|
|
102
|
-
// tested cases:
|
|
103
|
-
// @nativescript/ios
|
|
104
|
-
// @nativescript/ios@1
|
|
105
|
-
// @nativescript/ios@1.2
|
|
106
|
-
// @nativescript/ios@1.2.3
|
|
107
|
-
// @nativescript/ios@1.2.3-
|
|
108
|
-
// @nativescript/ios@1.2.3-rc
|
|
109
|
-
// @nativescript/ios@1.2.3-rc.
|
|
110
|
-
// @nativescript/ios@1.2.3-rc.0
|
|
111
|
-
// @nativescript/ios@rc
|
|
112
|
-
// @nativescript/ios@^7.0.0
|
|
113
|
-
// @nativescript/ios@~7.0.0
|
|
114
|
-
// tns-ios
|
|
115
|
-
// tns-ios@1
|
|
116
|
-
// tns-ios@1.2
|
|
117
|
-
// tns-ios@1.2.3
|
|
118
|
-
// tns-ios@1.2.3-
|
|
119
|
-
// tns-ios@1.2.3-rc
|
|
120
|
-
// tns-ios@1.2.3-rc.
|
|
121
|
-
// tns-ios@1.2.3-rc.0
|
|
122
|
-
// tns-ios@rc
|
|
123
|
-
// tns-ios@^7.0.0
|
|
124
|
-
// tns-ios@~7.0.0
|
|
125
85
|
packageName = packageName.replace(/(.+)@.+$/g, "$1");
|
|
126
86
|
const frameworkDir = require
|
|
127
87
|
.resolve(`${packageName}/package.json`, {
|
|
@@ -139,7 +99,9 @@ class AddPlatformService {
|
|
|
139
99
|
}
|
|
140
100
|
addNativePlatform(platformData, projectData, frameworkDirPath, frameworkVersion) {
|
|
141
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
-
const platformDir =
|
|
102
|
+
const platformDir = this.$options.nativeHost
|
|
103
|
+
? this.$options.nativeHost
|
|
104
|
+
: path.join(projectData.platformsDir, platformData.normalizedPlatformName.toLowerCase());
|
|
143
105
|
this.$fs.deleteDirectory(platformDir);
|
|
144
106
|
yield platformData.platformProjectService.createProject(path.resolve(frameworkDirPath), frameworkVersion, projectData);
|
|
145
107
|
platformData.platformProjectService.ensureConfigurationFileInAppResources(projectData);
|
|
@@ -150,7 +112,7 @@ class AddPlatformService {
|
|
|
150
112
|
trackPlatformVersion(frameworkVersion, platformData) {
|
|
151
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
114
|
yield this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
153
|
-
action: "Add Platform"
|
|
115
|
+
action: "Add Platform",
|
|
154
116
|
additionalData: `${platformData.platformNameLowerCase}${constants_1.AnalyticsEventLabelDelimiter}${frameworkVersion}`,
|
|
155
117
|
});
|
|
156
118
|
});
|
|
@@ -161,4 +123,3 @@ __decorate([
|
|
|
161
123
|
], AddPlatformService.prototype, "addNativePlatform", null);
|
|
162
124
|
exports.AddPlatformService = AddPlatformService;
|
|
163
125
|
yok_1.injector.register("addPlatformService", AddPlatformService);
|
|
164
|
-
//# sourceMappingURL=add-platform-service.js.map
|
|
@@ -20,11 +20,12 @@ const helpers_1 = require("../../common/helpers");
|
|
|
20
20
|
const decorators_1 = require("../../common/decorators");
|
|
21
21
|
const yok_1 = require("../../common/yok");
|
|
22
22
|
class PrepareNativePlatformService {
|
|
23
|
-
constructor($hooksService, $nodeModulesBuilder, $projectChangesService, $metadataFilteringService) {
|
|
23
|
+
constructor($hooksService, $nodeModulesBuilder, $projectChangesService, $metadataFilteringService, $options) {
|
|
24
24
|
this.$hooksService = $hooksService;
|
|
25
25
|
this.$nodeModulesBuilder = $nodeModulesBuilder;
|
|
26
26
|
this.$projectChangesService = $projectChangesService;
|
|
27
27
|
this.$metadataFilteringService = $metadataFilteringService;
|
|
28
|
+
this.$options = $options;
|
|
28
29
|
}
|
|
29
30
|
prepareNativePlatform(platformData, projectData, prepareData) {
|
|
30
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -40,8 +41,10 @@ class PrepareNativePlatformService {
|
|
|
40
41
|
if (changesInfo.hasChanges) {
|
|
41
42
|
yield this.cleanProject(platformData, { release });
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
if (!this.$options.nativeHost) {
|
|
45
|
+
platformData.platformProjectService.prepareAppResources(projectData);
|
|
46
|
+
}
|
|
47
|
+
if (hasChangesRequirePrepare || this.$options.nativeHost) {
|
|
45
48
|
yield platformData.platformProjectService.prepareProject(projectData, prepareData);
|
|
46
49
|
}
|
|
47
50
|
if (hasNativeModulesChange) {
|
|
@@ -56,21 +59,19 @@ class PrepareNativePlatformService {
|
|
|
56
59
|
this.$metadataFilteringService.generateMetadataFilters(projectData, platformData.platformNameLowerCase);
|
|
57
60
|
}
|
|
58
61
|
platformData.platformProjectService.interpolateConfigurationFile(projectData);
|
|
59
|
-
yield this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: "3"
|
|
62
|
+
yield this.$projectChangesService.setNativePlatformStatus(platformData, projectData, { nativePlatformStatus: "3" });
|
|
60
63
|
return hasChanges;
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
66
|
cleanProject(platformData, options) {
|
|
64
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
// android build artifacts need to be cleaned up
|
|
66
|
-
// when switching between debug, release and webpack builds
|
|
67
68
|
if (platformData.platformNameLowerCase !== "android") {
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
70
71
|
const previousPrepareInfo = this.$projectChangesService.getPrepareInfo(platformData);
|
|
71
72
|
if (!previousPrepareInfo ||
|
|
72
73
|
previousPrepareInfo.nativePlatformStatus !==
|
|
73
|
-
"3"
|
|
74
|
+
"3") {
|
|
74
75
|
return;
|
|
75
76
|
}
|
|
76
77
|
const { release: previousWasRelease } = previousPrepareInfo;
|
|
@@ -87,4 +88,3 @@ __decorate([
|
|
|
87
88
|
], PrepareNativePlatformService.prototype, "prepareNativePlatform", null);
|
|
88
89
|
exports.PrepareNativePlatformService = PrepareNativePlatformService;
|
|
89
90
|
yok_1.injector.register("prepareNativePlatformService", PrepareNativePlatformService);
|
|
90
|
-
//# sourceMappingURL=prepare-native-platform-service.js.map
|
|
@@ -20,9 +20,7 @@ const helpers_1 = require("../common/helpers");
|
|
|
20
20
|
const os_1 = require("os");
|
|
21
21
|
const yok_1 = require("../common/yok");
|
|
22
22
|
class PlatformEnvironmentRequirements {
|
|
23
|
-
constructor($doctorService, $errors, $analyticsService,
|
|
24
|
-
// @ts-ignore - required by the hook helper!
|
|
25
|
-
$injector) {
|
|
23
|
+
constructor($doctorService, $errors, $analyticsService, $injector) {
|
|
26
24
|
this.$doctorService = $doctorService;
|
|
27
25
|
this.$errors = $errors;
|
|
28
26
|
this.$analyticsService = $analyticsService;
|
|
@@ -34,7 +32,7 @@ class PlatformEnvironmentRequirements {
|
|
|
34
32
|
const selectedOption = null;
|
|
35
33
|
if (process.env.NS_SKIP_ENV_CHECK) {
|
|
36
34
|
yield this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
37
|
-
action: "Check Environment Requirements"
|
|
35
|
+
action: "Check Environment Requirements",
|
|
38
36
|
additionalData: "Skipped: NS_SKIP_ENV_CHECK is set",
|
|
39
37
|
});
|
|
40
38
|
return {
|
|
@@ -49,9 +47,8 @@ class PlatformEnvironmentRequirements {
|
|
|
49
47
|
forceCheck: input.forceCheck,
|
|
50
48
|
});
|
|
51
49
|
if (!canExecute) {
|
|
52
|
-
// if (!isInteractive()) {
|
|
53
50
|
yield this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
54
|
-
action: "Check Environment Requirements"
|
|
51
|
+
action: "Check Environment Requirements",
|
|
55
52
|
additionalData: "Non-interactive terminal, unable to execute local builds.",
|
|
56
53
|
});
|
|
57
54
|
this.fail(this.getNonInteractiveConsoleMessage(platform));
|
|
@@ -72,13 +69,14 @@ class PlatformEnvironmentRequirements {
|
|
|
72
69
|
].join(os_1.EOL);
|
|
73
70
|
}
|
|
74
71
|
getEnvVerificationMessage(platform) {
|
|
75
|
-
// map process.platform to OS name used in docs
|
|
76
72
|
const os = {
|
|
77
73
|
linux: "linux",
|
|
78
74
|
win32: "windows",
|
|
79
75
|
darwin: "macos",
|
|
80
76
|
}[process.platform];
|
|
81
|
-
const anchor = platform
|
|
77
|
+
const anchor = platform
|
|
78
|
+
? `#setting-up-${os}-for-${platform.toLowerCase()}`
|
|
79
|
+
: "";
|
|
82
80
|
return (`Verify that your environment is configured according to the system requirements described at\n` +
|
|
83
81
|
`https://docs.nativescript.org/setup/${os}${anchor}.`);
|
|
84
82
|
}
|
|
@@ -89,4 +87,3 @@ __decorate([
|
|
|
89
87
|
], PlatformEnvironmentRequirements.prototype, "checkEnvironmentRequirements", null);
|
|
90
88
|
exports.PlatformEnvironmentRequirements = PlatformEnvironmentRequirements;
|
|
91
89
|
yok_1.injector.register("platformEnvironmentRequirements", PlatformEnvironmentRequirements);
|
|
92
|
-
//# sourceMappingURL=platform-environment-requirements.js.map
|
|
@@ -64,7 +64,6 @@ class PluginsService {
|
|
|
64
64
|
const realNpmPackageJson = this.$fs.readJson(pathToRealNpmPackageJson);
|
|
65
65
|
if (realNpmPackageJson.nativescript) {
|
|
66
66
|
const pluginData = this.convertToPluginData(realNpmPackageJson, projectData.projectDir);
|
|
67
|
-
// Validate
|
|
68
67
|
const action = (pluginDestinationPath, platform, platformData) => __awaiter(this, void 0, void 0, function* () {
|
|
69
68
|
this.isPluginDataValidForPlatform(pluginData, platform, projectData);
|
|
70
69
|
});
|
|
@@ -153,9 +152,6 @@ class PluginsService {
|
|
|
153
152
|
paths: [projectData.projectDir],
|
|
154
153
|
});
|
|
155
154
|
if (pathToPackage) {
|
|
156
|
-
// return false if the dependency is installed - we'll filter out boolean values
|
|
157
|
-
// and end up with an array of dep names that are not installed if we end up
|
|
158
|
-
// inside the catch block.
|
|
159
155
|
return false;
|
|
160
156
|
}
|
|
161
157
|
this.$logger.trace(`${dep} is not installed, or couldn't be found`);
|
|
@@ -191,9 +187,6 @@ class PluginsService {
|
|
|
191
187
|
return productionPlugins
|
|
192
188
|
.map((plugin) => this.convertToPluginData(plugin, projectData.projectDir))
|
|
193
189
|
.filter((item, idx, self) => {
|
|
194
|
-
// Filter out duplicates to speed up build times by not building the same dependency
|
|
195
|
-
// multiple times. One possible downside is that if there are different versions
|
|
196
|
-
// of the same native dependency only the first one in the array will be built
|
|
197
190
|
return self.findIndex((p) => p.name === item.name) === idx;
|
|
198
191
|
});
|
|
199
192
|
}
|
|
@@ -225,11 +218,9 @@ class PluginsService {
|
|
|
225
218
|
const dependenciesGroupedByName = _.groupBy(productionDependencies, (p) => p.name);
|
|
226
219
|
_.each(dependenciesGroupedByName, (dependencyOccurrences, dependencyName) => {
|
|
227
220
|
if (dependencyOccurrences.length > 1) {
|
|
228
|
-
// the dependency exists multiple times in node_modules
|
|
229
221
|
const dependencyOccurrencesGroupedByVersion = _.groupBy(dependencyOccurrences, (g) => g.version);
|
|
230
222
|
const versions = _.keys(dependencyOccurrencesGroupedByVersion);
|
|
231
223
|
if (versions.length === 1) {
|
|
232
|
-
// all dependencies with this name have the same version
|
|
233
224
|
this.$logger.trace(`Detected same versions (${_.first(versions)}) of the ${dependencyName} installed at locations: ${_.map(dependencyOccurrences, (d) => d.directory).join(", ")}`);
|
|
234
225
|
}
|
|
235
226
|
else {
|
|
@@ -255,11 +246,9 @@ class PluginsService {
|
|
|
255
246
|
const dependenciesGroupedByFrameworkName = _.groupBy(dependenciesWithFrameworks, (d) => d.frameworkName);
|
|
256
247
|
_.each(dependenciesGroupedByFrameworkName, (dependencyOccurrences, frameworkName) => {
|
|
257
248
|
if (dependencyOccurrences.length > 1) {
|
|
258
|
-
// A framework exists multiple times in node_modules
|
|
259
249
|
const groupedByName = _.groupBy(dependencyOccurrences, (d) => d.name);
|
|
260
250
|
const pluginsNames = _.keys(groupedByName);
|
|
261
251
|
if (pluginsNames.length > 1) {
|
|
262
|
-
// fail - the same framework is installed by different dependencies.
|
|
263
252
|
const locations = dependencyOccurrences.map((d) => d.frameworkLocation);
|
|
264
253
|
let msg = `Detected the framework ${frameworkName} is installed from multiple plugins at locations:\n${locations.join("\n")}\n`;
|
|
265
254
|
msg += this.getHelpMessage(projectDir);
|
|
@@ -269,7 +258,6 @@ class PluginsService {
|
|
|
269
258
|
const dependencyOccurrencesGroupedByVersion = _.groupBy(dependencyOccurrences, (g) => g.version);
|
|
270
259
|
const versions = _.keys(dependencyOccurrencesGroupedByVersion);
|
|
271
260
|
if (versions.length === 1) {
|
|
272
|
-
// all dependencies with this name have the same version
|
|
273
261
|
this.$logger.warn(`Detected the framework ${frameworkName} is installed multiple times from the same versions of plugin (${_.first(versions)}) at locations: ${_.map(dependencyOccurrences, (d) => d.directory).join(", ")}`);
|
|
274
262
|
const selectedPackage = _.minBy(dependencyOccurrences, (d) => d.depth);
|
|
275
263
|
this.$logger.info(color_1.color.green(`CLI will use only the native code from '${selectedPackage.directory}'.`));
|
|
@@ -321,7 +309,7 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
|
|
|
321
309
|
pluginData.isPlugin = !!cacheData.nativescript;
|
|
322
310
|
pluginData.pluginPlatformsFolderPath = (platform) => {
|
|
323
311
|
if (this.$mobileHelper.isvisionOSPlatform(platform)) {
|
|
324
|
-
platform = "ios"
|
|
312
|
+
platform = "ios";
|
|
325
313
|
}
|
|
326
314
|
return path.join(pluginData.fullPath, "platforms", platform.toLowerCase());
|
|
327
315
|
};
|
|
@@ -378,7 +366,6 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
|
|
|
378
366
|
return _.keys(require(packageJsonFilePath).dependencies);
|
|
379
367
|
}
|
|
380
368
|
getNodeModuleData(module, projectDir) {
|
|
381
|
-
// module can be modulePath or moduleName
|
|
382
369
|
if (!this.$fs.exists(module) || path.basename(module) !== "package.json") {
|
|
383
370
|
module = this.getPackageJsonFilePathForModule(module, projectDir);
|
|
384
371
|
}
|
|
@@ -416,7 +403,7 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
|
|
|
416
403
|
});
|
|
417
404
|
}
|
|
418
405
|
parseNpmCommandResult(npmCommandResult) {
|
|
419
|
-
return npmCommandResult.split("@")[0];
|
|
406
|
+
return npmCommandResult.split("@")[0];
|
|
420
407
|
}
|
|
421
408
|
executeForAllInstalledPlatforms(action, projectData) {
|
|
422
409
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -425,7 +412,7 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
|
|
|
425
412
|
const isPlatformInstalled = this.$fs.exists(path.join(projectData.platformsDir, platform.toLowerCase()));
|
|
426
413
|
if (isPlatformInstalled) {
|
|
427
414
|
const platformData = this.$platformsDataService.getPlatformData(platform.toLowerCase(), projectData);
|
|
428
|
-
const pluginDestinationPath = path.join(platformData.appDestinationDirectoryPath,
|
|
415
|
+
const pluginDestinationPath = path.join(platformData.appDestinationDirectoryPath, this.$options.nativeHostModule, "tns_modules");
|
|
429
416
|
yield action(pluginDestinationPath, platform.toLowerCase(), platformData);
|
|
430
417
|
}
|
|
431
418
|
}
|
|
@@ -433,8 +420,6 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
|
|
|
433
420
|
}
|
|
434
421
|
getInstalledFrameworkVersion(platform, projectData) {
|
|
435
422
|
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, platform);
|
|
436
|
-
// const platformData = this.$platformsDataService.getPlatformData(platform, projectData);
|
|
437
|
-
// const frameworkData = this.$projectDataService.getNSValue(projectData.projectDir, platformData.frameworkPackageName);
|
|
438
423
|
return runtimePackage.version;
|
|
439
424
|
}
|
|
440
425
|
isPluginDataValidForPlatform(pluginData, platform, projectData) {
|
|
@@ -465,6 +450,9 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
|
|
|
465
450
|
});
|
|
466
451
|
}
|
|
467
452
|
getAllPluginsNativeHashes(pathToPluginsBuildFile) {
|
|
453
|
+
if (this.$options.nativeHost) {
|
|
454
|
+
return {};
|
|
455
|
+
}
|
|
468
456
|
let data = {};
|
|
469
457
|
if (this.$fs.exists(pathToPluginsBuildFile)) {
|
|
470
458
|
data = this.$fs.readJson(pathToPluginsBuildFile);
|
|
@@ -472,6 +460,9 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
|
|
|
472
460
|
return data;
|
|
473
461
|
}
|
|
474
462
|
setPluginNativeHashes(opts) {
|
|
463
|
+
if (this.$options.nativeHost) {
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
475
466
|
opts.allPluginsNativeHashes[opts.pluginData.name] =
|
|
476
467
|
opts.currentPluginNativeHashes;
|
|
477
468
|
this.$fs.writeJson(opts.pathToPluginsBuildFile, opts.allPluginsNativeHashes);
|
|
@@ -490,4 +481,3 @@ PluginsService.LOCK_FILES = [
|
|
|
490
481
|
];
|
|
491
482
|
exports.PluginsService = PluginsService;
|
|
492
483
|
yok_1.injector.register("pluginsService", PluginsService);
|
|
493
|
-
//# sourceMappingURL=plugins-service.js.map
|
|
@@ -46,7 +46,6 @@ ProjectBackupService.Backup = class Backup {
|
|
|
46
46
|
backedUpPaths.push(pathToBackup);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
// create backup.json
|
|
50
49
|
this.$super.$fs.writeJson(path.resolve(this.backupDir, "_backup.json"), {
|
|
51
50
|
name: this.name,
|
|
52
51
|
paths: backedUpPaths,
|
|
@@ -67,7 +66,6 @@ ProjectBackupService.Backup = class Backup {
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
this.$super.$logger.trace(backupData);
|
|
70
|
-
// restore files
|
|
71
69
|
return this;
|
|
72
70
|
}
|
|
73
71
|
isUpToDate() {
|
|
@@ -77,7 +75,6 @@ ProjectBackupService.Backup = class Backup {
|
|
|
77
75
|
}
|
|
78
76
|
for (const pathToBackup of backupData.paths) {
|
|
79
77
|
const sourcePath = path.resolve(this.backupDir, pathToBackup);
|
|
80
|
-
// if any of the files don't exist the backup is not up-to-date
|
|
81
78
|
if (!this.$super.$fs.exists(sourcePath)) {
|
|
82
79
|
return false;
|
|
83
80
|
}
|
|
@@ -115,4 +112,3 @@ ProjectBackupService.Backup = class Backup {
|
|
|
115
112
|
};
|
|
116
113
|
exports.ProjectBackupService = ProjectBackupService;
|
|
117
114
|
yok_1.injector.register("projectBackupService", ProjectBackupService);
|
|
118
|
-
//# sourceMappingURL=project-backup-service.js.map
|
|
@@ -37,10 +37,11 @@ class ProjectChangesInfo {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
class ProjectChangesService {
|
|
40
|
-
constructor($devicePlatformsConstants, $fs, $logger, $hooksService, $nodeModulesDependenciesBuilder) {
|
|
40
|
+
constructor($devicePlatformsConstants, $fs, $logger, $options, $hooksService, $nodeModulesDependenciesBuilder) {
|
|
41
41
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
42
42
|
this.$fs = $fs;
|
|
43
43
|
this.$logger = $logger;
|
|
44
|
+
this.$options = $options;
|
|
44
45
|
this.$hooksService = $hooksService;
|
|
45
46
|
this.$nodeModulesDependenciesBuilder = $nodeModulesDependenciesBuilder;
|
|
46
47
|
}
|
|
@@ -73,7 +74,6 @@ class ProjectChangesService {
|
|
|
73
74
|
this._prepareInfo.projectFileHash = this.getProjectFileStrippedHash(projectData.projectDir, platformData);
|
|
74
75
|
this._changesInfo.nativeChanged = this.isProjectFileChanged(projectData.projectDir, platformData);
|
|
75
76
|
}
|
|
76
|
-
// If this causes too much rebuilds of the plugins or uncecessary builds for Android, move overrideCocoapods to prepareInfo.
|
|
77
77
|
this._changesInfo.nsConfigChanged = this.filesChanged([
|
|
78
78
|
path.join(projectData.projectDir, constants_1.CONFIG_FILE_NAME_JS),
|
|
79
79
|
path.join(projectData.projectDir, constants_1.CONFIG_FILE_NAME_TS),
|
|
@@ -131,6 +131,9 @@ class ProjectChangesService {
|
|
|
131
131
|
return prepareInfoFilePath;
|
|
132
132
|
}
|
|
133
133
|
getPrepareInfo(platformData) {
|
|
134
|
+
if (this.$options.nativeHost) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
134
137
|
const prepareInfoFilePath = this.getPrepareInfoFilePath(platformData);
|
|
135
138
|
let prepareInfo = null;
|
|
136
139
|
if (this.$fs.exists(prepareInfoFilePath)) {
|
|
@@ -148,6 +151,9 @@ class ProjectChangesService {
|
|
|
148
151
|
if (!this._prepareInfo) {
|
|
149
152
|
yield this.ensurePrepareInfo(platformData, projectData, prepareData);
|
|
150
153
|
}
|
|
154
|
+
if (this.$options.nativeHost) {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
151
157
|
const prepareInfoFilePath = this.getPrepareInfoFilePath(platformData);
|
|
152
158
|
this.$fs.writeJson(prepareInfoFilePath, this._prepareInfo);
|
|
153
159
|
});
|
|
@@ -157,7 +163,7 @@ class ProjectChangesService {
|
|
|
157
163
|
this._prepareInfo = this._prepareInfo || this.getPrepareInfo(platformData);
|
|
158
164
|
if (this._prepareInfo &&
|
|
159
165
|
addedPlatform.nativePlatformStatus ===
|
|
160
|
-
"3"
|
|
166
|
+
"3") {
|
|
161
167
|
this._prepareInfo.nativePlatformStatus =
|
|
162
168
|
addedPlatform.nativePlatformStatus;
|
|
163
169
|
}
|
|
@@ -183,8 +189,8 @@ class ProjectChangesService {
|
|
|
183
189
|
return false;
|
|
184
190
|
}
|
|
185
191
|
const nativePlatformStatus = !prepareData.nativePrepare || !prepareData.nativePrepare.skipNativePrepare
|
|
186
|
-
? "2"
|
|
187
|
-
: "1"
|
|
192
|
+
? "2"
|
|
193
|
+
: "1";
|
|
188
194
|
this._prepareInfo = {
|
|
189
195
|
time: "",
|
|
190
196
|
nativePlatformStatus,
|
|
@@ -208,13 +214,6 @@ class ProjectChangesService {
|
|
|
208
214
|
const projectFileContents = this.$fs.readJson(projectFilePath);
|
|
209
215
|
const relevantProperties = ["dependencies"];
|
|
210
216
|
const projectFileStrippedContents = _.pick(projectFileContents, relevantProperties);
|
|
211
|
-
// _(this.$devicePlatformsConstants)
|
|
212
|
-
// .keys()
|
|
213
|
-
// .map(k => k.toLowerCase())
|
|
214
|
-
// .difference([platformData.platformNameLowerCase])
|
|
215
|
-
// .each(otherPlatform => {
|
|
216
|
-
// delete projectFileContents.nativescript[`tns-${otherPlatform}`];
|
|
217
|
-
// });
|
|
218
217
|
return (0, helpers_1.getHash)(JSON.stringify(projectFileStrippedContents));
|
|
219
218
|
}
|
|
220
219
|
isProjectFileChanged(projectDir, platformData) {
|
|
@@ -280,4 +279,3 @@ __decorate([
|
|
|
280
279
|
], ProjectChangesService.prototype, "checkForChanges", null);
|
|
281
280
|
exports.ProjectChangesService = ProjectChangesService;
|
|
282
281
|
yok_1.injector.register("projectChangesService", ProjectChangesService);
|
|
283
|
-
//# sourceMappingURL=project-changes-service.js.map
|
|
@@ -38,7 +38,6 @@ class ProjectCleanupService {
|
|
|
38
38
|
success = success && cleanRes.ok;
|
|
39
39
|
}
|
|
40
40
|
if (!(options === null || options === void 0 ? void 0 : options.silent)) {
|
|
41
|
-
// required to print an empty line for the spinner to not replace the last status... (probably a bug in the spinners)
|
|
42
41
|
console.log();
|
|
43
42
|
}
|
|
44
43
|
if (stats) {
|
|
@@ -101,4 +100,3 @@ class ProjectCleanupService {
|
|
|
101
100
|
}
|
|
102
101
|
exports.ProjectCleanupService = ProjectCleanupService;
|
|
103
102
|
yok_1.injector.register("projectCleanupService", ProjectCleanupService);
|
|
104
|
-
//# sourceMappingURL=project-cleanup-service.js.map
|