@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 +1 -1
- package/constant.d.ts +1 -2
- package/index.d.ts +1 -1
- package/lib/http.d.ts +5 -0
- package/lib/request.d.ts +4 -2
- package/lib/settings.d.ts +1 -5
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright
|
|
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.
|
|
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<
|
|
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
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 =
|
|
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?: {
|