@frogbotai/piece-image-helper 0.27.0 → 0.29.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/dist/actions/compress.d.ts +15 -31
- package/dist/actions/compress.d.ts.map +1 -1
- package/dist/actions/compress.js +3 -2
- package/dist/actions/compress.js.map +1 -1
- package/dist/actions/convertFormat.d.ts +20 -38
- package/dist/actions/convertFormat.d.ts.map +1 -1
- package/dist/actions/convertFormat.js +3 -2
- package/dist/actions/convertFormat.js.map +1 -1
- package/dist/actions/crop.d.ts +15 -30
- package/dist/actions/crop.d.ts.map +1 -1
- package/dist/actions/crop.js +3 -2
- package/dist/actions/crop.js.map +1 -1
- package/dist/actions/getMetadata.d.ts +9 -17
- package/dist/actions/getMetadata.d.ts.map +1 -1
- package/dist/actions/getMetadata.js +3 -2
- package/dist/actions/getMetadata.js.map +1 -1
- package/dist/actions/imageToBase64.d.ts +3 -14
- package/dist/actions/imageToBase64.d.ts.map +1 -1
- package/dist/actions/imageToBase64.js +3 -2
- package/dist/actions/imageToBase64.js.map +1 -1
- package/dist/actions/resize.d.ts +15 -29
- package/dist/actions/resize.d.ts.map +1 -1
- package/dist/actions/resize.js +3 -2
- package/dist/actions/resize.js.map +1 -1
- package/dist/actions/rotate.d.ts +15 -27
- package/dist/actions/rotate.d.ts.map +1 -1
- package/dist/actions/rotate.js +3 -2
- package/dist/actions/rotate.js.map +1 -1
- package/dist/define.d.ts +6 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +3 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +114 -186
- package/dist/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const compress: import("frogbot").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
image: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
5
4
|
quality: z.ZodUnion<readonly [z.ZodLiteral<90>, z.ZodLiteral<60>]>;
|
|
6
5
|
format: z.ZodEnum<{
|
|
@@ -8,34 +7,19 @@ declare const inputSchema: z.ZodObject<{
|
|
|
8
7
|
png: "png";
|
|
9
8
|
}>;
|
|
10
9
|
resultFileName: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, z.core.$strip
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
output: z.ZodObject<{
|
|
26
|
-
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
27
|
-
name: z.ZodString;
|
|
28
|
-
mimeType: z.ZodString;
|
|
29
|
-
size: z.ZodNumber;
|
|
30
|
-
url: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
run({ input, req }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<{
|
|
33
|
-
id: string | number;
|
|
34
|
-
name: string;
|
|
35
|
-
mimeType: string;
|
|
36
|
-
size: number;
|
|
37
|
-
url: string | undefined;
|
|
38
|
-
}>;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
mimeType: z.ZodString;
|
|
14
|
+
size: z.ZodNumber;
|
|
15
|
+
url: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>, Record<string, never>, undefined, {
|
|
17
|
+
id: string | number;
|
|
18
|
+
name: string;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
size: number;
|
|
21
|
+
url?: string | undefined;
|
|
22
|
+
}> & {
|
|
23
|
+
slug: "compress";
|
|
39
24
|
};
|
|
40
|
-
export {};
|
|
41
25
|
//# sourceMappingURL=compress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compress.d.ts","sourceRoot":"","sources":["../../src/actions/compress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compress.d.ts","sourceRoot":"","sources":["../../src/actions/compress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;CAsBnB,CAAC"}
|
package/dist/actions/compress.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Jimp from 'jimp';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import { defineAction } from '../define.js';
|
|
3
4
|
import { imageFile, loadImage, savedImage, saveImage } from '../files.js';
|
|
4
5
|
const inputSchema = z.object({
|
|
5
6
|
image: imageFile.meta({ label: 'Image' }),
|
|
@@ -7,7 +8,7 @@ const inputSchema = z.object({
|
|
|
7
8
|
format: z.enum(['jpg', 'png']),
|
|
8
9
|
resultFileName: z.string().min(1).optional(),
|
|
9
10
|
});
|
|
10
|
-
export const compress = {
|
|
11
|
+
export const compress = defineAction({
|
|
11
12
|
slug: 'compress',
|
|
12
13
|
label: 'Compress image',
|
|
13
14
|
description: 'Compress an image with the selected quality.',
|
|
@@ -26,5 +27,5 @@ export const compress = {
|
|
|
26
27
|
mimeType,
|
|
27
28
|
});
|
|
28
29
|
},
|
|
29
|
-
};
|
|
30
|
+
});
|
|
30
31
|
//# sourceMappingURL=compress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compress.js","sourceRoot":"","sources":["../../src/actions/compress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compress.js","sourceRoot":"","sources":["../../src/actions/compress.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAA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MAAM,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAElD,OAAO,SAAS,CAAC;YACf,GAAG;YACH,IAAI;YACJ,IAAI,EAAE,GAAG,KAAK,CAAC,cAAc,IAAI,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE;YAC1D,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const convertFormat: import("frogbot").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
image: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
5
4
|
outputFormat: z.ZodEnum<{
|
|
6
5
|
JPEG: "JPEG";
|
|
@@ -10,42 +9,25 @@ declare const inputSchema: z.ZodObject<{
|
|
|
10
9
|
AVIF: "AVIF";
|
|
11
10
|
}>;
|
|
12
11
|
resultFileName: z.ZodOptional<z.ZodString>;
|
|
13
|
-
}, z.core.$strip
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
outputFormat: z.ZodEnum<{
|
|
21
|
-
JPEG: "JPEG";
|
|
22
|
-
PNG: "PNG";
|
|
23
|
-
TIFF: "TIFF";
|
|
24
|
-
BMP: "BMP";
|
|
25
|
-
AVIF: "AVIF";
|
|
26
|
-
}>;
|
|
27
|
-
resultFileName: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
file: z.ZodObject<{
|
|
14
|
+
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
mimeType: z.ZodString;
|
|
17
|
+
size: z.ZodNumber;
|
|
18
|
+
url: z.ZodOptional<z.ZodString>;
|
|
28
19
|
}, z.core.$strip>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
id: string | number;
|
|
42
|
-
name: string;
|
|
43
|
-
mimeType: string;
|
|
44
|
-
size: number;
|
|
45
|
-
url: string | undefined;
|
|
46
|
-
};
|
|
47
|
-
sourceMimeType: string;
|
|
48
|
-
}>;
|
|
20
|
+
sourceMimeType: z.ZodString;
|
|
21
|
+
}, z.core.$strip>, Record<string, never>, undefined, {
|
|
22
|
+
file: {
|
|
23
|
+
id: string | number;
|
|
24
|
+
name: string;
|
|
25
|
+
mimeType: string;
|
|
26
|
+
size: number;
|
|
27
|
+
url?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
sourceMimeType: string;
|
|
30
|
+
}> & {
|
|
31
|
+
slug: "convertFormat";
|
|
49
32
|
};
|
|
50
|
-
export {};
|
|
51
33
|
//# sourceMappingURL=convertFormat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertFormat.d.ts","sourceRoot":"","sources":["../../src/actions/convertFormat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convertFormat.d.ts","sourceRoot":"","sources":["../../src/actions/convertFormat.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCxB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import convertHeic from 'heic-convert';
|
|
|
2
2
|
import Jimp from 'jimp';
|
|
3
3
|
import sharp from 'sharp';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
+
import { defineAction } from '../define.js';
|
|
5
6
|
import { imageFile, loadImage, savedImage, saveImage } from '../files.js';
|
|
6
7
|
const inputSchema = z.object({
|
|
7
8
|
image: imageFile.meta({ label: 'Image' }),
|
|
@@ -18,7 +19,7 @@ const formats = {
|
|
|
18
19
|
TIFF: { extension: 'tiff', mimeType: Jimp.MIME_TIFF },
|
|
19
20
|
BMP: { extension: 'bmp', mimeType: Jimp.MIME_BMP },
|
|
20
21
|
};
|
|
21
|
-
export const convertFormat = {
|
|
22
|
+
export const convertFormat = defineAction({
|
|
22
23
|
slug: 'convertFormat',
|
|
23
24
|
label: 'Convert image format',
|
|
24
25
|
description: 'Convert an image to JPEG, PNG, TIFF, BMP, or AVIF.',
|
|
@@ -52,5 +53,5 @@ export const convertFormat = {
|
|
|
52
53
|
});
|
|
53
54
|
return { file, sourceMimeType: source.mimeType };
|
|
54
55
|
},
|
|
55
|
-
};
|
|
56
|
+
});
|
|
56
57
|
//# sourceMappingURL=convertFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertFormat.js","sourceRoot":"","sources":["../../src/actions/convertFormat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convertFormat.js","sourceRoot":"","sources":["../../src/actions/convertFormat.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACzC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC5D,cAAc,EAAE,CAAC,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AY,CAAC;QACjB,IAAI,SAAiB,CAAC;QACtB,IAAI,QAAgB,CAAC;QAErB,IAAI,KAAK,CAAC,YAAY,KAAK,MAAM,EAAE,CAAC;YAClC,IAAI,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;YACjD,SAAS,GAAG,MAAM,CAAC;YACnB,QAAQ,GAAG,YAAY,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YAC3C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAE1C,IAAI,GAAG,MAAM,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACnD,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;YAC7B,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC7B,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC;YAC3B,GAAG;YACH,IAAI;YACJ,IAAI,EAAE,GAAG,KAAK,CAAC,cAAc,IAAI,OAAO,IAAI,SAAS,EAAE;YACvD,QAAQ;SACT,CAAC,CAAC;QAEH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;IACnD,CAAC;CACF,CAAC,CAAC"}
|
package/dist/actions/crop.d.ts
CHANGED
|
@@ -1,39 +1,24 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const crop: import("frogbot").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
image: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
5
4
|
left: z.ZodNumber;
|
|
6
5
|
top: z.ZodNumber;
|
|
7
6
|
width: z.ZodNumber;
|
|
8
7
|
height: z.ZodNumber;
|
|
9
8
|
resultFileName: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, z.core.$strip
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
25
|
-
name: z.ZodString;
|
|
26
|
-
mimeType: z.ZodString;
|
|
27
|
-
size: z.ZodNumber;
|
|
28
|
-
url: z.ZodOptional<z.ZodString>;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
run({ input, req }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<{
|
|
31
|
-
id: string | number;
|
|
32
|
-
name: string;
|
|
33
|
-
mimeType: string;
|
|
34
|
-
size: number;
|
|
35
|
-
url: string | undefined;
|
|
36
|
-
}>;
|
|
9
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
+
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
mimeType: z.ZodString;
|
|
13
|
+
size: z.ZodNumber;
|
|
14
|
+
url: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>, Record<string, never>, undefined, {
|
|
16
|
+
id: string | number;
|
|
17
|
+
name: string;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
size: number;
|
|
20
|
+
url?: string | undefined;
|
|
21
|
+
}> & {
|
|
22
|
+
slug: "crop";
|
|
37
23
|
};
|
|
38
|
-
export {};
|
|
39
24
|
//# sourceMappingURL=crop.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crop.d.ts","sourceRoot":"","sources":["../../src/actions/crop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crop.d.ts","sourceRoot":"","sources":["../../src/actions/crop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;CAqBf,CAAC"}
|
package/dist/actions/crop.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Jimp from 'jimp';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import { defineAction } from '../define.js';
|
|
3
4
|
import { imageFile, loadImage, savedImage, saveImage } from '../files.js';
|
|
4
5
|
const inputSchema = z.object({
|
|
5
6
|
image: imageFile.meta({ label: 'Image' }),
|
|
@@ -9,7 +10,7 @@ const inputSchema = z.object({
|
|
|
9
10
|
height: z.number().int().positive(),
|
|
10
11
|
resultFileName: z.string().min(1).optional(),
|
|
11
12
|
});
|
|
12
|
-
export const crop = {
|
|
13
|
+
export const crop = defineAction({
|
|
13
14
|
slug: 'crop',
|
|
14
15
|
label: 'Crop image',
|
|
15
16
|
description: 'Crop a rectangular region from an image.',
|
|
@@ -27,5 +28,5 @@ export const crop = {
|
|
|
27
28
|
mimeType: image.getMIME(),
|
|
28
29
|
});
|
|
29
30
|
},
|
|
30
|
-
};
|
|
31
|
+
});
|
|
31
32
|
//# sourceMappingURL=crop.js.map
|
package/dist/actions/crop.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crop.js","sourceRoot":"","sources":["../../src/actions/crop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crop.js","sourceRoot":"","sources":["../../src/actions/crop.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IA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AI,KAAK,CAAC,YAAY,EAAE,EAAE;YAClE,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE;SAC1B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import ExifReader from 'exifreader';
|
|
2
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
3
1
|
import { z } from 'zod';
|
|
4
|
-
declare const
|
|
2
|
+
export declare const getMetadata: import("frogbot").PieceActionDefinition<z.ZodObject<{
|
|
5
3
|
image: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
6
|
-
}, z.core.$strip
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
output: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
15
|
-
value: z.ZodUnknown;
|
|
16
|
-
description: z.ZodOptional<z.ZodString>;
|
|
17
|
-
}, z.core.$strip>>;
|
|
18
|
-
run({ input, req }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<ExifReader.Tags>;
|
|
4
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5
|
+
value: z.ZodUnknown;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>>, Record<string, never>, undefined, Record<string, {
|
|
8
|
+
value: unknown;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
}>> & {
|
|
11
|
+
slug: "getMetadata";
|
|
19
12
|
};
|
|
20
|
-
export {};
|
|
21
13
|
//# sourceMappingURL=getMetadata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMetadata.d.ts","sourceRoot":"","sources":["../../src/actions/getMetadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getMetadata.d.ts","sourceRoot":"","sources":["../../src/actions/getMetadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,WAAW;;;;;;;;;;CAiBtB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import ExifReader from 'exifreader';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import { defineAction } from '../define.js';
|
|
3
4
|
import { imageFile, loadImage } from '../files.js';
|
|
4
5
|
const inputSchema = z.object({ image: imageFile.meta({ label: 'Image' }) });
|
|
5
|
-
export const getMetadata = {
|
|
6
|
+
export const getMetadata = defineAction({
|
|
6
7
|
slug: 'getMetadata',
|
|
7
8
|
label: 'Get image metadata',
|
|
8
9
|
description: 'Read metadata embedded in an image.',
|
|
@@ -15,5 +16,5 @@ export const getMetadata = {
|
|
|
15
16
|
const image = await loadImage(req, input.image);
|
|
16
17
|
return ExifReader.load(image.data);
|
|
17
18
|
},
|
|
18
|
-
};
|
|
19
|
+
});
|
|
19
20
|
//# sourceMappingURL=getMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMetadata.js","sourceRoot":"","sources":["../../src/actions/getMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"getMetadata.js","sourceRoot":"","sources":["../../src/actions/getMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;IACtC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,qCAAqC;IAClD,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,CACd,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;QAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC,CACH;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;QACtB,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAEhD,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const imageToBase64: import("frogbot").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
image: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
5
4
|
mimeType: z.ZodOptional<z.ZodString>;
|
|
6
|
-
}, z.core.$strip
|
|
7
|
-
|
|
8
|
-
slug: string;
|
|
9
|
-
label: string;
|
|
10
|
-
description: string;
|
|
11
|
-
input: z.ZodObject<{
|
|
12
|
-
image: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
13
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
output: z.ZodString;
|
|
16
|
-
run({ input, req }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<string>;
|
|
5
|
+
}, z.core.$strip>, z.ZodString, Record<string, never>, undefined, string> & {
|
|
6
|
+
slug: "imageToBase64";
|
|
17
7
|
};
|
|
18
|
-
export {};
|
|
19
8
|
//# sourceMappingURL=imageToBase64.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageToBase64.d.ts","sourceRoot":"","sources":["../../src/actions/imageToBase64.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"imageToBase64.d.ts","sourceRoot":"","sources":["../../src/actions/imageToBase64.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,aAAa;;;;;CAWxB,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { defineAction } from '../define.js';
|
|
2
3
|
import { imageFile, loadImage } from '../files.js';
|
|
3
4
|
const inputSchema = z.object({
|
|
4
5
|
image: imageFile.meta({ label: 'Image' }),
|
|
5
6
|
mimeType: z.string().min(1).optional().meta({ label: 'Override MIME type' }),
|
|
6
7
|
});
|
|
7
|
-
export const imageToBase64 = {
|
|
8
|
+
export const imageToBase64 = defineAction({
|
|
8
9
|
slug: 'imageToBase64',
|
|
9
10
|
label: 'Convert image to Base64',
|
|
10
11
|
description: 'Convert an image to a Base64 data URL.',
|
|
@@ -14,5 +15,5 @@ export const imageToBase64 = {
|
|
|
14
15
|
const image = await loadImage(req, input.image);
|
|
15
16
|
return `data:${input.mimeType ?? image.mimeType};base64,${image.data.toString('base64')}`;
|
|
16
17
|
},
|
|
17
|
-
};
|
|
18
|
+
});
|
|
18
19
|
//# sourceMappingURL=imageToBase64.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageToBase64.js","sourceRoot":"","sources":["../../src/actions/imageToBase64.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"imageToBase64.js","sourceRoot":"","sources":["../../src/actions/imageToBase64.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;CAC7E,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;IACxC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,wCAAwC;IACrD,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,2CAA2C,CAAC;IACrE,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;QACtB,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAEhD,OAAO,QAAQ,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,WAAW,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC5F,CAAC;CACF,CAAC,CAAC"}
|
package/dist/actions/resize.d.ts
CHANGED
|
@@ -1,37 +1,23 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const resize: import("frogbot").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
image: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
5
4
|
width: z.ZodNumber;
|
|
6
5
|
height: z.ZodNumber;
|
|
7
6
|
maintainAspectRatio: z.ZodDefault<z.ZodBoolean>;
|
|
8
7
|
resultFileName: z.ZodOptional<z.ZodString>;
|
|
9
|
-
}, z.core.$strip
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
name: z.ZodString;
|
|
24
|
-
mimeType: z.ZodString;
|
|
25
|
-
size: z.ZodNumber;
|
|
26
|
-
url: z.ZodOptional<z.ZodString>;
|
|
27
|
-
}, z.core.$strip>;
|
|
28
|
-
run({ input, req }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<{
|
|
29
|
-
id: string | number;
|
|
30
|
-
name: string;
|
|
31
|
-
mimeType: string;
|
|
32
|
-
size: number;
|
|
33
|
-
url: string | undefined;
|
|
34
|
-
}>;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
mimeType: z.ZodString;
|
|
12
|
+
size: z.ZodNumber;
|
|
13
|
+
url: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>, Record<string, never>, undefined, {
|
|
15
|
+
id: string | number;
|
|
16
|
+
name: string;
|
|
17
|
+
mimeType: string;
|
|
18
|
+
size: number;
|
|
19
|
+
url?: string | undefined;
|
|
20
|
+
}> & {
|
|
21
|
+
slug: "resize";
|
|
35
22
|
};
|
|
36
|
-
export {};
|
|
37
23
|
//# sourceMappingURL=resize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../src/actions/resize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../src/actions/resize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;CAqBjB,CAAC"}
|
package/dist/actions/resize.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Jimp from 'jimp';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import { defineAction } from '../define.js';
|
|
3
4
|
import { imageFile, loadImage, savedImage, saveImage } from '../files.js';
|
|
4
5
|
const inputSchema = z.object({
|
|
5
6
|
image: imageFile.meta({ label: 'Image' }),
|
|
@@ -8,7 +9,7 @@ const inputSchema = z.object({
|
|
|
8
9
|
maintainAspectRatio: z.boolean().default(false),
|
|
9
10
|
resultFileName: z.string().min(1).optional(),
|
|
10
11
|
});
|
|
11
|
-
export const resize = {
|
|
12
|
+
export const resize = defineAction({
|
|
12
13
|
slug: 'resize',
|
|
13
14
|
label: 'Resize image',
|
|
14
15
|
description: 'Resize an image to the requested dimensions.',
|
|
@@ -26,5 +27,5 @@ export const resize = {
|
|
|
26
27
|
mimeType: image.getMIME(),
|
|
27
28
|
});
|
|
28
29
|
},
|
|
29
|
-
};
|
|
30
|
+
});
|
|
30
31
|
//# sourceMappingURL=resize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize.js","sourceRoot":"","sources":["../../src/actions/resize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resize.js","sourceRoot":"","sources":["../../src/actions/resize.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAA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O,EAAE;SAC1B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
package/dist/actions/rotate.d.ts
CHANGED
|
@@ -1,33 +1,21 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const rotate: import("frogbot").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
image: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
5
4
|
degrees: z.ZodUnion<readonly [z.ZodLiteral<90>, z.ZodLiteral<180>, z.ZodLiteral<270>]>;
|
|
6
5
|
resultFileName: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, z.core.$strip
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
size: z.ZodNumber;
|
|
22
|
-
url: z.ZodOptional<z.ZodString>;
|
|
23
|
-
}, z.core.$strip>;
|
|
24
|
-
run({ input, req }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<{
|
|
25
|
-
id: string | number;
|
|
26
|
-
name: string;
|
|
27
|
-
mimeType: string;
|
|
28
|
-
size: number;
|
|
29
|
-
url: string | undefined;
|
|
30
|
-
}>;
|
|
6
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7
|
+
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
mimeType: z.ZodString;
|
|
10
|
+
size: z.ZodNumber;
|
|
11
|
+
url: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>, Record<string, never>, undefined, {
|
|
13
|
+
id: string | number;
|
|
14
|
+
name: string;
|
|
15
|
+
mimeType: string;
|
|
16
|
+
size: number;
|
|
17
|
+
url?: string | undefined;
|
|
18
|
+
}> & {
|
|
19
|
+
slug: "rotate";
|
|
31
20
|
};
|
|
32
|
-
export {};
|
|
33
21
|
//# sourceMappingURL=rotate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../src/actions/rotate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../src/actions/rotate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAqBjB,CAAC"}
|
package/dist/actions/rotate.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import Jimp from 'jimp';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import { defineAction } from '../define.js';
|
|
3
4
|
import { imageFile, loadImage, savedImage, saveImage } from '../files.js';
|
|
4
5
|
const inputSchema = z.object({
|
|
5
6
|
image: imageFile.meta({ label: 'Image' }),
|
|
6
7
|
degrees: z.union([z.literal(90), z.literal(180), z.literal(270)]),
|
|
7
8
|
resultFileName: z.string().min(1).optional(),
|
|
8
9
|
});
|
|
9
|
-
export const rotate = {
|
|
10
|
+
export const rotate = defineAction({
|
|
10
11
|
slug: 'rotate',
|
|
11
12
|
label: 'Rotate image',
|
|
12
13
|
description: 'Rotate an image clockwise.',
|
|
@@ -24,5 +25,5 @@ export const rotate = {
|
|
|
24
25
|
mimeType: image.getMIME(),
|
|
25
26
|
});
|
|
26
27
|
},
|
|
27
|
-
};
|
|
28
|
+
});
|
|
28
29
|
//# sourceMappingURL=rotate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rotate.js","sourceRoot":"","sources":["../../src/actions/rotate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rotate.js","sourceRoot":"","sources":["../../src/actions/rotate.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI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IAAI,EAAE,GAAG,KAAK,CAAC,cAAc,IAAI,OAAO,IAAI,KAAK,CAAC,YAAY,EAAE,EAAE;YAClE,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE;SAC1B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const defineAction: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined, TResult = unknown>(action: TOutput extends unknown ? import("frogbot").PieceActionDefinition<TInput, TOutput, Record<string, never>, undefined, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
2
|
+
slug: TSlug;
|
|
3
|
+
} : never) => import("frogbot").PieceActionDefinition<TInput, TOutput, Record<string, never>, undefined, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
4
|
+
slug: TSlug;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,YAAY;;;;CAAyB,CAAC"}
|
package/dist/define.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,kBAAkB,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,204 +5,132 @@ export declare const createImageHelper: import("frogbot").PieceFactory<{
|
|
|
5
5
|
readonly description: "Inspect, transform, and convert images";
|
|
6
6
|
readonly group: "Core";
|
|
7
7
|
};
|
|
8
|
-
readonly actions: readonly [{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
slug:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
8
|
+
readonly actions: readonly [import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
9
|
+
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
10
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodString, Record<string, never>, undefined, string> & {
|
|
12
|
+
slug: "imageToBase64";
|
|
13
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
14
|
+
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
15
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
|
16
|
+
value: import("zod").ZodUnknown;
|
|
17
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
+
}, import("zod/v4/core").$strip>>, Record<string, never>, undefined, Record<string, {
|
|
19
|
+
value: unknown;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
}>> & {
|
|
22
|
+
slug: "getMetadata";
|
|
23
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
24
|
+
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
25
|
+
left: import("zod").ZodNumber;
|
|
26
|
+
top: import("zod").ZodNumber;
|
|
27
|
+
width: import("zod").ZodNumber;
|
|
28
|
+
height: import("zod").ZodNumber;
|
|
29
|
+
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
31
|
+
id: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
32
|
+
name: import("zod").ZodString;
|
|
33
|
+
mimeType: import("zod").ZodString;
|
|
34
|
+
size: import("zod").ZodNumber;
|
|
35
|
+
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
}, import("zod/v4/core").$strip>, Record<string, never>, undefined, {
|
|
37
|
+
id: string | number;
|
|
38
|
+
name: string;
|
|
39
|
+
mimeType: string;
|
|
40
|
+
size: number;
|
|
41
|
+
url?: string | undefined;
|
|
42
|
+
}> & {
|
|
43
|
+
slug: "crop";
|
|
44
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
45
|
+
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
46
|
+
degrees: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<90>, import("zod").ZodLiteral<180>, import("zod").ZodLiteral<270>]>;
|
|
47
|
+
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
49
|
+
id: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
50
|
+
name: import("zod").ZodString;
|
|
51
|
+
mimeType: import("zod").ZodString;
|
|
52
|
+
size: import("zod").ZodNumber;
|
|
53
|
+
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
54
|
+
}, import("zod/v4/core").$strip>, Record<string, never>, undefined, {
|
|
55
|
+
id: string | number;
|
|
56
|
+
name: string;
|
|
57
|
+
mimeType: string;
|
|
58
|
+
size: number;
|
|
59
|
+
url?: string | undefined;
|
|
60
|
+
}> & {
|
|
61
|
+
slug: "rotate";
|
|
62
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
63
|
+
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
64
|
+
width: import("zod").ZodNumber;
|
|
65
|
+
height: import("zod").ZodNumber;
|
|
66
|
+
maintainAspectRatio: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
67
|
+
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
68
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
69
|
+
id: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
70
|
+
name: import("zod").ZodString;
|
|
71
|
+
mimeType: import("zod").ZodString;
|
|
72
|
+
size: import("zod").ZodNumber;
|
|
73
|
+
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
+
}, import("zod/v4/core").$strip>, Record<string, never>, undefined, {
|
|
75
|
+
id: string | number;
|
|
76
|
+
name: string;
|
|
77
|
+
mimeType: string;
|
|
78
|
+
size: number;
|
|
79
|
+
url?: string | undefined;
|
|
80
|
+
}> & {
|
|
81
|
+
slug: "resize";
|
|
82
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
83
|
+
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
84
|
+
quality: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<90>, import("zod").ZodLiteral<60>]>;
|
|
85
|
+
format: import("zod").ZodEnum<{
|
|
86
|
+
jpg: "jpg";
|
|
87
|
+
png: "png";
|
|
67
88
|
}>;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
mimeType: string;
|
|
92
|
-
size: number;
|
|
93
|
-
url: string | undefined;
|
|
94
|
-
}>;
|
|
95
|
-
}, {
|
|
96
|
-
slug: string;
|
|
97
|
-
label: string;
|
|
98
|
-
description: string;
|
|
99
|
-
input: import("zod").ZodObject<{
|
|
100
|
-
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
101
|
-
width: import("zod").ZodNumber;
|
|
102
|
-
height: import("zod").ZodNumber;
|
|
103
|
-
maintainAspectRatio: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
104
|
-
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
105
|
-
}, import("zod/v4/core").$strip>;
|
|
106
|
-
output: import("zod").ZodObject<{
|
|
107
|
-
id: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
108
|
-
name: import("zod").ZodString;
|
|
109
|
-
mimeType: import("zod").ZodString;
|
|
110
|
-
size: import("zod").ZodNumber;
|
|
111
|
-
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
112
|
-
}, import("zod/v4/core").$strip>;
|
|
113
|
-
run({ input, req }: import("frogbot").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
114
|
-
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
115
|
-
width: import("zod").ZodNumber;
|
|
116
|
-
height: import("zod").ZodNumber;
|
|
117
|
-
maintainAspectRatio: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
118
|
-
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
119
|
-
}, import("zod/v4/core").$strip>>, object, undefined>): Promise<{
|
|
120
|
-
id: string | number;
|
|
121
|
-
name: string;
|
|
122
|
-
mimeType: string;
|
|
123
|
-
size: number;
|
|
124
|
-
url: string | undefined;
|
|
89
|
+
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
90
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
91
|
+
id: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
92
|
+
name: import("zod").ZodString;
|
|
93
|
+
mimeType: import("zod").ZodString;
|
|
94
|
+
size: import("zod").ZodNumber;
|
|
95
|
+
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
96
|
+
}, import("zod/v4/core").$strip>, Record<string, never>, undefined, {
|
|
97
|
+
id: string | number;
|
|
98
|
+
name: string;
|
|
99
|
+
mimeType: string;
|
|
100
|
+
size: number;
|
|
101
|
+
url?: string | undefined;
|
|
102
|
+
}> & {
|
|
103
|
+
slug: "compress";
|
|
104
|
+
}, import("frogbot").PieceActionDefinition<import("zod").ZodObject<{
|
|
105
|
+
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
106
|
+
outputFormat: import("zod").ZodEnum<{
|
|
107
|
+
JPEG: "JPEG";
|
|
108
|
+
PNG: "PNG";
|
|
109
|
+
TIFF: "TIFF";
|
|
110
|
+
BMP: "BMP";
|
|
111
|
+
AVIF: "AVIF";
|
|
125
112
|
}>;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
description: string;
|
|
130
|
-
input: import("zod").ZodObject<{
|
|
131
|
-
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
132
|
-
quality: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<90>, import("zod").ZodLiteral<60>]>;
|
|
133
|
-
format: import("zod").ZodEnum<{
|
|
134
|
-
jpg: "jpg";
|
|
135
|
-
png: "png";
|
|
136
|
-
}>;
|
|
137
|
-
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
138
|
-
}, import("zod/v4/core").$strip>;
|
|
139
|
-
output: import("zod").ZodObject<{
|
|
113
|
+
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
114
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
115
|
+
file: import("zod").ZodObject<{
|
|
140
116
|
id: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
141
117
|
name: import("zod").ZodString;
|
|
142
118
|
mimeType: import("zod").ZodString;
|
|
143
119
|
size: import("zod").ZodNumber;
|
|
144
120
|
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
145
121
|
}, import("zod/v4/core").$strip>;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
format: import("zod").ZodEnum<{
|
|
150
|
-
jpg: "jpg";
|
|
151
|
-
png: "png";
|
|
152
|
-
}>;
|
|
153
|
-
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
154
|
-
}, import("zod/v4/core").$strip>>, object, undefined>): Promise<{
|
|
122
|
+
sourceMimeType: import("zod").ZodString;
|
|
123
|
+
}, import("zod/v4/core").$strip>, Record<string, never>, undefined, {
|
|
124
|
+
file: {
|
|
155
125
|
id: string | number;
|
|
156
126
|
name: string;
|
|
157
127
|
mimeType: string;
|
|
158
128
|
size: number;
|
|
159
|
-
url
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
description: string;
|
|
165
|
-
input: import("zod").ZodObject<{
|
|
166
|
-
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
167
|
-
outputFormat: import("zod").ZodEnum<{
|
|
168
|
-
JPEG: "JPEG";
|
|
169
|
-
PNG: "PNG";
|
|
170
|
-
TIFF: "TIFF";
|
|
171
|
-
BMP: "BMP";
|
|
172
|
-
AVIF: "AVIF";
|
|
173
|
-
}>;
|
|
174
|
-
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
175
|
-
}, import("zod/v4/core").$strip>;
|
|
176
|
-
output: import("zod").ZodObject<{
|
|
177
|
-
file: import("zod").ZodObject<{
|
|
178
|
-
id: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
179
|
-
name: import("zod").ZodString;
|
|
180
|
-
mimeType: import("zod").ZodString;
|
|
181
|
-
size: import("zod").ZodNumber;
|
|
182
|
-
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
183
|
-
}, import("zod/v4/core").$strip>;
|
|
184
|
-
sourceMimeType: import("zod").ZodString;
|
|
185
|
-
}, import("zod/v4/core").$strip>;
|
|
186
|
-
run({ input, req }: import("frogbot").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
187
|
-
image: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
188
|
-
outputFormat: import("zod").ZodEnum<{
|
|
189
|
-
JPEG: "JPEG";
|
|
190
|
-
PNG: "PNG";
|
|
191
|
-
TIFF: "TIFF";
|
|
192
|
-
BMP: "BMP";
|
|
193
|
-
AVIF: "AVIF";
|
|
194
|
-
}>;
|
|
195
|
-
resultFileName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
196
|
-
}, import("zod/v4/core").$strip>>, object, undefined>): Promise<{
|
|
197
|
-
file: {
|
|
198
|
-
id: string | number;
|
|
199
|
-
name: string;
|
|
200
|
-
mimeType: string;
|
|
201
|
-
size: number;
|
|
202
|
-
url: string | undefined;
|
|
203
|
-
};
|
|
204
|
-
sourceMimeType: string;
|
|
205
|
-
}>;
|
|
129
|
+
url?: string | undefined;
|
|
130
|
+
};
|
|
131
|
+
sourceMimeType: string;
|
|
132
|
+
}> & {
|
|
133
|
+
slug: "convertFormat";
|
|
206
134
|
}];
|
|
207
135
|
}>;
|
|
208
136
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogbotai/piece-image-helper",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "image-helper tools for FrogBot.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colby Gilbert",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"zod": "^4.3.6"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"frogbot": "0.
|
|
30
|
+
"frogbot": "0.29.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/heic-convert": "2.1.1",
|
|
34
34
|
"@types/mime-types": "2.1.1",
|
|
35
35
|
"typescript": "5.6.2",
|
|
36
|
-
"frogbot": "0.
|
|
36
|
+
"frogbot": "0.29.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|