Merge pull request #1620 from whalehub/master
Update the error text and "help" output for all commands which use a device or group ID
This commit is contained in:
commit
20aee9cba1
108
meshctrl.js
108
meshctrl.js
|
@ -71,36 +71,36 @@ if (args['_'].length == 0) {
|
||||||
case 'listdevicegroups': { ok = true; break; }
|
case 'listdevicegroups': { ok = true; break; }
|
||||||
case 'listdevices': { ok = true; break; }
|
case 'listdevices': { ok = true; break; }
|
||||||
case 'listusersofdevicegroup': {
|
case 'listusersofdevicegroup': {
|
||||||
if (args.id == null) { console.log("Missing group id, use --id [groupid]"); }
|
if (args.id == null) { console.log("Missing group id, use --id '[groupid]'"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'deviceinfo': {
|
case 'deviceinfo': {
|
||||||
if (args.id == null) { console.log("Missing device id, use --id [deviceid]"); }
|
if (args.id == null) { console.log("Missing device id, use --id '[deviceid]'"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'addusertodevicegroup': {
|
case 'addusertodevicegroup': {
|
||||||
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id [groupid] or --group [groupname]"); }
|
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id '[groupid]' or --group [groupname]"); }
|
||||||
else if (args.userid == null) { console.log("Add user to group missing useid, use --userid [userid]"); }
|
else if (args.userid == null) { console.log("Add user to group missing useid, use --userid [userid]"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'removeuserfromdevicegroup': {
|
case 'removeuserfromdevicegroup': {
|
||||||
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id [groupid] or --group [groupname]"); }
|
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id '[groupid]' or --group [groupname]"); }
|
||||||
else if (args.userid == null) { console.log("Remove user from group missing useid, use --userid [userid]"); }
|
else if (args.userid == null) { console.log("Remove user from group missing useid, use --userid [userid]"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'addusertodevice': {
|
case 'addusertodevice': {
|
||||||
if (args.userid == null) { console.log("Add user to device missing useid, use --userid [userid]"); }
|
if (args.userid == null) { console.log("Add user to device missing userid, use --userid [userid]"); }
|
||||||
else if (args.id == null) { console.log("Add user to device missing device id, use --id [deviceid]"); }
|
else if (args.id == null) { console.log("Add user to device missing device id, use --id '[deviceid]'"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'removeuserfromdevice': {
|
case 'removeuserfromdevice': {
|
||||||
if (args.userid == null) { console.log("Remove user from device missing useid, use --userid [userid]"); }
|
if (args.userid == null) { console.log("Remove user from device missing userid, use --userid [userid]"); }
|
||||||
else if (args.id == null) { console.log("Remove user from device missing device id, use --id [deviceid]"); }
|
else if (args.id == null) { console.log("Remove user from device missing device id, use --id '[deviceid]'"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -110,13 +110,13 @@ if (args['_'].length == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'removedevicegroup': {
|
case 'removedevicegroup': {
|
||||||
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id [groupid] or --group [groupname]"); }
|
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id '[groupid]' or --group [groupname]"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'movetodevicegroup': {
|
case 'movetodevicegroup': {
|
||||||
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id [groupid] or --group [groupname]"); }
|
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id '[groupid]' or --group [groupname]"); }
|
||||||
else if (args.devid == null) { console.log("Device identifier missing, use --devid [deviceid]"); }
|
else if (args.devid == null) { console.log("Device identifier missing, use --devid '[deviceid]'"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -146,35 +146,35 @@ if (args['_'].length == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'removeusergroup': {
|
case 'removeusergroup': {
|
||||||
if (args.groupid == null) { console.log("Remove user group id missing, use --groupid [id]"); }
|
if (args.groupid == null) { console.log("Remove user group id missing, use --groupid '[id]'"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'sendinviteemail': {
|
case 'sendinviteemail': {
|
||||||
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id [groupid] or --group [groupname]"); }
|
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id '[groupid]' or --group [groupname]"); }
|
||||||
else if (args.email == null) { console.log("Device email is missing, use --email [email]"); }
|
else if (args.email == null) { console.log("Device email is missing, use --email [email]"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'generateinvitelink': {
|
case 'generateinvitelink': {
|
||||||
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id [groupid] or --group [groupname]"); }
|
if ((args.id == null) && (args.group == null)) { console.log("Device group identifier missing, use --id '[groupid]' or --group [groupname]"); }
|
||||||
else if (args.hours == null) { console.log("Invitation validity period missing, use --hours [hours]"); }
|
else if (args.hours == null) { console.log("Invitation validity period missing, use --hours [hours]"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'runcommand': {
|
case 'runcommand': {
|
||||||
if (args.id == null) { console.log("Missing device id, use --id [deviceid]"); }
|
if (args.id == null) { console.log("Missing device id, use --id '[deviceid]'"); }
|
||||||
else if (args.run == null) { console.log("Missing run, use --run \"command\""); }
|
else if (args.run == null) { console.log("Missing run, use --run \"command\""); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'shell': {
|
case 'shell': {
|
||||||
if (args.id == null) { console.log("Missing device id, use --id [deviceid]"); }
|
if (args.id == null) { console.log("Missing device id, use --id '[deviceid]'"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'upload': {
|
case 'upload': {
|
||||||
if (args.id == null) { console.log("Missing device id, use --id [deviceid]"); }
|
if (args.id == null) { console.log("Missing device id, use --id '[deviceid]'"); }
|
||||||
else if (args.file == null) { console.log("Local file missing, use --file [file] specify the file to upload"); }
|
else if (args.file == null) { console.log("Local file missing, use --file [file] specify the file to upload"); }
|
||||||
else if (args.target == null) { console.log("Remote target path missing, use --target [path] to specify the remote location"); }
|
else if (args.target == null) { console.log("Remote target path missing, use --target [path] to specify the remote location"); }
|
||||||
else if (require('fs').existsSync(args.file) == false) { console.log("Local file does not exists, check --file"); }
|
else if (require('fs').existsSync(args.file) == false) { console.log("Local file does not exists, check --file"); }
|
||||||
|
@ -182,7 +182,7 @@ if (args['_'].length == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'download': {
|
case 'download': {
|
||||||
if (args.id == null) { console.log("Missing device id, use --id [deviceid]"); }
|
if (args.id == null) { console.log("Missing device id, use --id '[deviceid]'"); }
|
||||||
else if (args.file == null) { console.log("Remote file missing, use --file [file] specify the remote file to download"); }
|
else if (args.file == null) { console.log("Remote file missing, use --file [file] specify the remote file to download"); }
|
||||||
else if (args.target == null) { console.log("Target path missing, use --target [path] to specify the local download location"); }
|
else if (args.target == null) { console.log("Target path missing, use --target [path] to specify the local download location"); }
|
||||||
else { ok = true; }
|
else { ok = true; }
|
||||||
|
@ -199,10 +199,10 @@ if (args['_'].length == 0) {
|
||||||
}
|
}
|
||||||
case 'sendinviteemail': {
|
case 'sendinviteemail': {
|
||||||
console.log("Send invitation email with instructions on how to install the mesh agent for a specific device group. Example usage:\r\n");
|
console.log("Send invitation email with instructions on how to install the mesh agent for a specific device group. Example usage:\r\n");
|
||||||
console.log(" MeshCtrl SendInviteEmail --id devicegroupid --message \"msg\" --email user@sample.com");
|
console.log(" MeshCtrl SendInviteEmail --id 'groupid' --message \"msg\" --email user@sample.com");
|
||||||
console.log(" MeshCtrl SendInviteEmail --group \"My Computers\" --name \"Jack\" --email user@sample.com");
|
console.log(" MeshCtrl SendInviteEmail --group \"My Computers\" --name \"Jack\" --email user@sample.com");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Device group identifier (or --group).");
|
console.log(" --id '[groupid]' - Device group identifier (or --group).");
|
||||||
console.log(" --group [groupname] - Device group name (or --id).");
|
console.log(" --group [groupname] - Device group name (or --id).");
|
||||||
console.log(" --email [email] - Email address.");
|
console.log(" --email [email] - Email address.");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
|
@ -212,10 +212,10 @@ if (args['_'].length == 0) {
|
||||||
}
|
}
|
||||||
case 'generateinvitelink': {
|
case 'generateinvitelink': {
|
||||||
console.log("Generate a agent invitation URL for a given group. Example usage:\r\n");
|
console.log("Generate a agent invitation URL for a given group. Example usage:\r\n");
|
||||||
console.log(" MeshCtrl GenerateInviteLink --id devicegroupid --hours 24");
|
console.log(" MeshCtrl GenerateInviteLink --id 'groupid' --hours 24");
|
||||||
console.log(" MeshCtrl GenerateInviteLink --group \"My Computers\" --hours 0");
|
console.log(" MeshCtrl GenerateInviteLink --group \"My Computers\" --hours 0");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Device group identifier (or --group).");
|
console.log(" --id '[groupid]' - Device group identifier (or --group).");
|
||||||
console.log(" --group [groupname] - Device group name (or --id).");
|
console.log(" --group [groupname] - Device group name (or --id).");
|
||||||
console.log(" --hours [hours] - Validity period in hours or 0 for infinit.");
|
console.log(" --hours [hours] - Validity period in hours or 0 for infinit.");
|
||||||
break;
|
break;
|
||||||
|
@ -276,9 +276,9 @@ if (args['_'].length == 0) {
|
||||||
case 'listdevices': {
|
case 'listdevices': {
|
||||||
console.log("List devices, Example usages:\r\n");
|
console.log("List devices, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl ListDevices");
|
console.log(" MeshCtrl ListDevices");
|
||||||
console.log(" MeshCtrl ListDevices -id [groupid] --json");
|
console.log(" MeshCtrl ListDevices -id '[groupid]' --json");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Filter by group identifier (or --group).");
|
console.log(" --id '[groupid]' - Filter by group identifier (or --group).");
|
||||||
console.log(" --group [groupname] - Filter by group name (or --id).");
|
console.log(" --group [groupname] - Filter by group name (or --id).");
|
||||||
console.log(" --count - Only return the device count.");
|
console.log(" --count - Only return the device count.");
|
||||||
console.log(" --json - Show result as JSON.");
|
console.log(" --json - Show result as JSON.");
|
||||||
|
@ -288,7 +288,7 @@ if (args['_'].length == 0) {
|
||||||
console.log("List users that have permissions for a given device group, Example usage:\r\n");
|
console.log("List users that have permissions for a given device group, Example usage:\r\n");
|
||||||
console.log(" MeshCtrl ListUserOfDeviceGroup ");
|
console.log(" MeshCtrl ListUserOfDeviceGroup ");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Device group identifier.");
|
console.log(" --id '[groupid]' - Device group identifier.");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
console.log(" --json - Show result as JSON.");
|
console.log(" --json - Show result as JSON.");
|
||||||
break;
|
break;
|
||||||
|
@ -334,27 +334,27 @@ if (args['_'].length == 0) {
|
||||||
}
|
}
|
||||||
case 'removedevicegroup': {
|
case 'removedevicegroup': {
|
||||||
console.log("Remove a device group, Example usages:\r\n");
|
console.log("Remove a device group, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl RemoveDeviceGroup --id groupid");
|
console.log(" MeshCtrl RemoveDeviceGroup --id 'groupid'");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Device group identifier (or --group).");
|
console.log(" --id '[groupid]' - Device group identifier (or --group).");
|
||||||
console.log(" --group [groupname] - Device group name (or --id).");
|
console.log(" --group [groupname] - Device group name (or --id).");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'movetodevicegroup': {
|
case 'movetodevicegroup': {
|
||||||
console.log("Move a device to a new device group, Example usages:\r\n");
|
console.log("Move a device to a new device group, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl MoveToDeviceGroup --devid deviceid --id groupid");
|
console.log(" MeshCtrl MoveToDeviceGroup --devid 'deviceid' --id 'groupid'");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Device group identifier (or --group).");
|
console.log(" --id '[groupid]' - Device group identifier (or --group).");
|
||||||
console.log(" --group [groupname] - Device group name (or --id).");
|
console.log(" --group [groupname] - Device group name (or --id).");
|
||||||
console.log(" --devid [deviceid] - Device identifier.");
|
console.log(" --devid '[deviceid]' - Device identifier.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'addusertodevicegroup': {
|
case 'addusertodevicegroup': {
|
||||||
console.log("Add a user to a device group, Example usages:\r\n");
|
console.log("Add a user to a device group, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl AddUserToDeviceGroup --id groupid --userid userid --fullrights");
|
console.log(" MeshCtrl AddUserToDeviceGroup --id 'groupid' --userid userid --fullrights");
|
||||||
console.log(" MeshCtrl AddUserToDeviceGroup --group groupname --userid userid --editgroup --manageusers");
|
console.log(" MeshCtrl AddUserToDeviceGroup --group groupname --userid userid --editgroup --manageusers");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Device group identifier (or --group).");
|
console.log(" --id '[groupid]' - Device group identifier (or --group).");
|
||||||
console.log(" --group [groupname] - Device group name (or --id).");
|
console.log(" --group [groupname] - Device group name (or --id).");
|
||||||
console.log(" --userid [userid] - The user identifier.");
|
console.log(" --userid [userid] - The user identifier.");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
|
@ -384,19 +384,19 @@ if (args['_'].length == 0) {
|
||||||
}
|
}
|
||||||
case 'removeuserfromdevicegroup': {
|
case 'removeuserfromdevicegroup': {
|
||||||
console.log("Remove a user from a device group, Example usages:\r\n");
|
console.log("Remove a user from a device group, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl RemoveuserFromDeviceGroup --id groupid --userid userid");
|
console.log(" MeshCtrl RemoveuserFromDeviceGroup --id 'groupid' --userid userid");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Device group identifier (or --group).");
|
console.log(" --id '[groupid]' - Device group identifier (or --group).");
|
||||||
console.log(" --group [groupname] - Device group name (or --id).");
|
console.log(" --group [groupname] - Device group name (or --id).");
|
||||||
console.log(" --userid [userid] - The user identifier.");
|
console.log(" --userid [userid] - The user identifier.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'addusertodevice': {
|
case 'addusertodevice': {
|
||||||
console.log("Add a user to a device, Example usages:\r\n");
|
console.log("Add a user to a device, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl AddUserToDevice --id deviceid --userid userid --fullrights");
|
console.log(" MeshCtrl AddUserToDevice --id 'deviceid' --userid userid --fullrights");
|
||||||
console.log(" MeshCtrl AddUserToDevice --id deviceid --userid userid --remotecontrol");
|
console.log(" MeshCtrl AddUserToDevice --id 'deviceid' --userid userid --remotecontrol");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [deviceid] - The device identifier.");
|
console.log(" --id '[deviceid]' - The device identifier.");
|
||||||
console.log(" --userid [userid] - The user identifier.");
|
console.log(" --userid [userid] - The user identifier.");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
console.log(" --fullrights - Allow full rights over this device.");
|
console.log(" --fullrights - Allow full rights over this device.");
|
||||||
|
@ -417,9 +417,9 @@ if (args['_'].length == 0) {
|
||||||
}
|
}
|
||||||
case 'removeuserfromdevice': {
|
case 'removeuserfromdevice': {
|
||||||
console.log("Remove a user from a device, Example usages:\r\n");
|
console.log("Remove a user from a device, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl RemoveuserFromDeviceGroup --id deviceid --userid userid");
|
console.log(" MeshCtrl RemoveuserFromDeviceGroup --id 'deviceid' --userid userid");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [deviceid] - The device identifier.");
|
console.log(" --id '[deviceid]' - The device identifier.");
|
||||||
console.log(" --userid [userid] - The user identifier.");
|
console.log(" --userid [userid] - The user identifier.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -432,10 +432,10 @@ if (args['_'].length == 0) {
|
||||||
}
|
}
|
||||||
case 'deviceinfo': {
|
case 'deviceinfo': {
|
||||||
console.log("Display information about a device, Example usages:\r\n");
|
console.log("Display information about a device, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl DeviceInfo --id deviceid");
|
console.log(" MeshCtrl DeviceInfo --id 'deviceid'");
|
||||||
console.log(" MeshCtrl DeviceInfo --id deviceid --json");
|
console.log(" MeshCtrl DeviceInfo --id 'deviceid' --json");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [deviceid] - The device identifier.");
|
console.log(" --id '[deviceid]' - The device identifier.");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
console.log(" --raw - Output raw data in JSON format.");
|
console.log(" --raw - Output raw data in JSON format.");
|
||||||
console.log(" --json - Give results in JSON format.");
|
console.log(" --json - Give results in JSON format.");
|
||||||
|
@ -443,10 +443,10 @@ if (args['_'].length == 0) {
|
||||||
}
|
}
|
||||||
case 'runcommand': {
|
case 'runcommand': {
|
||||||
console.log("Run a shell command on a remote device, Example usages:\r\n");
|
console.log("Run a shell command on a remote device, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl RunCommand --id deviceid --run \"command\"");
|
console.log(" MeshCtrl RunCommand --id 'deviceid' --run \"command\"");
|
||||||
console.log(" MeshCtrl RunCommand --id deviceid --run \"command\" --powershell");
|
console.log(" MeshCtrl RunCommand --id 'deviceid' --run \"command\" --powershell");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [deviceid] - The device identifier.");
|
console.log(" --id '[deviceid]' - The device identifier.");
|
||||||
console.log(" --run \"[command]\" - Shell command to execute on the remote device.");
|
console.log(" --run \"[command]\" - Shell command to execute on the remote device.");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
console.log(" --powershell - Run in Windows PowerShell.");
|
console.log(" --powershell - Run in Windows PowerShell.");
|
||||||
|
@ -454,30 +454,30 @@ if (args['_'].length == 0) {
|
||||||
}
|
}
|
||||||
case 'shell': {
|
case 'shell': {
|
||||||
console.log("Access a command shell on a remote device, Example usages:\r\n");
|
console.log("Access a command shell on a remote device, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl Shell --id deviceid");
|
console.log(" MeshCtrl Shell --id 'deviceid'");
|
||||||
console.log(" MeshCtrl Shell --id deviceid --powershell");
|
console.log(" MeshCtrl Shell --id 'deviceid' --powershell");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [deviceid] - The device identifier.");
|
console.log(" --id '[deviceid]' - The device identifier.");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
console.log(" --powershell - Run a Windows PowerShell.");
|
console.log(" --powershell - Run a Windows PowerShell.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'upload': {
|
case 'upload': {
|
||||||
console.log("Upload a local file to a remote device, Example usages:\r\n");
|
console.log("Upload a local file to a remote device, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl Upload --id deviceid --file sample.txt --target c:\\");
|
console.log(" MeshCtrl Upload --id 'deviceid' --file sample.txt --target c:\\");
|
||||||
console.log(" MeshCtrl Upload --id deviceid --file sample.txt --target /tmp");
|
console.log(" MeshCtrl Upload --id 'deviceid' --file sample.txt --target /tmp");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [deviceid] - The device identifier.");
|
console.log(" --id '[deviceid]' - The device identifier.");
|
||||||
console.log(" --file [localfile] - The local file to upload.");
|
console.log(" --file [localfile] - The local file to upload.");
|
||||||
console.log(" --target [remotepath] - The remote path to upload the file to.");
|
console.log(" --target [remotepath] - The remote path to upload the file to.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'download': {
|
case 'download': {
|
||||||
console.log("Download a file from a remote device, Example usages:\r\n");
|
console.log("Download a file from a remote device, Example usages:\r\n");
|
||||||
console.log(" MeshCtrl Download --id deviceid --file C:\\sample.txt --target c:\\temp");
|
console.log(" MeshCtrl Download --id 'deviceid' --file C:\\sample.txt --target c:\\temp");
|
||||||
console.log(" MeshCtrl Download --id deviceid --file /tmp/sample.txt --target /tmp");
|
console.log(" MeshCtrl Download --id 'deviceid' --file /tmp/sample.txt --target /tmp");
|
||||||
console.log("\r\nRequired arguments:\r\n");
|
console.log("\r\nRequired arguments:\r\n");
|
||||||
console.log(" --id [deviceid] - The device identifier.");
|
console.log(" --id '[deviceid]' - The device identifier.");
|
||||||
console.log(" --file [remotefile] - The remote file to download.");
|
console.log(" --file [remotefile] - The remote file to download.");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
console.log(" --target [localpath] - The local path to download the file to.");
|
console.log(" --target [localpath] - The local path to download the file to.");
|
||||||
|
|
Loading…
Reference in New Issue