@e-mc/types 0.8.18 → 0.8.20
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 +3 -3
- 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/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
12
|
+
- https://www.unpkg.com/@e-mc/types@0.8.20/index.d.ts
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { LogArguments } from "./lib/logger";
|
|
@@ -186,8 +186,8 @@ const IMPORT_MAP: Record<string, string | undefined>;
|
|
|
186
186
|
|
|
187
187
|
## References
|
|
188
188
|
|
|
189
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
190
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
189
|
+
- https://www.unpkg.com/@e-mc/types@0.8.20/lib/logger.d.ts
|
|
190
|
+
- https://www.unpkg.com/@e-mc/types@0.8.20/lib/module.d.ts
|
|
191
191
|
|
|
192
192
|
* https://nodejs.org/api/perf_hooks.html
|
|
193
193
|
* 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.8.
|
|
2
|
+
VERSION = '0.8.20',
|
|
3
3
|
TEMP_DIR = 'tmp',
|
|
4
4
|
CJS = '__cjs__'
|
|
5
5
|
}
|
|
@@ -260,6 +260,7 @@ export const enum SETTINGS_KEY_NAME {
|
|
|
260
260
|
NODE_REQUIRE_EXT = "node.require.ext",
|
|
261
261
|
NODE_REQUIRE_NPM = "node.require.npm",
|
|
262
262
|
NODE_REQUIRE_INLINE = "node.require.inline",
|
|
263
|
+
NODE_PACKAGE_MANAGER = "node.settings.package_manager",
|
|
263
264
|
TEMP_DIR = "temp.dir",
|
|
264
265
|
TEMP_WRITE = "temp.write",
|
|
265
266
|
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
|
@@ -699,8 +699,8 @@ declare namespace functions {
|
|
|
699
699
|
formatMessage(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions): void;
|
|
700
700
|
writeFail(value: LogValue, message?: unknown, options?: LogFailOptions | LogType): void;
|
|
701
701
|
enabled(key: string, username?: string): boolean;
|
|
702
|
-
parseFunction<U = unknown>(value: unknown, options?: ParseFunctionOptions): Null<FunctionType<Promise<U> | U>>;
|
|
703
|
-
parseFunction<U = unknown>(value: unknown, absolute: boolean, sync?: boolean): Null<FunctionType<Promise<U> | U>>;
|
|
702
|
+
parseFunction<U = unknown, V = unknown>(value: unknown, options?: ParseFunctionOptions): Null<FunctionType<Promise<U> | U, V>>;
|
|
703
|
+
parseFunction<U = unknown, V = unknown>(value: unknown, absolute: boolean, sync?: boolean): Null<FunctionType<Promise<U> | U, V>>;
|
|
704
704
|
asString(value: unknown, cacheKey?: boolean | "throws"): string;
|
|
705
705
|
asHash(data: BinaryLike, options: AsHashOptions): string;
|
|
706
706
|
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
|
@@ -36,7 +36,7 @@ export interface ClientSettings<T = PlainObject> extends PlainObject {
|
|
|
36
36
|
cache_dir?: string;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export interface NodeModule<T =
|
|
39
|
+
export interface NodeModule<T = NodeSettings> extends HandlerSettings<T> {
|
|
40
40
|
process?: {
|
|
41
41
|
cpu_usage?: boolean;
|
|
42
42
|
memory_usage?: boolean;
|
|
@@ -49,6 +49,10 @@ export interface NodeModule<T = PlainObject> extends HandlerSettings<T> {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
export interface NodeSettings extends PlainObject {
|
|
53
|
+
package_manager?: "npm" | "yarn" | "pnpm";
|
|
54
|
+
}
|
|
55
|
+
|
|
52
56
|
export interface ProcessModule<T = PlainObject> extends HandlerSettings<T> {
|
|
53
57
|
env?: ProcessEnvConfig;
|
|
54
58
|
thread?: {
|