@e-mc/types 0.6.11 → 0.6.12

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  export const enum INTERNAL {
2
- VERSION = '0.6.11',
2
+ VERSION = '0.6.12',
3
3
  TEMP_DIR = 'tmp',
4
4
  CJS = '__cjs__'
5
5
  }
@@ -232,6 +232,7 @@ export const enum SETTINGS_KEY_NAME {
232
232
  NODE_REQUIRE_EXT = "node.require.ext",
233
233
  NODE_REQUIRE_NPM = "node.require.npm",
234
234
  NODE_REQUIRE_INLINE = "node.require.inline",
235
+ NODE_PACKAGE_MANAGER = "node.settings.package_manager",
235
236
  TEMP_DIR = "temp.dir",
236
237
  TEMP_WRITE = "temp.write",
237
238
  PROCESS_PASSWORD = "process.password",
package/index.d.ts CHANGED
@@ -251,7 +251,7 @@ declare namespace types {
251
251
  function isPlainObject<T = PlainObject>(value: unknown): value is T;
252
252
  function isString(value: unknown): value is string;
253
253
  function isEmpty(value: unknown): boolean;
254
- function asFunction<T = unknown, U = FunctionType<Promise<T> | T>>(value: unknown, sync?: boolean): Null<U>;
254
+ function asFunction<U = unknown, V = unknown>(value: unknown, sync?: boolean): Null<FunctionType<Promise<U> | U, V>>;
255
255
  function parseTime(value: NumString, start?: number): number;
256
256
  function parseExpires(value: NumString, start?: number): number;
257
257
  function formatTime(value: number, char: string): string;
package/lib/index.d.ts CHANGED
@@ -678,8 +678,8 @@ declare namespace functions {
678
678
  formatMessage(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions): void;
679
679
  writeFail(value: LogValue, message?: unknown, options?: LogFailOptions | LogType): void;
680
680
  enabled(key: string, username?: string): boolean;
681
- parseFunction<U = unknown>(value: unknown, options?: ParseFunctionOptions): Null<FunctionType<Promise<U> | U>>;
682
- parseFunction<U = unknown>(value: unknown, absolute: boolean, sync?: boolean): Null<FunctionType<Promise<U> | U>>;
681
+ parseFunction<U = unknown, V = unknown>(value: unknown, options?: ParseFunctionOptions): Null<FunctionType<Promise<U> | U, V>>;
682
+ parseFunction<U = unknown, V = unknown>(value: unknown, absolute: boolean, sync?: boolean): Null<FunctionType<Promise<U> | U, V>>;
683
683
  asString(value: unknown, cacheKey?: boolean | "throws"): string;
684
684
  asHash(data: BinaryLike, options: AsHashOptions): string;
685
685
  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 {
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 {
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?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",