@e-mc/types 0.7.14 → 0.7.16
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/constant.d.ts +2 -1
- package/index.d.ts +1 -1
- package/lib/http.d.ts +5 -0
- package/lib/index.d.ts +2 -2
- package/lib/object.d.ts +29 -29
- package/lib/settings.d.ts +5 -1
- package/package.json +1 -1
package/constant.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const enum INTERNAL {
|
|
2
|
-
VERSION = '0.7.
|
|
2
|
+
VERSION = '0.7.15',
|
|
3
3
|
TEMP_DIR = 'tmp',
|
|
4
4
|
CJS = '__cjs__'
|
|
5
5
|
}
|
|
@@ -242,6 +242,7 @@ 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",
|
|
245
246
|
TEMP_DIR = "temp.dir",
|
|
246
247
|
TEMP_WRITE = "temp.write",
|
|
247
248
|
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<
|
|
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/index.d.ts
CHANGED
|
@@ -684,8 +684,8 @@ declare namespace functions {
|
|
|
684
684
|
formatMessage(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions): void;
|
|
685
685
|
writeFail(value: LogValue, message?: unknown, options?: LogFailOptions | LogType): void;
|
|
686
686
|
enabled(key: string, username?: string): boolean;
|
|
687
|
-
parseFunction<U = unknown>(value: unknown, options?: ParseFunctionOptions): Null<FunctionType<Promise<U> | U>>;
|
|
688
|
-
parseFunction<U = unknown>(value: unknown, absolute: boolean, sync?: boolean): Null<FunctionType<Promise<U> | U>>;
|
|
687
|
+
parseFunction<U = unknown, V = unknown>(value: unknown, options?: ParseFunctionOptions): Null<FunctionType<Promise<U> | U, V>>;
|
|
688
|
+
parseFunction<U = unknown, V = unknown>(value: unknown, absolute: boolean, sync?: boolean): Null<FunctionType<Promise<U> | U, V>>;
|
|
689
689
|
asString(value: unknown, cacheKey?: boolean | "throws"): string;
|
|
690
690
|
asHash(data: BinaryLike, options: AsHashOptions): string;
|
|
691
691
|
asHash(data: BinaryLike, algorithm?: unknown, digest?: unknown): string;
|
package/lib/object.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
interface Point {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface Dimension {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface KeyValue<T, U> {
|
|
12
|
-
key: T;
|
|
13
|
-
value: U;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface ErrorCode extends Error {
|
|
17
|
-
code?: unknown;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface AuthValue {
|
|
21
|
-
username?: string;
|
|
22
|
-
password?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface MinMax<T = number> {
|
|
26
|
-
min?: T;
|
|
27
|
-
max?: T;
|
|
28
|
-
}
|
|
29
|
-
|
|
1
|
+
interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
interface Dimension {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface KeyValue<T, U> {
|
|
12
|
+
key: T;
|
|
13
|
+
value: U;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ErrorCode extends Error {
|
|
17
|
+
code?: unknown;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface AuthValue {
|
|
21
|
+
username?: string;
|
|
22
|
+
password?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface MinMax<T = number> {
|
|
26
|
+
min?: T;
|
|
27
|
+
max?: T;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
30
|
type HighResolutionTime = TupleOf<number>;
|
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 = NodeSettings> extends HandlerSettings<T> {
|
|
37
37
|
process?: {
|
|
38
38
|
cpu_usage?: boolean;
|
|
39
39
|
memory_usage?: boolean;
|
|
@@ -46,6 +46,10 @@ export interface NodeModule<T = PlainObject> extends HandlerSettings<T> {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
export interface NodeSettings extends PlainObject {
|
|
50
|
+
package_manager?: "npm" | "yarn" | "pnpm";
|
|
51
|
+
}
|
|
52
|
+
|
|
49
53
|
export interface ProcessModule<T = PlainObject> extends HandlerSettings<T> {
|
|
50
54
|
env?: ProcessEnvConfig;
|
|
51
55
|
thread?: {
|