forked from friedrith/node-wifi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite wifi binary to make it compliant with ES6.
- Loading branch information
Showing
4 changed files
with
138 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
const optionDefinitions = [ | ||
{ | ||
name: 'scan', | ||
type: Boolean, | ||
description: | ||
'Scan for wifi networks. It returns a JSON formatted response with ssid, bssid, frequency, signal level and security for every network detected.' | ||
}, | ||
{ | ||
name: 'connect', | ||
type: Boolean, | ||
description: | ||
'Connect to a wifi network. It needs options {bold --ssid} and {bold --password}. A specific interface may be selected by adding option {bold --iface}' | ||
}, | ||
{ | ||
name: 'disconnect', | ||
type: Boolean, | ||
description: | ||
'Disconnect from a wifi network. A specific interface may be selected by adding option {bold --iface}' | ||
}, | ||
{ | ||
name: 'current', | ||
type: Boolean, | ||
description: | ||
'List the current wifi connections. A specific interface may be selected by adding option {bold --iface}' | ||
}, | ||
{ | ||
name: 'ssid', | ||
type: String, | ||
typeLabel: '{underline ssid}', | ||
description: 'Ssid to connect to the wifi.' | ||
}, | ||
{ | ||
name: 'password', | ||
type: String, | ||
typeLabel: '{underline password}', | ||
description: 'Password to connect to the wifi.' | ||
}, | ||
{ | ||
name: 'iface', | ||
type: String, | ||
typeLabel: '{underline interface}', | ||
description: 'Network interface to connect to the wifi.' | ||
}, | ||
{ | ||
name: 'help', | ||
alias: 'h', | ||
type: Boolean, | ||
description: 'Show the help.' | ||
}, | ||
{ | ||
name: 'version', | ||
alias: 'v', | ||
type: Boolean, | ||
description: 'Display the current version of node-wifi.' | ||
} | ||
]; | ||
|
||
const sections = [ | ||
{ | ||
header: 'Wifi', | ||
content: 'Multi-OS tool to manage wifi.' | ||
}, | ||
{ | ||
header: 'Options', | ||
optionList: optionDefinitions | ||
} | ||
]; | ||
|
||
module.exports = { | ||
sections, | ||
optionDefinitions | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters