@e-mc/types 0.7.15 → 0.7.17

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,4 +1,4 @@
1
- Copyright 2024 An Pham
1
+ Copyright 2023 An Pham
2
2
 
3
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
 
package/constant.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export const enum INTERNAL {
2
- VERSION = '0.7.15',
2
+ VERSION = '0.7.17',
3
3
  TEMP_DIR = 'tmp',
4
4
  CJS = '__cjs__'
5
5
  }
@@ -242,7 +242,6 @@ export const enum SETTINGS_KEY_NAME {
242
242
  NODE_REQUIRE_EXT = "node.require.ext",
243
243
  NODE_REQUIRE_NPM = "node.require.npm",
244
244
  NODE_REQUIRE_INLINE = "node.require.inline",
245
- NODE_PACKAGE_MANAGER = "node.settings.package_manager",
246
245
  TEMP_DIR = "temp.dir",
247
246
  TEMP_WRITE = "temp.write",
248
247
  PROCESS_PASSWORD = "process.password",
package/index.d.ts CHANGED
@@ -263,7 +263,7 @@ declare namespace types {
263
263
  function isPlainObject<T = PlainObject>(value: unknown): value is T;
264
264
  function isString(value: unknown): value is string;
265
265
  function isEmpty(value: unknown): boolean;
266
- function asFunction<U = unknown, V = unknown>(value: unknown, sync?: boolean): Null<FunctionType<Promise<U> | U, V>>;
266
+ function asFunction<U = unknown, V = unknown>(value: unknown, sync?: boolean): Null<FunctionType<U, V>>;
267
267
  function parseTime(value: NumString, start?: number): number;
268
268
  function parseExpires(value: NumString, start?: number): number;
269
269
  function formatTime(value: number, char: string): string;
package/lib/http.d.ts CHANGED
@@ -78,6 +78,11 @@ export const enum QUERY_RESULT {
78
78
  TIMEOUT
79
79
  }
80
80
 
81
+ export interface AuthValue {
82
+ username?: string;
83
+ password?: string;
84
+ }
85
+
81
86
  export interface HttpAgentSettings {
82
87
  http?: HttpAgent;
83
88
  https?: HttpsAgent;
package/lib/request.d.ts CHANGED
@@ -59,7 +59,8 @@ export interface OpenOptions extends KeepAliveAction, SilentAction {
59
59
  method?: "GET" | "POST" | "HEAD";
60
60
  encoding?: BufferEncoding;
61
61
  format?: BufferFormat | { out?: BufferFormat; parser?: PlainObject };
62
- headers?: OutgoingHttpHeaders;
62
+ headers?: OutgoingHttpHeaders | Headers;
63
+ signal?: AbortSignal;
63
64
  timeout?: number;
64
65
  pipeTo?: string | Writable;
65
66
  postData?: unknown;
@@ -88,7 +89,8 @@ export interface FormDataPart {
88
89
 
89
90
  export interface Aria2Options extends BinaryAction, SilentAction {
90
91
  pathname?: string;
91
- headers?: OutgoingHttpHeaders;
92
+ headers?: OutgoingHttpHeaders | Headers;
93
+ signal?: AbortSignal;
92
94
  }
93
95
 
94
96
  export interface HostConfig extends OpenOptions {
package/lib/settings.d.ts CHANGED
@@ -33,7 +33,7 @@ export interface ClientSettings extends PlainObject {
33
33
  cache_dir?: string;
34
34
  }
35
35
 
36
- export interface NodeModule<T = NodeSettings> extends HandlerSettings<T> {
36
+ export interface NodeModule<T = PlainObject> extends HandlerSettings<T> {
37
37
  process?: {
38
38
  cpu_usage?: boolean;
39
39
  memory_usage?: boolean;
@@ -46,10 +46,6 @@ export interface NodeModule<T = NodeSettings> extends HandlerSettings<T> {
46
46
  };
47
47
  }
48
48
 
49
- export interface NodeSettings extends PlainObject {
50
- package_manager?: "npm" | "yarn" | "pnpm";
51
- }
52
-
53
49
  export interface ProcessModule<T = PlainObject> extends HandlerSettings<T> {
54
50
  env?: ProcessEnvConfig;
55
51
  thread?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.7.15",
3
+ "version": "0.7.17",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",