@e-mc/module 0.10.12 → 0.10.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/LICENSE CHANGED
@@ -1,11 +1,7 @@
1
1
  Copyright 2024 An Pham
2
2
 
3
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
5
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
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
- 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.
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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.10.12/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.10.13/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { LogStatus } from "./squared";
@@ -407,14 +407,14 @@ interface LoggerModule {
407
407
 
408
408
  ## References
409
409
 
410
- - https://www.unpkg.com/@e-mc/types@0.10.12/lib/core.d.ts
411
- - https://www.unpkg.com/@e-mc/types@0.10.12/lib/logger.d.ts
412
- - https://www.unpkg.com/@e-mc/types@0.10.12/lib/module.d.ts
413
- - https://www.unpkg.com/@e-mc/types@0.10.12/lib/node.d.ts
414
- - https://www.unpkg.com/@e-mc/types@0.10.12/lib/settings.d.ts
410
+ - https://www.unpkg.com/@e-mc/types@0.10.13/lib/core.d.ts
411
+ - https://www.unpkg.com/@e-mc/types@0.10.13/lib/logger.d.ts
412
+ - https://www.unpkg.com/@e-mc/types@0.10.13/lib/module.d.ts
413
+ - https://www.unpkg.com/@e-mc/types@0.10.13/lib/node.d.ts
414
+ - https://www.unpkg.com/@e-mc/types@0.10.13/lib/settings.d.ts
415
415
 
416
416
  * https://www.npmjs.com/package/@types/node
417
417
 
418
418
  ## LICENSE
419
419
 
420
- BSD 3-Clause
420
+ MIT
package/index.js CHANGED
@@ -138,7 +138,6 @@ const MEMORY_CACHE_DISK = {
138
138
  include: null,
139
139
  exclude: null
140
140
  };
141
- const SUPPORTED_CANPARSE = (0, types_1.supported)(19, 9) || (0, types_1.supported)(18, 17, 0, true);
142
141
  const REGEXP_TORRENT = /^(?:magnet:\?xt=|(?:https?|s?ftp):\/\/[^/][^\n]*?\.(?:torrent|metalink|meta4)(?:\?[^\n]*)?$)/i;
143
142
  const REGEXP_PROTOCOL = /^([a-z][a-z\d+-.]*):\/\/[^@:[\]\\^<>|\s]/i;
144
143
  const REGEXP_CLIESCAPE = /[^\w+-.,/:@]/g;
@@ -960,7 +959,7 @@ class Module extends EventEmitter {
960
959
  this[_g] = null;
961
960
  }
962
961
  static get VERSION() {
963
- return "0.10.12";
962
+ return "0.10.13";
964
963
  }
965
964
  static get LOG_TYPE() {
966
965
  return types_1.LOG_TYPE;
@@ -1560,9 +1559,6 @@ class Module extends EventEmitter {
1560
1559
  return filename || '';
1561
1560
  }
1562
1561
  static isURL(value, ...exclude) {
1563
- if (exclude.length === 0 && SUPPORTED_CANPARSE) {
1564
- return URL.canParse(value);
1565
- }
1566
1562
  const match = REGEXP_PROTOCOL.exec(value);
1567
1563
  return !!match && !exclude.includes(match[1].toLowerCase());
1568
1564
  }
@@ -2770,7 +2766,7 @@ class Module extends EventEmitter {
2770
2766
  dir = dir.substring(ensureDir(PROCESS_CWD).length);
2771
2767
  }
2772
2768
  else {
2773
- this.formatMessage(1, "WARN!", 'Temp directory can only be relative', dir, { ...this.LOG_STYLE_WARN, newline: true });
2769
+ this.formatMessage(1, "WARN!", "Not permitted to set absolute path", dir, { ...this.LOG_STYLE_WARN, newline: true });
2774
2770
  dir = VALUES["temp.dir"];
2775
2771
  }
2776
2772
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/module",
3
- "version": "0.10.12",
3
+ "version": "0.10.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-3-Clause",
20
+ "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/types": "0.10.12",
23
+ "@e-mc/types": "0.10.13",
24
24
  "chalk": "4.1.2",
25
25
  "file-type": "^18.7.0",
26
26
  "js-yaml": "^4.1.0",