@teambit/logger 0.0.470 → 0.0.471

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/dist/logger.d.ts CHANGED
@@ -10,16 +10,49 @@ export declare class Logger implements IBitLogger {
10
10
  error(message: string, ...meta: any[]): void;
11
11
  fatal(message: string, ...meta: any[]): void;
12
12
  get isLoaderStarted(): boolean;
13
+ /**
14
+ * use it for a long running process. upon creation it logs the `processDescription`.
15
+ * if the process involves iteration over a list of items, such as running tag on a list of
16
+ * components, then pass the `totalItems` as the total of the total components in the list.
17
+ * later, during the iteration, call `LongProcessLogger.logProgress(componentName)`.
18
+ * once done, call `LongProcessLogger.end()`
19
+ * the status-line will show all messages in the terminal.
20
+ */
13
21
  createLongProcessLogger(processDescription: string, totalItems?: number): LongProcessLogger;
22
+ /**
23
+ * single status-line on the bottom of the screen.
24
+ * the text is replaced every time this method is called.
25
+ */
14
26
  setStatusLine(text: string): void;
27
+ /**
28
+ * remove the text from the last line on the screen.
29
+ */
15
30
  clearStatusLine(): void;
31
+ /**
32
+ * print to the screen. if message is empty, print the last logged message.
33
+ */
16
34
  console(message?: string): void;
35
+ /**
36
+ * print to the screen as a title, with bold text.
37
+ */
17
38
  consoleTitle(message: string): void;
39
+ /**
40
+ * print to the screen with a green `✔` prefix. if message is empty, print the last logged message.
41
+ */
18
42
  consoleSuccess(message?: string): void;
43
+ /**
44
+ * turn off the logger.
45
+ */
19
46
  off(): import("@teambit/legacy/dist/cli/loader/loader").Loader;
20
47
  on(): import("@teambit/legacy/dist/cli/loader/loader").Loader;
21
48
  profile(id: string, console?: boolean): void;
49
+ /**
50
+ * print to the screen with a red `✖` prefix. if message is empty, print the last logged message.
51
+ */
22
52
  consoleFailure(message?: string): void;
53
+ /**
54
+ * print to the screen with a red `⚠` prefix. if message is empty, print the last logged message.
55
+ */
23
56
  consoleWarning(message?: string): void;
24
57
  private colorMessage;
25
58
  }
@@ -1,4 +1,13 @@
1
1
  import type { Logger } from './logger';
2
+ /**
3
+ * use it for a long running process. upon creation it logs the `processDescription`.
4
+ * if the process involves iteration over a list of items, such as running tag on a list of
5
+ * components, then pass the `totalItems` as the total components in the list.
6
+ * later, during the iteration, call `logProgress(componentName)`.
7
+ * once done, call `end()`.
8
+ * the status-line will show all messages in the terminal.
9
+ * see README for more data.
10
+ */
2
11
  export declare class LongProcessLogger {
3
12
  private logPublisher;
4
13
  private extensionName;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/logger",
3
- "version": "0.0.470",
3
+ "version": "0.0.471",
4
4
  "homepage": "https://bit.dev/teambit/harmony/logger",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "logger",
9
- "version": "0.0.470"
9
+ "version": "0.0.471"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/harmony": "0.2.11",
@@ -15,7 +15,7 @@
15
15
  "pretty-time": "1.1.0",
16
16
  "@babel/runtime": "7.12.18",
17
17
  "core-js": "^3.0.0",
18
- "@teambit/cli": "0.0.385"
18
+ "@teambit/cli": "0.0.386"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/mocha": "5.2.7",
@@ -24,10 +24,10 @@
24
24
  "@types/react-dom": "^17.0.5",
25
25
  "@types/react": "^17.0.8",
26
26
  "@types/node": "12.20.4",
27
- "@teambit/harmony.aspect-docs.logger": "0.0.104"
27
+ "@teambit/harmony.aspect-docs.logger": "0.0.105"
28
28
  },
29
29
  "peerDependencies": {
30
- "@teambit/legacy": "1.0.171",
30
+ "@teambit/legacy": "1.0.172",
31
31
  "react-dom": "^16.8.0 || ^17.0.0",
32
32
  "react": "^16.8.0 || ^17.0.0"
33
33
  },
@@ -55,7 +55,7 @@
55
55
  "react": "-"
56
56
  },
57
57
  "peerDependencies": {
58
- "@teambit/legacy": "1.0.171",
58
+ "@teambit/legacy": "1.0.172",
59
59
  "react-dom": "^16.8.0 || ^17.0.0",
60
60
  "react": "^16.8.0 || ^17.0.0"
61
61
  }
package/tsconfig.json CHANGED
@@ -25,7 +25,6 @@
25
25
  "strict": true,
26
26
  "noImplicitAny": false,
27
27
  "rootDir": ".",
28
- "removeComments": true,
29
28
  "preserveConstEnums": true,
30
29
  "resolveJsonModule": true
31
30
  },