oputil.js fb scan improvement & fixes

* Start of --verbose for oputil.js in general (mostly placeholder at this point)
* Fix --full-scan and rename to just --full
This commit is contained in:
Bryan Ashby 2019-08-09 18:16:23 -06:00
parent 428b3c0059
commit c71404a641
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
4 changed files with 19 additions and 7 deletions

View File

@ -9,7 +9,7 @@ This document attempts to track **major** changes and additions in ENiGMA½. For
* New ACS codes for new 2FA/OTP: `AR` and `AF`. See [ACS](/docs/configuration/acs.md) for details. * New ACS codes for new 2FA/OTP: `AR` and `AF`. See [ACS](/docs/configuration/acs.md) for details.
+ `oputil.js user 2fa USERNAME TYPE` enables 2-factor authentication for a user. + `oputil.js user 2fa USERNAME TYPE` enables 2-factor authentication for a user.
* `oputil.js user info USERNAME --security` can now display additional security information such as 2FA/OTP. * `oputil.js user info USERNAME --security` can now display additional security information such as 2FA/OTP.
* `oputil.js fb scan --quick` is now the default. Override with `--full-scan`. * `oputil.js fb scan --quick` is now the default. Override with `--full`.
* ACS checks can now be applied to form actions. For example: * ACS checks can now be applied to form actions. For example:
```hjson ```hjson
{ {

View File

@ -209,7 +209,7 @@ function scanFileAreaForChanges(areaInfo, options, cb) {
async.series( async.series(
[ [
function quickCheck(next) { function quickCheck(next) {
if(options['full-scan']) { if(options['full']) {
return next(null); return next(null);
} }
@ -229,6 +229,16 @@ function scanFileAreaForChanges(areaInfo, options, cb) {
areaTag : areaInfo.areaTag, areaTag : areaInfo.areaTag,
storageTag : storageLoc.storageTag storageTag : storageLoc.storageTag
}, },
(stepInfo, next) => {
if(argv.verbose) {
if(stepInfo.error) {
console.error(` error: ${stepInfo.error}`);
} else {
console.info(` processing: ${stepInfo.step}`);
}
}
return next(null);
},
(err, fileEntry, dupeEntries) => { (err, fileEntry, dupeEntries) => {
if(err) { if(err) {
console.info(`Error: ${err.message}`); console.info(`Error: ${err.message}`);
@ -477,7 +487,7 @@ function scanFileAreas() {
} }
options.descFile = argv['desc-file']; // --desc-file or --desc-file PATH options.descFile = argv['desc-file']; // --desc-file or --desc-file PATH
options['full-scan'] = argv['-full-scan']; options['full'] = argv.full;
options.areaAndStorageInfo = getAreaAndStorage(argv._.slice(2)); options.areaAndStorageInfo = getAreaAndStorage(argv._.slice(2));

View File

@ -14,6 +14,7 @@ const usageHelp = exports.USAGE_HELP = {
Global arguments: Global arguments:
-c, --config PATH Specify config path (default is ${getDefaultConfigPath()}) -c, --config PATH Specify config path (default is ${getDefaultConfigPath()})
-n, --no-prompt Assume defaults (don't prompt for input where possible) -n, --no-prompt Assume defaults (don't prompt for input where possible)
--verbose Verbose output, where applicable
Commands: Commands:
user User management user User management
@ -131,7 +132,7 @@ scan arguments:
DESCRIPT.ION file. DESCRIPT.ION file.
--update Attempt to update information for existing entries --update Attempt to update information for existing entries
--full-scan Perform a full scan (default is quick) --full Perform a full scan (default is quick)
info arguments: info arguments:
--show-desc Display short description, if any --show-desc Display short description, if any
@ -152,7 +153,7 @@ General Information:
Generally an area tag can also include an optional storage tag. For example, the Generally an area tag can also include an optional storage tag. For example, the
area of 'bbswarez' stored using 'bbswarez_main': bbswarez@bbswarez_main area of 'bbswarez' stored using 'bbswarez_main': bbswarez@bbswarez_main
When performing an initial import of a large area or storage backing, --full-scan When performing an initial import of a large area or storage backing, --full
is the best option. If re-scanning an area for updates a standard / quick scan is is the best option. If re-scanning an area for updates a standard / quick scan is
generally good enough. generally good enough.

View File

@ -14,6 +14,7 @@ usage: oputil.js [--version] [--help]
Global arguments: Global arguments:
-c, --config PATH Specify config path (default is ./config/) -c, --config PATH Specify config path (default is ./config/)
-n, --no-prompt Assume defaults (don't prompt for input where possible) -n, --no-prompt Assume defaults (don't prompt for input where possible)
--verbose Verbose output, where applicable
Commands: Commands:
user User management user User management
@ -178,7 +179,7 @@ scan arguments:
DESCRIPT.ION file. DESCRIPT.ION file.
--update Attempt to update information for existing entries --update Attempt to update information for existing entries
--full-scan Perform a full scan (default is quick) --full Perform a full scan (default is quick)
info arguments: info arguments:
--show-desc Display short description, if any --show-desc Display short description, if any
@ -197,7 +198,7 @@ General Information:
Generally an area tag can also include an optional storage tag. For example, the Generally an area tag can also include an optional storage tag. For example, the
area of 'bbswarez' stored using 'bbswarez_main': bbswarez@bbswarez_main area of 'bbswarez' stored using 'bbswarez_main': bbswarez@bbswarez_main
When performing an initial import of a large area or storage backing, --full-scan When performing an initial import of a large area or storage backing, --full
is the best option. If re-scanning an area for updates a standard / quick scan is is the best option. If re-scanning an area for updates a standard / quick scan is
generally good enough. generally good enough.