@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 CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- - https://www.unpkg.com/@e-mc/types@0.8.18/index.d.ts
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.18/lib/logger.d.ts
190
- - https://www.unpkg.com/@e-mc/types@0.8.18/lib/module.d.ts
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.18',
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<T = unknown, U = FunctionType<Promise<T> | T>>(value: unknown, sync?: boolean): Null<U>;
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
@@ -74,6 +74,11 @@ export const enum HTTP_STATUS {
74
74
  INVALID_SSL_CERTIFICATE = 526
75
75
  }
76
76
 
77
+ export interface AuthValue {
78
+ username?: string;
79
+ password?: string;
80
+ }
81
+
77
82
  export const enum QUERY_RESULT {
78
83
  FAIL,
79
84
  OK,
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 = PlainObject> extends HandlerSettings<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?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.8.18",
3
+ "version": "0.8.20",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",