@e-mc/module 0.9.0 → 0.9.1
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/LICENSE +10 -10
- package/README.md +7 -23
- package/index.d.ts +4 -4
- package/index.js +1 -17
- package/lib-v4.d.ts +4 -4
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
Copyright 2024 An Pham
|
|
2
|
-
|
|
3
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
4
|
-
|
|
5
|
-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
6
|
-
|
|
7
|
-
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
-
|
|
9
|
-
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
|
-
|
|
1
|
+
Copyright 2024 An Pham
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
4
|
+
|
|
5
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
6
|
+
|
|
7
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
+
|
|
9
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
|
+
|
|
11
11
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @e-mc/module
|
|
2
2
|
|
|
3
|
-
* NodeJS
|
|
3
|
+
* NodeJS 16
|
|
4
4
|
* ES2020
|
|
5
5
|
|
|
6
6
|
## General Usage
|
|
@@ -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.1/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { LogStatus } from "./squared";
|
|
@@ -389,29 +389,13 @@ type BackgroundColor = typeof IBackgroundColor | `#${string}`;
|
|
|
389
389
|
type ForegroundColor = typeof IForegroundColor | `#${string}`;
|
|
390
390
|
```
|
|
391
391
|
|
|
392
|
-
## NodeJS 14 LTS
|
|
393
|
-
|
|
394
|
-
Any optional fail safe dependencies were removed as of `E-mc 0.9`. The code itself will still be *ES2020* and will continue to work equivalently when self-installing these dependencies:
|
|
395
|
-
|
|
396
|
-
### Under 15.4 + 16.0
|
|
397
|
-
|
|
398
|
-
```sh
|
|
399
|
-
npm i abort-controller event-target-shim
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
### Under 14.17 + 15.6
|
|
403
|
-
|
|
404
|
-
```sh
|
|
405
|
-
npm i uuid
|
|
406
|
-
```
|
|
407
|
-
|
|
408
392
|
## References
|
|
409
393
|
|
|
410
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
411
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
412
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
413
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
414
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
394
|
+
- https://www.unpkg.com/@e-mc/types@0.9.1/lib/core.d.ts
|
|
395
|
+
- https://www.unpkg.com/@e-mc/types@0.9.1/lib/logger.d.ts
|
|
396
|
+
- https://www.unpkg.com/@e-mc/types@0.9.1/lib/module.d.ts
|
|
397
|
+
- https://www.unpkg.com/@e-mc/types@0.9.1/lib/node.d.ts
|
|
398
|
+
- https://www.unpkg.com/@e-mc/types@0.9.1/lib/settings.d.ts
|
|
415
399
|
|
|
416
400
|
* https://www.npmjs.com/package/@types/node
|
|
417
401
|
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ModuleConstructor } from '../types/lib';
|
|
2
|
-
|
|
3
|
-
declare const Module: ModuleConstructor;
|
|
4
|
-
|
|
1
|
+
import type { ModuleConstructor } from '../types/lib';
|
|
2
|
+
|
|
3
|
+
declare const Module: ModuleConstructor;
|
|
4
|
+
|
|
5
5
|
export = Module;
|
package/index.js
CHANGED
|
@@ -694,7 +694,7 @@ class Module extends EventEmitter {
|
|
|
694
694
|
this[_f] = new AbortController();
|
|
695
695
|
this[_g] = null;
|
|
696
696
|
}
|
|
697
|
-
static get VERSION() { return "0.9.
|
|
697
|
+
static get VERSION() { return "0.9.1"; }
|
|
698
698
|
static get LOG_TYPE() { return types_1.LOG_TYPE; }
|
|
699
699
|
static get STATUS_TYPE() { return types_1.STATUS_TYPE; }
|
|
700
700
|
static get MAX_TIMEOUT() { return 2147483647; }
|
|
@@ -3629,22 +3629,6 @@ Module.LOG_STYLE_INFO = Object.freeze({ titleBgColor: 'bgBlue', titleColor: 'whi
|
|
|
3629
3629
|
Module.LOG_STYLE_WARN = Object.freeze({ titleBgColor: 'bgBlack', titleColor: 'yellow', titleBold: true });
|
|
3630
3630
|
Module.LOG_STYLE_NOTICE = Object.freeze({ titleBgColor: 'bgGrey', titleColor: 'white' });
|
|
3631
3631
|
Module.LOG_STYLE_REVERSE = Object.freeze({ titleBgColor: 'bgWhite', titleColor: 'black', messageBgColor: 'bgGrey' });
|
|
3632
|
-
if (!Module.supported(15, 4)) {
|
|
3633
|
-
if (!global.AbortController) {
|
|
3634
|
-
try {
|
|
3635
|
-
({ AbortController: global.AbortController } = require('abort-controller'));
|
|
3636
|
-
}
|
|
3637
|
-
catch {
|
|
3638
|
-
}
|
|
3639
|
-
}
|
|
3640
|
-
if (!global.EventTarget) {
|
|
3641
|
-
try {
|
|
3642
|
-
({ EventTarget: global.EventTarget } = require('event-target-shim'));
|
|
3643
|
-
}
|
|
3644
|
-
catch {
|
|
3645
|
-
}
|
|
3646
|
-
}
|
|
3647
|
-
}
|
|
3648
3632
|
EventEmitter.defaultMaxListeners = Infinity;
|
|
3649
3633
|
Object.freeze(types_1.LOG_TYPE);
|
|
3650
3634
|
Object.freeze(types_1.STATUS_TYPE);
|
package/lib-v4.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IModuleLibV4 } from '../types/lib/compat-v4';
|
|
2
|
-
|
|
3
|
-
declare const LibV4: IModuleLibV4;
|
|
4
|
-
|
|
1
|
+
import type { IModuleLibV4 } from '../types/lib/compat-v4';
|
|
2
|
+
|
|
3
|
+
declare const LibV4: IModuleLibV4;
|
|
4
|
+
|
|
5
5
|
export = LibV4;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/module",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
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": "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.1",
|
|
24
24
|
"chalk": "4.1.2",
|
|
25
25
|
"file-type": "16.5.4",
|
|
26
26
|
"js-yaml": "^4.1.0",
|