@e-mc/types 0.13.4 → 0.13.5

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.13.4/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.13.5/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { LogArguments } from "./lib/logger";
@@ -208,10 +208,10 @@ const IMPORT_MAP: Record<string, string | undefined>;
208
208
 
209
209
  ## References
210
210
 
211
- - https://www.unpkg.com/@e-mc/types@0.13.4/index.d.ts
212
- - https://www.unpkg.com/@e-mc/types@0.13.4/lib/logger.d.ts
213
- - https://www.unpkg.com/@e-mc/types@0.13.4/lib/module.d.ts
214
- - https://www.unpkg.com/@e-mc/types@0.13.4/lib/node.d.ts
211
+ - https://www.unpkg.com/@e-mc/types@0.13.5/index.d.ts
212
+ - https://www.unpkg.com/@e-mc/types@0.13.5/lib/logger.d.ts
213
+ - https://www.unpkg.com/@e-mc/types@0.13.5/lib/module.d.ts
214
+ - https://www.unpkg.com/@e-mc/types@0.13.5/lib/node.d.ts
215
215
 
216
216
  * https://developer.mozilla.org/en-US/docs/Web/API/DOMException
217
217
  * 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.13.4',
2
+ VERSION = '0.13.5',
3
3
  TEMP_DIR = 'tmp',
4
4
  CJS = '__cjs__'
5
5
  }
package/lib/http.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { LookupAddress } from 'node:dns';
2
- import type { ClientRequest, Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
2
+ import type { AgentOptions, ClientRequest, Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
3
3
  import type { Agent as HttpsAgent } from 'node:https';
4
4
  import type { ClientHttp2Stream } from 'node:http2';
5
5
  import type { SecureVersion } from 'node:tls';
@@ -85,11 +85,10 @@ export interface HeadersAction {
85
85
  headers?: OutgoingHttpHeaders | Headers;
86
86
  }
87
87
 
88
- export interface HttpAgentSettings {
88
+ export interface HttpAgentSettings extends HttpAgentOptions {
89
89
  http?: HttpAgent;
90
90
  https?: HttpsAgent;
91
91
  keepAlive?: boolean;
92
- timeout?: number;
93
92
  }
94
93
 
95
94
  export interface SecureConfig<T = string, U = T> {
@@ -114,6 +113,7 @@ export interface AuthValue {
114
113
 
115
114
  export type HttpRequestClient = ClientRequest | ClientHttp2Stream;
116
115
  export type HttpOutgoingHeaders = ObjectMap<OutgoingHttpHeaders>;
116
+ export type HttpAgentOptions = Pick<AgentOptions, "timeout" | "maxSockets" | "maxTotalSockets" | "keepAliveMsecs" | "maxFreeSockets" | "proxyEnv">;
117
117
  export type HttpProtocolVersion = 1 | 2 | 3;
118
118
  export type InternetProtocolVersion = 0 | 4 | 6;
119
- export type LookupCallback = (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family?: number) => void;
119
+ export type LookupCallback = (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family?: number) => void;
package/lib/index.d.ts CHANGED
@@ -680,7 +680,7 @@ declare namespace functions {
680
680
  getThreadCount(username: string, iv?: BinaryLike): ThreadCountStat;
681
681
  getThreadCount(username?: string | boolean, iv?: BinaryLike): number;
682
682
  getLogDelayed(): FormatMessageArgs[];
683
- getPermissionFromSettings(): IPermission;
683
+ getPermissionFromSettings(freeze?: boolean): IPermission;
684
684
  readonly prototype: IHost;
685
685
  new(config?: HostInitConfig): IHost;
686
686
  }
package/lib/request.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { EncodingAction } from './squared';
2
2
 
3
3
  import type { IRequest } from './index';
4
4
  import type { BinaryAction } from './asset';
5
- import type { HeadersAction, HttpProtocolVersion, HttpRequestClient, InternetProtocolVersion } from './http';
5
+ import type { HeadersAction, HttpAgentOptions, HttpProtocolVersion, HttpRequestClient, InternetProtocolVersion } from './http';
6
6
  import type { IncludeAction } from './module';
7
7
  import type { ErrorCode } from './node';
8
8
  import type { HttpHostSettings, RequestModule } from './settings';
@@ -12,7 +12,9 @@ import type { Readable, Writable } from 'node:stream';
12
12
 
13
13
  interface KeepAliveAction {
14
14
  keepAlive?: boolean;
15
+ /** @deprecated */
15
16
  agentTimeout?: number;
17
+ agentOptions?: HttpAgentOptions;
16
18
  }
17
19
 
18
20
  interface SilentAction {
package/lib/settings.d.ts CHANGED
@@ -11,6 +11,7 @@ import type { ExecAction, IncludeAction } from './module';
11
11
  import type { SpawnOptions } from 'node:child_process';
12
12
  import type { BinaryLike, CipherGCMTypes } from 'node:crypto';
13
13
  import type { LookupAddress } from 'node:dns';
14
+ import type { AgentOptions } from 'node:http';
14
15
  import type { BrotliOptions, ZlibOptions } from 'node:zlib';
15
16
  // @ts-ignore
16
17
  import type { BackgroundColor as IBackgroundColor } from 'chalk';
@@ -314,7 +315,9 @@ export interface RequestModule<T = RequestSettings> extends HandlerSettings<T>,
314
315
  read_timeout?: number | string;
315
316
  agent?: {
316
317
  keep_alive?: boolean;
318
+ keep_alive_interval?: number | string;
317
319
  timeout?: number | string;
320
+ proxy_env?: AgentOptions["proxyEnv"];
318
321
  };
319
322
  disk?: HttpDiskSettings;
320
323
  buffer?: HttpMemorySettings;
@@ -335,6 +338,7 @@ export interface HttpProxySettings extends AuthValue, IncludeAction {
335
338
  port?: number | string;
336
339
  origin?: string;
337
340
  keep_alive?: boolean;
341
+ keep_alive_interval?: number | string;
338
342
  }
339
343
 
340
344
  export interface HttpHostSettings {
@@ -360,6 +364,7 @@ export interface WatchSettings<T = WatchUserSettings> extends ClientSettings<Obj
360
364
  export interface CompressModule<U = CompressSettings> extends HandlerSettings<U> {
361
365
  gzip?: ZlibOptions;
362
366
  brotli?: BrotliOptions;
367
+ /** @deprecated */
363
368
  zopfli?: ZopfliOptions;
364
369
  }
365
370
 
@@ -369,6 +374,7 @@ export interface CompressSettings extends PlainObject {
369
374
  cache_expires?: number | string;
370
375
  gzip_level?: number | string;
371
376
  brotli_quality?: number | string;
377
+ /** @deprecated */
372
378
  zopfli_iterations?: number | string;
373
379
  chunk_size?: number | string;
374
380
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.13.4",
3
+ "version": "0.13.5",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",