@e-mc/types 0.7.17 → 0.7.19

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.7.17',
2
+ VERSION = '0.7.19',
3
3
  TEMP_DIR = 'tmp',
4
4
  CJS = '__cjs__'
5
5
  }
package/index.js CHANGED
@@ -34,6 +34,9 @@ function fromObject(value, typedArray) {
34
34
  if (value instanceof RegExp) {
35
35
  return new RegExp(value);
36
36
  }
37
+ if (value instanceof URL) {
38
+ return new URL(value);
39
+ }
37
40
  if (typedArray) {
38
41
  if (value instanceof Buffer) {
39
42
  return Buffer.from(value);
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.7.17",
3
+ "version": "0.7.19",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",