@cparra/apexdocs 2.2.3 → 2.3.0
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/.github/workflows/close_stale.yml +22 -0
- package/README.md +33 -8
- package/docs/Misc/SampleClass.md +168 -0
- package/docs/README.md +1 -1
- package/docs/Sample-Classes/SampleClass.md +7 -1
- package/examples/force-app/main/default/classes/SampleClass.cls +1 -1
- package/lib/application/Apexdocs.d.ts +2 -1
- package/lib/application/Apexdocs.js +7 -5
- package/lib/application/Apexdocs.js.map +1 -1
- package/lib/model/apex-bundle.d.ts +2 -1
- package/lib/model/apex-bundle.js +2 -1
- package/lib/model/apex-bundle.js.map +1 -1
- package/lib/model/file.js +5 -2
- package/lib/model/file.js.map +1 -1
- package/lib/model/markdown-file.d.ts +2 -0
- package/lib/model/markdown-file.js +22 -0
- package/lib/model/markdown-file.js.map +1 -1
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +0 -1
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +1 -1
- package/lib/model/markdown-home-file.d.ts +0 -1
- package/lib/model/markdown-home-file.js +0 -4
- package/lib/model/markdown-home-file.js.map +1 -1
- package/lib/model/markdown-type-file.d.ts +0 -1
- package/lib/model/markdown-type-file.js +0 -4
- package/lib/model/markdown-type-file.js.map +1 -1
- package/lib/service/apex-file-reader.js +4 -4
- package/lib/service/apex-file-reader.js.map +1 -1
- package/lib/service/manifest-factory.d.ts +2 -1
- package/lib/service/manifest-factory.js.map +1 -1
- package/lib/service/parser.d.ts +2 -2
- package/lib/service/parser.js +3 -1
- package/lib/service/parser.js.map +1 -1
- package/lib/transpiler/markdown/class-file-generatorHelper.js +2 -2
- package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -1
- package/lib/util/error-logger.js +25 -24
- package/lib/util/error-logger.js.map +1 -1
- package/lib/util/logger.d.ts +4 -1
- package/lib/util/logger.js +28 -3
- package/lib/util/logger.js.map +1 -1
- package/package.json +5 -4
- package/src/application/Apexdocs.ts +8 -5
- package/src/model/apex-bundle.ts +1 -1
- package/src/model/file.ts +6 -2
- package/src/model/markdown-file.ts +26 -0
- package/src/model/markdown-generation-util/doc-comment-annotation-util.ts +0 -1
- package/src/model/markdown-home-file.ts +0 -5
- package/src/model/markdown-type-file.ts +0 -5
- package/src/service/apex-file-reader.ts +4 -4
- package/src/service/manifest-factory.ts +5 -1
- package/src/service/parser.ts +5 -3
- package/src/transpiler/markdown/class-file-generatorHelper.ts +2 -2
- package/src/util/error-logger.ts +25 -24
- package/src/util/logger.ts +29 -3
- package/docs/Some-group/GroupedClass.md +0 -7
- package/docs/index.html +0 -21
package/src/util/logger.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as chalk from 'chalk';
|
|
2
|
+
import * as logUpdate from 'log-update';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Logs messages to the console.
|
|
5
6
|
*/
|
|
6
7
|
export class Logger {
|
|
8
|
+
static currentFrame = -1;
|
|
9
|
+
|
|
10
|
+
static frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
11
|
+
|
|
7
12
|
/**
|
|
8
13
|
* Logs a message with optional arguments.
|
|
9
14
|
* @param message The message to log.
|
|
@@ -22,10 +27,31 @@ export class Logger {
|
|
|
22
27
|
* @param args Optional arguments.
|
|
23
28
|
*/
|
|
24
29
|
public static error(message: string, ...args: string[]) {
|
|
25
|
-
this.
|
|
30
|
+
this.logSingle(message, false, 'red', false);
|
|
31
|
+
args.forEach((arg) => {
|
|
32
|
+
this.logSingle(message, false, 'red', false);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public static logSingle(text: string, showSpinner = true, color: 'green' | 'red' = 'green', overrideConsole = true) {
|
|
37
|
+
if (this.currentFrame > 9) {
|
|
38
|
+
this.currentFrame = 0;
|
|
39
|
+
}
|
|
40
|
+
const spinner = showSpinner ? `${this.frames[this.currentFrame++]}` : '';
|
|
41
|
+
let logMessage;
|
|
42
|
+
if (color === 'green') {
|
|
43
|
+
logMessage = `${chalk.green(new Date().toLocaleString() + ': ')}${text}\n`;
|
|
44
|
+
} else {
|
|
45
|
+
logMessage = `${chalk.red(new Date().toLocaleString() + ': ')}${text}\n`;
|
|
46
|
+
}
|
|
47
|
+
if (overrideConsole) {
|
|
48
|
+
logUpdate(`${spinner} ${logMessage}`);
|
|
49
|
+
} else {
|
|
50
|
+
process.stdout.write(`${spinner} ${logMessage}`);
|
|
51
|
+
}
|
|
26
52
|
}
|
|
27
53
|
|
|
28
|
-
|
|
29
|
-
|
|
54
|
+
public static clear() {
|
|
55
|
+
logUpdate.clear();
|
|
30
56
|
}
|
|
31
57
|
}
|
package/docs/index.html
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Document</title>
|
|
6
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
7
|
-
<meta name="description" content="Description">
|
|
8
|
-
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
9
|
-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css">
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div id="app"></div>
|
|
13
|
-
<script>
|
|
14
|
-
window.$docsify = {
|
|
15
|
-
name: '',
|
|
16
|
-
repo: ''
|
|
17
|
-
}
|
|
18
|
-
</script>
|
|
19
|
-
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|