@shibam/sticker-maker 1.2.0 → 1.2.2

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.
@@ -1,19 +1,9 @@
1
- import TextOnGif from 'text-on-gif';
1
+ // import TextOnGif from 'text-on-gif'
2
+ import fs from "fs/promises";
2
3
  const textOnGif = async (fileName, text) => {
3
4
  return new Promise(async (resolve, reject) => {
4
5
  try {
5
- const gif = new TextOnGif({
6
- file_path: fileName,
7
- font_size: '32px',
8
- font_color: 'white',
9
- font_family: 'Arial',
10
- stroke_color: 'black',
11
- stroke_width: 3
12
- });
13
- const buff = await gif.textOnGif({
14
- text,
15
- get_as_buffer: true
16
- });
6
+ let buff = await fs.readFile(fileName);
17
7
  resolve(buff);
18
8
  }
19
9
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shibam/sticker-maker",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "A package for creating stickers",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -32,15 +32,14 @@
32
32
  "typescript"
33
33
  ],
34
34
  "dependencies": {
35
- "@types/fluent-ffmpeg": "^2.1.24",
36
- "canvas": "^2.11.2",
37
- "file-type": "^19.4.0",
35
+ "canvas": "^3.0.1",
36
+ "file-type": "^20.0.0",
38
37
  "fluent-ffmpeg": "^2.1.3",
39
38
  "node-webpmux": "^3.2.0",
40
- "sharp": "^0.33.4",
41
- "text-on-gif": "^2.0.13"
39
+ "sharp": "^0.33.5"
42
40
  },
43
41
  "devDependencies": {
42
+ "@types/fluent-ffmpeg": "^2.1.24",
44
43
  "@types/node": "^20.17.14",
45
44
  "tsx": "^4.7.1",
46
45
  "typescript": "^5.4.5"