@e-mc/module 0.9.12 → 0.9.13
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 +2 -15
- package/package.json +3 -3
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.9.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.9.13/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { LogStatus } from "./squared";
|
|
@@ -394,11 +394,11 @@ type ForegroundColor = typeof IForegroundColor | `#${string}`;
|
|
|
394
394
|
|
|
395
395
|
## References
|
|
396
396
|
|
|
397
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
398
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
399
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
400
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
401
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
397
|
+
- https://www.unpkg.com/@e-mc/types@0.9.13/lib/core.d.ts
|
|
398
|
+
- https://www.unpkg.com/@e-mc/types@0.9.13/lib/logger.d.ts
|
|
399
|
+
- https://www.unpkg.com/@e-mc/types@0.9.13/lib/module.d.ts
|
|
400
|
+
- https://www.unpkg.com/@e-mc/types@0.9.13/lib/node.d.ts
|
|
401
|
+
- https://www.unpkg.com/@e-mc/types@0.9.13/lib/settings.d.ts
|
|
402
402
|
|
|
403
403
|
* https://www.npmjs.com/package/@types/node
|
|
404
404
|
|
package/index.js
CHANGED
|
@@ -106,7 +106,6 @@ const VALUES = {
|
|
|
106
106
|
["node.process.cpu_usage"]: true,
|
|
107
107
|
["node.process.memory_usage"]: true,
|
|
108
108
|
["node.process.inline"]: true,
|
|
109
|
-
["node.settings.package_manager"]: '',
|
|
110
109
|
["temp.dir"]: "tmp",
|
|
111
110
|
["temp.write"]: false,
|
|
112
111
|
["process.password"]: '',
|
|
@@ -735,7 +734,7 @@ class Module extends EventEmitter {
|
|
|
735
734
|
this[_f] = new AbortController();
|
|
736
735
|
this[_g] = null;
|
|
737
736
|
}
|
|
738
|
-
static get VERSION() { return "0.9.
|
|
737
|
+
static get VERSION() { return "0.9.13"; }
|
|
739
738
|
static get LOG_TYPE() { return types_1.LOG_TYPE; }
|
|
740
739
|
static get STATUS_TYPE() { return types_1.STATUS_TYPE; }
|
|
741
740
|
static get MAX_TIMEOUT() { return 2147483647; }
|
|
@@ -778,7 +777,6 @@ class Module extends EventEmitter {
|
|
|
778
777
|
case "error.fatal":
|
|
779
778
|
return VALUES[key];
|
|
780
779
|
case "node.require.ext":
|
|
781
|
-
case "node.settings.package_manager":
|
|
782
780
|
case "process.password":
|
|
783
781
|
case "process.cipher.algorithm":
|
|
784
782
|
return VALUES[key] !== '';
|
|
@@ -2320,17 +2318,6 @@ class Module extends EventEmitter {
|
|
|
2320
2318
|
VALUES["node.require.inline"] = inline;
|
|
2321
2319
|
}
|
|
2322
2320
|
}
|
|
2323
|
-
const manager = node.settings?.package_manager;
|
|
2324
|
-
switch (manager) {
|
|
2325
|
-
case 'npm':
|
|
2326
|
-
case 'yarn':
|
|
2327
|
-
case 'pnpm':
|
|
2328
|
-
VALUES["node.settings.package_manager"] = manager;
|
|
2329
|
-
break;
|
|
2330
|
-
default:
|
|
2331
|
-
VALUES["node.settings.package_manager"] = '';
|
|
2332
|
-
break;
|
|
2333
|
-
}
|
|
2334
2321
|
}
|
|
2335
2322
|
if ((0, types_1.isPlainObject)(settings.process)) {
|
|
2336
2323
|
const { env, cipher, password: pwd } = settings.process;
|
|
@@ -3423,7 +3410,7 @@ class Module extends EventEmitter {
|
|
|
3423
3410
|
if (typeof options === 'number') {
|
|
3424
3411
|
options = undefined;
|
|
3425
3412
|
}
|
|
3426
|
-
this.writeFail("Unknown", err, { ...options, type: types_1.LOG_TYPE.SYSTEM, code: types_1.ERR_CODE.MODULE_NOT_FOUND, exec: { command:
|
|
3413
|
+
this.writeFail("Unknown", err, { ...options, type: types_1.LOG_TYPE.SYSTEM, code: types_1.ERR_CODE.MODULE_NOT_FOUND, exec: { command: 'npm', args: ['i', name] } });
|
|
3427
3414
|
return true;
|
|
3428
3415
|
}
|
|
3429
3416
|
if (value) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/module",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.13",
|
|
4
4
|
"description": "Module base class for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"squared-functions"
|
|
18
18
|
],
|
|
19
19
|
"author": "An Pham <anpham6@gmail.com>",
|
|
20
|
-
"license": "BSD
|
|
20
|
+
"license": "BSD-3-Clause",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/types": "0.9.
|
|
23
|
+
"@e-mc/types": "0.9.13",
|
|
24
24
|
"chalk": "4.1.2",
|
|
25
25
|
"file-type": "16.5.4",
|
|
26
26
|
"js-yaml": "^4.1.0",
|