UNPKG

@twilio/plugin-microvisor

Version:

Interact with your Twilio Microvisor devices

34 lines (33 loc) 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseCommand = void 0; exports.BaseCommand = require('@twilio/cli-core').baseCommands.BaseCommand; const common_1 = require("../../../lib/provision/common"); const proto_1 = require("../../../../proto_gen/proto"); const MAIN_ERROR = "Could not get device SID"; const REQUEST_TYPE = proto_1.provision.ProvisioningCommands_MessageTypes_F2D.TYPE_F2D_GET_SID_REQUEST; class MicrovisorInfoSid extends exports.BaseCommand { async run() { await super.run(); const passThis = this; passThis.requestType = REQUEST_TYPE; passThis.mainError = MAIN_ERROR; (0, common_1.getDataFromDevice)(passThis); } async runCommand() { return run(); } } exports.default = MicrovisorInfoSid; MicrovisorInfoSid.description = "Get a device's SID"; MicrovisorInfoSid.args = [ { name: 'devicePath', required: true, description: 'The path to the device file or COM port' } ]; // Remove some unnecessary options delete MicrovisorInfoSid.flags['cli-output-format']; delete MicrovisorInfoSid.flags.silent; delete MicrovisorInfoSid.flags.profile;