UNPKG

nativescript

Version:

Command-line interface for building NativeScript projects

32 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StopApplicationOnDeviceCommand = void 0; const yok_1 = require("../../yok"); class StopApplicationOnDeviceCommand { constructor($devicesService, $stringParameter, $options) { this.$devicesService = $devicesService; this.$stringParameter = $stringParameter; this.$options = $options; this.allowedParameters = [ this.$stringParameter, this.$stringParameter, this.$stringParameter, ]; } async execute(args) { await this.$devicesService.initialize({ deviceId: this.$options.device, skipInferPlatform: true, platform: args[1], }); const action = (device) => device.applicationManager.stopApplication({ appId: args[0], projectName: args[2], projectDir: null, }); await this.$devicesService.execute(action); } } exports.StopApplicationOnDeviceCommand = StopApplicationOnDeviceCommand; yok_1.injector.registerCommand(["device|stop", "devices|stop"], StopApplicationOnDeviceCommand); //# sourceMappingURL=stop-application.js.map