Socket
Socket
Sign inDemoInstall

sms24x7-client

Package Overview
Dependencies
4
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

65

bin/index.js

@@ -10,3 +10,3 @@ #!/usr/bin/env nodejs

var SmsSender, smsSender, Minimist, cmdArgs;
var SmsSender, smsSender, Minimist, cmdArgs, command, printHelp;

@@ -22,7 +22,39 @@

cmdArgs = Minimist(process.argv.slice(2));
cmdArgs = Minimist(process.argv.slice(2));
command = cmdArgs._[0]
printHelp = function(showUnsupportedCommand) {
var lines = [];
if (showUnsupportedCommand) {
lines = lines.concat([
'',
' Unsupported command',
]);
}
lines = lines.concat([
'',
' Usage:',
' sms24x7-client send|help --email=email --password=password --phone=recipient_phone --message=message_text [--sender=alias]',
'',
' Available commands:',
' send Send text message to a recipient',
' --email Account email',
' --password Account password',
' --phone Recipient phone number',
' --message Message text',
' --sender Text string to show instead of server phone number',
'',
' help Show this help and exit',
''
]);
console.log(lines.join('\n'));
}
smsSender = new SmsSender({

@@ -37,9 +69,22 @@ connection: {

});
smsSender
.send(cmdArgs.phone, cmdArgs.message, cmdArgs.sender)
.then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log(error);
});
switch (command) {
case 'send':
smsSender
.send(cmdArgs.phone, cmdArgs.message, cmdArgs.sender)
.then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log(error);
});
break;
case 'help':
printHelp(false);
break;
default:
printHelp(command);
}

2

package.json
{
"name": "sms24x7-client",
"version": "0.0.2",
"version": "0.0.3",
"description": "Send text messages via SMS using sms24x7.ru",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/devlato/sms24x7",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc