nativescript 9.0.4-dev.0 → 9.0.4-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android-tools-info.js +0 -12
- package/lib/base-package-manager.js +0 -7
- package/lib/bootstrap.js +1 -5
- package/lib/bun-package-manager.js +1 -14
- package/lib/color.js +0 -4
- package/lib/commands/add-platform.js +0 -1
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.js +0 -3
- package/lib/commands/build.js +2 -3
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.js +0 -5
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.js +1 -6
- package/lib/commands/deploy.js +2 -3
- package/lib/commands/embedding/embed.js +0 -7
- package/lib/commands/extensibility/install-extension.js +0 -1
- package/lib/commands/extensibility/list-extensions.js +0 -1
- package/lib/commands/extensibility/uninstall-extension.js +0 -1
- package/lib/commands/fonts.js +0 -1
- package/lib/commands/generate-assets.js +0 -1
- package/lib/commands/generate-help.js +0 -1
- package/lib/commands/generate.js +1 -48
- package/lib/commands/hooks/common.js +1 -2
- package/lib/commands/hooks/hooks-lock.js +0 -1
- package/lib/commands/hooks/hooks.js +0 -1
- package/lib/commands/info.js +0 -1
- package/lib/commands/install.js +0 -1
- package/lib/commands/list-platforms.js +0 -1
- package/lib/commands/migrate.js +0 -1
- package/lib/commands/native-add.js +0 -5
- package/lib/commands/platform-clean.js +0 -1
- package/lib/commands/plugin/add-plugin.js +0 -1
- package/lib/commands/plugin/build-plugin.js +0 -1
- package/lib/commands/plugin/create-plugin.js +0 -5
- package/lib/commands/plugin/list-plugins.js +0 -1
- package/lib/commands/plugin/remove-plugin.js +0 -2
- package/lib/commands/plugin/update-plugin.js +0 -1
- package/lib/commands/post-install.js +0 -6
- package/lib/commands/prepare.js +3 -4
- package/lib/commands/preview.js +0 -2
- package/lib/commands/remove-platform.js +0 -1
- package/lib/commands/resources/resources-update.js +0 -2
- package/lib/commands/run.js +0 -1
- package/lib/commands/setup.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/commands/test-init.js +0 -4
- package/lib/commands/test.js +2 -9
- package/lib/commands/typings.js +1 -2
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.js +0 -2
- package/lib/commands/widget.js +1 -20
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.js +0 -3
- package/lib/common/codeGeneration/code-entity.js +0 -1
- package/lib/common/codeGeneration/code-printer.js +0 -1
- package/lib/common/command-params.js +0 -1
- package/lib/common/commands/analytics.js +0 -3
- package/lib/common/commands/autocompletion.js +0 -3
- package/lib/common/commands/device/device-log-stream.js +0 -1
- package/lib/common/commands/device/get-file.js +0 -2
- package/lib/common/commands/device/list-applications.js +0 -1
- package/lib/common/commands/device/list-devices.js +0 -3
- package/lib/common/commands/device/list-files.js +0 -2
- package/lib/common/commands/device/put-file.js +0 -2
- package/lib/common/commands/device/run-application.js +0 -1
- package/lib/common/commands/device/stop-application.js +0 -1
- package/lib/common/commands/device/uninstall-application.js +0 -1
- package/lib/common/commands/doctor.js +2 -3
- package/lib/common/commands/generate-messages.js +0 -1
- package/lib/common/commands/help.js +0 -1
- package/lib/common/commands/package-manager-get.js +0 -1
- package/lib/common/commands/package-manager-set.js +0 -1
- package/lib/common/commands/post-install.js +0 -1
- package/lib/common/commands/preuninstall.js +2 -11
- package/lib/common/commands/proxy/proxy-base.js +0 -4
- package/lib/common/commands/proxy/proxy-clear.js +0 -1
- package/lib/common/commands/proxy/proxy-get.js +0 -1
- package/lib/common/commands/proxy/proxy-set.js +0 -1
- package/lib/common/common-lib.js +0 -1
- package/lib/common/constants.js +0 -11
- package/lib/common/decorators.js +0 -48
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/errors.js +3 -13
- package/lib/common/file-system.js +2 -13
- package/lib/common/header.js +0 -3
- package/lib/common/helpers.js +3 -89
- package/lib/common/host-info.js +0 -4
- package/lib/common/http-client.js +0 -20
- package/lib/common/logger/appenders/cli-appender.js +0 -4
- package/lib/common/logger/appenders/emit-appender.js +0 -4
- package/lib/common/logger/layouts/cli-layout.js +0 -1
- package/lib/common/logger/logger.js +0 -5
- package/lib/common/messages/messages.js +0 -6
- package/lib/common/mobile/android/android-application-manager.js +1 -20
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
- package/lib/common/mobile/android/android-debug-bridge.js +0 -6
- package/lib/common/mobile/android/android-device-file-system.js +0 -4
- package/lib/common/mobile/android/android-device-hash-service.js +0 -3
- package/lib/common/mobile/android/android-device.js +0 -8
- package/lib/common/mobile/android/android-emulator-services.js +1 -2
- package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
- package/lib/common/mobile/android/android-log-filter.js +0 -4
- package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
- package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
- package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +0 -13
- package/lib/common/mobile/application-manager-base.js +0 -6
- package/lib/common/mobile/device-emitter.js +0 -4
- package/lib/common/mobile/device-log-emitter.js +0 -1
- package/lib/common/mobile/device-log-provider-base.js +0 -1
- package/lib/common/mobile/device-log-provider.js +0 -23
- package/lib/common/mobile/device-platforms-constants.js +0 -1
- package/lib/common/mobile/emulator-helper.js +0 -3
- package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
- package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
- package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
- package/lib/common/mobile/ios/device/ios-device.js +0 -4
- package/lib/common/mobile/ios/ios-device-base.js +0 -1
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
- package/lib/common/mobile/ios/ios-log-filter.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
- package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
- package/lib/common/mobile/log-filter.js +0 -2
- package/lib/common/mobile/logging-levels.js +0 -1
- package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
- package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
- package/lib/common/mobile/mobile-core/devices-service.js +0 -69
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-helper.js +0 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
- package/lib/common/opener.js +0 -1
- package/lib/common/os-info.js +0 -1
- package/lib/common/plist-parser.js +0 -1
- package/lib/common/project-helper.js +0 -1
- package/lib/common/prompter.js +1 -9
- package/lib/common/queue.js +0 -1
- package/lib/common/resource-loader.js +0 -1
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +1 -2
- package/lib/common/services/commands-service.js +6 -17
- package/lib/common/services/help-service.js +3 -11
- package/lib/common/services/hooks-service.js +0 -13
- package/lib/common/services/ios-notification-service.js +0 -1
- package/lib/common/services/json-file-settings-service.js +0 -6
- package/lib/common/services/lock-service.js +0 -6
- package/lib/common/services/message-contract-generator.js +0 -1
- package/lib/common/services/messages-service.js +0 -1
- package/lib/common/services/micro-templating-service.js +0 -6
- package/lib/common/services/net-service.js +0 -3
- package/lib/common/services/project-files-manager.js +0 -5
- package/lib/common/services/project-files-provider-base.js +0 -1
- package/lib/common/services/proxy-service.js +0 -1
- package/lib/common/services/qr.js +0 -1
- package/lib/common/services/settings-service.js +0 -1
- package/lib/common/services/xcode-select-service.js +0 -1
- package/lib/common/utils.js +0 -1
- package/lib/common/validators/project-name-validator.js +0 -1
- package/lib/common/validators/validation-result.js +0 -1
- package/lib/common/verify-node-version.js +1 -8
- package/lib/common/yok.js +11 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +0 -53
- package/lib/controllers/build-controller.js +3 -4
- package/lib/controllers/debug-controller.js +3 -8
- package/lib/controllers/deploy-controller.js +0 -1
- package/lib/controllers/migrate-controller.js +4 -90
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +4 -17
- package/lib/controllers/run-controller.js +1 -17
- package/lib/controllers/update-controller-base.js +0 -1
- package/lib/controllers/update-controller.js +0 -11
- package/lib/data/build-data.js +0 -1
- package/lib/data/controller-data-base.js +0 -1
- package/lib/data/debug-data.js +0 -1
- package/lib/data/platform-data.js +0 -1
- package/lib/data/prepare-data.js +0 -1
- package/lib/data/run-data.js +0 -1
- package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
- package/lib/detached-processes/cleanup-process.js +14 -18
- package/lib/detached-processes/file-log-service.js +1 -2
- package/lib/device-path-provider.js +0 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
- package/lib/device-sockets/ios/notification.js +0 -3
- package/lib/device-sockets/ios/socket-request-executor.js +0 -3
- package/lib/helpers/android-bundle-validator-helper.js +1 -2
- package/lib/helpers/deploy-command-helper.js +0 -1
- package/lib/helpers/key-command-helper.js +2 -4
- package/lib/helpers/livesync-command-helper.js +1 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +2 -3
- package/lib/helpers/package-path-helper.js +0 -1
- package/lib/helpers/platform-command-helper.js +2 -7
- package/lib/helpers/version-validator-helper.js +0 -1
- package/lib/key-commands/bootstrap.js +2 -3
- package/lib/key-commands/index.js +4 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +1 -11
- package/lib/node/pbxproj-dom-xcode.js +0 -1
- package/lib/node/xcode.js +0 -1
- package/lib/node-package-manager.js +1 -11
- package/lib/options.js +119 -144
- package/lib/package-installation-manager.js +1 -8
- package/lib/package-manager.js +0 -2
- package/lib/platform-command-param.js +0 -1
- package/lib/pnpm-package-manager.js +1 -4
- package/lib/project-data.js +0 -12
- package/lib/providers/project-files-provider.js +0 -1
- package/lib/resolvers/livesync-service-resolver.js +0 -1
- package/lib/services/analytics/analytics-broker-process.js +6 -10
- package/lib/services/analytics/analytics-broker.js +1 -2
- package/lib/services/analytics/analytics-service.js +25 -29
- package/lib/services/analytics/google-analytics-provider.js +12 -13
- package/lib/services/analytics-settings-service.js +0 -5
- package/lib/services/android/android-bundle-tool-service.js +0 -1
- package/lib/services/android/gradle-build-args-service.js +0 -3
- package/lib/services/android/gradle-build-service.js +0 -1
- package/lib/services/android/gradle-command-service.js +0 -1
- package/lib/services/android-device-debug-service.js +0 -6
- package/lib/services/android-plugin-build-service.js +2 -31
- package/lib/services/android-project-service.js +4 -71
- package/lib/services/android-resources-migration-service.js +0 -7
- package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
- package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
- package/lib/services/assets-generation/assets-generation-service.js +5 -10
- package/lib/services/build-artifacts-service.js +1 -2
- package/lib/services/build-data-service.js +0 -1
- package/lib/services/build-info-file-service.js +0 -1
- package/lib/services/bundler/bundler-compiler-service.js +1 -68
- package/lib/services/bundler/bundler.js +0 -1
- package/lib/services/cleanup-service.js +9 -13
- package/lib/services/cocoapods-platform-manager.js +0 -9
- package/lib/services/cocoapods-service.js +1 -21
- package/lib/services/debug-data-service.js +0 -1
- package/lib/services/debug-service-base.js +0 -7
- package/lib/services/device/device-install-app-service.js +1 -2
- package/lib/services/doctor-service.js +6 -21
- package/lib/services/extensibility-service.js +0 -8
- package/lib/services/files-hash-service.js +0 -1
- package/lib/services/hmr-status-service.js +0 -2
- package/lib/services/info-service.js +0 -1
- package/lib/services/initialize-service.js +1 -5
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.js +10 -7
- package/lib/services/ios/spm-service.js +0 -18
- package/lib/services/ios/xcodebuild-args-service.js +0 -11
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +1 -2
- package/lib/services/ios-debugger-port-service.js +0 -1
- package/lib/services/ios-device-debug-service.js +0 -1
- package/lib/services/ios-entitlements-service.js +0 -1
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.js +4 -6
- package/lib/services/ios-project-service.js +1 -100
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +0 -1
- package/lib/services/ip-service.js +0 -2
- package/lib/services/itmstransporter-service.js +0 -1
- package/lib/services/karma-execution.js +0 -2
- package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
- package/lib/services/livesync/android-device-livesync-service.js +0 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
- package/lib/services/livesync/android-livesync-service.js +0 -1
- package/lib/services/livesync/android-livesync-tool.js +0 -4
- package/lib/services/livesync/device-livesync-service-base.js +0 -2
- package/lib/services/livesync/ios-device-livesync-service.js +0 -7
- package/lib/services/livesync/ios-livesync-service.js +0 -2
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.js +0 -5
- package/lib/services/livesync-process-data-service.js +0 -1
- package/lib/services/log-parser-service.js +0 -1
- package/lib/services/log-source-map-service.js +0 -15
- package/lib/services/marking-mode-service.js +5 -8
- package/lib/services/metadata-filtering-service.js +0 -1
- package/lib/services/npm-config-service.js +0 -4
- package/lib/services/pacote-service.js +0 -7
- package/lib/services/performance-service.js +1 -3
- package/lib/services/platform/add-platform-service.js +2 -49
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.js +2 -5
- package/lib/services/platform-environment-requirements.js +3 -8
- package/lib/services/platform-project-service-base.js +0 -1
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.js +2 -20
- package/lib/services/prepare-data-service.js +0 -1
- package/lib/services/project-backup-service.js +0 -4
- package/lib/services/project-changes-service.js +3 -14
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +2 -21
- package/lib/services/project-data-service.js +7 -36
- package/lib/services/project-name-service.js +0 -1
- package/lib/services/project-service.js +0 -10
- package/lib/services/project-templates-service.js +2 -3
- package/lib/services/qr-code-terminal-service.js +0 -1
- package/lib/services/require-service.js +0 -1
- package/lib/services/start-service.js +0 -1
- package/lib/services/temp-service.js +0 -3
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.js +2 -9
- package/lib/services/test-initialization-service.js +0 -4
- package/lib/services/timeline-profiler-service.js +0 -1
- package/lib/services/user-settings-service.js +0 -1
- package/lib/services/versions-service.js +4 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/xcconfig-service.js +0 -2
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +1 -2
- package/lib/tools/config-manipulation/config-transformer.js +0 -12
- package/lib/tools/node-modules/node-modules-builder.js +0 -1
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
- package/lib/yarn-package-manager.js +0 -1
- package/lib/yarn2-package-manager.js +0 -3
- package/package.json +1 -1
|
@@ -18,40 +18,7 @@ const constants_1 = require("../common/constants");
|
|
|
18
18
|
const helpers_1 = require("../common/helpers");
|
|
19
19
|
const decorators_1 = require(".././common/decorators");
|
|
20
20
|
const yok_1 = require("../common/yok");
|
|
21
|
-
|
|
22
|
-
// we sort the native dependencies topologically to make sure they are processed in the right order
|
|
23
|
-
// native dependenciess need to be sorted so the deepst dependencies are built before it's parents
|
|
24
|
-
//
|
|
25
|
-
// for example, given this dep structure (assuming these are all native dependencies that need to be built)
|
|
26
|
-
// (note: we list all dependencies at the root level, so the leaf nodes are essentially references to the root nodes)
|
|
27
|
-
//
|
|
28
|
-
// |- dep1
|
|
29
|
-
// |- dep2
|
|
30
|
-
// |- |- dep3
|
|
31
|
-
// |- |- dep4
|
|
32
|
-
// |- |- |- dep5
|
|
33
|
-
// |- dep3
|
|
34
|
-
// |- dep4
|
|
35
|
-
// |- |- dep5
|
|
36
|
-
// |- dep5
|
|
37
|
-
//
|
|
38
|
-
// It is sorted:
|
|
39
|
-
//
|
|
40
|
-
// |- dep1
|
|
41
|
-
// |- dep3
|
|
42
|
-
// |- dep5
|
|
43
|
-
// |- dep4 # depends on dep5, so dep5 must be built first, ie above ^
|
|
44
|
-
// |- |- dep5
|
|
45
|
-
// |- dep2 # depends on dep3, dep4 (and dep5 through dep4) so all of them must be built first before dep2 is built
|
|
46
|
-
// |- |- dep3
|
|
47
|
-
// |- |- dep4
|
|
48
|
-
// |- |- |- dep5
|
|
49
|
-
//
|
|
50
|
-
// for more details see: https://wikiless.org/wiki/Topological_sorting?lang=en
|
|
51
|
-
//
|
|
52
|
-
function topologicalSortNativeDependencies(dependencies, start = [], depth = 0, total = 0 // do not pass in, we calculate it in the initial run!
|
|
53
|
-
) {
|
|
54
|
-
// we set the total on the initial call - and never increment it, as it's used for esacaping the recursion
|
|
21
|
+
function topologicalSortNativeDependencies(dependencies, start = [], depth = 0, total = 0) {
|
|
55
22
|
if (total === 0) {
|
|
56
23
|
total = dependencies.length;
|
|
57
24
|
}
|
|
@@ -65,8 +32,6 @@ function topologicalSortNativeDependencies(dependencies, start = [], depth = 0,
|
|
|
65
32
|
return sortedDeps;
|
|
66
33
|
}, start);
|
|
67
34
|
const remainingDeps = dependencies.filter((nativeDep) => !sortedDeps.includes(nativeDep));
|
|
68
|
-
// recurse if we still have remaining deps
|
|
69
|
-
// the second condition here prevents infinite recursion
|
|
70
35
|
if (remainingDeps.length && sortedDeps.length < total) {
|
|
71
36
|
return topologicalSortNativeDependencies(remainingDeps, sortedDeps, depth + 1, total);
|
|
72
37
|
}
|
|
@@ -120,7 +85,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
120
85
|
constants.APK_DIR,
|
|
121
86
|
];
|
|
122
87
|
const packageName = this.getProjectNameFromId(projectData);
|
|
123
|
-
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android"
|
|
88
|
+
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "android");
|
|
124
89
|
this._platformData = {
|
|
125
90
|
frameworkPackageName: runtimePackage.name,
|
|
126
91
|
normalizedPlatformName: "Android",
|
|
@@ -161,7 +126,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
161
126
|
configurationFileName: constants.MANIFEST_FILE_NAME,
|
|
162
127
|
configurationFilePath: path.join(...configurationsDirectoryArr),
|
|
163
128
|
relativeToFrameworkConfigurationFilePath: path.join(constants.SRC_DIR, constants.MAIN_DIR, constants.MANIFEST_FILE_NAME),
|
|
164
|
-
fastLivesyncFileExtensions: [".jpg", ".gif", ".png", ".bmp", ".webp"],
|
|
129
|
+
fastLivesyncFileExtensions: [".jpg", ".gif", ".png", ".bmp", ".webp"],
|
|
165
130
|
};
|
|
166
131
|
}
|
|
167
132
|
return this._platformData;
|
|
@@ -211,7 +176,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
211
176
|
const targetSdkVersion = androidToolsInfo && androidToolsInfo.targetSdkVersion;
|
|
212
177
|
this.$logger.trace(`Using Android SDK '${targetSdkVersion}'.`);
|
|
213
178
|
this.copy(this.getPlatformData(projectData).projectRoot, frameworkDir, "*", "-R");
|
|
214
|
-
// TODO: Check if we actually need this and if it should be targetSdk or compileSdk
|
|
215
179
|
this.cleanResValues(targetSdkVersion, projectData);
|
|
216
180
|
}
|
|
217
181
|
getResDestinationDir(projectData) {
|
|
@@ -243,7 +207,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
243
207
|
_.map(directoriesToClean, (dir) => this.$fs.deleteDirectory(dir));
|
|
244
208
|
}
|
|
245
209
|
async interpolateData(projectData) {
|
|
246
|
-
// Interpolate the apilevel and package
|
|
247
210
|
this.interpolateConfigurationFile(projectData);
|
|
248
211
|
const appResourcesDirectoryPath = projectData.getAppResourcesDirectoryPath();
|
|
249
212
|
let stringsFilePath;
|
|
@@ -259,10 +222,8 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
259
222
|
const gradleSettingsFilePath = path.join(this.getPlatformData(projectData).projectRoot, "settings.gradle");
|
|
260
223
|
shell.sed("-i", /__PROJECT_NAME__/, this.getProjectNameFromId(projectData), gradleSettingsFilePath);
|
|
261
224
|
try {
|
|
262
|
-
// will replace applicationId in app/App_Resources/Android/app.gradle if it has not been edited by the user
|
|
263
225
|
const appGradleContent = this.$fs.readText(projectData.appGradlePath);
|
|
264
226
|
if (appGradleContent.indexOf(constants.PACKAGE_PLACEHOLDER_NAME) !== -1) {
|
|
265
|
-
//TODO: For compatibility with old templates. Once all templates are updated should delete.
|
|
266
227
|
shell.sed("-i", new RegExp(constants.PACKAGE_PLACEHOLDER_NAME), projectData.projectIdentifiers.android, projectData.appGradlePath);
|
|
267
228
|
}
|
|
268
229
|
}
|
|
@@ -313,7 +274,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
313
274
|
return [".jar", ".dat"];
|
|
314
275
|
}
|
|
315
276
|
async prepareProject() {
|
|
316
|
-
// Intentionally left empty.
|
|
317
277
|
}
|
|
318
278
|
ensureConfigurationFileInAppResources(projectData) {
|
|
319
279
|
const appResourcesDirectoryPath = projectData.appResourcesDirectoryPath;
|
|
@@ -330,7 +290,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
330
290
|
this.$logger.warn("No manifest found in " + originalAndroidManifestFilePath);
|
|
331
291
|
return;
|
|
332
292
|
}
|
|
333
|
-
// Overwrite the AndroidManifest from runtime.
|
|
334
293
|
if (!appResourcesDirStructureHasMigrated) {
|
|
335
294
|
this.$fs.copyFile(originalAndroidManifestFilePath, this.getPlatformData(projectData).configurationFilePath);
|
|
336
295
|
}
|
|
@@ -347,8 +306,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
347
306
|
}
|
|
348
307
|
else {
|
|
349
308
|
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "*"), platformsAppResourcesPath);
|
|
350
|
-
// https://github.com/NativeScript/android-runtime/issues/899
|
|
351
|
-
// App_Resources/Android/libs is reserved to user's aars and jars, but they should not be copied as resources
|
|
352
309
|
this.$fs.deleteDirectory(path.join(platformsAppResourcesPath, "libs"));
|
|
353
310
|
}
|
|
354
311
|
const androidToolsInfo = this.$androidToolsInfo.getToolsInfo({
|
|
@@ -358,7 +315,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
358
315
|
this.cleanResValues(compileSdkVersion, projectData);
|
|
359
316
|
}
|
|
360
317
|
async preparePluginNativeCode(pluginData, projectData) {
|
|
361
|
-
// build Android plugins which contain AndroidManifest.xml and/or resources
|
|
362
318
|
const pluginPlatformsFolderPath = this.getPluginPlatformsFolderPath(pluginData, AndroidProjectService.ANDROID_PLATFORM_NAME);
|
|
363
319
|
if (this.$fs.exists(pluginPlatformsFolderPath)) {
|
|
364
320
|
const options = {
|
|
@@ -380,7 +336,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
380
336
|
return;
|
|
381
337
|
}
|
|
382
338
|
async removePluginNativeCode(pluginData, projectData) {
|
|
383
|
-
// not implemented
|
|
384
339
|
}
|
|
385
340
|
async beforePrepareAllPlugins(projectData, dependencies) {
|
|
386
341
|
if (dependencies) {
|
|
@@ -394,7 +349,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
394
349
|
filterUniqueDependencies(dependencies) {
|
|
395
350
|
const depsDictionary = dependencies.reduce((dict, dep) => {
|
|
396
351
|
const collision = dict[dep.name];
|
|
397
|
-
// in case there are multiple dependencies to the same module, the one declared in the package.json takes precedence
|
|
398
352
|
if (!collision || collision.depth > dep.depth) {
|
|
399
353
|
dict[dep.name] = dep;
|
|
400
354
|
}
|
|
@@ -413,7 +367,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
413
367
|
name,
|
|
414
368
|
directory: path.relative(platformDir, directory),
|
|
415
369
|
dependencies: dependencies.filter((dep) => {
|
|
416
|
-
// filter out transient dependencies that don't have native dependencies
|
|
417
370
|
return (nativeDependencyData.findIndex((nativeDep) => nativeDep.name === dep) !== -1);
|
|
418
371
|
}),
|
|
419
372
|
};
|
|
@@ -421,7 +374,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
421
374
|
nativeDependencies = topologicalSortNativeDependencies(nativeDependencies);
|
|
422
375
|
const jsonContent = JSON.stringify(nativeDependencies, null, 4);
|
|
423
376
|
this.$fs.writeFile(dependenciesJsonPath, jsonContent);
|
|
424
|
-
// we sort all the dependencies to respect the topological sorting of the native dependencies
|
|
425
377
|
return dependencies.sort(function (a, b) {
|
|
426
378
|
return (nativeDependencies.findIndex((n) => n.name === a.name) -
|
|
427
379
|
nativeDependencies.findIndex((n) => n.name === b.name));
|
|
@@ -453,7 +405,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
453
405
|
await adb.executeShellCommand(["rm", "-rf", deviceRootPath]);
|
|
454
406
|
}
|
|
455
407
|
async checkForChanges() {
|
|
456
|
-
// Nothing android specific to check yet.
|
|
457
408
|
}
|
|
458
409
|
getDeploymentTarget(projectData) {
|
|
459
410
|
return;
|
|
@@ -463,12 +414,9 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
463
414
|
shell.cp(cpArg, paths, projectRoot);
|
|
464
415
|
}
|
|
465
416
|
validatePackageName(packageName) {
|
|
466
|
-
//Make the package conform to Java package types
|
|
467
|
-
//Enforce underscore limitation
|
|
468
417
|
if (!/^[a-zA-Z]+(\.[a-zA-Z0-9][a-zA-Z0-9_]*)+$/.test(packageName)) {
|
|
469
418
|
this.$errors.fail(`Package name must look like: com.company.Name. Got: ${packageName}`);
|
|
470
419
|
}
|
|
471
|
-
//Class is a reserved word
|
|
472
420
|
if (/\b[Cc]lass\b/.test(packageName)) {
|
|
473
421
|
this.$errors.fail("class is a reserved word");
|
|
474
422
|
}
|
|
@@ -477,7 +425,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
477
425
|
if (projectName === "") {
|
|
478
426
|
this.$errors.fail("Project name cannot be empty");
|
|
479
427
|
}
|
|
480
|
-
//Classes in Java don't begin with numbers
|
|
481
428
|
if (/^[0-9]/.test(projectName)) {
|
|
482
429
|
this.$errors.fail("Project name must not begin with a number");
|
|
483
430
|
}
|
|
@@ -498,19 +445,6 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
498
445
|
];
|
|
499
446
|
return path.join(this.getPlatformData(projectData).projectRoot, ...resourcePath);
|
|
500
447
|
}
|
|
501
|
-
/**
|
|
502
|
-
* The purpose of this method is to delete the previously prepared user resources.
|
|
503
|
-
* The content of the `<platforms>/android/.../res` directory is based on user's resources and gradle project template from android-runtime.
|
|
504
|
-
* During preparation of the `<path to user's App_Resources>/Android` we want to clean all the users files from previous preparation,
|
|
505
|
-
* but keep the ones that were introduced during `platform add` of the android-runtime.
|
|
506
|
-
* Currently the Gradle project template contains resources only in values and values-v21 directories.
|
|
507
|
-
* So the current logic of the method is cleaning al resources from `<platforms>/android/.../res` that are not in `values.*` directories
|
|
508
|
-
* and that exist in the `<path to user's App_Resources>/Android/.../res` directory
|
|
509
|
-
* This means that if user has a resource file in values-v29 for example, builds the project and then deletes this resource,
|
|
510
|
-
* it will be kept in platforms directory. Reference issue: `https://github.com/NativeScript/nativescript-cli/issues/5083`
|
|
511
|
-
* Same is valid for files in `drawable-<resolution>` directories - in case in user's resources there's drawable-hdpi directory,
|
|
512
|
-
* which is deleted after the first build of app, it will remain in platforms directory.
|
|
513
|
-
*/
|
|
514
448
|
cleanUpPreparedResources(projectData) {
|
|
515
449
|
let resourcesDirPath = path.join(projectData.appResourcesDirectoryPath, this.getPlatformData(projectData).normalizedPlatformName);
|
|
516
450
|
if (this.$androidResourcesMigrationService.hasMigrated(projectData.appResourcesDirectoryPath)) {
|
|
@@ -535,7 +469,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
|
|
|
535
469
|
const hasUseKotlinPropertyInAppData = `hasUseKotlinPropertyInApp${analyticsDelimiter}${buildStatistics.kotlinUsage.hasUseKotlinPropertyInApp}`;
|
|
536
470
|
const hasKotlinRuntimeClassesData = `hasKotlinRuntimeClasses${analyticsDelimiter}${buildStatistics.kotlinUsage.hasKotlinRuntimeClasses}`;
|
|
537
471
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
538
|
-
action: "Using Kotlin"
|
|
472
|
+
action: "Using Kotlin",
|
|
539
473
|
additionalData: `${hasUseKotlinPropertyInAppData}${analyticsDelimiter}${hasKotlinRuntimeClassesData}`,
|
|
540
474
|
});
|
|
541
475
|
}
|
|
@@ -568,4 +502,3 @@ __decorate([
|
|
|
568
502
|
(0, helpers_1.hook)("buildAndroid")
|
|
569
503
|
], AndroidProjectService.prototype, "buildProject", null);
|
|
570
504
|
yok_1.injector.register("androidProjectService", AndroidProjectService);
|
|
571
|
-
//# sourceMappingURL=android-project-service.js.map
|
|
@@ -46,7 +46,6 @@ class AndroidResourcesMigrationService {
|
|
|
46
46
|
const appResourcesMainSourceSetResourcesDestination = path.join(appMainSourceSet, constants.RESOURCES_DIR);
|
|
47
47
|
this.$fs.ensureDirectoryExists(appResourcesDestination);
|
|
48
48
|
this.$fs.ensureDirectoryExists(appMainSourceSet);
|
|
49
|
-
// create /java, /res and /assets in the App_Resources/Android/src/main directory
|
|
50
49
|
this.$fs.ensureDirectoryExists(appResourcesMainSourceSetResourcesDestination);
|
|
51
50
|
this.$fs.ensureDirectoryExists(path.join(appMainSourceSet, "java"));
|
|
52
51
|
this.$fs.ensureDirectoryExists(path.join(appMainSourceSet, constants.ASSETS_DIR));
|
|
@@ -60,25 +59,20 @@ class AndroidResourcesMigrationService {
|
|
|
60
59
|
const resourceFiles = getFiles(appResourcesFiles);
|
|
61
60
|
resourceDirectories.forEach((dir) => {
|
|
62
61
|
if (path.basename(dir) !== "libs") {
|
|
63
|
-
// don't copy /App_Resources/Android/libs into the src/main/res/libs directory
|
|
64
62
|
this.$fs.copyFile(dir, appResourcesMainSourceSetResourcesDestination);
|
|
65
63
|
}
|
|
66
64
|
else {
|
|
67
|
-
// copy App_Resources/Android/libs to App_ResourcesNew/Android/libs
|
|
68
65
|
this.$fs.copyFile(dir, path.join(appResourcesDestination));
|
|
69
66
|
}
|
|
70
67
|
});
|
|
71
68
|
resourceFiles.forEach((file) => {
|
|
72
69
|
const fileName = path.basename(file);
|
|
73
70
|
if (fileName !== constants.MANIFEST_FILE_NAME) {
|
|
74
|
-
// don't copy AndroidManifest into /App_Resources/Android as it needs to be inside src/main/
|
|
75
71
|
this.$fs.copyFile(file, path.join(appResourcesDestination, fileName));
|
|
76
72
|
}
|
|
77
73
|
});
|
|
78
74
|
this.$fs.copyFile(path.join(originalAppResources, constants.MANIFEST_FILE_NAME), path.join(appMainSourceSet, constants.MANIFEST_FILE_NAME));
|
|
79
|
-
// rename the legacy app_resources to ANDROID_DIR_OLD
|
|
80
75
|
this.$fs.rename(originalAppResources, appResourcesBackup);
|
|
81
|
-
// move the new, updated app_resources to App_Resources/Android, as the de facto resources
|
|
82
76
|
this.$fs.rename(appResourcesDestination, originalAppResources);
|
|
83
77
|
}
|
|
84
78
|
recover(originalAppResources, appResourcesDestination, appResourcesBackup) {
|
|
@@ -95,4 +89,3 @@ AndroidResourcesMigrationService.ANDROID_DIR = "Android";
|
|
|
95
89
|
AndroidResourcesMigrationService.ANDROID_DIR_TEMP = "Android-Updated";
|
|
96
90
|
AndroidResourcesMigrationService.ANDROID_DIR_OLD = "Android-Pre-v4";
|
|
97
91
|
yok_1.injector.register("androidResourcesMigrationService", AndroidResourcesMigrationService);
|
|
98
|
-
//# sourceMappingURL=android-resources-migration-service.js.map
|
|
@@ -63,4 +63,3 @@ class ApplePortalApplicationService {
|
|
|
63
63
|
}
|
|
64
64
|
exports.ApplePortalApplicationService = ApplePortalApplicationService;
|
|
65
65
|
yok_1.injector.register("applePortalApplicationService", ApplePortalApplicationService);
|
|
66
|
-
//# sourceMappingURL=apple-portal-application-service.js.map
|
|
@@ -201,10 +201,10 @@ For more details how to set up your environment, please execute "ns publish ios
|
|
|
201
201
|
const data = JSON.parse(authResponse.body);
|
|
202
202
|
const isSMS = data.trustedPhoneNumbers &&
|
|
203
203
|
data.trustedPhoneNumbers.length === 1 &&
|
|
204
|
-
data.noTrustedDevices;
|
|
204
|
+
data.noTrustedDevices;
|
|
205
205
|
const multiSMS = data.trustedPhoneNumbers &&
|
|
206
206
|
data.trustedPhoneNumbers.length !== 1 &&
|
|
207
|
-
data.noTrustedDevices;
|
|
207
|
+
data.noTrustedDevices;
|
|
208
208
|
let token;
|
|
209
209
|
if (data.trustedPhoneNumbers &&
|
|
210
210
|
data.trustedPhoneNumbers.length &&
|
|
@@ -218,7 +218,6 @@ For more details how to set up your environment, please execute "ns publish ios
|
|
|
218
218
|
};
|
|
219
219
|
let url = `https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode`;
|
|
220
220
|
if (isSMS) {
|
|
221
|
-
// No trusted devices means it must be sms.
|
|
222
221
|
body.mode = "sms";
|
|
223
222
|
body.phoneNumber = {
|
|
224
223
|
id: data.trustedPhoneNumbers[0].id,
|
|
@@ -281,9 +280,8 @@ function checkBits(bits, digest) {
|
|
|
281
280
|
return result;
|
|
282
281
|
}
|
|
283
282
|
function checkBit(position, buffer) {
|
|
284
|
-
const bitOffset = position & 7;
|
|
285
|
-
const byteIndex = position >> 3;
|
|
283
|
+
const bitOffset = position & 7;
|
|
284
|
+
const byteIndex = position >> 3;
|
|
286
285
|
const bit = (buffer[byteIndex] >> bitOffset) & 1;
|
|
287
286
|
return bit === 0;
|
|
288
287
|
}
|
|
289
|
-
//# sourceMappingURL=apple-portal-session-service.js.map
|
|
@@ -28,9 +28,7 @@ class GSASRPAuthenticator {
|
|
|
28
28
|
async getInit() {
|
|
29
29
|
if (this.srpClient)
|
|
30
30
|
throw new Error("Already initialized");
|
|
31
|
-
this.srpClient = await srp.newClient(stringToU8Array(this.username),
|
|
32
|
-
// provide fake passsword because we need to get data from server
|
|
33
|
-
new Uint8Array());
|
|
31
|
+
this.srpClient = await srp.newClient(stringToU8Array(this.username), new Uint8Array());
|
|
34
32
|
let a = Buffer.from(js_srp_1.util.bytesFromBigint(this.srpClient.A)).toString("base64");
|
|
35
33
|
return {
|
|
36
34
|
a,
|
|
@@ -61,4 +59,3 @@ class GSASRPAuthenticator {
|
|
|
61
59
|
}
|
|
62
60
|
}
|
|
63
61
|
exports.GSASRPAuthenticator = GSASRPAuthenticator;
|
|
64
|
-
//# sourceMappingURL=srp-wrapper.js.map
|
|
@@ -82,7 +82,7 @@ class AssetsGenerationService {
|
|
|
82
82
|
}
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
|
-
const operation = assetItem.resizeOperation || "resize"
|
|
85
|
+
const operation = assetItem.resizeOperation || "resize";
|
|
86
86
|
let tempScale = null;
|
|
87
87
|
if (assetItem.scale) {
|
|
88
88
|
if (_.isNumber(assetItem.scale)) {
|
|
@@ -107,31 +107,27 @@ class AssetsGenerationService {
|
|
|
107
107
|
}
|
|
108
108
|
let image;
|
|
109
109
|
switch (operation) {
|
|
110
|
-
case "overlayWith"
|
|
110
|
+
case "overlayWith":
|
|
111
111
|
const overlayImageScale = assetItem.overlayImageScale ||
|
|
112
112
|
constants_1.AssetConstants.defaultOverlayImageScale;
|
|
113
113
|
const imageResize = Math.round(Math.min(width, height) * overlayImageScale);
|
|
114
114
|
image = await this.resize(generationData.imagePath, imageResize, imageResize);
|
|
115
115
|
image = this.generateImage(background, width, height, image);
|
|
116
116
|
break;
|
|
117
|
-
case "blank"
|
|
117
|
+
case "blank":
|
|
118
118
|
image = this.generateImage(background, width, height);
|
|
119
119
|
break;
|
|
120
|
-
case "resize"
|
|
120
|
+
case "resize":
|
|
121
121
|
image = await this.resize(generationData.imagePath, width, height);
|
|
122
122
|
break;
|
|
123
|
-
case "outerScale"
|
|
124
|
-
// Resize image without applying scale
|
|
123
|
+
case "outerScale":
|
|
125
124
|
image = await this.resize(generationData.imagePath, assetItem.width, assetItem.height);
|
|
126
|
-
// The scale will apply to the underlying layer of the generated image
|
|
127
125
|
image = this.generateImage("#00000000", width, height, image);
|
|
128
126
|
break;
|
|
129
127
|
default:
|
|
130
128
|
throw new Error(`Invalid image generation operation: ${operation}`);
|
|
131
129
|
}
|
|
132
|
-
// This code disables the alpha chanel, as some images for the Apple App Store must not have transparency.
|
|
133
130
|
if (assetItem.rgba === false) {
|
|
134
|
-
// Add an underlying white layer
|
|
135
131
|
image = this.generateImage("#FFFFFF", image.width, image.height, image);
|
|
136
132
|
}
|
|
137
133
|
if (this.isAssetFilePath(outputPath)) {
|
|
@@ -185,4 +181,3 @@ __decorate([
|
|
|
185
181
|
(0, decorators_1.exported)("assetsGenerationService")
|
|
186
182
|
], AssetsGenerationService.prototype, "generateSplashScreens", null);
|
|
187
183
|
yok_1.injector.register("assetsGenerationService", AssetsGenerationService);
|
|
188
|
-
//# sourceMappingURL=assets-generation-service.js.map
|
|
@@ -64,7 +64,7 @@ class BuildArtifactsService {
|
|
|
64
64
|
if (packages.length > 1) {
|
|
65
65
|
this.$logger.warn(`More than one ${packageExtName} found in ${buildOutputPath} directory. Using the last one produced from build.`);
|
|
66
66
|
}
|
|
67
|
-
packages = _.sortBy(packages, (pkg) => pkg.time).reverse();
|
|
67
|
+
packages = _.sortBy(packages, (pkg) => pkg.time).reverse();
|
|
68
68
|
return packages[0];
|
|
69
69
|
}
|
|
70
70
|
getApplicationPackagesCore(candidates, validPackageNames) {
|
|
@@ -85,4 +85,3 @@ class BuildArtifactsService {
|
|
|
85
85
|
}
|
|
86
86
|
exports.BuildArtifactsService = BuildArtifactsService;
|
|
87
87
|
yok_1.injector.register("buildArtifactsService", BuildArtifactsService);
|
|
88
|
-
//# sourceMappingURL=build-artifacts-service.js.map
|