nativescript 9.1.0-alpha.15 → 9.1.0-alpha.17
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/CHANGELOG.md +2571 -0
- package/bin/tns +65 -1
- package/config/config.json +2 -1
- package/config/test-deps-versions-generated.json +1 -1
- package/contracts/package.json +4 -0
- package/docs/build-jekyll-md.sh +1 -1
- package/docs/man_pages/config/config-set.md +2 -0
- package/docs/man_pages/project/testing/build-android.md +1 -1
- package/lib/android-tools-info.d.ts +19 -0
- package/lib/android-tools-info.js +0 -12
- package/lib/base-package-manager.d.ts +28 -0
- package/lib/base-package-manager.js +0 -7
- package/lib/bootstrap.js +3 -6
- package/lib/bun-package-manager.d.ts +16 -0
- package/lib/bun-package-manager.js +1 -14
- package/lib/color.d.ts +39 -0
- package/lib/color.js +0 -4
- package/lib/commands/add-platform.d.ts +14 -0
- package/lib/commands/add-platform.js +0 -1
- package/lib/commands/apple-login.d.ts +14 -0
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.d.ts +21 -0
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.d.ts +25 -0
- package/lib/commands/appstore-upload.js +0 -3
- package/lib/commands/build.d.ts +58 -0
- package/lib/commands/build.js +3 -3
- package/lib/commands/clean.d.ts +21 -0
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.d.ts +16 -0
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.d.ts +30 -0
- package/lib/commands/config.js +0 -5
- package/lib/commands/create-project.d.ts +42 -0
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.d.ts +53 -0
- package/lib/commands/debug.js +2 -6
- package/lib/commands/deploy.d.ts +32 -0
- package/lib/commands/deploy.js +3 -3
- package/lib/commands/embedding/embed.d.ts +27 -0
- package/lib/commands/embedding/embed.js +0 -7
- package/lib/commands/extensibility/install-extension.d.ts +10 -0
- package/lib/commands/extensibility/install-extension.js +0 -1
- package/lib/commands/extensibility/list-extensions.d.ts +9 -0
- package/lib/commands/extensibility/list-extensions.js +0 -1
- package/lib/commands/extensibility/uninstall-extension.d.ts +10 -0
- package/lib/commands/extensibility/uninstall-extension.js +0 -1
- package/lib/commands/fonts.d.ts +12 -0
- package/lib/commands/fonts.js +0 -1
- package/lib/commands/generate-assets.d.ts +29 -0
- package/lib/commands/generate-assets.js +0 -1
- package/lib/commands/generate-help.d.ts +8 -0
- package/lib/commands/generate-help.js +0 -1
- package/lib/commands/generate.d.ts +12 -0
- package/lib/commands/generate.js +1 -48
- package/lib/commands/hooks/common.d.ts +22 -0
- package/lib/commands/hooks/common.js +1 -2
- package/lib/commands/hooks/hooks-lock.d.ts +24 -0
- package/lib/commands/hooks/hooks-lock.js +0 -1
- package/lib/commands/hooks/hooks.d.ts +17 -0
- package/lib/commands/hooks/hooks.js +0 -1
- package/lib/commands/info.d.ts +8 -0
- package/lib/commands/info.js +0 -1
- package/lib/commands/install.d.ts +25 -0
- package/lib/commands/install.js +0 -1
- package/lib/commands/list-platforms.d.ts +11 -0
- package/lib/commands/list-platforms.js +0 -1
- package/lib/commands/migrate.d.ts +13 -0
- package/lib/commands/migrate.js +0 -1
- package/lib/commands/native-add.d.ts +49 -0
- package/lib/commands/native-add.js +0 -5
- package/lib/commands/platform-clean.d.ts +17 -0
- package/lib/commands/platform-clean.js +0 -1
- package/lib/commands/plugin/add-plugin.d.ts +13 -0
- package/lib/commands/plugin/add-plugin.js +0 -1
- package/lib/commands/plugin/build-plugin.d.ts +18 -0
- package/lib/commands/plugin/build-plugin.js +0 -1
- package/lib/commands/plugin/create-plugin.d.ts +30 -0
- package/lib/commands/plugin/create-plugin.js +0 -5
- package/lib/commands/plugin/list-plugins.d.ts +12 -0
- package/lib/commands/plugin/list-plugins.js +0 -1
- package/lib/commands/plugin/remove-plugin.d.ts +14 -0
- package/lib/commands/plugin/remove-plugin.js +0 -2
- package/lib/commands/plugin/update-plugin.d.ts +13 -0
- package/lib/commands/plugin/update-plugin.js +0 -1
- package/lib/commands/post-install.d.ts +16 -0
- package/lib/commands/post-install.js +0 -6
- package/lib/commands/prepare.d.ts +40 -0
- package/lib/commands/prepare.js +4 -9
- package/lib/commands/preview.d.ts +18 -0
- package/lib/commands/preview.js +1 -2
- package/lib/commands/remove-platform.d.ts +14 -0
- package/lib/commands/remove-platform.js +0 -1
- package/lib/commands/resources/resources-update.d.ts +13 -0
- package/lib/commands/resources/resources-update.js +0 -2
- package/lib/commands/run.d.ts +61 -0
- package/lib/commands/run.js +0 -1
- package/lib/commands/setup.d.ts +8 -0
- package/lib/commands/setup.js +0 -1
- package/lib/commands/start.d.ts +9 -0
- package/lib/commands/start.js +0 -1
- package/lib/commands/test-init.js +0 -4
- package/lib/commands/test.js +3 -9
- package/lib/commands/typings.d.ts +22 -0
- package/lib/commands/typings.js +1 -2
- package/lib/commands/update-platform.d.ts +17 -0
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.d.ts +21 -0
- package/lib/commands/update.js +0 -2
- package/lib/commands/widget.d.ts +24 -0
- package/lib/commands/widget.js +0 -19
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.d.ts +17 -0
- package/lib/common/child-process.js +0 -3
- package/lib/common/codeGeneration/code-entity.d.ts +22 -0
- package/lib/common/codeGeneration/code-entity.js +0 -1
- package/lib/common/codeGeneration/code-printer.d.ts +10 -0
- package/lib/common/codeGeneration/code-printer.js +0 -1
- package/lib/common/command-params.d.ts +14 -0
- package/lib/common/command-params.js +0 -1
- package/lib/common/commands/analytics.d.ts +30 -0
- package/lib/common/commands/analytics.js +0 -3
- package/lib/common/commands/autocompletion.d.ts +35 -0
- package/lib/common/commands/autocompletion.js +0 -3
- package/lib/common/commands/device/device-log-stream.d.ts +16 -0
- package/lib/common/commands/device/device-log-stream.js +0 -1
- package/lib/common/commands/device/get-file.d.ts +14 -0
- package/lib/common/commands/device/get-file.js +0 -2
- package/lib/common/commands/device/list-applications.d.ts +10 -0
- package/lib/common/commands/device/list-applications.js +0 -1
- package/lib/common/commands/device/list-devices.d.ts +16 -0
- package/lib/common/commands/device/list-devices.js +0 -3
- package/lib/common/commands/device/list-files.d.ts +14 -0
- package/lib/common/commands/device/list-files.js +0 -2
- package/lib/common/commands/device/put-file.d.ts +14 -0
- package/lib/common/commands/device/put-file.js +0 -2
- package/lib/common/commands/device/run-application.d.ts +13 -0
- package/lib/common/commands/device/run-application.js +0 -1
- package/lib/common/commands/device/stop-application.d.ts +10 -0
- package/lib/common/commands/device/stop-application.js +0 -1
- package/lib/common/commands/device/uninstall-application.d.ts +10 -0
- package/lib/common/commands/device/uninstall-application.js +0 -1
- package/lib/common/commands/doctor.d.ts +23 -0
- package/lib/common/commands/doctor.js +3 -3
- package/lib/common/commands/generate-messages.d.ts +13 -0
- package/lib/common/commands/generate-messages.js +0 -1
- package/lib/common/commands/help.d.ts +14 -0
- package/lib/common/commands/help.js +0 -1
- package/lib/common/commands/package-manager-get.d.ts +10 -0
- package/lib/common/commands/package-manager-get.js +0 -1
- package/lib/common/commands/package-manager-set.d.ts +11 -0
- package/lib/common/commands/package-manager-set.js +0 -1
- package/lib/common/commands/post-install.d.ts +9 -0
- package/lib/common/commands/post-install.js +0 -1
- package/lib/common/commands/preuninstall.d.ts +16 -0
- package/lib/common/commands/preuninstall.js +2 -11
- package/lib/common/commands/proxy/proxy-base.d.ts +13 -0
- package/lib/common/commands/proxy/proxy-base.js +0 -4
- package/lib/common/commands/proxy/proxy-clear.d.ts +9 -0
- package/lib/common/commands/proxy/proxy-clear.js +0 -1
- package/lib/common/commands/proxy/proxy-get.d.ts +9 -0
- package/lib/common/commands/proxy/proxy-get.js +0 -1
- package/lib/common/commands/proxy/proxy-set.d.ts +23 -0
- package/lib/common/commands/proxy/proxy-set.js +0 -1
- package/lib/common/common-lib.js +0 -1
- package/lib/common/constants.d.ts +117 -0
- package/lib/common/constants.js +14 -12
- package/lib/common/contracts/command-registry.d.ts +35 -0
- package/lib/common/contracts/command-registry.js +16 -0
- package/lib/common/contracts/index.d.ts +5 -0
- package/lib/common/contracts/index.js +11 -0
- package/lib/common/contracts/key-command-registry.d.ts +7 -0
- package/lib/common/contracts/key-command-registry.js +16 -0
- package/lib/common/contracts/module-registry.d.ts +4 -0
- package/lib/common/contracts/module-registry.js +16 -0
- package/lib/common/contracts/public-api-builder.d.ts +5 -0
- package/lib/common/contracts/public-api-builder.js +16 -0
- package/lib/common/declarations.d.ts +49 -118
- package/lib/common/decorators.d.ts +13 -0
- package/lib/common/decorators.js +0 -48
- package/lib/common/define-command.d.ts +53 -0
- package/lib/common/define-command.js +147 -0
- package/lib/common/define-hook.d.ts +29 -0
- package/lib/common/define-hook.js +101 -0
- package/lib/common/definitions/commands.d.ts +7 -0
- package/lib/common/definitions/extensibility.d.ts +7 -0
- package/lib/common/definitions/key-commands.d.ts +15 -52
- package/lib/common/definitions/key-commands.js +8 -0
- package/lib/common/definitions/yok.d.ts +43 -35
- package/lib/common/deprecation.d.ts +12 -0
- package/lib/common/deprecation.js +56 -0
- package/lib/common/di/contract.d.ts +7 -0
- package/lib/common/di/contract.js +34 -0
- package/lib/common/di/forward-ref.d.ts +2 -0
- package/lib/common/di/forward-ref.js +15 -0
- package/lib/common/di/index.d.ts +8 -0
- package/lib/common/di/index.js +19 -0
- package/lib/common/di/inject.d.ts +8 -0
- package/lib/common/di/inject.js +41 -0
- package/lib/common/di/injector.d.ts +38 -0
- package/lib/common/di/injector.js +268 -0
- package/lib/common/di/providers.d.ts +30 -0
- package/lib/common/di/providers.js +7 -0
- package/lib/common/dispatchers.d.ts +21 -0
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/enums.d.ts +34 -0
- package/lib/common/enums.js +42 -0
- package/lib/common/errors.d.ts +15 -0
- package/lib/common/errors.js +4 -13
- package/lib/common/file-system.d.ts +77 -0
- package/lib/common/file-system.js +2 -13
- package/lib/common/header.d.ts +1 -0
- package/lib/common/header.js +0 -3
- package/lib/common/helpers.d.ts +62 -0
- package/lib/common/helpers.js +6 -92
- package/lib/common/host-info.d.ts +24 -0
- package/lib/common/host-info.js +0 -4
- package/lib/common/http-client.d.ts +14 -0
- package/lib/common/http-client.js +11 -20
- package/lib/common/logger/appenders/cli-appender.d.ts +2 -0
- package/lib/common/logger/appenders/cli-appender.js +0 -4
- package/lib/common/logger/appenders/emit-appender.d.ts +5 -0
- package/lib/common/logger/appenders/emit-appender.js +0 -4
- package/lib/common/logger/layouts/cli-layout.d.ts +2 -0
- package/lib/common/logger/layouts/cli-layout.js +0 -1
- package/lib/common/logger/logger.d.ts +24 -0
- package/lib/common/logger/logger.js +0 -5
- package/lib/common/messages/messages.d.ts +7 -0
- package/lib/common/messages/messages.js +0 -6
- package/lib/common/mobile/android/android-application-manager.d.ts +31 -0
- package/lib/common/mobile/android/android-application-manager.js +1 -20
- package/lib/common/mobile/android/android-debug-bridge-result-handler.d.ts +9 -0
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
- package/lib/common/mobile/android/android-debug-bridge.d.ts +24 -0
- package/lib/common/mobile/android/android-debug-bridge.js +0 -6
- package/lib/common/mobile/android/android-device-file-system.d.ts +26 -0
- package/lib/common/mobile/android/android-device-file-system.js +0 -4
- package/lib/common/mobile/android/android-device-hash-service.d.ts +23 -0
- package/lib/common/mobile/android/android-device-hash-service.js +0 -3
- package/lib/common/mobile/android/android-device.d.ts +24 -0
- package/lib/common/mobile/android/android-device.js +0 -8
- package/lib/common/mobile/android/android-emulator-services.d.ts +23 -0
- package/lib/common/mobile/android/android-emulator-services.js +1 -2
- package/lib/common/mobile/android/android-ini-file-parser.d.ts +8 -0
- package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
- package/lib/common/mobile/android/android-log-filter.d.ts +11 -0
- package/lib/common/mobile/android/android-log-filter.js +0 -4
- package/lib/common/mobile/android/android-virtual-device-service.d.ts +37 -0
- package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
- package/lib/common/mobile/android/device-android-debug-bridge.d.ts +18 -0
- package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
- package/lib/common/mobile/android/genymotion/genymotion-service.d.ts +26 -0
- package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
- package/lib/common/mobile/android/genymotion/virtualbox-service.d.ts +13 -0
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.d.ts +17 -0
- package/lib/common/mobile/android/logcat-helper.js +0 -13
- package/lib/common/mobile/application-manager-base.d.ts +27 -0
- package/lib/common/mobile/application-manager-base.js +0 -6
- package/lib/common/mobile/device-emitter.d.ts +8 -0
- package/lib/common/mobile/device-emitter.js +0 -4
- package/lib/common/mobile/device-log-emitter.d.ts +9 -0
- package/lib/common/mobile/device-log-emitter.js +0 -1
- package/lib/common/mobile/device-log-provider-base.d.ts +21 -0
- package/lib/common/mobile/device-log-provider-base.js +0 -1
- package/lib/common/mobile/device-log-provider.d.ts +21 -0
- package/lib/common/mobile/device-log-provider.js +0 -23
- package/lib/common/mobile/device-platforms-constants.d.ts +8 -0
- package/lib/common/mobile/device-platforms-constants.js +0 -1
- package/lib/common/mobile/emulator-helper.d.ts +32 -0
- package/lib/common/mobile/emulator-helper.js +0 -3
- package/lib/common/mobile/ios/device/ios-application-manager.d.ts +27 -0
- package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
- package/lib/common/mobile/ios/device/ios-device-file-system.d.ts +19 -0
- package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -9
- package/lib/common/mobile/ios/device/ios-device-operations.d.ts +29 -0
- package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
- package/lib/common/mobile/ios/device/ios-device.d.ts +32 -0
- package/lib/common/mobile/ios/device/ios-device.js +0 -4
- package/lib/common/mobile/ios/ios-device-base.d.ts +24 -0
- 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.d.ts +6 -0
- package/lib/common/mobile/ios/ios-log-filter.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.d.ts +1 -0
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.d.ts +7 -0
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.d.ts +27 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
- package/lib/common/mobile/ios/simulator/ios-simulator-device.d.ts +27 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.d.ts +16 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.d.ts +15 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
- package/lib/common/mobile/local-to-device-path-data-factory.d.ts +3 -0
- package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
- package/lib/common/mobile/log-filter.d.ts +13 -0
- package/lib/common/mobile/log-filter.js +0 -2
- package/lib/common/mobile/logging-levels.d.ts +4 -0
- package/lib/common/mobile/logging-levels.js +0 -1
- package/lib/common/mobile/mobile-core/android-device-discovery.d.ts +16 -0
- package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/android-emulator-discovery.d.ts +11 -0
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-core/android-process-service.d.ts +33 -0
- package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
- package/lib/common/mobile/mobile-core/device-discovery.d.ts +12 -0
- package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
- package/lib/common/mobile/mobile-core/devices-service.d.ts +99 -0
- package/lib/common/mobile/mobile-core/devices-service.js +0 -69
- package/lib/common/mobile/mobile-core/ios-device-discovery.d.ts +12 -0
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.d.ts +20 -0
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-helper.d.ts +22 -0
- package/lib/common/mobile/mobile-helper.js +0 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.d.ts +1 -0
- package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
- package/lib/common/opener.d.ts +4 -0
- package/lib/common/opener.js +0 -1
- package/lib/common/os-info.d.ts +7 -0
- package/lib/common/os-info.js +0 -1
- package/lib/common/plist-parser.d.ts +5 -0
- package/lib/common/plist-parser.js +0 -1
- package/lib/common/project-helper.d.ts +15 -0
- package/lib/common/project-helper.js +0 -1
- package/lib/common/prompter.d.ts +23 -0
- package/lib/common/prompter.js +1 -9
- package/lib/common/queue.d.ts +8 -0
- package/lib/common/queue.js +0 -1
- package/lib/common/resource-loader.d.ts +10 -0
- package/lib/common/resource-loader.js +0 -1
- package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +8 -15
- package/lib/common/services/analytics/google-analytics-custom-dimensions.js +13 -0
- package/lib/common/services/auto-completion-service.d.ts +36 -0
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.d.ts +1 -0
- package/lib/common/services/cancellation.js +2 -2
- package/lib/common/services/command-definition-adapter.d.ts +6 -0
- package/lib/common/services/command-definition-adapter.js +141 -0
- package/lib/common/services/commands-service.d.ts +30 -0
- package/lib/common/services/commands-service.js +10 -18
- package/lib/common/services/help-service.d.ts +46 -0
- package/lib/common/services/help-service.js +4 -11
- package/lib/common/services/hooks-service.d.ts +40 -0
- package/lib/common/services/hooks-service.js +110 -64
- package/lib/common/services/ios-notification-service.d.ts +7 -0
- package/lib/common/services/ios-notification-service.js +0 -1
- package/lib/common/services/json-file-settings-service.d.ts +24 -0
- package/lib/common/services/json-file-settings-service.js +0 -6
- package/lib/common/services/lock-service.d.ts +18 -0
- package/lib/common/services/lock-service.js +0 -6
- package/lib/common/services/message-contract-generator.d.ts +8 -0
- package/lib/common/services/message-contract-generator.js +0 -1
- package/lib/common/services/messages-service.d.ts +15 -0
- package/lib/common/services/messages-service.js +0 -1
- package/lib/common/services/micro-templating-service.d.ts +12 -0
- package/lib/common/services/micro-templating-service.js +0 -6
- package/lib/common/services/net-service.d.ts +13 -0
- package/lib/common/services/net-service.js +0 -3
- package/lib/common/services/project-files-manager.d.ts +14 -0
- package/lib/common/services/project-files-manager.js +0 -5
- package/lib/common/services/project-files-provider-base.d.ts +12 -0
- package/lib/common/services/project-files-provider-base.js +0 -1
- package/lib/common/services/proxy-service.d.ts +12 -0
- package/lib/common/services/proxy-service.js +0 -1
- package/lib/common/services/qr.d.ts +7 -0
- package/lib/common/services/qr.js +0 -1
- package/lib/common/services/settings-service.d.ts +10 -0
- package/lib/common/services/settings-service.js +0 -1
- package/lib/common/services/xcode-select-service.d.ts +12 -0
- package/lib/common/services/xcode-select-service.js +0 -1
- package/lib/common/utils.d.ts +10 -0
- package/lib/common/utils.js +0 -1
- package/lib/common/validators/project-name-validator.d.ts +18 -0
- package/lib/common/validators/project-name-validator.js +0 -1
- package/lib/common/validators/validation-result.d.ts +7 -0
- package/lib/common/validators/validation-result.js +0 -1
- package/lib/common/verify-node-version.d.ts +3 -0
- package/lib/common/verify-node-version.js +2 -8
- package/lib/common/yok.d.ts +60 -0
- package/lib/common/yok.js +173 -165
- package/lib/config.d.ts +45 -0
- package/lib/config.js +3 -23
- package/lib/constants-provider.d.ts +4 -0
- package/lib/constants-provider.js +0 -1
- package/lib/constants.d.ts +331 -0
- package/lib/constants.js +59 -58
- package/lib/contracts/doctor-service.d.ts +20 -0
- package/lib/contracts/doctor-service.js +16 -0
- package/lib/contracts/index.d.ts +14 -0
- package/lib/contracts/index.js +32 -0
- package/lib/contracts/project-name-service.d.ts +5 -0
- package/lib/contracts/project-name-service.js +16 -0
- package/lib/controllers/build-controller.d.ts +23 -0
- package/lib/controllers/build-controller.js +3 -4
- package/lib/controllers/debug-controller.d.ts +31 -0
- package/lib/controllers/debug-controller.js +3 -8
- package/lib/controllers/deploy-controller.d.ts +7 -0
- package/lib/controllers/deploy-controller.js +0 -1
- package/lib/controllers/migrate-controller.d.ts +67 -0
- package/lib/controllers/migrate-controller.js +4 -90
- package/lib/controllers/platform-controller.d.ts +20 -0
- package/lib/controllers/platform-controller.js +2 -9
- package/lib/controllers/prepare-controller.d.ts +45 -0
- package/lib/controllers/prepare-controller.js +8 -24
- package/lib/controllers/run-controller.d.ts +57 -0
- package/lib/controllers/run-controller.js +1 -81
- package/lib/controllers/update-controller-base.d.ts +27 -0
- package/lib/controllers/update-controller-base.js +0 -1
- package/lib/controllers/update-controller.d.ts +36 -0
- package/lib/controllers/update-controller.js +0 -11
- package/lib/data/build-data.d.ts +33 -0
- package/lib/data/build-data.js +0 -1
- package/lib/data/controller-data-base.d.ts +8 -0
- package/lib/data/controller-data-base.js +0 -1
- package/lib/data/debug-data.d.ts +2 -0
- package/lib/data/debug-data.js +0 -1
- package/lib/data/platform-data.d.ts +7 -0
- package/lib/data/platform-data.js +0 -1
- package/lib/data/prepare-data.d.ts +22 -0
- package/lib/data/prepare-data.js +0 -1
- package/lib/data/run-data.d.ts +6 -0
- package/lib/data/run-data.js +0 -1
- package/lib/declarations.d.ts +2 -1
- package/lib/definitions/ios.d.ts +36 -1
- package/lib/definitions/project.d.ts +1 -6
- package/lib/definitions/system-warnings.d.ts +3 -3
- package/lib/definitions/system-warnings.js +8 -0
- package/lib/detached-processes/cleanup-js-subprocess.d.ts +2 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +3 -8
- package/lib/detached-processes/cleanup-process.d.ts +1 -0
- package/lib/detached-processes/cleanup-process.js +15 -18
- package/lib/detached-processes/detached-process-enums.d.ts +15 -67
- package/lib/detached-processes/detached-process-enums.js +24 -0
- package/lib/detached-processes/file-log-service.d.ts +7 -0
- package/lib/detached-processes/file-log-service.js +2 -2
- package/lib/device-path-provider.d.ts +9 -0
- package/lib/device-path-provider.js +0 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.d.ts +22 -0
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
- package/lib/device-sockets/ios/notification.d.ts +13 -0
- package/lib/device-sockets/ios/notification.js +0 -3
- package/lib/device-sockets/ios/socket-request-executor.d.ts +11 -0
- package/lib/device-sockets/ios/socket-request-executor.js +0 -3
- package/lib/helpers/android-bundle-validator-helper.d.ts +18 -0
- package/lib/helpers/android-bundle-validator-helper.js +1 -2
- package/lib/helpers/deploy-command-helper.d.ts +16 -0
- package/lib/helpers/deploy-command-helper.js +0 -1
- package/lib/helpers/key-command-helper.d.ts +13 -0
- package/lib/helpers/key-command-helper.js +3 -4
- package/lib/helpers/livesync-command-helper.d.ts +36 -0
- package/lib/helpers/livesync-command-helper.js +2 -4
- package/lib/helpers/network-connectivity-validator.d.ts +12 -0
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.d.ts +14 -0
- package/lib/helpers/options-track-helper.js +4 -3
- package/lib/helpers/package-path-helper.d.ts +2 -0
- package/lib/helpers/package-path-helper.js +0 -1
- package/lib/helpers/platform-command-helper.d.ts +35 -0
- package/lib/helpers/platform-command-helper.js +2 -7
- package/lib/helpers/version-validator-helper.d.ts +8 -0
- package/lib/helpers/version-validator-helper.js +0 -1
- package/lib/key-commands/bootstrap.d.ts +1 -0
- package/lib/key-commands/bootstrap.js +3 -3
- package/lib/key-commands/index.d.ts +166 -0
- package/lib/key-commands/index.js +5 -5
- package/lib/nativescript-cli-lib-bootstrap.d.ts +1 -0
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.d.ts +1 -0
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.d.ts +1 -0
- package/lib/nativescript-cli.js +2 -11
- package/lib/node/pbxproj-dom-xcode.d.ts +4 -0
- package/lib/node/pbxproj-dom-xcode.js +0 -1
- package/lib/node/xcode.d.ts +2 -0
- package/lib/node/xcode.js +0 -1
- package/lib/node-package-manager.d.ts +16 -0
- package/lib/node-package-manager.js +1 -11
- package/lib/options.d.ts +33 -0
- package/lib/options.js +186 -183
- package/lib/package-installation-manager.d.ts +30 -0
- package/lib/package-installation-manager.js +1 -8
- package/lib/package-manager.d.ts +32 -0
- package/lib/package-manager.js +0 -2
- package/lib/platform-command-param.d.ts +10 -0
- package/lib/platform-command-param.js +0 -1
- package/lib/pnpm-package-manager.d.ts +16 -0
- package/lib/pnpm-package-manager.js +1 -4
- package/lib/project-data.d.ts +58 -0
- package/lib/project-data.js +0 -12
- package/lib/providers/project-files-provider.d.ts +12 -0
- package/lib/providers/project-files-provider.js +0 -1
- package/lib/resolvers/livesync-service-resolver.d.ts +9 -0
- package/lib/resolvers/livesync-service-resolver.js +0 -1
- package/lib/services/analytics/analytics-broker-process.d.ts +1 -0
- package/lib/services/analytics/analytics-broker-process.js +8 -10
- package/lib/services/analytics/analytics-broker.d.ts +11 -0
- package/lib/services/analytics/analytics-broker.js +2 -2
- package/lib/services/analytics/analytics-service.d.ts +46 -0
- package/lib/services/analytics/analytics-service.js +29 -29
- package/lib/services/analytics/google-analytics-provider.d.ts +22 -0
- package/lib/services/analytics/google-analytics-provider.js +96 -92
- package/lib/services/analytics-settings-service.d.ts +1 -0
- package/lib/services/analytics-settings-service.js +0 -5
- package/lib/services/android/android-bundle-tool-service.d.ts +27 -0
- package/lib/services/android/android-bundle-tool-service.js +102 -4
- package/lib/services/android/gradle-build-args-service.d.ts +17 -0
- package/lib/services/android/gradle-build-args-service.js +0 -3
- package/lib/services/android/gradle-build-service.d.ts +12 -0
- package/lib/services/android/gradle-build-service.js +0 -1
- package/lib/services/android/gradle-command-service.d.ts +11 -0
- package/lib/services/android/gradle-command-service.js +0 -1
- package/lib/services/android-device-debug-service.d.ts +30 -0
- package/lib/services/android-device-debug-service.js +0 -6
- package/lib/services/android-plugin-build-service.d.ts +55 -0
- package/lib/services/android-plugin-build-service.js +2 -31
- package/lib/services/android-project-service.d.ts +75 -0
- package/lib/services/android-project-service.js +4 -71
- package/lib/services/android-resources-migration-service.d.ts +17 -0
- package/lib/services/android-resources-migration-service.js +0 -7
- package/lib/services/apple-portal/apple-portal-application-service.d.ts +12 -0
- package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-cookie-service.d.ts +10 -0
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.d.ts +19 -0
- package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
- package/lib/services/apple-portal/srp/srp-wrapper.d.ts +29 -0
- package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
- package/lib/services/assets-generation/assets-generation-service.d.ts +24 -0
- package/lib/services/assets-generation/assets-generation-service.js +13 -11
- package/lib/services/build-artifacts-service.d.ts +16 -0
- package/lib/services/build-artifacts-service.js +1 -2
- package/lib/services/build-data-service.d.ts +7 -0
- package/lib/services/build-data-service.js +0 -1
- package/lib/services/build-info-file-service.d.ts +16 -0
- package/lib/services/build-info-file-service.js +0 -1
- package/lib/services/bundler/bundler-compiler-service.d.ts +50 -0
- package/lib/services/bundler/bundler-compiler-service.js +3 -145
- package/lib/services/bundler/bundler.d.ts +75 -0
- package/lib/services/bundler/bundler.js +0 -1
- package/lib/services/cleanup-service.d.ts +29 -0
- package/lib/services/cleanup-service.js +10 -13
- package/lib/services/cocoapods-platform-manager.d.ts +17 -0
- package/lib/services/cocoapods-platform-manager.js +0 -9
- package/lib/services/cocoapods-service.d.ts +47 -0
- package/lib/services/cocoapods-service.js +1 -21
- package/lib/services/debug-data-service.d.ts +7 -0
- package/lib/services/debug-data-service.js +0 -1
- package/lib/services/debug-service-base.d.ts +12 -0
- package/lib/services/debug-service-base.js +0 -7
- package/lib/services/device/device-install-app-service.d.ts +19 -0
- package/lib/services/device/device-install-app-service.js +1 -2
- package/lib/services/doctor-service.d.ts +51 -0
- package/lib/services/doctor-service.js +20 -32
- package/lib/services/extensibility-service.d.ts +36 -0
- package/lib/services/extensibility-service.js +126 -13
- package/lib/services/files-hash-service.d.ts +17 -0
- package/lib/services/files-hash-service.js +0 -1
- package/lib/services/hmr-status-service.d.ts +19 -0
- package/lib/services/hmr-status-service.js +0 -2
- package/lib/services/info-service.d.ts +6 -0
- package/lib/services/info-service.js +0 -1
- package/lib/services/initialize-service.d.ts +8 -0
- package/lib/services/initialize-service.js +2 -5
- package/lib/services/ios/export-options-plist-service.d.ts +13 -0
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.d.ts +33 -0
- package/lib/services/ios/ios-signing-service.js +0 -4
- package/lib/services/ios/spm-pbxproj-service.d.ts +16 -0
- package/lib/services/ios/spm-pbxproj-service.js +234 -0
- package/lib/services/ios/spm-service.d.ts +35 -0
- package/lib/services/ios/spm-service.js +10 -138
- package/lib/services/ios/xcodebuild-args-service.d.ts +20 -0
- package/lib/services/ios/xcodebuild-args-service.js +0 -29
- package/lib/services/ios/xcodebuild-command-service.d.ts +17 -0
- package/lib/services/ios/xcodebuild-command-service.js +0 -3
- package/lib/services/ios/xcodebuild-service.d.ts +13 -0
- package/lib/services/ios/xcodebuild-service.js +1 -2
- package/lib/services/ios-debugger-port-service.d.ts +20 -0
- package/lib/services/ios-debugger-port-service.js +0 -1
- package/lib/services/ios-device-debug-service.d.ts +29 -0
- package/lib/services/ios-device-debug-service.js +0 -1
- package/lib/services/ios-entitlements-service.d.ts +19 -0
- package/lib/services/ios-entitlements-service.js +3 -4
- package/lib/services/ios-extensions-service.d.ts +12 -0
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.d.ts +11 -0
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.d.ts +14 -0
- package/lib/services/ios-native-target-service.js +5 -6
- package/lib/services/ios-project-service.d.ts +108 -0
- package/lib/services/ios-project-service.js +9 -135
- package/lib/services/ios-provision-service.d.ts +18 -0
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.d.ts +39 -0
- package/lib/services/ios-watch-app-service.js +18 -75
- package/lib/services/ip-service.d.ts +10 -0
- package/lib/services/ip-service.js +0 -2
- package/lib/services/itmstransporter-service.d.ts +26 -0
- package/lib/services/itmstransporter-service.js +0 -1
- package/lib/services/karma-execution.d.ts +1 -0
- package/lib/services/karma-execution.js +0 -2
- package/lib/services/livesync/android-device-livesync-service-base.d.ts +19 -0
- package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
- package/lib/services/livesync/android-device-livesync-service.d.ts +24 -0
- package/lib/services/livesync/android-device-livesync-service.js +0 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.d.ts +36 -0
- package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
- package/lib/services/livesync/android-livesync-service.d.ts +16 -0
- package/lib/services/livesync/android-livesync-service.js +0 -1
- package/lib/services/livesync/android-livesync-tool.d.ts +58 -0
- package/lib/services/livesync/android-livesync-tool.js +0 -4
- package/lib/services/livesync/device-livesync-service-base.d.ts +13 -0
- package/lib/services/livesync/device-livesync-service-base.js +0 -2
- package/lib/services/livesync/ios-device-livesync-service.d.ts +28 -0
- package/lib/services/livesync/ios-device-livesync-service.js +0 -7
- package/lib/services/livesync/ios-livesync-service.d.ts +17 -0
- package/lib/services/livesync/ios-livesync-service.js +0 -55
- package/lib/services/livesync/livesync-socket.d.ts +5 -0
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.d.ts +25 -0
- package/lib/services/livesync/platform-livesync-service-base.js +0 -5
- package/lib/services/livesync-process-data-service.d.ts +10 -0
- package/lib/services/livesync-process-data-service.js +0 -1
- package/lib/services/log-parser-service.d.ts +11 -0
- package/lib/services/log-parser-service.js +0 -1
- package/lib/services/log-source-map-service.d.ts +28 -0
- package/lib/services/log-source-map-service.js +0 -15
- package/lib/services/marking-mode-service.d.ts +12 -0
- package/lib/services/marking-mode-service.js +10 -8
- package/lib/services/metadata-filtering-service.d.ts +19 -0
- package/lib/services/metadata-filtering-service.js +0 -1
- package/lib/services/npm-config-service.d.ts +7 -0
- package/lib/services/npm-config-service.js +0 -4
- package/lib/services/pacote-service.d.ts +16 -0
- package/lib/services/pacote-service.js +0 -7
- package/lib/services/performance-service.d.ts +19 -0
- package/lib/services/performance-service.js +2 -3
- package/lib/services/platform/add-platform-service.d.ts +21 -0
- package/lib/services/platform/add-platform-service.js +2 -49
- package/lib/services/platform/platform-validation-service.d.ts +17 -0
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.d.ts +15 -0
- package/lib/services/platform/prepare-native-platform-service.js +3 -5
- package/lib/services/platform-environment-requirements.d.ts +15 -0
- package/lib/services/platform-environment-requirements.js +4 -8
- package/lib/services/platform-project-service-base.d.ts +14 -0
- package/lib/services/platform-project-service-base.js +0 -1
- package/lib/services/platforms-data-service.d.ts +9 -0
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.d.ts +60 -0
- package/lib/services/plugins-service.js +2 -20
- package/lib/services/prepare-data-service.d.ts +7 -0
- package/lib/services/prepare-data-service.js +0 -1
- package/lib/services/project-backup-service.d.ts +12 -0
- package/lib/services/project-backup-service.js +0 -4
- package/lib/services/project-changes-service.d.ts +30 -0
- package/lib/services/project-changes-service.js +3 -14
- package/lib/services/project-cleanup-service.d.ts +13 -0
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.d.ts +33 -0
- package/lib/services/project-config-service.js +35 -32
- package/lib/services/project-data-service.d.ts +48 -0
- package/lib/services/project-data-service.js +7 -36
- package/lib/services/project-name-service.d.ts +16 -0
- package/lib/services/project-name-service.js +4 -5
- package/lib/services/project-service.d.ts +34 -0
- package/lib/services/project-service.js +0 -10
- package/lib/services/project-templates-service.d.ts +18 -0
- package/lib/services/project-templates-service.js +2 -3
- package/lib/services/qr-code-terminal-service.d.ts +5 -0
- package/lib/services/qr-code-terminal-service.js +0 -1
- package/lib/services/require-service.d.ts +3 -0
- package/lib/services/require-service.js +0 -1
- package/lib/services/start-service.d.ts +30 -0
- package/lib/services/start-service.js +0 -1
- package/lib/services/temp-service.d.ts +14 -0
- package/lib/services/temp-service.js +0 -3
- package/lib/services/terminal-spinner-service.d.ts +5 -0
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.d.ts +26 -0
- package/lib/services/test-execution-service.js +3 -9
- package/lib/services/test-initialization-service.d.ts +10 -0
- package/lib/services/test-initialization-service.js +0 -4
- package/lib/services/timeline-profiler-service.d.ts +18 -0
- package/lib/services/timeline-profiler-service.js +0 -1
- package/lib/services/user-settings-service.d.ts +14 -0
- package/lib/services/user-settings-service.js +0 -1
- package/lib/services/versions-service.d.ts +5 -0
- package/lib/services/versions-service.js +5 -6
- package/lib/services/watch-ignore-list-service.d.ts +7 -0
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/xcconfig-service.d.ts +15 -0
- package/lib/services/xcconfig-service.js +45 -12
- package/lib/services/xcproj-service.d.ts +1 -0
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.d.ts +1 -0
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.d.ts +18 -0
- package/lib/sys-info.js +2 -2
- package/lib/tools/config-manipulation/config-transformer.d.ts +28 -0
- package/lib/tools/config-manipulation/config-transformer.js +15 -19
- package/lib/tools/node-modules/node-modules-builder.d.ts +9 -0
- package/lib/tools/node-modules/node-modules-builder.js +0 -1
- package/lib/tools/node-modules/node-modules-dependencies-builder.d.ts +10 -0
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
- package/lib/tools/plist-merge/plist-session.d.ts +30 -0
- package/lib/tools/plist-merge/plist-session.js +92 -0
- package/lib/yarn-package-manager.d.ts +16 -0
- package/lib/yarn-package-manager.js +0 -1
- package/lib/yarn2-package-manager.d.ts +18 -0
- package/lib/yarn2-package-manager.js +0 -3
- package/package.json +11 -118
- package/postinstall.js +7 -2
- package/lib/.d.ts +0 -504
- package/lib/services/analytics/google-analytics-cross-client-custom-dimensions.d.ts +0 -6
- package/node_modules/debug/LICENSE +0 -20
- package/node_modules/debug/README.md +0 -481
- package/node_modules/debug/package.json +0 -64
- package/node_modules/debug/src/browser.js +0 -272
- package/node_modules/debug/src/common.js +0 -292
- package/node_modules/debug/src/index.js +0 -10
- package/node_modules/debug/src/node.js +0 -263
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -38
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/universal-analytics/.travis.yml +0 -11
- package/node_modules/universal-analytics/AcceptableParams.md +0 -757
- package/node_modules/universal-analytics/HISTORY.md +0 -170
- package/node_modules/universal-analytics/Makefile +0 -5
- package/node_modules/universal-analytics/README.md +0 -651
- package/node_modules/universal-analytics/index.js +0 -2
- package/node_modules/universal-analytics/lib/config.js +0 -171
- package/node_modules/universal-analytics/lib/index.js +0 -563
- package/node_modules/universal-analytics/lib/request.js +0 -73
- package/node_modules/universal-analytics/lib/utils.js +0 -29
- package/node_modules/universal-analytics/package.json +0 -33
- package/node_modules/universal-analytics/test/_enqueue.js +0 -144
- package/node_modules/universal-analytics/test/event.js +0 -346
- package/node_modules/universal-analytics/test/exception.js +0 -233
- package/node_modules/universal-analytics/test/index.js +0 -141
- package/node_modules/universal-analytics/test/item.js +0 -550
- package/node_modules/universal-analytics/test/middleware.js +0 -119
- package/node_modules/universal-analytics/test/mocha.opts +0 -3
- package/node_modules/universal-analytics/test/pageview.js +0 -286
- package/node_modules/universal-analytics/test/send.js +0 -232
- package/node_modules/universal-analytics/test/set.js +0 -68
- package/node_modules/universal-analytics/test/timing.js +0 -363
- package/node_modules/universal-analytics/test/transaction.js +0 -371
- package/node_modules/uuid/LICENSE.md +0 -9
- package/node_modules/uuid/README.md +0 -510
- package/node_modules/uuid/dist/cjs/index.d.ts +0 -15
- package/node_modules/uuid/dist/cjs/index.js +0 -31
- package/node_modules/uuid/dist/cjs/max.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/max.js +0 -3
- package/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/md5.js +0 -13
- package/node_modules/uuid/dist/cjs/native.d.ts +0 -6
- package/node_modules/uuid/dist/cjs/native.js +0 -4
- package/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/nil.js +0 -3
- package/node_modules/uuid/dist/cjs/package.json +0 -1
- package/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/parse.js +0 -11
- package/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/regex.js +0 -3
- package/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/rng.js +0 -13
- package/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/sha1.js +0 -13
- package/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/cjs/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs/types.d.ts +0 -21
- package/node_modules/uuid/dist/cjs/types.js +0 -2
- package/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
- package/node_modules/uuid/dist/cjs/v1.js +0 -87
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v3.js +0 -14
- package/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
- package/node_modules/uuid/dist/cjs/v35.js +0 -41
- package/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v4.js +0 -29
- package/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v5.js +0 -14
- package/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v6.js +0 -19
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v7.js +0 -69
- package/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/validate.js +0 -7
- package/node_modules/uuid/dist/cjs/version.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/version.js +0 -10
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +0 -15
- package/node_modules/uuid/dist/cjs-browser/index.js +0 -31
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/max.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +0 -4
- package/node_modules/uuid/dist/cjs-browser/native.js +0 -4
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/package.json +0 -1
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +0 -21
- package/node_modules/uuid/dist/cjs-browser/types.js +0 -2
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +0 -11
- package/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +0 -9
- package/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +0 -7
- package/node_modules/uuid/dist/cjs-browser/v35.js +0 -41
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +0 -4
- package/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +0 -9
- package/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +0 -4
- package/node_modules/uuid/dist/cjs-browser/v6.js +0 -19
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +0 -9
- package/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/version.js +0 -10
- package/node_modules/uuid/dist/esm/bin/uuid +0 -2
- package/node_modules/uuid/dist/esm/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm/index.js +0 -14
- package/node_modules/uuid/dist/esm/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm/max.js +0 -1
- package/node_modules/uuid/dist/esm/md5.d.ts +0 -4
- package/node_modules/uuid/dist/esm/md5.js +0 -11
- package/node_modules/uuid/dist/esm/native.d.ts +0 -6
- package/node_modules/uuid/dist/esm/native.js +0 -2
- package/node_modules/uuid/dist/esm/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm/nil.js +0 -1
- package/node_modules/uuid/dist/esm/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm/parse.js +0 -9
- package/node_modules/uuid/dist/esm/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm/regex.js +0 -1
- package/node_modules/uuid/dist/esm/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm/rng.js +0 -10
- package/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/esm/sha1.js +0 -11
- package/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm/stringify.js +0 -35
- package/node_modules/uuid/dist/esm/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm/uuid-bin.js +0 -70
- package/node_modules/uuid/dist/esm/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm/v1.js +0 -83
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v1ToV6.js +0 -10
- package/node_modules/uuid/dist/esm/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v3.js +0 -9
- package/node_modules/uuid/dist/esm/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm/v35.js +0 -36
- package/node_modules/uuid/dist/esm/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v4.js +0 -27
- package/node_modules/uuid/dist/esm/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v5.js +0 -9
- package/node_modules/uuid/dist/esm/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v6.js +0 -17
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v6ToV1.js +0 -10
- package/node_modules/uuid/dist/esm/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v7.js +0 -65
- package/node_modules/uuid/dist/esm/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm/validate.js +0 -5
- package/node_modules/uuid/dist/esm/version.d.ts +0 -2
- package/node_modules/uuid/dist/esm/version.js +0 -8
- package/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm-browser/index.js +0 -14
- package/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/max.js +0 -1
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/md5.js +0 -135
- package/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/native.js +0 -2
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/nil.js +0 -1
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/parse.js +0 -9
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/regex.js +0 -1
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/rng.js +0 -11
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/sha1.js +0 -70
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm-browser/stringify.js +0 -35
- package/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +0 -70
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm-browser/v1.js +0 -83
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +0 -10
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v3.js +0 -9
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm-browser/v35.js +0 -36
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v4.js +0 -27
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v5.js +0 -9
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v6.js +0 -17
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +0 -10
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v7.js +0 -65
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/validate.js +0 -5
- package/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/version.js +0 -8
- package/node_modules/uuid/package.json +0 -132
- package/vendor/aab-tool/LICENSE +0 -202
- package/vendor/aab-tool/README.txt +0 -1
- package/vendor/aab-tool/bundletool.jar +0 -0
- /package/{node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts → lib/bootstrap.d.ts} +0 -0
- /package/{node_modules/uuid/dist/cjs/uuid-bin.d.ts → lib/commands/test-init.d.ts} +0 -0
- /package/{node_modules/uuid/dist/esm-browser/types.js → lib/commands/test.d.ts} +0 -0
- /package/{node_modules/uuid/dist/esm-browser/uuid-bin.d.ts → lib/common/bootstrap.d.ts} +0 -0
- /package/{node_modules/uuid/dist/esm/types.js → lib/common/common-lib.d.ts} +0 -0
- /package/{node_modules/uuid/dist/esm/uuid-bin.d.ts → lib/common/mobile/ios/ios-device-product-name-mapper.d.ts} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
import { IAnalyticsService, IFileSystem, IHooksService } from "../common/declarations";
|
|
3
|
+
import { IOptions, IWatchIgnoreListService } from "../declarations";
|
|
4
|
+
import { INodeModulesDependenciesBuilder, IPlatformController, IPlatformData, IPlatformsDataService } from "../definitions/platform";
|
|
5
|
+
import { IPluginsService } from "../definitions/plugins";
|
|
6
|
+
import { IProjectConfigService, IProjectData, IProjectDataService, IProjectService } from "../definitions/project";
|
|
7
|
+
export declare class PrepareController extends EventEmitter {
|
|
8
|
+
private $platformController;
|
|
9
|
+
$hooksService: IHooksService;
|
|
10
|
+
private $fs;
|
|
11
|
+
private $logger;
|
|
12
|
+
private $options;
|
|
13
|
+
private $mobileHelper;
|
|
14
|
+
private $nodeModulesDependenciesBuilder;
|
|
15
|
+
private $platformsDataService;
|
|
16
|
+
private $pluginsService;
|
|
17
|
+
private $prepareNativePlatformService;
|
|
18
|
+
private $projectChangesService;
|
|
19
|
+
private $projectDataService;
|
|
20
|
+
private $bundlerCompilerService;
|
|
21
|
+
private $watchIgnoreListService;
|
|
22
|
+
private $analyticsService;
|
|
23
|
+
private $markingModeService;
|
|
24
|
+
private $projectConfigService;
|
|
25
|
+
private $projectService;
|
|
26
|
+
private watchersData;
|
|
27
|
+
private isInitialPrepareReady;
|
|
28
|
+
private persistedData;
|
|
29
|
+
private webpackCompilerHandler;
|
|
30
|
+
private pausedFileWatch;
|
|
31
|
+
constructor($platformController: IPlatformController, $hooksService: IHooksService, $fs: IFileSystem, $logger: ILogger, $options: IOptions, $mobileHelper: Mobile.IMobileHelper, $nodeModulesDependenciesBuilder: INodeModulesDependenciesBuilder, $platformsDataService: IPlatformsDataService, $pluginsService: IPluginsService, $prepareNativePlatformService: IPrepareNativePlatformService, $projectChangesService: IProjectChangesService, $projectDataService: IProjectDataService, $bundlerCompilerService: IBundlerCompilerService, $watchIgnoreListService: IWatchIgnoreListService, $analyticsService: IAnalyticsService, $markingModeService: IMarkingModeService, $projectConfigService: IProjectConfigService, $projectService: IProjectService);
|
|
32
|
+
prepare(prepareData: IPrepareData): Promise<IPrepareResultData>;
|
|
33
|
+
stopWatchers(projectDir: string, platform: string): Promise<void>;
|
|
34
|
+
private prepareCore;
|
|
35
|
+
private startWatchersWithPrepare;
|
|
36
|
+
private startJSWatcherWithPrepare;
|
|
37
|
+
private startNativeWatcherWithPrepare;
|
|
38
|
+
private startNativeWatcher;
|
|
39
|
+
getWatcherPatterns(platformData: IPlatformData, projectData: IProjectData): Promise<string[]>;
|
|
40
|
+
writeRuntimePackageJson(projectData: IProjectData, platformData: IPlatformData, prepareData?: IPrepareData): Promise<void>;
|
|
41
|
+
private emitPrepareEvent;
|
|
42
|
+
private trackRuntimeVersion;
|
|
43
|
+
private isFileWatcherPaused;
|
|
44
|
+
toggleFileWatcher(): Promise<boolean>;
|
|
45
|
+
}
|
|
@@ -77,10 +77,6 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
77
77
|
await this.$platformController.addPlatformIfNeeded(prepareData, projectData);
|
|
78
78
|
await this.trackRuntimeVersion(prepareData.platform, projectData);
|
|
79
79
|
this.$logger.info("Preparing project...");
|
|
80
|
-
// we need to mark the ~/package.json (used by core modules)
|
|
81
|
-
// as external for us to be able to write the config to it
|
|
82
|
-
// in writeRuntimePackageJson() below, because otherwise
|
|
83
|
-
// webpack will inline it into the bundle/vendor chunks
|
|
84
80
|
prepareData.env = prepareData.env || {};
|
|
85
81
|
prepareData.env.externals = prepareData.env.externals || [];
|
|
86
82
|
prepareData.env.externals.push("~/package.json");
|
|
@@ -121,8 +117,8 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
121
117
|
},
|
|
122
118
|
};
|
|
123
119
|
}
|
|
124
|
-
await this.startJSWatcherWithPrepare(platformData, projectData, prepareData);
|
|
125
|
-
const hasNativeChanges = await this.startNativeWatcherWithPrepare(platformData, projectData, prepareData);
|
|
120
|
+
await this.startJSWatcherWithPrepare(platformData, projectData, prepareData);
|
|
121
|
+
const hasNativeChanges = await this.startNativeWatcherWithPrepare(platformData, projectData, prepareData);
|
|
126
122
|
const result = {
|
|
127
123
|
platform: platformData.platformNameLowerCase,
|
|
128
124
|
hasNativeChanges,
|
|
@@ -131,7 +127,6 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
131
127
|
if (hasPersistedDataWithNativeChanges) {
|
|
132
128
|
result.hasNativeChanges = true;
|
|
133
129
|
}
|
|
134
|
-
// TODO: Do not persist this in `this` context. Also it should be per platform.
|
|
135
130
|
this.isInitialPrepareReady = true;
|
|
136
131
|
if (this.persistedData && this.persistedData.length) {
|
|
137
132
|
this.emitPrepareEvent({
|
|
@@ -184,7 +179,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
184
179
|
pollInterval: 100,
|
|
185
180
|
stabilityThreshold: 500,
|
|
186
181
|
},
|
|
187
|
-
ignored: ["**/.*", ".*"],
|
|
182
|
+
ignored: ["**/.*", ".*"],
|
|
188
183
|
};
|
|
189
184
|
const watcher = (0, chokidar_1.watch)(patterns, watcherOptions).on("all", async (event, filePath) => {
|
|
190
185
|
if (this.isFileWatcherPaused())
|
|
@@ -226,9 +221,6 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
226
221
|
.concat(pluginsPackageJsonFiles);
|
|
227
222
|
return patterns;
|
|
228
223
|
}
|
|
229
|
-
/**
|
|
230
|
-
* TODO: move this logic to the webpack side of things - WIP and deprecate here with a webpack version check...
|
|
231
|
-
*/
|
|
232
224
|
async writeRuntimePackageJson(projectData, platformData, prepareData = null) {
|
|
233
225
|
var _a, _b, _c, _d, _e;
|
|
234
226
|
const configInfo = this.$projectConfigService.detectProjectConfigs(projectData.projectDir);
|
|
@@ -236,23 +228,20 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
236
228
|
return;
|
|
237
229
|
}
|
|
238
230
|
this.$logger.info("Updating runtime package.json with configuration values...");
|
|
239
|
-
// Tolerate a missing/unreadable config — prior to the destructure this
|
|
240
|
-
// was a plain object spread, where `undefined` is a legal no-op.
|
|
241
231
|
const { hooks, ignoredNativeDependencies, webpackPackageName, webpackConfigPath, appResourcesPath, buildPath, appPath, ...nsConfig } = (_a = this.$projectConfigService.readConfig(projectData.projectDir)) !== null && _a !== void 0 ? _a : {};
|
|
242
232
|
const platform = platformData.platformNameLowerCase;
|
|
243
233
|
let installedRuntimePackageJSON;
|
|
244
234
|
let runtimePackageName;
|
|
245
|
-
if (platform ===
|
|
235
|
+
if (platform === constants_1.PlatformTypes.ios) {
|
|
246
236
|
runtimePackageName =
|
|
247
237
|
((_c = (_b = projectData.nsConfig) === null || _b === void 0 ? void 0 : _b.ios) === null || _c === void 0 ? void 0 : _c.runtimePackageName) ||
|
|
248
238
|
constants_1.SCOPED_IOS_RUNTIME_NAME;
|
|
249
239
|
}
|
|
250
|
-
else if (platform ===
|
|
240
|
+
else if (platform === constants_1.PlatformTypes.android) {
|
|
251
241
|
runtimePackageName =
|
|
252
242
|
((_e = (_d = projectData.nsConfig) === null || _d === void 0 ? void 0 : _d.android) === null || _e === void 0 ? void 0 : _e.runtimePackageName) ||
|
|
253
243
|
constants_1.SCOPED_ANDROID_RUNTIME_NAME;
|
|
254
244
|
}
|
|
255
|
-
// try reading from installed runtime first before reading from the npm registry...
|
|
256
245
|
const installedRuntimePackageJSONPath = (0, resolve_package_path_1.resolvePackageJSONPath)(runtimePackageName, {
|
|
257
246
|
paths: [projectData.projectDir],
|
|
258
247
|
});
|
|
@@ -265,7 +254,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
265
254
|
main: "bundle",
|
|
266
255
|
...(installedRuntimePackageJSON ? {} : {}),
|
|
267
256
|
};
|
|
268
|
-
if (platform ===
|
|
257
|
+
if (platform === constants_1.PlatformTypes.ios) {
|
|
269
258
|
if (installedRuntimePackageJSON) {
|
|
270
259
|
packageData.ios = packageData.ios || {};
|
|
271
260
|
packageData.ios.runtime = {
|
|
@@ -278,7 +267,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
278
267
|
}
|
|
279
268
|
delete packageData.android;
|
|
280
269
|
}
|
|
281
|
-
if (platform ===
|
|
270
|
+
if (platform === constants_1.PlatformTypes.android) {
|
|
282
271
|
if (installedRuntimePackageJSON) {
|
|
283
272
|
packageData.android = packageData.android || {};
|
|
284
273
|
packageData.android.runtime = {
|
|
@@ -302,11 +291,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
302
291
|
packagePath = path.join(platformData.projectRoot, this.$options.hostProjectModuleName, "src", this.$options.hostProjectPath ? "nativescript" : "main", "assets", "app", "package.json");
|
|
303
292
|
}
|
|
304
293
|
try {
|
|
305
|
-
// this will read the package.json that is already emitted by
|
|
306
|
-
// the GenerateNativeScriptEntryPointsPlugin webpack plugin
|
|
307
294
|
const emittedPackageData = this.$fs.readJson(packagePath);
|
|
308
|
-
// since ns7 we only care about the main key from the emitted
|
|
309
|
-
// package.json, the rest is coming from the new config.
|
|
310
295
|
if (emittedPackageData === null || emittedPackageData === void 0 ? void 0 : emittedPackageData.main) {
|
|
311
296
|
packageData.main = emittedPackageData.main;
|
|
312
297
|
}
|
|
@@ -334,7 +319,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
334
319
|
return;
|
|
335
320
|
}
|
|
336
321
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
337
|
-
action:
|
|
322
|
+
action: constants_1.TrackActionNames.UsingRuntimeVersion,
|
|
338
323
|
additionalData: `${platform.toLowerCase()}${constants_1.AnalyticsEventLabelDelimiter}${version}`,
|
|
339
324
|
});
|
|
340
325
|
}
|
|
@@ -379,4 +364,3 @@ __decorate([
|
|
|
379
364
|
(0, decorators_1.cache)()
|
|
380
365
|
], PrepareController.prototype, "trackRuntimeVersion", null);
|
|
381
366
|
yok_1.injector.register("prepareController", PrepareController);
|
|
382
|
-
//# sourceMappingURL=prepare-controller.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
import { IProjectDataService, IProjectData } from "../definitions/project";
|
|
3
|
+
import { IBuildController } from "../definitions/build";
|
|
4
|
+
import { IPlatformsDataService } from "../definitions/platform";
|
|
5
|
+
import { IDebugController } from "../definitions/debug";
|
|
6
|
+
import { IPluginsService } from "../definitions/plugins";
|
|
7
|
+
import { IAnalyticsService, IErrors, IHooksService } from "../common/declarations";
|
|
8
|
+
import { IInjector } from "../common/definitions/yok";
|
|
9
|
+
export declare class RunController extends EventEmitter implements IRunController {
|
|
10
|
+
protected $analyticsService: IAnalyticsService;
|
|
11
|
+
private $buildController;
|
|
12
|
+
private $debugController;
|
|
13
|
+
private $deviceInstallAppService;
|
|
14
|
+
protected $devicesService: Mobile.IDevicesService;
|
|
15
|
+
protected $errors: IErrors;
|
|
16
|
+
protected $injector: IInjector;
|
|
17
|
+
private $hmrStatusService;
|
|
18
|
+
$hooksService: IHooksService;
|
|
19
|
+
private $liveSyncServiceResolver;
|
|
20
|
+
private $liveSyncProcessDataService;
|
|
21
|
+
protected $logger: ILogger;
|
|
22
|
+
protected $mobileHelper: Mobile.IMobileHelper;
|
|
23
|
+
private $platformsDataService;
|
|
24
|
+
private $pluginsService;
|
|
25
|
+
private $prepareController;
|
|
26
|
+
private $prepareDataService;
|
|
27
|
+
private $prepareNativePlatformService;
|
|
28
|
+
private $projectChangesService;
|
|
29
|
+
protected $projectDataService: IProjectDataService;
|
|
30
|
+
private $staticConfig;
|
|
31
|
+
private prepareReadyEventHandler;
|
|
32
|
+
private _syncInProgress;
|
|
33
|
+
private _pendingSyncs;
|
|
34
|
+
constructor($analyticsService: IAnalyticsService, $buildController: IBuildController, $debugController: IDebugController, $deviceInstallAppService: IDeviceInstallAppService, $devicesService: Mobile.IDevicesService, $errors: IErrors, $injector: IInjector, $hmrStatusService: IHmrStatusService, $hooksService: IHooksService, $liveSyncServiceResolver: ILiveSyncServiceResolver, $liveSyncProcessDataService: ILiveSyncProcessDataService, $logger: ILogger, $mobileHelper: Mobile.IMobileHelper, $platformsDataService: IPlatformsDataService, $pluginsService: IPluginsService, $prepareController: IPrepareController, $prepareDataService: IPrepareDataService, $prepareNativePlatformService: IPrepareNativePlatformService, $projectChangesService: IProjectChangesService, $projectDataService: IProjectDataService, $staticConfig: Config.IStaticConfig);
|
|
35
|
+
run(runData: IRunData): Promise<void>;
|
|
36
|
+
stop(data: IStopRunData): Promise<void>;
|
|
37
|
+
getDeviceDescriptors(data: {
|
|
38
|
+
projectDir: string;
|
|
39
|
+
}): ILiveSyncDeviceDescriptor[];
|
|
40
|
+
protected refreshApplication(projectData: IProjectData, liveSyncResultInfo: ILiveSyncResultInfo, filesChangeEventData: IFilesChangeEventData, deviceDescriptor: ILiveSyncDeviceDescriptor, fullSyncAction?: () => Promise<void>): Promise<IRestartApplicationInfo>;
|
|
41
|
+
protected refreshApplicationWithDebug(projectData: IProjectData, liveSyncResultInfo: ILiveSyncResultInfo, filesChangeEventData: IFilesChangeEventData, deviceDescriptor: ILiveSyncDeviceDescriptor): Promise<IRestartApplicationInfo>;
|
|
42
|
+
protected refreshApplicationWithoutDebug(projectData: IProjectData, liveSyncResultInfo: ILiveSyncResultInfo, filesChangeEventData: IFilesChangeEventData, deviceDescriptor: ILiveSyncDeviceDescriptor, settings?: IRefreshApplicationSettings, fullSyncAction?: () => Promise<void>): Promise<IRestartApplicationInfo>;
|
|
43
|
+
private getDeviceDescriptorsForInitialSync;
|
|
44
|
+
private initializeSetup;
|
|
45
|
+
private attachDeviceLostHandler;
|
|
46
|
+
private syncInitialDataOnDevices;
|
|
47
|
+
private setupAndroidViteHmrReverse;
|
|
48
|
+
private ensureAndroidReverse;
|
|
49
|
+
private getViteHmrPort;
|
|
50
|
+
private isTruthyEnvFlag;
|
|
51
|
+
private syncChangedDataOnDevices;
|
|
52
|
+
private scheduleSyncOnDevices;
|
|
53
|
+
private executeSyncOnDevices;
|
|
54
|
+
private mergeFilesChangeEvents;
|
|
55
|
+
private addActionToChain;
|
|
56
|
+
private emitCore;
|
|
57
|
+
}
|
|
@@ -79,14 +79,11 @@ class RunController extends events_1.EventEmitter {
|
|
|
79
79
|
const { projectDir, deviceIdentifiers, stopOptions } = data;
|
|
80
80
|
const liveSyncProcessInfo = this.$liveSyncProcessDataService.getPersistedData(projectDir);
|
|
81
81
|
if (liveSyncProcessInfo && !liveSyncProcessInfo.isStopped) {
|
|
82
|
-
// In case we are coming from error during livesync, the current action is the one that erred (but we are still executing it),
|
|
83
|
-
// so we cannot await it as this will cause infinite loop.
|
|
84
82
|
const shouldAwaitPendingOperation = !stopOptions || stopOptions.shouldAwaitAllActions;
|
|
85
83
|
const deviceIdentifiersToRemove = deviceIdentifiers && deviceIdentifiers.length
|
|
86
84
|
? deviceIdentifiers
|
|
87
85
|
: _.map(liveSyncProcessInfo.deviceDescriptors, (d) => d.identifier);
|
|
88
86
|
const removedDeviceIdentifiers = _.remove(liveSyncProcessInfo.deviceDescriptors, (descriptor) => _.includes(deviceIdentifiersToRemove, descriptor.identifier)).map((descriptor) => descriptor.identifier);
|
|
89
|
-
// Handle the case when no more devices left for any of the persisted platforms
|
|
90
87
|
for (let i = 0; i < liveSyncProcessInfo.platforms.length; i++) {
|
|
91
88
|
const platform = liveSyncProcessInfo.platforms[i];
|
|
92
89
|
const devices = this.$devicesService.getDevicesForPlatform(platform);
|
|
@@ -94,7 +91,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
94
91
|
await this.$prepareController.stopWatchers(projectDir, platform);
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
|
-
// In case deviceIdentifiers are not passed, we should stop the whole LiveSync.
|
|
98
94
|
if (!deviceIdentifiers ||
|
|
99
95
|
!deviceIdentifiers.length ||
|
|
100
96
|
!liveSyncProcessInfo.deviceDescriptors ||
|
|
@@ -125,7 +121,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
125
121
|
shouldAwaitPendingOperation) {
|
|
126
122
|
await liveSyncProcessInfo.currentSyncAction;
|
|
127
123
|
}
|
|
128
|
-
// Emit RunOnDevice stopped when we've really stopped.
|
|
129
124
|
_.each(removedDeviceIdentifiers, (deviceIdentifier) => {
|
|
130
125
|
this.emitCore(constants_2.RunOnDeviceEvents.runOnDeviceStopped, {
|
|
131
126
|
projectDir,
|
|
@@ -163,8 +158,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
163
158
|
shouldSkipEmitLiveSyncNotification: true,
|
|
164
159
|
shouldCheckDeveloperDiscImage: true,
|
|
165
160
|
});
|
|
166
|
-
// we do not stop the application when debugBrk is false, so we need to attach, instead of launch
|
|
167
|
-
// if we try to send the launch request, the debugger port will not be printed and the command will timeout
|
|
168
161
|
debugOptions.start = !debugOptions.debugBrk;
|
|
169
162
|
debugOptions.forceDebuggerAttachedEvent = refreshInfo.didRestart;
|
|
170
163
|
await this.$debugController.enableDebuggingCoreWithoutWaitingCurrentAction(projectData.projectDir, deviceDescriptor.identifier, debugOptions);
|
|
@@ -232,7 +225,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
232
225
|
getDeviceDescriptorsForInitialSync(projectDir, deviceDescriptors) {
|
|
233
226
|
const currentRunData = this.$liveSyncProcessDataService.getPersistedData(projectDir);
|
|
234
227
|
const isAlreadyLiveSyncing = currentRunData && !currentRunData.isStopped;
|
|
235
|
-
// Prevent cases where liveSync is called consecutive times with the same device, for example [ A, B, C ] and then [ A, B, D ] - we want to execute initialSync only for D.
|
|
236
228
|
const deviceDescriptorsForInitialSync = isAlreadyLiveSyncing
|
|
237
229
|
? _.differenceBy(deviceDescriptors, currentRunData.deviceDescriptors, "identifier")
|
|
238
230
|
: deviceDescriptors;
|
|
@@ -278,13 +270,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
278
270
|
},
|
|
279
271
|
watch: !liveSyncInfo.skipWatcher,
|
|
280
272
|
});
|
|
281
|
-
// For Android + Vite HMR, own the `adb reverse` ourselves —
|
|
282
|
-
// with our SDK-resolved adb, scoped to this exact serial, and
|
|
283
|
-
// only after the device is up — then hand the bundler the
|
|
284
|
-
// result via env vars. This MUST run before `prepare` (which
|
|
285
|
-
// spawns the Vite bundler that inherits `process.env`) so the
|
|
286
|
-
// bundler trusts the tunnel instead of racing us to spawn its
|
|
287
|
-
// own adb during config-load. See packages/vite hardening.
|
|
288
273
|
await this.setupAndroidViteHmrReverse(device, projectData, liveSyncInfo, "pre-build");
|
|
289
274
|
const prepareResultData = await this.$prepareController.prepare(prepareData);
|
|
290
275
|
const buildData = {
|
|
@@ -294,8 +279,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
294
279
|
const platformData = this.$platformsDataService.getPlatformData(device.deviceInfo.platform, projectData);
|
|
295
280
|
try {
|
|
296
281
|
let packageFilePath = null;
|
|
297
|
-
// Case where we have three devices attached, a change that requires build is found,
|
|
298
|
-
// we'll rebuild the app only for the first device, but we should install new package on all three devices.
|
|
299
282
|
if (rebuiltInformation[platformData.platformNameLowerCase] &&
|
|
300
283
|
(this.$mobileHelper.isAndroidPlatform(platformData.platformNameLowerCase) ||
|
|
301
284
|
rebuiltInformation[platformData.platformNameLowerCase]
|
|
@@ -319,7 +302,7 @@ class RunController extends events_1.EventEmitter {
|
|
|
319
302
|
}
|
|
320
303
|
else {
|
|
321
304
|
await this.$analyticsService.trackEventActionInGoogleAnalytics({
|
|
322
|
-
action:
|
|
305
|
+
action: constants_2.TrackActionNames.LiveSync,
|
|
323
306
|
device,
|
|
324
307
|
projectDir: projectData.projectDir,
|
|
325
308
|
});
|
|
@@ -336,10 +319,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
336
319
|
watch: !skipWatcher,
|
|
337
320
|
liveSyncDeviceData: deviceDescriptor,
|
|
338
321
|
});
|
|
339
|
-
// Re-establish the adb reverse on the CURRENT transport right
|
|
340
|
-
// before launch — the transport can change during build/install
|
|
341
|
-
// and drop the mapping set in `pre-build`, which would leave the
|
|
342
|
-
// app unable to reach the Vite dev server at 127.0.0.1.
|
|
343
322
|
await this.setupAndroidViteHmrReverse(device, projectData, liveSyncInfo, "pre-launch");
|
|
344
323
|
await this.refreshApplication(projectData, liveSyncResultInfo, null, deviceDescriptor);
|
|
345
324
|
this.$logger.info(`Successfully synced application ${liveSyncResultInfo.deviceAppData.appIdentifier} on device ${liveSyncResultInfo.deviceAppData.device.deviceInfo.identifier}.`);
|
|
@@ -367,26 +346,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
367
346
|
};
|
|
368
347
|
await this.addActionToChain(projectData.projectDir, () => this.$devicesService.execute(deviceAction, (device) => _.some(deviceDescriptors, (deviceDescriptor) => deviceDescriptor.identifier === device.deviceInfo.identifier)));
|
|
369
348
|
}
|
|
370
|
-
/**
|
|
371
|
-
* Set up `adb reverse tcp:<port> tcp:<port>` for an Android device
|
|
372
|
-
* when the project bundles with Vite in HMR/watch mode, then export
|
|
373
|
-
* the result to the bundler subprocess via environment variables.
|
|
374
|
-
*
|
|
375
|
-
* The Vite dev-host helper prefers an ADB tunnel (device-side
|
|
376
|
-
* `127.0.0.1:<port>` → host) over the emulator's flaky slirp NAT
|
|
377
|
-
* (`10.0.2.2`). Historically the bundler tried to wire that tunnel
|
|
378
|
-
* itself at config-load time, racing this CLI's device discovery
|
|
379
|
-
* over the single global adb daemon and intermittently freezing the
|
|
380
|
-
* run at "Searching for devices…". The CLI is the right owner: it
|
|
381
|
-
* knows the exact target serial and when the device is ready, and it
|
|
382
|
-
* already drives a single, version-matched adb. We do the reverse
|
|
383
|
-
* here and signal the bundler with `NS_ADB_REVERSE_READY=1` so it
|
|
384
|
-
* never spawns adb on its own.
|
|
385
|
-
*
|
|
386
|
-
* Best-effort: any failure is logged at trace level and swallowed.
|
|
387
|
-
* The bundler then falls back to its own (now hardened) adb path, or
|
|
388
|
-
* ultimately to `10.0.2.2`, so a reverse hiccup never fails the run.
|
|
389
|
-
*/
|
|
390
349
|
async setupAndroidViteHmrReverse(device, projectData, liveSyncInfo, phase) {
|
|
391
350
|
try {
|
|
392
351
|
if (!this.$mobileHelper.isAndroidPlatform(device.deviceInfo.platform)) {
|
|
@@ -395,29 +354,18 @@ class RunController extends events_1.EventEmitter {
|
|
|
395
354
|
if (projectData.bundler !== "vite") {
|
|
396
355
|
return;
|
|
397
356
|
}
|
|
398
|
-
// HMR over the tunnel only matters for a live watch session.
|
|
399
357
|
if (liveSyncInfo.skipWatcher || !liveSyncInfo.useHotModuleReload) {
|
|
400
358
|
return;
|
|
401
359
|
}
|
|
402
|
-
// Respect the user's explicit opt-out — they want the
|
|
403
|
-
// `10.0.2.2` / LAN path, so don't create a tunnel or claim one
|
|
404
|
-
// exists.
|
|
405
360
|
if (this.isTruthyEnvFlag(process.env.NS_HMR_NO_ADB_REVERSE)) {
|
|
406
361
|
return;
|
|
407
362
|
}
|
|
408
|
-
// `NS_HMR_PREFER_LAN_HOST` means the dev wants LAN routing
|
|
409
|
-
// (physical device over Wi-Fi); the dev-host resolver suppresses
|
|
410
|
-
// the adb-reverse path for it, so don't bother wiring one.
|
|
411
363
|
if (this.isTruthyEnvFlag(process.env.NS_HMR_PREFER_LAN_HOST)) {
|
|
412
364
|
return;
|
|
413
365
|
}
|
|
414
366
|
const serial = device.deviceInfo.identifier;
|
|
415
367
|
const port = this.getViteHmrPort();
|
|
416
368
|
if (phase === "pre-build") {
|
|
417
|
-
// Decide the origin baked into bundle.mjs. Hand the bundler our
|
|
418
|
-
// exact adb (so any self-managed fallback can't version-mismatch
|
|
419
|
-
// the daemon) and, if the tunnel comes up, tell it to emit
|
|
420
|
-
// `127.0.0.1` and skip adb entirely.
|
|
421
369
|
process.env.NS_ADB_PATH = await this.$staticConfig.getAdbFilePath();
|
|
422
370
|
process.env.NS_DEVICE_SERIAL = serial;
|
|
423
371
|
const ok = await this.ensureAndroidReverse(device, serial, port);
|
|
@@ -430,12 +378,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
430
378
|
}
|
|
431
379
|
return;
|
|
432
380
|
}
|
|
433
|
-
// phase === "pre-launch": re-establish the mapping right before the
|
|
434
|
-
// app boots. `adb reverse` mappings are bound to the device's adb
|
|
435
|
-
// transport, and that transport can change during the (long) build
|
|
436
|
-
// + install (fresh emulators reconnect as they settle), silently
|
|
437
|
-
// dropping the early mapping. We only bother when we actually told
|
|
438
|
-
// the bundle to use `127.0.0.1` (READY set during pre-build).
|
|
439
381
|
if (!this.isTruthyEnvFlag(process.env.NS_ADB_REVERSE_READY)) {
|
|
440
382
|
return;
|
|
441
383
|
}
|
|
@@ -448,15 +390,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
448
390
|
this.$logger.trace(`Setting up adb reverse for Vite HMR (${phase}) failed; leaving it to the bundler fallback. Error: ${err}`);
|
|
449
391
|
}
|
|
450
392
|
}
|
|
451
|
-
/**
|
|
452
|
-
* Apply `adb reverse tcp:<port> tcp:<port>` to the device and confirm
|
|
453
|
-
* via `adb reverse --list` that it actually landed, retrying a few
|
|
454
|
-
* times. Every device-side call is bounded with a Node `spawn` timeout
|
|
455
|
-
* + `SIGKILL` so a wedged/slow adbd (observed blocking 90s+ on some
|
|
456
|
-
* fresh-boot / API-36 arm64 emulators) can never hang the run — the
|
|
457
|
-
* hung adb child is reaped, not orphaned. Returns whether the mapping
|
|
458
|
-
* is confirmed present.
|
|
459
|
-
*/
|
|
460
393
|
async ensureAndroidReverse(device, serial, port) {
|
|
461
394
|
var _a, _b, _c;
|
|
462
395
|
const adb = device.adb;
|
|
@@ -467,13 +400,9 @@ class RunController extends events_1.EventEmitter {
|
|
|
467
400
|
treatErrorsAsWarnings: true,
|
|
468
401
|
childProcessOptions: { timeout, killSignal: "SIGKILL" },
|
|
469
402
|
});
|
|
470
|
-
// `wait-for-device` only blocks until the transport is up; bounded so a
|
|
471
|
-
// never-ready device can't stall us.
|
|
472
403
|
await adb.executeCommand(["wait-for-device"], bounded(ADB_WAIT_MS));
|
|
473
404
|
for (let attempt = 1; attempt <= 3; attempt++) {
|
|
474
405
|
await adb.executeCommand(["reverse", `tcp:${port}`, `tcp:${port}`], bounded(ADB_REVERSE_MS));
|
|
475
|
-
// Verify it landed (a SIGKILL'd-on-timeout reverse resolves rather
|
|
476
|
-
// than throws, so success of the call isn't proof).
|
|
477
406
|
const list = (_c = (_b = (_a = (await adb.executeCommand(["reverse", "--list"], bounded(ADB_WAIT_MS)))) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : "";
|
|
478
407
|
if (list.includes(`tcp:${port}`)) {
|
|
479
408
|
return true;
|
|
@@ -482,9 +411,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
482
411
|
return false;
|
|
483
412
|
}
|
|
484
413
|
getViteHmrPort() {
|
|
485
|
-
// The Vite dev server defaults to 5173; the bundler reads the same
|
|
486
|
-
// default. If a project runs Vite on a different port, the dev sets
|
|
487
|
-
// `NS_HMR_PORT` so the CLI reverses the matching port.
|
|
488
414
|
const fromEnv = Number(process.env.NS_HMR_PORT);
|
|
489
415
|
return Number.isFinite(fromEnv) && fromEnv > 0 ? fromEnv : 5173;
|
|
490
416
|
}
|
|
@@ -522,9 +448,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
522
448
|
const watchInfo = {
|
|
523
449
|
liveSyncDeviceData: deviceDescriptor,
|
|
524
450
|
projectData,
|
|
525
|
-
// todo: remove stale files once everything is stable
|
|
526
|
-
// currently, watcher fires multiple times & may clean up unsynced files
|
|
527
|
-
// filesToRemove: data.staleFiles ?? [],
|
|
528
451
|
filesToRemove: [],
|
|
529
452
|
filesToSync,
|
|
530
453
|
hmrData: data.hmrData,
|
|
@@ -570,7 +493,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
570
493
|
const fullSyncAction = async () => {
|
|
571
494
|
watchInfo.filesToSync = allAppFiles;
|
|
572
495
|
const fullLiveSyncResultInfo = await platformLiveSyncService.liveSyncWatchAction(device, watchInfo);
|
|
573
|
-
// IMPORTANT: keep the same instance as we rely on side effects
|
|
574
496
|
_.assign(liveSyncResultInfo, fullLiveSyncResultInfo);
|
|
575
497
|
};
|
|
576
498
|
await this.$hooksService.executeBeforeHooks("watchAction", {
|
|
@@ -585,7 +507,6 @@ class RunController extends events_1.EventEmitter {
|
|
|
585
507
|
await this.refreshApplication(projectData, liveSyncResultInfo, data, deviceDescriptor, fullSyncAction);
|
|
586
508
|
if (!liveSyncResultInfo.didRecover && isInHMRMode) {
|
|
587
509
|
const status = await this.$hmrStatusService.getHmrStatus(device.deviceInfo.identifier, data.hmrData.hash);
|
|
588
|
-
// the timeout is assumed OK as the app could be blocked on a breakpoint
|
|
589
510
|
if (status === constants_1.HmrConstants.HMR_ERROR_STATUS) {
|
|
590
511
|
await fullSyncAction();
|
|
591
512
|
liveSyncResultInfo.isFullSync = true;
|
|
@@ -712,4 +633,3 @@ __decorate([
|
|
|
712
633
|
(0, decorators_1.cache)()
|
|
713
634
|
], RunController.prototype, "attachDeviceLostHandler", null);
|
|
714
635
|
yok_1.injector.register("runController", RunController);
|
|
715
|
-
//# sourceMappingURL=run-controller.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IProjectData } from "../definitions/project";
|
|
2
|
+
import { IPlatformCommandHelper, IPackageInstallationManager, IPackageManager } from "../declarations";
|
|
3
|
+
import { IPlatformsDataService } from "../definitions/platform";
|
|
4
|
+
import { IDependency } from "../definitions/migrate";
|
|
5
|
+
import { IFileSystem } from "../common/declarations";
|
|
6
|
+
export declare class UpdateControllerBase {
|
|
7
|
+
protected $fs: IFileSystem;
|
|
8
|
+
protected $platformCommandHelper: IPlatformCommandHelper;
|
|
9
|
+
protected $platformsDataService: IPlatformsDataService;
|
|
10
|
+
protected $packageInstallationManager: IPackageInstallationManager;
|
|
11
|
+
protected $packageManager: IPackageManager;
|
|
12
|
+
protected $pacoteService: IPacoteService;
|
|
13
|
+
protected getPackageManifest: Function;
|
|
14
|
+
constructor($fs: IFileSystem, $platformCommandHelper: IPlatformCommandHelper, $platformsDataService: IPlatformsDataService, $packageInstallationManager: IPackageInstallationManager, $packageManager: IPackageManager, $pacoteService: IPacoteService);
|
|
15
|
+
protected restoreBackup(folders: string[], backupDir: string, projectDir: string): void;
|
|
16
|
+
protected backup(folders: string[], backupDir: string, projectDir: string): void;
|
|
17
|
+
protected hasDependency(dependency: IDependency, projectData: IProjectData): boolean;
|
|
18
|
+
protected hasRuntimeDependency({ platform, projectData, }: {
|
|
19
|
+
platform: string;
|
|
20
|
+
projectData: IProjectData;
|
|
21
|
+
}): boolean;
|
|
22
|
+
protected getMaxRuntimeVersion({ platform, projectData, }: {
|
|
23
|
+
platform: string;
|
|
24
|
+
projectData: IProjectData;
|
|
25
|
+
}): Promise<string>;
|
|
26
|
+
private _getPackageManifest;
|
|
27
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { UpdateControllerBase } from "./update-controller-base";
|
|
2
|
+
import { IProjectDataService, IProjectCleanupService, IProjectBackupService } from "../definitions/project";
|
|
3
|
+
import { IPlatformsDataService } from "../definitions/platform";
|
|
4
|
+
import { IPlatformCommandHelper, IPackageInstallationManager, IPackageManager } from "../declarations";
|
|
5
|
+
import { IFileSystem, IErrors } from "../common/declarations";
|
|
6
|
+
import { IDependency } from "../definitions/migrate";
|
|
7
|
+
import { IPluginsService } from "../definitions/plugins";
|
|
8
|
+
import { ITerminalSpinnerService } from "../definitions/terminal-spinner-service";
|
|
9
|
+
export declare class UpdateController extends UpdateControllerBase implements IUpdateController {
|
|
10
|
+
protected $fs: IFileSystem;
|
|
11
|
+
protected $platformsDataService: IPlatformsDataService;
|
|
12
|
+
protected $platformCommandHelper: IPlatformCommandHelper;
|
|
13
|
+
protected $packageInstallationManager: IPackageInstallationManager;
|
|
14
|
+
protected $packageManager: IPackageManager;
|
|
15
|
+
protected $pluginsService: IPluginsService;
|
|
16
|
+
protected $pacoteService: IPacoteService;
|
|
17
|
+
private $logger;
|
|
18
|
+
private $errors;
|
|
19
|
+
private $projectDataService;
|
|
20
|
+
private $projectBackupService;
|
|
21
|
+
private $projectCleanupService;
|
|
22
|
+
private $terminalSpinnerService;
|
|
23
|
+
static readonly updatableDependencies: IDependency[];
|
|
24
|
+
static readonly backupFolderName: string;
|
|
25
|
+
static readonly pathsToBackup: string[];
|
|
26
|
+
private spinner;
|
|
27
|
+
constructor($fs: IFileSystem, $platformsDataService: IPlatformsDataService, $platformCommandHelper: IPlatformCommandHelper, $packageInstallationManager: IPackageInstallationManager, $packageManager: IPackageManager, $pluginsService: IPluginsService, $pacoteService: IPacoteService, $logger: ILogger, $errors: IErrors, $projectDataService: IProjectDataService, $projectBackupService: IProjectBackupService, $projectCleanupService: IProjectCleanupService, $terminalSpinnerService: ITerminalSpinnerService);
|
|
28
|
+
update(updateOptions: IUpdateOptions): Promise<void>;
|
|
29
|
+
shouldUpdate(updateOptions: IUpdateOptions): Promise<boolean>;
|
|
30
|
+
private updateDependencies;
|
|
31
|
+
private updateDependency;
|
|
32
|
+
private shouldUpdateDependency;
|
|
33
|
+
private getVersionFromTagOrVersion;
|
|
34
|
+
private backupProject;
|
|
35
|
+
private cleanUpProject;
|
|
36
|
+
}
|
|
@@ -28,15 +28,12 @@ class UpdateController extends update_controller_base_1.UpdateControllerBase {
|
|
|
28
28
|
this.spinner = this.$terminalSpinnerService.createSpinner();
|
|
29
29
|
const projectData = this.$projectDataService.getProjectData(updateOptions.projectDir);
|
|
30
30
|
updateOptions.version = updateOptions.version || constants_1.PackageVersion.LATEST;
|
|
31
|
-
// back up project files and folders
|
|
32
31
|
this.spinner.info("Backing up project files before update");
|
|
33
32
|
await this.backupProject();
|
|
34
33
|
this.spinner.succeed("Project files have been backed up");
|
|
35
|
-
// clean up project files
|
|
36
34
|
this.spinner.info("Cleaning up project files before update");
|
|
37
35
|
await this.cleanUpProject();
|
|
38
36
|
this.spinner.succeed("Project files have been cleaned up");
|
|
39
|
-
// update dependencies
|
|
40
37
|
this.spinner.info("Updating project dependencies");
|
|
41
38
|
await this.updateDependencies(projectData, updateOptions.version);
|
|
42
39
|
this.spinner.succeed("Project dependencies have been updated");
|
|
@@ -82,10 +79,6 @@ class UpdateController extends update_controller_base_1.UpdateControllerBase {
|
|
|
82
79
|
if (!shouldUpdate) {
|
|
83
80
|
return;
|
|
84
81
|
}
|
|
85
|
-
// check if the coerced version is the same as desired and prefix it with a ~
|
|
86
|
-
// for example:
|
|
87
|
-
// 8.0.0 -> ~8.0.0
|
|
88
|
-
// 8.0.8-next-XXX -> 8.0.8-next-XXX
|
|
89
82
|
const updatedVersion = (() => {
|
|
90
83
|
if (desiredVersion === version) {
|
|
91
84
|
return desiredVersion;
|
|
@@ -138,11 +131,9 @@ class UpdateController extends update_controller_base_1.UpdateControllerBase {
|
|
|
138
131
|
}
|
|
139
132
|
exports.UpdateController = UpdateController;
|
|
140
133
|
UpdateController.updatableDependencies = [
|
|
141
|
-
// dependencies
|
|
142
134
|
{
|
|
143
135
|
packageName: "@nativescript/core",
|
|
144
136
|
},
|
|
145
|
-
// devDependencies
|
|
146
137
|
{
|
|
147
138
|
packageName: "@nativescript/webpack",
|
|
148
139
|
isDev: true,
|
|
@@ -151,7 +142,6 @@ UpdateController.updatableDependencies = [
|
|
|
151
142
|
packageName: "@nativescript/types",
|
|
152
143
|
isDev: true,
|
|
153
144
|
},
|
|
154
|
-
// runtimes
|
|
155
145
|
{
|
|
156
146
|
packageName: "@nativescript/ios",
|
|
157
147
|
isDev: true,
|
|
@@ -171,4 +161,3 @@ UpdateController.pathsToBackup = [
|
|
|
171
161
|
constants.CONFIG_NS_FILE_NAME,
|
|
172
162
|
];
|
|
173
163
|
yok_1.injector.register("updateController", UpdateController);
|
|
174
|
-
//# sourceMappingURL=update-controller.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PrepareData } from "./prepare-data";
|
|
2
|
+
import { IiOSBuildData, IBuildData } from "../definitions/build";
|
|
3
|
+
export declare class BuildData extends PrepareData implements IBuildData {
|
|
4
|
+
device?: string;
|
|
5
|
+
_device?: Mobile.IDevice;
|
|
6
|
+
emulator?: boolean;
|
|
7
|
+
clean: boolean;
|
|
8
|
+
buildForDevice?: boolean;
|
|
9
|
+
buildOutputStdio?: string;
|
|
10
|
+
outputPath?: string;
|
|
11
|
+
copyTo?: string;
|
|
12
|
+
constructor(projectDir: string, platform: string, data: any);
|
|
13
|
+
}
|
|
14
|
+
export declare class IOSBuildData extends BuildData implements IiOSBuildData {
|
|
15
|
+
teamId: string;
|
|
16
|
+
provision: string;
|
|
17
|
+
mobileProvisionData: any;
|
|
18
|
+
buildForAppStore: boolean;
|
|
19
|
+
iCloudContainerEnvironment: string;
|
|
20
|
+
hostProjectPath: string;
|
|
21
|
+
constructor(projectDir: string, platform: string, data: any);
|
|
22
|
+
}
|
|
23
|
+
export declare class AndroidBuildData extends BuildData {
|
|
24
|
+
keyStoreAlias: string;
|
|
25
|
+
keyStorePath: string;
|
|
26
|
+
keyStoreAliasPassword: string;
|
|
27
|
+
keyStorePassword: string;
|
|
28
|
+
androidBundle: boolean;
|
|
29
|
+
gradlePath: string;
|
|
30
|
+
gradleArgs: string;
|
|
31
|
+
hostProjectPath: string;
|
|
32
|
+
constructor(projectDir: string, platform: string, data: any);
|
|
33
|
+
}
|
package/lib/data/build-data.js
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { INativePrepare } from "../definitions/project";
|
|
2
|
+
import { IControllerDataBase } from "../definitions/data";
|
|
3
|
+
export declare class ControllerDataBase implements IControllerDataBase {
|
|
4
|
+
projectDir: string;
|
|
5
|
+
platform: string;
|
|
6
|
+
nativePrepare?: INativePrepare;
|
|
7
|
+
constructor(projectDir: string, platform: string, data: any);
|
|
8
|
+
}
|
package/lib/data/debug-data.js
CHANGED