nativescript 9.0.4-dev.1 → 9.0.4-dev.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 +4 -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 +5 -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/hooks/common.js +2 -1
- package/lib/commands/hooks/hooks-lock.js +1 -0
- package/lib/commands/hooks/hooks.js +1 -0
- 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 +2 -1
- 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 +3 -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 +11 -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 +68 -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 +18 -0
- package/lib/services/ios/xcodebuild-args-service.js +16 -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 +100 -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 +3 -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 +1 -1
|
@@ -5,6 +5,7 @@ const ora = require("ora");
|
|
|
5
5
|
const yok_1 = require("../common/yok");
|
|
6
6
|
class TerminalSpinnerService {
|
|
7
7
|
createSpinner(spinnerOptions = {}) {
|
|
8
|
+
// @ts-expect-error - options are readonly, however we still want to override them before passing them on...
|
|
8
9
|
spinnerOptions.stream = spinnerOptions.stream || process.stdout;
|
|
9
10
|
return ora(spinnerOptions);
|
|
10
11
|
}
|
|
@@ -25,3 +26,4 @@ class TerminalSpinnerService {
|
|
|
25
26
|
}
|
|
26
27
|
exports.TerminalSpinnerService = TerminalSpinnerService;
|
|
27
28
|
yok_1.injector.register("terminalSpinnerService", TerminalSpinnerService);
|
|
29
|
+
//# sourceMappingURL=terminal-spinner-service.js.map
|
|
@@ -24,8 +24,10 @@ class TestExecutionService {
|
|
|
24
24
|
platform = platform.toLowerCase();
|
|
25
25
|
this.platform = platform;
|
|
26
26
|
const projectData = this.$projectDataService.getProjectData(liveSyncInfo.projectDir);
|
|
27
|
+
// We need the dependencies installed here, so we can start the Karma server.
|
|
27
28
|
await this.$pluginsService.ensureAllDependenciesAreInstalled(projectData);
|
|
28
29
|
const karmaConfig = this.getKarmaConfiguration(platform, projectData);
|
|
30
|
+
// In case you want to debug the unit test runner, add "--inspect-brk=<port>" as a first element in the array of args.
|
|
29
31
|
const karmaRunner = this.$childProcess.spawn(process.execPath, [path.join(__dirname, "karma-execution.js")], { stdio: ["inherit", "inherit", "inherit", "ipc"] });
|
|
30
32
|
const launchKarmaTests = async (karmaData) => {
|
|
31
33
|
this.$logger.trace("## Unit-testing: Parent process received message", karmaData);
|
|
@@ -42,6 +44,8 @@ class TestExecutionService {
|
|
|
42
44
|
const configJs = this.generateConfig(port, configOptions);
|
|
43
45
|
this.$fs.writeFile(path.join(liveSyncInfo.projectDir, TestExecutionService.CONFIG_FILE_NAME), configJs);
|
|
44
46
|
}
|
|
47
|
+
// Prepare the project AFTER the TestExecutionService.CONFIG_FILE_NAME file is created in node_modules
|
|
48
|
+
// so it will be sent to device.
|
|
45
49
|
await this.$runController.run({
|
|
46
50
|
liveSyncInfo,
|
|
47
51
|
deviceDescriptors,
|
|
@@ -54,12 +58,13 @@ class TestExecutionService {
|
|
|
54
58
|
}
|
|
55
59
|
launchKarmaTests(karmaData).catch((result) => {
|
|
56
60
|
this.$logger.error(result);
|
|
57
|
-
process.exit(130);
|
|
61
|
+
process.exit(130 /* ErrorCodes.KARMA_FAIL */);
|
|
58
62
|
});
|
|
59
63
|
});
|
|
60
64
|
return new Promise((resolve, reject) => {
|
|
61
65
|
karmaRunner.on("exit", (exitCode) => {
|
|
62
66
|
if (exitCode !== 0) {
|
|
67
|
+
//End our process with a non-zero exit code
|
|
63
68
|
const testError = new Error("Test run failed.");
|
|
64
69
|
reject(testError);
|
|
65
70
|
}
|
|
@@ -72,7 +77,7 @@ class TestExecutionService {
|
|
|
72
77
|
}
|
|
73
78
|
async canStartKarmaServer(projectData) {
|
|
74
79
|
let canStartKarmaServer = true;
|
|
75
|
-
const requiredDependencies = ["@nativescript/unit-test-runner"];
|
|
80
|
+
const requiredDependencies = ["@nativescript/unit-test-runner"]; // we need @nativescript/unit-test-runner at the local level because of hooks!
|
|
76
81
|
_.each(requiredDependencies, (dep) => {
|
|
77
82
|
if (!projectData.dependencies[dep] && !projectData.devDependencies[dep]) {
|
|
78
83
|
canStartKarmaServer = false;
|
|
@@ -121,6 +126,7 @@ class TestExecutionService {
|
|
|
121
126
|
karmaConfig.logLevel = "DEBUG";
|
|
122
127
|
}
|
|
123
128
|
if (!this.$options.watch) {
|
|
129
|
+
// Setting singleRun to true will automatically start the tests when new browser (device in our case) is registered in karma.
|
|
124
130
|
karmaConfig.singleRun = true;
|
|
125
131
|
}
|
|
126
132
|
if (this.$options.debugBrk) {
|
|
@@ -139,3 +145,4 @@ exports.TestExecutionService = TestExecutionService;
|
|
|
139
145
|
TestExecutionService.CONFIG_FILE_NAME = `node_modules/${constants.TEST_RUNNER_NAME}/config.js`;
|
|
140
146
|
TestExecutionService.SOCKETIO_JS_FILE_NAME = `node_modules/${constants.TEST_RUNNER_NAME}/socket.io.js`;
|
|
141
147
|
yok_1.injector.register("testExecutionService", TestExecutionService);
|
|
148
|
+
//# sourceMappingURL=test-execution-service.js.map
|
|
@@ -34,6 +34,9 @@ class TestInitializationService {
|
|
|
34
34
|
});
|
|
35
35
|
return targetFrameworkDependencies;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* This method is used from test-init.md file so it is not allowed to use "this" inside the method's body.
|
|
39
|
+
*/
|
|
37
40
|
getFrameworkNames() {
|
|
38
41
|
const configsPath = path.join(__dirname, "..", "..", "config");
|
|
39
42
|
const dependenciesPath = path.join(configsPath, "test-dependencies.json");
|
|
@@ -52,3 +55,4 @@ __decorate([
|
|
|
52
55
|
(0, decorators_1.cache)()
|
|
53
56
|
], TestInitializationService.prototype, "getFrameworkNames", null);
|
|
54
57
|
yok_1.injector.register("testInitializationService", TestInitializationService);
|
|
58
|
+
//# sourceMappingURL=test-initialization-service.js.map
|
|
@@ -47,6 +47,7 @@ class VersionsService {
|
|
|
47
47
|
const tnsCoreModulesPath = path.join(nodeModulesPath, constants.TNS_CORE_MODULES_NAME);
|
|
48
48
|
const dependsOnNonScopedPackage = !!this.projectData.dependencies[constants.TNS_CORE_MODULES_NAME];
|
|
49
49
|
const dependsOnScopedPackage = !!this.projectData.dependencies[constants.SCOPED_TNS_CORE_MODULES];
|
|
50
|
+
// ensure the dependencies are installed, so we can get their actual versions from node_modules
|
|
50
51
|
if (!this.$fs.exists(nodeModulesPath) ||
|
|
51
52
|
(dependsOnNonScopedPackage && !this.$fs.exists(tnsCoreModulesPath)) ||
|
|
52
53
|
(dependsOnScopedPackage && !this.$fs.exists(scopedPackagePath))) {
|
|
@@ -73,16 +74,16 @@ class VersionsService {
|
|
|
73
74
|
return versionInformations;
|
|
74
75
|
}
|
|
75
76
|
async getRuntimesVersions(platform) {
|
|
76
|
-
const iosRuntime = this.$projectDataService.getRuntimePackage(this.projectData.projectDir, "ios");
|
|
77
|
-
const androidRuntime = this.$projectDataService.getRuntimePackage(this.projectData.projectDir, "android");
|
|
77
|
+
const iosRuntime = this.$projectDataService.getRuntimePackage(this.projectData.projectDir, "ios" /* constants.PlatformTypes.ios */);
|
|
78
|
+
const androidRuntime = this.$projectDataService.getRuntimePackage(this.projectData.projectDir, "android" /* constants.PlatformTypes.android */);
|
|
78
79
|
let runtimes = [];
|
|
79
80
|
if (!platform) {
|
|
80
81
|
runtimes = [iosRuntime, androidRuntime];
|
|
81
82
|
}
|
|
82
|
-
else if (platform === "ios") {
|
|
83
|
+
else if (platform === "ios" /* PlatformTypes.ios */) {
|
|
83
84
|
runtimes.push(iosRuntime);
|
|
84
85
|
}
|
|
85
|
-
else if (platform === "android") {
|
|
86
|
+
else if (platform === "android" /* PlatformTypes.android */) {
|
|
86
87
|
runtimes.push(androidRuntime);
|
|
87
88
|
}
|
|
88
89
|
const runtimesVersions = await Promise.all(runtimes.map(async (runtime) => {
|
|
@@ -175,3 +176,4 @@ VersionsService.UP_TO_DATE_MESSAGE = "up to date";
|
|
|
175
176
|
VersionsService.UPDATE_AVAILABLE_MESSAGE = "Update available";
|
|
176
177
|
VersionsService.NOT_INSTALLED_MESSAGE = "not installed";
|
|
177
178
|
yok_1.injector.register("versionsService", VersionsService);
|
|
179
|
+
//# sourceMappingURL=versions-service.js.map
|
|
@@ -55,6 +55,7 @@ class XcconfigService {
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
if (isPropertyParsed) {
|
|
58
|
+
// property can be an empty string, so we don't check for that.
|
|
58
59
|
return property;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
@@ -63,3 +64,4 @@ class XcconfigService {
|
|
|
63
64
|
}
|
|
64
65
|
exports.XcconfigService = XcconfigService;
|
|
65
66
|
yok_1.injector.register("xcconfigService", XcconfigService);
|
|
67
|
+
//# sourceMappingURL=xcconfig-service.js.map
|
package/lib/shared-event-bus.js
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const events_1 = require("events");
|
|
4
4
|
const yok_1 = require("./common/yok");
|
|
5
|
+
/**
|
|
6
|
+
* Event Bus used by different services to emit state changes and
|
|
7
|
+
* allow listening for these state changes without needing a reference
|
|
8
|
+
* to the emitting service.
|
|
9
|
+
*/
|
|
5
10
|
class SharedEventBus extends events_1.EventEmitter {
|
|
6
11
|
}
|
|
7
12
|
yok_1.injector.register("sharedEventBus", SharedEventBus);
|
|
13
|
+
//# sourceMappingURL=shared-event-bus.js.map
|
package/lib/sys-info.js
CHANGED
|
@@ -79,7 +79,7 @@ class SysInfo {
|
|
|
79
79
|
if (macOSVersion && macOSVersion < constants_1.MacOSVersions.HighSierra) {
|
|
80
80
|
return {
|
|
81
81
|
message: (0, util_1.format)(constants_1.MacOSDeprecationStringFormat, macOSVersion),
|
|
82
|
-
severity: "high"
|
|
82
|
+
severity: "high" /* SystemWarningsSeverity.high */,
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
return null;
|
|
@@ -101,3 +101,4 @@ __decorate([
|
|
|
101
101
|
(0, decorators_1.exported)("sysInfo")
|
|
102
102
|
], SysInfo.prototype, "getSupportedNodeVersionRange", null);
|
|
103
103
|
yok_1.injector.register("sysInfo", SysInfo);
|
|
104
|
+
//# sourceMappingURL=sys-info.js.map
|
|
@@ -55,6 +55,7 @@ class ConfigTransformer {
|
|
|
55
55
|
const parts = key.split(".");
|
|
56
56
|
const name = parts.shift();
|
|
57
57
|
const property = this.getProperty(name, parent);
|
|
58
|
+
// no android key, add it to parent to root
|
|
58
59
|
if (!property) {
|
|
59
60
|
return undefined;
|
|
60
61
|
}
|
|
@@ -64,11 +65,14 @@ class ConfigTransformer {
|
|
|
64
65
|
if (!_parent) {
|
|
65
66
|
return undefined;
|
|
66
67
|
}
|
|
68
|
+
// add nonExistent.deep to android: {}
|
|
67
69
|
return this.getProperty(parts.join("."), _parent);
|
|
68
70
|
}
|
|
71
|
+
// if we have a parent, we are reading the property from it
|
|
69
72
|
if (parent) {
|
|
70
73
|
return parent.getProperty(key);
|
|
71
74
|
}
|
|
75
|
+
// otherwise we just read it from the root exports object
|
|
72
76
|
return this.getProperty(key, this.getDefaultExportValue());
|
|
73
77
|
}
|
|
74
78
|
addProperty(key, value, parent = null) {
|
|
@@ -190,15 +194,22 @@ class ConfigTransformer {
|
|
|
190
194
|
}
|
|
191
195
|
this.setInitializerValue(initializer, newValue);
|
|
192
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* @internal
|
|
199
|
+
*/
|
|
193
200
|
getFullText() {
|
|
194
201
|
return this.config.getFullText();
|
|
195
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
196
206
|
getValue(key) {
|
|
197
207
|
return this.getPropertyValue(this.getProperty(key));
|
|
198
208
|
}
|
|
199
209
|
setValue(key, value) {
|
|
200
210
|
const property = this.getProperty(key);
|
|
201
211
|
if (!property) {
|
|
212
|
+
// add new property
|
|
202
213
|
this.addProperty(key, value);
|
|
203
214
|
}
|
|
204
215
|
else {
|
|
@@ -208,3 +219,4 @@ class ConfigTransformer {
|
|
|
208
219
|
}
|
|
209
220
|
}
|
|
210
221
|
exports.ConfigTransformer = ConfigTransformer;
|
|
222
|
+
//# sourceMappingURL=config-transformer.js.map
|
|
@@ -56,14 +56,18 @@ class NodeModulesDependenciesBuilder {
|
|
|
56
56
|
let modulePath = (0, resolve_package_path_1.resolvePackagePath)(depDescription.name, {
|
|
57
57
|
paths: [parentModulesPath],
|
|
58
58
|
});
|
|
59
|
+
// perhaps traverse up the tree here?
|
|
59
60
|
if (!modulePath) {
|
|
61
|
+
// fallback to searching in the root path
|
|
60
62
|
modulePath = (0, resolve_package_path_1.resolvePackagePath)(depDescription.name, {
|
|
61
63
|
paths: [rootPath],
|
|
62
64
|
});
|
|
63
65
|
}
|
|
66
|
+
// if we failed to find the module...
|
|
64
67
|
if (!modulePath) {
|
|
65
68
|
return null;
|
|
66
69
|
}
|
|
70
|
+
// if we already resolved this dependency, we return null to avoid a duplicate resolution
|
|
67
71
|
if (resolvedDependencies.some((r) => {
|
|
68
72
|
return r.name === depDescription.name && r.directory === modulePath;
|
|
69
73
|
})) {
|
|
@@ -88,6 +92,7 @@ class NodeModulesDependenciesBuilder {
|
|
|
88
92
|
const packageJsonContents = this.$fs.readJson(packageJsonPath);
|
|
89
93
|
dependency.version = packageJsonContents.version;
|
|
90
94
|
if (!!packageJsonContents.nativescript) {
|
|
95
|
+
// add `nativescript` property, necessary for resolving plugins
|
|
91
96
|
dependency.nativescript = packageJsonContents.nativescript;
|
|
92
97
|
}
|
|
93
98
|
dependency.dependencies = _.keys(packageJsonContents.dependencies);
|
|
@@ -98,3 +103,4 @@ class NodeModulesDependenciesBuilder {
|
|
|
98
103
|
}
|
|
99
104
|
exports.NodeModulesDependenciesBuilder = NodeModulesDependenciesBuilder;
|
|
100
105
|
yok_1.injector.register("nodeModulesDependenciesBuilder", NodeModulesDependenciesBuilder);
|
|
106
|
+
//# sourceMappingURL=node-modules-dependencies-builder.js.map
|
|
@@ -36,6 +36,8 @@ class Yarn2PackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
36
36
|
}
|
|
37
37
|
const packageJsonPath = path.join(pathToSave, "package.json");
|
|
38
38
|
const jsonContentBefore = this.$fs.readJson(packageJsonPath);
|
|
39
|
+
// remove unsupported flags
|
|
40
|
+
// todo: refactor all package managers to map typed flags to the actual flags
|
|
39
41
|
const cleanedConfig = _.omit(config, ["save-dev", "save-exact"]);
|
|
40
42
|
const flags = this.getFlagsString(cleanedConfig, true);
|
|
41
43
|
let params = [];
|
|
@@ -122,3 +124,4 @@ __decorate([
|
|
|
122
124
|
(0, decorators_1.exported)("yarn2")
|
|
123
125
|
], Yarn2PackageManager.prototype, "getCachePath", null);
|
|
124
126
|
yok_1.injector.register("yarn2", Yarn2PackageManager);
|
|
127
|
+
//# sourceMappingURL=yarn2-package-manager.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nativescript",
|
|
3
3
|
"main": "./lib/nativescript-cli-lib.js",
|
|
4
|
-
"version": "9.0.4-dev.
|
|
4
|
+
"version": "9.0.4-dev.3",
|
|
5
5
|
"author": "NativeScript <oss@nativescript.org>",
|
|
6
6
|
"description": "Command-line interface for building NativeScript projects",
|
|
7
7
|
"bin": {
|