@yudzxml/baileys 7.3.5 → 7.3.6

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.
@@ -13,7 +13,8 @@ const {
13
13
  randomBytes,
14
14
  createHmac,
15
15
  createCipheriv,
16
- createDecipheriv
16
+ createDecipheriv,
17
+ randomUUID
17
18
  } = require("crypto")
18
19
  const {
19
20
  promises,
@@ -448,7 +449,9 @@ async function convertToOpusBuffer(buffer, logger) {
448
449
 
449
450
 
450
451
  async function convertToMp4Buffer(buffer, logger) {
451
- const tmp = join(__dirname, '../src', `${Date.now()}.tmp`)
452
+ const tmpDir = join(__dirname, '../tmp')
453
+ await promises.mkdir(tmpDir, { recursive: true })
454
+ const tmp = join(tmpDir, `${Date.now()}-${randomUUID()}.tmp`)
452
455
  const out = `${tmp}.mp4`
453
456
  const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path
454
457
  const { spawn } = require('child_process')
@@ -621,6 +624,7 @@ const encryptedStream = async (
621
624
  opusConverted = true;
622
625
  logger?.debug('converted audio to Opus');
623
626
  } catch (error) {
627
+ logger?.error(error)
624
628
  logger?.error('failed to convert audio to Opus, fallback to original');
625
629
  finalStream = toReadable(originalBuffer);
626
630
  }
@@ -633,6 +637,7 @@ const encryptedStream = async (
633
637
  originalBuffer = mp4Buffer;
634
638
  logger?.debug('converted video to mp4');
635
639
  } catch (error) {
640
+ logger?.error(error)
636
641
  logger?.error('failed to convert video to mp4, fallback to original');
637
642
  finalStream = toReadable(originalBuffer);
638
643
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yudzxml/baileys",
3
- "version": "7.3.5",
3
+ "version": "7.3.6",
4
4
  "description": "WhatsApp API Modification By Yudzxml",
5
5
  "keywords": [
6
6
  "whatsapp",
@@ -12,28 +12,22 @@
12
12
  "automation",
13
13
  "multi-device"
14
14
  ],
15
-
16
15
  "homepage": "https://github.com/Yudzxml/Baileys",
17
-
18
16
  "bugs": {
19
- "url": "https://github.com/Yudzxml/Baileys/issues"
17
+ "url": "https://github.com/Yudzxml/Baileys/issues"
20
18
  },
21
-
22
19
  "repository": {
23
20
  "type": "git",
24
21
  "url": "https://github.com/Yudzxml/Baileys.git"
25
22
  },
26
-
27
23
  "license": "MIT",
28
24
  "author": "Yudzxml",
29
-
30
25
  "main": "lib/index.js",
31
26
  "files": [
32
27
  "lib/*",
33
28
  "WAProto/*",
34
29
  "engine-requirements.js"
35
30
  ],
36
-
37
31
  "scripts": {
38
32
  "changelog:last": "conventional-changelog -p angular -r 2",
39
33
  "changelog:preview": "conventional-changelog -p angular -u",
@@ -44,7 +38,6 @@
44
38
  "release": "release-it",
45
39
  "test": "jest"
46
40
  },
47
-
48
41
  "dependencies": {
49
42
  "@hapi/boom": "^9.1.3",
50
43
  "@adiwajshing/keyed-db": "^0.2.4",
@@ -64,7 +57,6 @@
64
57
  "qrcode-terminal": "^0.12.0",
65
58
  "ws": "^8.13.0"
66
59
  },
67
-
68
60
  "devDependencies": {
69
61
  "@types/jest": "^29.5.14",
70
62
  "@types/node": "^16.0.0",
@@ -84,24 +76,19 @@
84
76
  "typedoc-plugin-markdown": "4.4.2",
85
77
  "typescript": "^5.8.2"
86
78
  },
87
-
88
79
  "peerDependencies": {
89
- "jimp": "^0.22.12",
80
+ "jimp": "^0.22.12",
90
81
  "sharp": "*"
91
82
  },
92
-
93
83
  "peerDependenciesMeta": {
94
84
  "jimp": {
95
85
  "optional": true
96
86
  }
97
87
  },
98
-
99
88
  "packageManager": "yarn@1.22.19",
100
-
101
89
  "engines": {
102
90
  "node": ">=20.0.0"
103
91
  },
104
-
105
92
  "directories": {
106
93
  "lib": "lib"
107
94
  }