find-cli 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/action/find.js +3 -8
- package/bin/messages.js +0 -4
- package/package.json +1 -1
package/bin/action/find.js
CHANGED
|
@@ -5,8 +5,7 @@ const ruleOperation = require("../operation/rule"),
|
|
|
5
5
|
readConfigurationOperation = require("../operation/readConfiguration");
|
|
6
6
|
|
|
7
7
|
const { S, EMPTY_STRING } = require("../constants"),
|
|
8
|
-
{ executeOperations } = require("../utilities/operation")
|
|
9
|
-
{ FAILED_FIND_MESSAGE, SUCCESSFUL_FIND_MESSAGE } = require("../messages");
|
|
8
|
+
{ executeOperations } = require("../utilities/operation");
|
|
10
9
|
|
|
11
10
|
function findAction(string, dryRun, quietly) {
|
|
12
11
|
const operations = [
|
|
@@ -33,17 +32,13 @@ function findAction(string, dryRun, quietly) {
|
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
executeOperations(operations, (completed) => {
|
|
36
|
-
|
|
35
|
+
logLines(context);
|
|
37
36
|
|
|
38
37
|
if (!completed) {
|
|
39
|
-
console.log(FAILED_FIND_MESSAGE);
|
|
40
|
-
|
|
41
38
|
return;
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
console.log(SUCCESSFUL_FIND_MESSAGE);
|
|
41
|
+
logTottals(context);
|
|
47
42
|
}, context);
|
|
48
43
|
}
|
|
49
44
|
|
package/bin/messages.js
CHANGED
|
@@ -8,11 +8,9 @@ const NO_ARGUMENT_GIVEN_MESSAGE = "No argument has been given.",
|
|
|
8
8
|
INVALID_ROOT_DIRECTORY_PATH_MESSAGE = "Additional root directories must be globs of the form '../**/'.",
|
|
9
9
|
INVALID_GLOB_REGEX_OR_STRING_MESSAGE = "The glob, regex or string is invalid.",
|
|
10
10
|
INVALID_ROOT_DIRECTORY_PATH_INDEX_MESSAGE = "The index is either not a number or not within range.",
|
|
11
|
-
FAILED_FIND_MESSAGE = "Failed to search everything.",
|
|
12
11
|
FAILED_INITIALISE_MESSAGE = "Failed to create a configuration file because one is already present.",
|
|
13
12
|
FAILED_ADD_ROOT_DIRECTORY_MESSAGE = "Failed to add the root directory.",
|
|
14
13
|
FAILED_REMOVE_ROOT_DIRECTORY_MESSAGE = "Failed to remove the root directory.",
|
|
15
|
-
SUCCESSFUL_FIND_MESSAGE = "Searched everything successfully.",
|
|
16
14
|
SUCCESSFUL_INITIALISE_MESSAGE = "The configuration file has been created successfully.",
|
|
17
15
|
SUCCESSFUL_ADD_ROOT_DIRECTORY_MESSAGE = "Added the root directory successfully.",
|
|
18
16
|
SUCCESSFUL_REMOVE_ROOT_DIRECTORY_MESSAGE = "Removed the root directory successfully.";
|
|
@@ -26,11 +24,9 @@ module.exports = {
|
|
|
26
24
|
INVALID_ROOT_DIRECTORY_PATH_MESSAGE,
|
|
27
25
|
INVALID_GLOB_REGEX_OR_STRING_MESSAGE,
|
|
28
26
|
INVALID_ROOT_DIRECTORY_PATH_INDEX_MESSAGE,
|
|
29
|
-
FAILED_FIND_MESSAGE,
|
|
30
27
|
FAILED_INITIALISE_MESSAGE,
|
|
31
28
|
FAILED_ADD_ROOT_DIRECTORY_MESSAGE,
|
|
32
29
|
FAILED_REMOVE_ROOT_DIRECTORY_MESSAGE,
|
|
33
|
-
SUCCESSFUL_FIND_MESSAGE,
|
|
34
30
|
SUCCESSFUL_INITIALISE_MESSAGE,
|
|
35
31
|
SUCCESSFUL_ADD_ROOT_DIRECTORY_MESSAGE,
|
|
36
32
|
SUCCESSFUL_REMOVE_ROOT_DIRECTORY_MESSAGE
|