@e-mc/module 0.12.1 → 0.12.3

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.
Files changed (3) hide show
  1. package/README.md +7 -7
  2. package/index.js +3 -7
  3. 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.12.1/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.12.2/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { LogStatus } from "./squared";
@@ -232,7 +232,7 @@ interface ModuleConstructor {
232
232
  checkSemVer(name: string | [string, string], min: number | string, max?: number | string): boolean;
233
233
  checkSemVer(name: string | [string, string], min: number | string, max: number | string, options?: Omit<CheckSemVerOptions, "min" | "max" | "equals">): boolean;
234
234
  /** @deprecated @e-mc/types */
235
- sanitizeCmd(value: string): string;
235
+ sanitizeCmd(value: string, ...args: unknown[]): string;
236
236
  /** @deprecated @e-mc/types */
237
237
  sanitizeArgs(value: string, doubleQuote?: boolean): string;
238
238
  /** @deprecated @e-mc/types */
@@ -414,11 +414,11 @@ interface LoggerModule {
414
414
 
415
415
  ## References
416
416
 
417
- - https://www.unpkg.com/@e-mc/types@0.12.1/lib/core.d.ts
418
- - https://www.unpkg.com/@e-mc/types@0.12.1/lib/logger.d.ts
419
- - https://www.unpkg.com/@e-mc/types@0.12.1/lib/module.d.ts
420
- - https://www.unpkg.com/@e-mc/types@0.12.1/lib/node.d.ts
421
- - https://www.unpkg.com/@e-mc/types@0.12.1/lib/settings.d.ts
417
+ - https://www.unpkg.com/@e-mc/types@0.12.2/lib/core.d.ts
418
+ - https://www.unpkg.com/@e-mc/types@0.12.2/lib/logger.d.ts
419
+ - https://www.unpkg.com/@e-mc/types@0.12.2/lib/module.d.ts
420
+ - https://www.unpkg.com/@e-mc/types@0.12.2/lib/node.d.ts
421
+ - https://www.unpkg.com/@e-mc/types@0.12.2/lib/settings.d.ts
422
422
 
423
423
  * https://www.npmjs.com/package/@types/node
424
424
 
package/index.js CHANGED
@@ -136,7 +136,6 @@ const MEMORY_CACHE_DISK = {
136
136
  exclude: null
137
137
  };
138
138
  const PROCESS_CIPHER = {};
139
- const SUPPORTED_CANPARSE = (0, types_1.supported)(19, 9) || (0, types_1.supported)(18, 17, true);
140
139
  const REGEXP_TORRENT = /^(?:magnet:\?xt=|(?:https?|s?ftp):\/\/[^/][^\n]*?\.(?:torrent|metalink|meta4)(?:\?[^\n]*)?$)/i;
141
140
  const REGEXP_PROTOCOL = /^([a-z][a-z\d+-.]*):\/\/[^@:[\]\\^<>|\s]/i;
142
141
  const REGEXP_ANSIESCAPE = /[\u001B\u009B]/;
@@ -869,7 +868,7 @@ class Module extends EventEmitter {
869
868
  static LOG_STYLE_NOTICE = Object.freeze({ titleBgColor: 'bgGrey', titleColor: 'white' });
870
869
  static LOG_STYLE_REVERSE = Object.freeze({ titleBgColor: 'bgWhite', titleColor: 'black', messageBgColor: 'bgGrey' });
871
870
  static get VERSION() {
872
- return "0.12.1";
871
+ return "0.12.3";
873
872
  }
874
873
  static get LOG_TYPE() {
875
874
  return types_1.LOG_TYPE;
@@ -1471,9 +1470,6 @@ class Module extends EventEmitter {
1471
1470
  return filename || '';
1472
1471
  }
1473
1472
  static isURL(value, ...exclude) {
1474
- if (exclude.length === 0 && SUPPORTED_CANPARSE) {
1475
- return URL.canParse(value);
1476
- }
1477
1473
  const match = REGEXP_PROTOCOL.exec(value);
1478
1474
  return !!match && !exclude.includes(match[1].toLowerCase());
1479
1475
  }
@@ -2244,8 +2240,8 @@ class Module extends EventEmitter {
2244
2240
  }
2245
2241
  return true;
2246
2242
  }
2247
- static sanitizeCmd(value) {
2248
- return (0, types_1.sanitizeCmd)(value);
2243
+ static sanitizeCmd(value, ...args) {
2244
+ return (0, types_1.sanitizeCmd)(value, ...args);
2249
2245
  }
2250
2246
  static sanitizeArgs(values, doubleQuote) {
2251
2247
  return (0, types_1.sanitizeArgs)(values, doubleQuote);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/module",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
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.12.1",
23
+ "@e-mc/types": "0.12.3",
24
24
  "chalk": "4.1.2",
25
25
  "file-type": "^18.7.0",
26
26
  "js-yaml": "^4.1.0",