@e-mc/types 0.12.7 → 0.12.9

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 CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- * [View Source](https://www.unpkg.com/@e-mc/types@0.12.7/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.12.9/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { LogArguments } from "./lib/logger";
@@ -203,10 +203,10 @@ const IMPORT_MAP: Record<string, string | undefined>;
203
203
 
204
204
  ## References
205
205
 
206
- - https://www.unpkg.com/@e-mc/types@0.12.7/index.d.ts
207
- - https://www.unpkg.com/@e-mc/types@0.12.7/lib/logger.d.ts
208
- - https://www.unpkg.com/@e-mc/types@0.12.7/lib/module.d.ts
209
- - https://www.unpkg.com/@e-mc/types@0.12.7/lib/node.d.ts
206
+ - https://www.unpkg.com/@e-mc/types@0.12.9/index.d.ts
207
+ - https://www.unpkg.com/@e-mc/types@0.12.9/lib/logger.d.ts
208
+ - https://www.unpkg.com/@e-mc/types@0.12.9/lib/module.d.ts
209
+ - https://www.unpkg.com/@e-mc/types@0.12.9/lib/node.d.ts
210
210
 
211
211
  * https://developer.mozilla.org/en-US/docs/Web/API/DOMException
212
212
  * https://www.npmjs.com/package/@types/bytes
package/constant.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export const enum INTERNAL {
2
- VERSION = '0.12.7',
2
+ VERSION = '0.12.9',
3
3
  TEMP_DIR = 'tmp',
4
4
  CJS = '__cjs__'
5
5
  }
package/lib/index.d.ts CHANGED
@@ -72,7 +72,7 @@ declare namespace functions {
72
72
  createGzip(file: string | Buffer, options?: CompressLevel): Gzip;
73
73
  createBrotliCompress(file: string | Buffer, options?: BrotliCompressLevel): BrotliCompress;
74
74
  createWriteStreamAsGzip(file: string | Buffer, output: string, options?: CompressLevel): WriteStream;
75
- createWriteStreamAsBrotli(file: string | Buffer, output: string, options?: CompressLevel): WriteStream;
75
+ createWriteStreamAsBrotli(file: string | Buffer, output: string, options?: BrotliCompressLevel): WriteStream;
76
76
  intoGzipStream(output: string, options?: ZlibOptions): WriteStream;
77
77
  intoBrotliStream(output: string, options?: BrotliOptions): WriteStream;
78
78
  writeGzip(file: string | Buffer, output: string, options?: CompressLevel): Promise<void>;
@@ -349,9 +349,9 @@ declare namespace functions {
349
349
  headersOn(name: string | string[], callback: HeadersOnCallback): void;
350
350
  headersOn(name: string | string[], globUrl: string, callback: HeadersOnCallback): void;
351
351
  headersOf(uri: string): OutgoingHttpHeaders | undefined;
352
- aria2c(uri: string | URL, pathname: string): Promise<string[]>;
352
+ aria2c(uri: string | URL, pathname: string | URL): Promise<string[]>;
353
353
  aria2c(uri: string | URL, options?: Aria2Options): Promise<string[]>;
354
- rclone(uri: string | URL, pathname: string): Promise<string[]>;
354
+ rclone(uri: string | URL, pathname: string | URL): Promise<string[]>;
355
355
  rclone(uri: string | URL, options?: RcloneOptions): Promise<string[]>;
356
356
  json(uri: string | URL, options?: OpenOptions): Promise<object | null>;
357
357
  pipe(uri: string | URL, to: Writable, options?: OpenOptions): Promise<null>;
@@ -687,7 +687,9 @@ declare namespace functions {
687
687
  checkFail(message: unknown, options: LogFailOptions): LogArguments | false | undefined;
688
688
  writeLog(component: LogComponent, queue?: boolean): void;
689
689
  writeLog(type: StatusType, value: unknown, options: LogOptions): void;
690
- writeLog(type: StatusType, value: unknown, timeStamp?: LogDate, duration?: number): void;
690
+ writeLog(type: StatusType, value: unknown, from: string, source?: string): void;
691
+ writeLog(type: StatusType, value: unknown, timeStamp?: LogDate, from?: string, source?: string): void;
692
+ writeLog(type: StatusType, value: unknown, timeStamp?: LogDate, duration?: number, from?: string, source?: string): void;
691
693
  addLog(component: LogComponent, queue?: boolean): void;
692
694
  addLog(type: StatusType, value: unknown, options: LogOptions): void;
693
695
  addLog(type: StatusType, value: unknown, from: string, source?: string): void;
package/lib/request.d.ts CHANGED
@@ -19,7 +19,7 @@ interface SilentAction {
19
19
  }
20
20
 
21
21
  interface CopyAction extends HeadersAction {
22
- pathname?: string;
22
+ pathname?: string | URL;
23
23
  signal?: AbortSignal;
24
24
  }
25
25
 
@@ -116,9 +116,9 @@ export interface IHttpAdapter<T extends OpenOptions = OpenOptions> {
116
116
 
117
117
  export interface HttpAdapterConstructor<T extends OpenOptions = OpenOptions> {
118
118
  isUnsupported(value: number): boolean;
119
- isDowngrade(err: unknown): boolean;
120
- wasAborted(err: unknown): boolean;
121
- isConnectionError(err: unknown): boolean;
119
+ isDowngrade(err: unknown): err is Error;
120
+ wasAborted(err: unknown): err is Error;
121
+ isConnectionError(err: unknown): err is Error;
122
122
  defineHostConfig(settings: RequestModule): void;
123
123
  readonly prototype: IHttpAdapter<T>;
124
124
  new(instance: IRequest, state: ControllerState, uri: string | URL, options: T): IHttpAdapter<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.12.7",
3
+ "version": "0.12.9",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",