@e-mc/module 0.13.8 → 0.13.9
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/README.md +7 -7
- package/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.13.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.13.9/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { LogStatus } from "./squared";
|
|
@@ -433,12 +433,12 @@ interface LoggerModule {
|
|
|
433
433
|
|
|
434
434
|
## References
|
|
435
435
|
|
|
436
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
437
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
438
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
439
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
440
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
441
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
436
|
+
- https://www.unpkg.com/@e-mc/types@0.13.9/lib/squared.d.ts
|
|
437
|
+
- https://www.unpkg.com/@e-mc/types@0.13.9/lib/core.d.ts
|
|
438
|
+
- https://www.unpkg.com/@e-mc/types@0.13.9/lib/logger.d.ts
|
|
439
|
+
- https://www.unpkg.com/@e-mc/types@0.13.9/lib/module.d.ts
|
|
440
|
+
- https://www.unpkg.com/@e-mc/types@0.13.9/lib/node.d.ts
|
|
441
|
+
- https://www.unpkg.com/@e-mc/types@0.13.9/lib/settings.d.ts
|
|
442
442
|
|
|
443
443
|
* https://www.npmjs.com/package/@types/node
|
|
444
444
|
* https://www.npmjs.com/package/file-type
|
package/index.js
CHANGED
|
@@ -879,7 +879,7 @@ class Module extends EventEmitter {
|
|
|
879
879
|
static LOG_STYLE_NOTICE = Object.freeze({ titleBgColor: 'bgGrey', titleColor: 'white' });
|
|
880
880
|
static LOG_STYLE_REVERSE = Object.freeze({ titleBgColor: 'bgWhite', titleColor: 'black', messageBgColor: 'bgGrey' });
|
|
881
881
|
static get VERSION() {
|
|
882
|
-
return "0.13.
|
|
882
|
+
return "0.13.9";
|
|
883
883
|
}
|
|
884
884
|
static get LOG_TYPE() {
|
|
885
885
|
return types_1.LOG_TYPE;
|
|
@@ -2039,7 +2039,7 @@ class Module extends EventEmitter {
|
|
|
2039
2039
|
else if ((value = getCpuTimes() - value) >= 0) {
|
|
2040
2040
|
let result = 0;
|
|
2041
2041
|
if (value > 0) {
|
|
2042
|
-
const { user, system } = thread && SUPPORTED_CPUTHREAD ? process.threadCpuUsage() : process.cpuUsage();
|
|
2042
|
+
const { user, system } = thread && SUPPORTED_CPUTHREAD ? process.threadCpuUsage(start) : process.cpuUsage(start);
|
|
2043
2043
|
const usage = user + system;
|
|
2044
2044
|
result = usage > 0 ? Math.min(usage / value, 1) * (SETTINGS.process?.cpu_single_core ? 1 : CPU_CORETOTAL) : 0;
|
|
2045
2045
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/module",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.9",
|
|
4
4
|
"description": "Module base class for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"license": "BSD-3-Clause",
|
|
20
20
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@e-mc/types": "0.13.
|
|
22
|
+
"@e-mc/types": "0.13.9",
|
|
23
23
|
"chalk": "4.1.2",
|
|
24
24
|
"file-type": "^20.5.0",
|
|
25
25
|
"js-yaml": "^4.1.1",
|