@builderbot/provider-venom 1.0.25-alpha.0 → 1.0.27-alpha.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/README.md +17 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +5 -4
- package/scripts/fix.js +42 -0
- package/dist/fix.d.ts +0 -2
- package/dist/fix.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://builderbot.vercel.app/">
|
|
3
|
+
<h2 align="center">@builderbot/provider-venom</h2>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
2
6
|
|
|
3
|
-
> TODO: description
|
|
4
7
|
|
|
5
|
-
##
|
|
8
|
+
## Documentation
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
const providerVenom = require('provider-venom');
|
|
10
|
+
Visit [builderbot](https://builderbot.vercel.app/) to view the full documentation.
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
## Official Course
|
|
14
|
+
|
|
15
|
+
If you want to discover all the functions and features offered by the library you can take the course.
|
|
16
|
+
[View Course](https://app.codigoencasa.com/courses/builderbot?refCode=LEIFER)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Contact Us
|
|
20
|
+
- [💻 Discord](https://link.codigoencasa.com/DISCORD)
|
|
21
|
+
- [👌 𝕏 (Twitter)](https://twitter.com/leifermendez)
|
package/dist/index.cjs
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO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,MAAM,mCAGhE;IAED;;;;;OAKG;IAEH,QAAQ,WAAkB,MAAM,YAAY,MAAM,QAAQ,MAAM,sBAG/D;IAED;;;;;;OAMG;IACH,SAAS,WAAkB,MAAM,YAAY,MAAM,QAAQ,MAAM,mBAEhE;IAED;;;;;;OAMG;IACH,SAAS,WAAkB,MAAM,YAAY,MAAM,QAAQ,MAAM,sBAWhE;IAED;;;;;;OAMG;IACH,WAAW,WAAkB,MAAM,WAAW,MAAM,YAAY,WAAW,KAAG,QAAQ,GAAG,CAAC,CAMzF;IAED;;;;;OAKG;IACH,QAAQ,QAAe,QAAQ,MAAM,OAAO,GAAG,UAAU,CAAC,YAAW,eAAe,KAAQ,QAAQ,MAAM,CAAC,CAa1G;CACJ;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builderbot/provider-venom",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27-alpha.0",
|
|
4
4
|
"description": "Now I’m the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin’ letters to relatives / Embellishin’ my elegance and eloquence / But the elephant is in the room / The truth is in ya face when ya hear the British cannons go / BOOM",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Leifer Mendez <leifer33@gmail.com>",
|
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"files": [
|
|
12
|
+
"./scripts/",
|
|
12
13
|
"./dist/"
|
|
13
14
|
],
|
|
14
15
|
"scripts": {
|
|
15
16
|
"build": "rimraf dist && rollup --config",
|
|
16
17
|
"test": "npx uvu -r tsm ./__tests__",
|
|
17
18
|
"test:coverage": "npx c8 npm run test",
|
|
18
|
-
"postinstall": ""
|
|
19
|
+
"postinstall": "node ./scripts/fix.js"
|
|
19
20
|
},
|
|
20
21
|
"directories": {
|
|
21
22
|
"lib": "dist",
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
},
|
|
31
32
|
"homepage": "https://github.com/codigoencasa/bot-whatsapp#readme",
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"@builderbot/bot": "^1.0.
|
|
34
|
+
"@builderbot/bot": "^1.0.27-alpha.0",
|
|
34
35
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
35
36
|
"@rollup/plugin-json": "^6.1.0",
|
|
36
37
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
@@ -58,5 +59,5 @@
|
|
|
58
59
|
"spinnies": "^0.5.1",
|
|
59
60
|
"venom-bot": "^5.0.21"
|
|
60
61
|
},
|
|
61
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "cbccaedf2373715cb59cf79b7cce71ba47db543a"
|
|
62
63
|
}
|
package/scripts/fix.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { readFileSync } from 'fs'
|
|
2
|
+
import { writeFile } from 'fs/promises'
|
|
3
|
+
|
|
4
|
+
// https://github.com/orkestral/venom/issues/2485
|
|
5
|
+
const fixSendFiles = async () => {
|
|
6
|
+
const path = './node_modules/venom-bot/dist/lib/wapi/wapi.js'
|
|
7
|
+
let toFix = readFileSync(path)
|
|
8
|
+
toFix = toFix
|
|
9
|
+
.toString()
|
|
10
|
+
.replace(
|
|
11
|
+
`return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,1),n}`,
|
|
12
|
+
`return await n.processAttachments("0.4.613"===Debug.VERSION?t:t.map((e=>({file:e}))),e,e),n}`
|
|
13
|
+
)
|
|
14
|
+
await writeFile(path, toFix)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const removeOverLogs = async () => {
|
|
18
|
+
const path = './node_modules/venom-bot/dist/utils/spinnies.js'
|
|
19
|
+
let toFix = readFileSync(path, 'utf8')
|
|
20
|
+
|
|
21
|
+
toFix = toFix
|
|
22
|
+
.replace(
|
|
23
|
+
/function\s+getSpinnies\(options\)\s*{[^}]+}/,
|
|
24
|
+
`function getSpinnies_(options) {
|
|
25
|
+
if (!spinnies) {
|
|
26
|
+
spinnies = new spinnies_1.default(options);
|
|
27
|
+
}
|
|
28
|
+
spinnies.fail = () => null;
|
|
29
|
+
spinnies.succeed = () => null;
|
|
30
|
+
spinnies.add = () => null;
|
|
31
|
+
`
|
|
32
|
+
)
|
|
33
|
+
.replace('exports.getSpinnies = getSpinnies;', `exports.getSpinnies = getSpinnies_;`)
|
|
34
|
+
await writeFile(path, toFix)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const mainFix = async () => {
|
|
38
|
+
await removeOverLogs()
|
|
39
|
+
await fixSendFiles()
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
mainFix()
|
package/dist/fix.d.ts
DELETED
package/dist/fix.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fix.d.ts","sourceRoot":"","sources":["../src/fix.ts"],"names":[],"mappings":""}
|