@e-mc/types 0.9.14 → 0.9.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/README.md +3 -3
- package/constant.d.ts +1 -1
- package/index.js +3 -0
- package/lib/image.d.ts +43 -43
- package/lib/task.d.ts +9 -9
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.9.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.9.16/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { LogArguments } from "./lib/logger";
|
|
@@ -194,8 +194,8 @@ const IMPORT_MAP: Record<string, string | undefined>;
|
|
|
194
194
|
|
|
195
195
|
## References
|
|
196
196
|
|
|
197
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
198
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
197
|
+
- https://www.unpkg.com/@e-mc/types@0.9.16/lib/logger.d.ts
|
|
198
|
+
- https://www.unpkg.com/@e-mc/types@0.9.16/lib/module.d.ts
|
|
199
199
|
|
|
200
200
|
* https://nodejs.org/api/perf_hooks.html
|
|
201
201
|
* https://www.npmjs.com/package/@types/bytes
|
package/constant.d.ts
CHANGED
package/index.js
CHANGED
package/lib/image.d.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import type { MimeTypeAction } from './squared';
|
|
2
|
-
|
|
3
|
-
import type { BroadcastValue, LogTime } from './logger';
|
|
4
|
-
import type { ImageModule } from './settings';
|
|
5
|
-
|
|
6
|
-
export interface CommandData {
|
|
7
|
-
resize?: ResizeData;
|
|
8
|
-
crop?: CropData;
|
|
9
|
-
rotate?: RotateData;
|
|
10
|
-
quality?: QualityData;
|
|
11
|
-
method?: MethodData;
|
|
12
|
-
opacity?: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface RotateData {
|
|
16
|
-
values: number[];
|
|
17
|
-
color: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface ResizeData extends Dimension {
|
|
21
|
-
mode: string;
|
|
22
|
-
color: number;
|
|
23
|
-
align: Undef<string>[];
|
|
24
|
-
algorithm?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface CropData extends Point, Dimension {}
|
|
28
|
-
|
|
29
|
-
export interface QualityData {
|
|
30
|
-
value: number;
|
|
31
|
-
nearLossless: number;
|
|
32
|
-
method: number;
|
|
33
|
-
preset?: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface TransformOptions extends MimeTypeAction {
|
|
37
|
-
tempFile?: boolean;
|
|
38
|
-
startTime?: LogTime;
|
|
39
|
-
module?: ImageModule;
|
|
40
|
-
broadcastId?: BroadcastValue;
|
|
41
|
-
cache?: boolean;
|
|
42
|
-
}
|
|
43
|
-
|
|
1
|
+
import type { MimeTypeAction } from './squared';
|
|
2
|
+
|
|
3
|
+
import type { BroadcastValue, LogTime } from './logger';
|
|
4
|
+
import type { ImageModule } from './settings';
|
|
5
|
+
|
|
6
|
+
export interface CommandData {
|
|
7
|
+
resize?: ResizeData;
|
|
8
|
+
crop?: CropData;
|
|
9
|
+
rotate?: RotateData;
|
|
10
|
+
quality?: QualityData;
|
|
11
|
+
method?: MethodData;
|
|
12
|
+
opacity?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface RotateData {
|
|
16
|
+
values: number[];
|
|
17
|
+
color: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ResizeData extends Dimension {
|
|
21
|
+
mode: string;
|
|
22
|
+
color: number;
|
|
23
|
+
align: Undef<string>[];
|
|
24
|
+
algorithm?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface CropData extends Point, Dimension {}
|
|
28
|
+
|
|
29
|
+
export interface QualityData {
|
|
30
|
+
value: number;
|
|
31
|
+
nearLossless: number;
|
|
32
|
+
method: number;
|
|
33
|
+
preset?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface TransformOptions extends MimeTypeAction {
|
|
37
|
+
tempFile?: boolean;
|
|
38
|
+
startTime?: LogTime;
|
|
39
|
+
module?: ImageModule;
|
|
40
|
+
broadcastId?: BroadcastValue;
|
|
41
|
+
cache?: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
44
|
export type MethodData = [string, unknown[]?][];
|
package/lib/task.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export interface Command<T = unknown> extends PlainObject {
|
|
2
|
-
task: string;
|
|
3
|
-
origDir: string;
|
|
4
|
-
data: T;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface SpawnResult {
|
|
8
|
-
added?: string[];
|
|
9
|
-
deleted?: string[];
|
|
1
|
+
export interface Command<T = unknown> extends PlainObject {
|
|
2
|
+
task: string;
|
|
3
|
+
origDir: string;
|
|
4
|
+
data: T;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface SpawnResult {
|
|
8
|
+
added?: string[];
|
|
9
|
+
deleted?: string[];
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/types",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.16",
|
|
4
4
|
"description": "Type definitions for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"license": "BSD-3-Clause",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"bytes": "^3.1.2"
|
|
23
|
+
"bytes": "^3.1.2",
|
|
24
|
+
"chalk": "4.1.2"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"typescript": "5.4.5"
|