@m4k/common 0.1.0 → 0.2.0

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/lib/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export type QueuePosition = {
7
7
  export type ProcessingError = {
8
8
  error: string;
9
9
  };
10
- export type ImageOptimizerOptions = {
10
+ export type ImageOptions = {
11
11
  /** The rotation of the image. If not provided, the image will be auto-rotated, according to the EXIF data. To disable auto-rotation, set to `0`. */
12
12
  rotate?: number;
13
13
  /** Resizing options. */
@@ -47,7 +47,7 @@ export type ImageOptimizerOptions = {
47
47
  /** The output path of the file. */
48
48
  output?: string;
49
49
  };
50
- export type VideoOptimizerOptions = {
50
+ export type VideoOptions = {
51
51
  /** The aspect ratio of the output file. */
52
52
  aspect?: number | string;
53
53
  /** The bitrate of the audio. */
@@ -83,7 +83,29 @@ export type VideoOptimizerOptions = {
83
83
  /** The output path of the file. */
84
84
  output?: string;
85
85
  };
86
- export declare class ConvertedFile {
86
+ export type AudioOptions = {
87
+ /** The bitrate of the audio. */
88
+ bitrate?: number | string;
89
+ /** The codec of the audio. */
90
+ codec?: string;
91
+ /** The complex filters to apply to the audio. */
92
+ complexFilters?: string;
93
+ /** The filters to apply to the audio. */
94
+ filters?: string;
95
+ /** The duration of the output file. */
96
+ duration?: number | string;
97
+ /** The format of the output file. */
98
+ format?: string;
99
+ /** The input format of the audio. */
100
+ inputFormat?: string;
101
+ /** The seek time of the audio. */
102
+ seek?: number | string;
103
+ /** The name of the output file. */
104
+ name?: string;
105
+ /** The output path of the file. */
106
+ output?: string;
107
+ };
108
+ export declare class ProcessedFile {
87
109
  readonly name: string;
88
110
  readonly type: string;
89
111
  readonly stream?: AsyncIterable<Uint8Array> | undefined;
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export class ConvertedFile {
1
+ export class ProcessedFile {
2
2
  name;
3
3
  type;
4
4
  stream;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4k/common",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",