@builderbot/provider-baileys 1.3.10 → 1.3.12-alpha.1
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/bailey.d.ts +0 -1
- package/dist/bailey.d.ts.map +1 -1
- package/dist/index.cjs +41 -19
- package/dist/index.mjs +41 -19
- package/package.json +5 -5
package/dist/bailey.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type { PathOrFileDescriptor } from 'fs';
|
|
|
4
4
|
import NodeCache from 'node-cache';
|
|
5
5
|
import type polka from 'polka';
|
|
6
6
|
import type { IStickerOptions } from 'wa-sticker-formatter';
|
|
7
|
-
|
|
8
7
|
import { BaileysEventMap, WAMessage, WASocket, proto } from './baileyWrapper';
|
|
9
8
|
import type { BaileyGlobalVendorArgs } from './type';
|
|
10
9
|
declare class BaileysProvider extends ProviderClass<WASocket> {
|
package/dist/bailey.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bailey.d.ts","sourceRoot":"","sources":["../src/bailey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAGjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAI9C,OAAO,SAAS,MAAM,YAAY,CAAA;AAIlC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAG3D,OAAO,EAGH,eAAe,EACf,SAAS,EACT,QAAQ,EASR,KAAK,EAKR,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAA;AAGpD,cAAM,eAAgB,SAAQ,aAAa,CAAC,QAAQ,CAAC;IAC1C,gBAAgB,EAAE,sBAAsB,C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,GAAG,EAAE,WAAW,GAAG,EAAE,WAAU,GAAU;;OAa3F;IAED;;;;;;;OAOG;IAEH,WAAW,GACP,WAAW,GAAG,EACd,eAAe;QAAE,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,GAAG,CAAA;KAAE,EAClE,aAAa,MAAM,EACnB,SAAS,MAAM,EACf,WAAU,GAAU;;OAyBvB;IAED;;;;OAIG;IACH,kBAAkB,GAAU,WAAW,GAAG,EAAE,YAAY,GAAG,mBAE1D;IAED;;;;;;OAMG;IAEH,WAAW,GACP,WAAW,GAAG,EACd,KAAK,MAAM,GAAG,MAAM,EACpB,gBAAgB,OAAO,CAAC,eAAe,CAAC,EACxC,WAAU,GAAU,mBAWvB;IAED,OAAO,CAAC,WAAW,CAYlB;IAED,OAAO,CAAC,gBAAgB,CAAmE;IAE3F;;;;;OAKG;IACH,QAAQ,GAAU,KAAK,OAAO,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,UAAU;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAG,OAAO,CAAC,MAAM,CAAC,CAUnG;IAED,OAAO,CAAC,eAAe;YAmBT,gBAAgB;CA+BjC;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1417,12 +1417,41 @@ var stat$a = {
|
|
|
1417
1417
|
areIdentical: areIdentical$5
|
|
1418
1418
|
};
|
|
1419
1419
|
|
|
1420
|
+
// https://github.com/jprichardson/node-fs-extra/issues/1056
|
|
1421
|
+
// Performing parallel operations on each item of an async iterator is
|
|
1422
|
+
// surprisingly hard; you need to have handlers in place to avoid getting an
|
|
1423
|
+
// UnhandledPromiseRejectionWarning.
|
|
1424
|
+
// NOTE: This function does not presently handle return values, only errors
|
|
1425
|
+
async function asyncIteratorConcurrentProcess$1 (iterator, fn) {
|
|
1426
|
+
const promises = [];
|
|
1427
|
+
for await (const item of iterator) {
|
|
1428
|
+
promises.push(
|
|
1429
|
+
fn(item).then(
|
|
1430
|
+
() => null,
|
|
1431
|
+
(err) => err ?? new Error('unknown error')
|
|
1432
|
+
)
|
|
1433
|
+
);
|
|
1434
|
+
}
|
|
1435
|
+
await Promise.all(
|
|
1436
|
+
promises.map((promise) =>
|
|
1437
|
+
promise.then((possibleErr) => {
|
|
1438
|
+
if (possibleErr !== null) throw possibleErr
|
|
1439
|
+
})
|
|
1440
|
+
)
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
var async = {
|
|
1445
|
+
asyncIteratorConcurrentProcess: asyncIteratorConcurrentProcess$1
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1420
1448
|
const fs$x = fs$D;
|
|
1421
1449
|
const path$n = require$$1$1;
|
|
1422
1450
|
const { mkdirs: mkdirs$4 } = mkdirs$5;
|
|
1423
1451
|
const { pathExists: pathExists$c } = pathExists_1$1;
|
|
1424
1452
|
const { utimesMillis: utimesMillis$2 } = utimes$1;
|
|
1425
1453
|
const stat$9 = stat$a;
|
|
1454
|
+
const { asyncIteratorConcurrentProcess } = async;
|
|
1426
1455
|
|
|
1427
1456
|
async function copy$5 (src, dest, opts = {}) {
|
|
1428
1457
|
if (typeof opts === 'function') {
|
|
@@ -1530,28 +1559,20 @@ async function onDir$3 (srcStat, destStat, src, dest, opts) {
|
|
|
1530
1559
|
await fs$x.mkdir(dest);
|
|
1531
1560
|
}
|
|
1532
1561
|
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
// loop through the files in the current directory to copy everything
|
|
1536
|
-
for await (const item of await fs$x.opendir(src)) {
|
|
1562
|
+
// iterate through the files in the current directory to copy everything
|
|
1563
|
+
await asyncIteratorConcurrentProcess(await fs$x.opendir(src), async (item) => {
|
|
1537
1564
|
const srcItem = path$n.join(src, item.name);
|
|
1538
1565
|
const destItem = path$n.join(dest, item.name);
|
|
1539
1566
|
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
}
|
|
1550
|
-
})
|
|
1551
|
-
);
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
await Promise.all(promises);
|
|
1567
|
+
const include = await runFilter(srcItem, destItem, opts);
|
|
1568
|
+
// only copy the item if it matches the filter function
|
|
1569
|
+
if (include) {
|
|
1570
|
+
const { destStat } = await stat$9.checkPaths(srcItem, destItem, 'copy', opts);
|
|
1571
|
+
// If the item is a copyable file, `getStatsAndPerformCopy` will copy it
|
|
1572
|
+
// If the item is a directory, `getStatsAndPerformCopy` will call `onDir` recursively
|
|
1573
|
+
await getStatsAndPerformCopy(destStat, srcItem, destItem, opts);
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1555
1576
|
|
|
1556
1577
|
if (!destStat) {
|
|
1557
1578
|
await fs$x.chmod(dest, srcStat.mode);
|
|
@@ -31116,6 +31137,7 @@ class BaileysProvider extends bot.ProviderClass {
|
|
|
31116
31137
|
`You must scan the QR Code`,
|
|
31117
31138
|
`Remember that the QR code updates every minute`,
|
|
31118
31139
|
`Need help: https://link.codigoencasa.com/DISCORD`,
|
|
31140
|
+
`Official documentation: https://www.builderbot.app`,
|
|
31119
31141
|
],
|
|
31120
31142
|
payload: { qr },
|
|
31121
31143
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1415,12 +1415,41 @@ var stat$a = {
|
|
|
1415
1415
|
areIdentical: areIdentical$5
|
|
1416
1416
|
};
|
|
1417
1417
|
|
|
1418
|
+
// https://github.com/jprichardson/node-fs-extra/issues/1056
|
|
1419
|
+
// Performing parallel operations on each item of an async iterator is
|
|
1420
|
+
// surprisingly hard; you need to have handlers in place to avoid getting an
|
|
1421
|
+
// UnhandledPromiseRejectionWarning.
|
|
1422
|
+
// NOTE: This function does not presently handle return values, only errors
|
|
1423
|
+
async function asyncIteratorConcurrentProcess$1 (iterator, fn) {
|
|
1424
|
+
const promises = [];
|
|
1425
|
+
for await (const item of iterator) {
|
|
1426
|
+
promises.push(
|
|
1427
|
+
fn(item).then(
|
|
1428
|
+
() => null,
|
|
1429
|
+
(err) => err ?? new Error('unknown error')
|
|
1430
|
+
)
|
|
1431
|
+
);
|
|
1432
|
+
}
|
|
1433
|
+
await Promise.all(
|
|
1434
|
+
promises.map((promise) =>
|
|
1435
|
+
promise.then((possibleErr) => {
|
|
1436
|
+
if (possibleErr !== null) throw possibleErr
|
|
1437
|
+
})
|
|
1438
|
+
)
|
|
1439
|
+
);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
var async = {
|
|
1443
|
+
asyncIteratorConcurrentProcess: asyncIteratorConcurrentProcess$1
|
|
1444
|
+
};
|
|
1445
|
+
|
|
1418
1446
|
const fs$x = fs$D;
|
|
1419
1447
|
const path$n = require$$1$1;
|
|
1420
1448
|
const { mkdirs: mkdirs$4 } = mkdirs$5;
|
|
1421
1449
|
const { pathExists: pathExists$c } = pathExists_1$1;
|
|
1422
1450
|
const { utimesMillis: utimesMillis$2 } = utimes$1;
|
|
1423
1451
|
const stat$9 = stat$a;
|
|
1452
|
+
const { asyncIteratorConcurrentProcess } = async;
|
|
1424
1453
|
|
|
1425
1454
|
async function copy$5 (src, dest, opts = {}) {
|
|
1426
1455
|
if (typeof opts === 'function') {
|
|
@@ -1528,28 +1557,20 @@ async function onDir$3 (srcStat, destStat, src, dest, opts) {
|
|
|
1528
1557
|
await fs$x.mkdir(dest);
|
|
1529
1558
|
}
|
|
1530
1559
|
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
// loop through the files in the current directory to copy everything
|
|
1534
|
-
for await (const item of await fs$x.opendir(src)) {
|
|
1560
|
+
// iterate through the files in the current directory to copy everything
|
|
1561
|
+
await asyncIteratorConcurrentProcess(await fs$x.opendir(src), async (item) => {
|
|
1535
1562
|
const srcItem = path$n.join(src, item.name);
|
|
1536
1563
|
const destItem = path$n.join(dest, item.name);
|
|
1537
1564
|
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
}
|
|
1548
|
-
})
|
|
1549
|
-
);
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
await Promise.all(promises);
|
|
1565
|
+
const include = await runFilter(srcItem, destItem, opts);
|
|
1566
|
+
// only copy the item if it matches the filter function
|
|
1567
|
+
if (include) {
|
|
1568
|
+
const { destStat } = await stat$9.checkPaths(srcItem, destItem, 'copy', opts);
|
|
1569
|
+
// If the item is a copyable file, `getStatsAndPerformCopy` will copy it
|
|
1570
|
+
// If the item is a directory, `getStatsAndPerformCopy` will call `onDir` recursively
|
|
1571
|
+
await getStatsAndPerformCopy(destStat, srcItem, destItem, opts);
|
|
1572
|
+
}
|
|
1573
|
+
});
|
|
1553
1574
|
|
|
1554
1575
|
if (!destStat) {
|
|
1555
1576
|
await fs$x.chmod(dest, srcStat.mode);
|
|
@@ -31114,6 +31135,7 @@ class BaileysProvider extends ProviderClass {
|
|
|
31114
31135
|
`You must scan the QR Code`,
|
|
31115
31136
|
`Remember that the QR code updates every minute`,
|
|
31116
31137
|
`Need help: https://link.codigoencasa.com/DISCORD`,
|
|
31138
|
+
`Official documentation: https://www.builderbot.app`,
|
|
31117
31139
|
],
|
|
31118
31140
|
payload: { qr },
|
|
31119
31141
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builderbot/provider-baileys",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.12-alpha.1",
|
|
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>",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/codigoencasa/bot-whatsapp#readme",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@builderbot/bot": "1.3.
|
|
41
|
+
"@builderbot/bot": "1.3.12-alpha.1",
|
|
42
42
|
"@hapi/boom": "^10.0.1",
|
|
43
43
|
"@jest/globals": "^29.7.0",
|
|
44
44
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"rimraf": "^5.0.5",
|
|
61
61
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
62
62
|
"sinon": "^17.0.1",
|
|
63
|
-
"ts-jest": "^29.
|
|
63
|
+
"ts-jest": "^29.4.5",
|
|
64
64
|
"ts-node": "^10.9.2",
|
|
65
65
|
"wa-sticker-formatter": "^4.4.4",
|
|
66
66
|
"wtfnode": "^0.9.2"
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"baileys": "7.0.0-rc.9",
|
|
73
73
|
"cheerio": "^1.1.2",
|
|
74
74
|
"fluent-ffmpeg": "^2.1.2",
|
|
75
|
-
"fs-extra": "^11.2
|
|
75
|
+
"fs-extra": "^11.3.2",
|
|
76
76
|
"jimp": "^1.6.0",
|
|
77
77
|
"node-cache": "^5.1.2",
|
|
78
78
|
"sharp": "0.33.3"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "4266223735c881752e034275f97a42a8699a5df0"
|
|
81
81
|
}
|