@twilio/plugin-microvisor
Version:
Interact with your Twilio Microvisor devices
34 lines (33 loc) • 1.29 kB
JavaScript
;
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 WiFi credentials";
const REQUEST_TYPE = proto_1.provision.ProvisioningCommands_MessageTypes_F2D.TYPE_F2D_GET_WIFI_CONFIGURATION_REQUEST;
class MicrovisorWiFiConfigGet 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 = MicrovisorWiFiConfigGet;
MicrovisorWiFiConfigGet.description = "Get a Microvisor device's WiFi credentials, if set";
MicrovisorWiFiConfigGet.args = [
{
name: 'devicePath',
required: true,
description: 'The path to the device file or COM port'
}
];
// Remove some unnecessary options
delete MicrovisorWiFiConfigGet.flags['cli-output-format'];
delete MicrovisorWiFiConfigGet.flags.silent;
delete MicrovisorWiFiConfigGet.flags.profile;