@e-mc/module 0.11.18 → 0.11.19
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 +6 -6
- package/index.js +10 -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.11.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.11.19/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { LogStatus } from "./squared";
|
|
@@ -414,11 +414,11 @@ interface LoggerModule {
|
|
|
414
414
|
|
|
415
415
|
## References
|
|
416
416
|
|
|
417
|
-
- https://www.unpkg.com/@e-mc/types@0.11.
|
|
418
|
-
- https://www.unpkg.com/@e-mc/types@0.11.
|
|
419
|
-
- https://www.unpkg.com/@e-mc/types@0.11.
|
|
420
|
-
- https://www.unpkg.com/@e-mc/types@0.11.
|
|
421
|
-
- https://www.unpkg.com/@e-mc/types@0.11.
|
|
417
|
+
- https://www.unpkg.com/@e-mc/types@0.11.19/lib/core.d.ts
|
|
418
|
+
- https://www.unpkg.com/@e-mc/types@0.11.19/lib/logger.d.ts
|
|
419
|
+
- https://www.unpkg.com/@e-mc/types@0.11.19/lib/module.d.ts
|
|
420
|
+
- https://www.unpkg.com/@e-mc/types@0.11.19/lib/node.d.ts
|
|
421
|
+
- https://www.unpkg.com/@e-mc/types@0.11.19/lib/settings.d.ts
|
|
422
422
|
|
|
423
423
|
* https://www.npmjs.com/package/@types/node
|
|
424
424
|
|
package/index.js
CHANGED
|
@@ -175,7 +175,15 @@ let PNPM_VER;
|
|
|
175
175
|
let YARN_VER;
|
|
176
176
|
let FILETYPE_ESM = null;
|
|
177
177
|
function parseYaml(pathname) {
|
|
178
|
-
|
|
178
|
+
let value;
|
|
179
|
+
try {
|
|
180
|
+
return yaml.load(value = fs.readFileSync(pathname, 'utf-8'));
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
if (value) {
|
|
184
|
+
return JSON.parse(value);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
179
187
|
}
|
|
180
188
|
function setPnpmVer() {
|
|
181
189
|
if (PNPM_VER === undefined) {
|
|
@@ -964,7 +972,7 @@ class Module extends EventEmitter {
|
|
|
964
972
|
this[_g] = null;
|
|
965
973
|
}
|
|
966
974
|
static get VERSION() {
|
|
967
|
-
return "0.11.
|
|
975
|
+
return "0.11.19";
|
|
968
976
|
}
|
|
969
977
|
static get LOG_TYPE() {
|
|
970
978
|
return types_1.LOG_TYPE;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/module",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.19",
|
|
4
4
|
"description": "Module base class for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/types": "0.11.
|
|
23
|
+
"@e-mc/types": "0.11.19",
|
|
24
24
|
"chalk": "4.1.2",
|
|
25
25
|
"file-type": "^18.7.0",
|
|
26
26
|
"js-yaml": "^4.1.1",
|