find-cli 1.4.5 → 1.4.7

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/line.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const { arrayUtilities } = require("necessary");
4
4
 
5
- const { grey, blue, yellow } = require("./utilities/log"),
5
+ const { grey, blue, yellow, cyan } = require("./utilities/log"),
6
6
  { EMPTY_STRING, SINGLE_SPACE } = require("./constants");
7
7
 
8
8
  const { backwardsForEach } = arrayUtilities;
@@ -128,7 +128,7 @@ class Line {
128
128
 
129
129
  gap = grey(gap); ///
130
130
 
131
- match = blue(match); ///
131
+ match = cyan(match); ///
132
132
 
133
133
  string = `${string}${match}${gap}`;
134
134
  });
@@ -142,7 +142,8 @@ class Line {
142
142
  const filePathLength = this.getFilePathLength(),
143
143
  paddingLength = requiredFilePathLength - filePathLength,
144
144
  padding = paddingFromPaddingLength(paddingLength),
145
- formattedFilePath = `${this.filePath}${padding}`;
145
+ filePath = `${this.filePath}${padding}`,
146
+ formattedFilePath = blue(filePath);
146
147
 
147
148
  return formattedFilePath;
148
149
  }
@@ -151,7 +152,7 @@ class Line {
151
152
  const formattedIndex = this.getFormattedIndex(requiredIndexLength),
152
153
  formattedContent = this.getFormattedContent(),
153
154
  formattedFilePath = this.getFormattedFilePath(requiredFilePathLength),
154
- message = `| ${formattedFilePath} ${formattedIndex} | ${formattedContent}`;
155
+ message = `${formattedFilePath} ${formattedIndex} | ${formattedContent}`;
155
156
 
156
157
  return message;
157
158
  }
@@ -1,26 +1,34 @@
1
1
  "use strict";
2
2
 
3
- const GREY_FOREGROUND_COLOUR = "\u001b[90m",
4
- RED_FOREGROUND_COLOUR = "\u001b[31m",
3
+ const RED_FOREGROUND_COLOUR = "\u001b[31m",
4
+ GREY_FOREGROUND_COLOUR = "\u001b[90m",
5
5
  BLUE_FOREGROUND_COLOUR = "\u001b[34m",
6
+ CYAN_FOREGROUND_COLOUR = "\u001b[36m",
6
7
  GREEN_FOREGROUND_COLOUR = "\u001b[32m",
7
8
  YELLOW_FOREGROUND_COLOUR = "\u001b[33m",
9
+ MAGENTA_FOREGROUND_COLOUR = "\u001b[35m",
8
10
  RESET_FOREGROUND_COLOUR = "\u001b[39m";
9
11
 
10
- function grey(string) { return `${GREY_FOREGROUND_COLOUR}${string}${RESET_FOREGROUND_COLOUR}`; }
11
-
12
12
  function red(string) { return `${RED_FOREGROUND_COLOUR}${string}${RESET_FOREGROUND_COLOUR}`; }
13
13
 
14
+ function grey(string) { return `${GREY_FOREGROUND_COLOUR}${string}${RESET_FOREGROUND_COLOUR}`; }
15
+
14
16
  function blue(string) { return `${BLUE_FOREGROUND_COLOUR}${string}${RESET_FOREGROUND_COLOUR}`; }
15
17
 
18
+ function cyan(string) { return `${CYAN_FOREGROUND_COLOUR}${string}${RESET_FOREGROUND_COLOUR}`; }
19
+
16
20
  function green(string) { return `${GREEN_FOREGROUND_COLOUR}${string}${RESET_FOREGROUND_COLOUR}`; }
17
21
 
18
22
  function yellow(string) { return `${YELLOW_FOREGROUND_COLOUR}${string}${RESET_FOREGROUND_COLOUR}`; }
19
23
 
24
+ function magenta(string) { return `${MAGENTA_FOREGROUND_COLOUR}${string}${RESET_FOREGROUND_COLOUR}`; }
25
+
20
26
  module.exports = {
21
- grey,
22
27
  red,
28
+ grey,
23
29
  blue,
30
+ cyan,
24
31
  green,
25
- yellow
32
+ yellow,
33
+ magenta
26
34
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "find-cli",
3
3
  "author": "James Smith",
4
- "version": "1.4.5",
4
+ "version": "1.4.7",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/find-cli",
7
7
  "description": "An alternative to grep.",