@builderbot/provider-wppconnect 1.3.12 → 1.3.14
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/index.cjs +62 -41
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -10742,7 +10742,7 @@ var mimeDb = require$$0;
|
|
|
10742
10742
|
* MIT Licensed
|
|
10743
10743
|
*/
|
|
10744
10744
|
|
|
10745
|
-
(function (exports) {
|
|
10745
|
+
(function (exports$1) {
|
|
10746
10746
|
|
|
10747
10747
|
/**
|
|
10748
10748
|
* Module dependencies.
|
|
@@ -10765,16 +10765,16 @@ var mimeDb = require$$0;
|
|
|
10765
10765
|
* @public
|
|
10766
10766
|
*/
|
|
10767
10767
|
|
|
10768
|
-
exports.charset = charset;
|
|
10769
|
-
exports.charsets = { lookup: charset };
|
|
10770
|
-
exports.contentType = contentType;
|
|
10771
|
-
exports.extension = extension;
|
|
10772
|
-
exports.extensions = Object.create(null);
|
|
10773
|
-
exports.lookup = lookup;
|
|
10774
|
-
exports.types = Object.create(null);
|
|
10768
|
+
exports$1.charset = charset;
|
|
10769
|
+
exports$1.charsets = { lookup: charset };
|
|
10770
|
+
exports$1.contentType = contentType;
|
|
10771
|
+
exports$1.extension = extension;
|
|
10772
|
+
exports$1.extensions = Object.create(null);
|
|
10773
|
+
exports$1.lookup = lookup;
|
|
10774
|
+
exports$1.types = Object.create(null);
|
|
10775
10775
|
|
|
10776
10776
|
// Populate the extensions/types maps
|
|
10777
|
-
populateMaps(exports.extensions, exports.types);
|
|
10777
|
+
populateMaps(exports$1.extensions, exports$1.types);
|
|
10778
10778
|
|
|
10779
10779
|
/**
|
|
10780
10780
|
* Get the default charset for a MIME type.
|
|
@@ -10818,7 +10818,7 @@ var mimeDb = require$$0;
|
|
|
10818
10818
|
}
|
|
10819
10819
|
|
|
10820
10820
|
var mime = str.indexOf('/') === -1
|
|
10821
|
-
? exports.lookup(str)
|
|
10821
|
+
? exports$1.lookup(str)
|
|
10822
10822
|
: str;
|
|
10823
10823
|
|
|
10824
10824
|
if (!mime) {
|
|
@@ -10827,7 +10827,7 @@ var mimeDb = require$$0;
|
|
|
10827
10827
|
|
|
10828
10828
|
// TODO: use content-type or other module
|
|
10829
10829
|
if (mime.indexOf('charset') === -1) {
|
|
10830
|
-
var charset = exports.charset(mime);
|
|
10830
|
+
var charset = exports$1.charset(mime);
|
|
10831
10831
|
if (charset) mime += '; charset=' + charset.toLowerCase();
|
|
10832
10832
|
}
|
|
10833
10833
|
|
|
@@ -10850,7 +10850,7 @@ var mimeDb = require$$0;
|
|
|
10850
10850
|
var match = EXTRACT_TYPE_REGEXP.exec(type);
|
|
10851
10851
|
|
|
10852
10852
|
// get extensions
|
|
10853
|
-
var exts = match && exports.extensions[match[1].toLowerCase()];
|
|
10853
|
+
var exts = match && exports$1.extensions[match[1].toLowerCase()];
|
|
10854
10854
|
|
|
10855
10855
|
if (!exts || !exts.length) {
|
|
10856
10856
|
return false
|
|
@@ -10880,7 +10880,7 @@ var mimeDb = require$$0;
|
|
|
10880
10880
|
return false
|
|
10881
10881
|
}
|
|
10882
10882
|
|
|
10883
|
-
return exports.types[extension] || false
|
|
10883
|
+
return exports$1.types[extension] || false
|
|
10884
10884
|
}
|
|
10885
10885
|
|
|
10886
10886
|
/**
|
|
@@ -11900,7 +11900,7 @@ function retry () {
|
|
|
11900
11900
|
}
|
|
11901
11901
|
}
|
|
11902
11902
|
|
|
11903
|
-
(function (exports) {
|
|
11903
|
+
(function (exports$1) {
|
|
11904
11904
|
// This is adapted from https://github.com/normalize/mz
|
|
11905
11905
|
// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
|
|
11906
11906
|
const u = universalify$1.fromCallback;
|
|
@@ -11955,16 +11955,16 @@ function retry () {
|
|
|
11955
11955
|
});
|
|
11956
11956
|
|
|
11957
11957
|
// Export cloned fs:
|
|
11958
|
-
Object.assign(exports, fs);
|
|
11958
|
+
Object.assign(exports$1, fs);
|
|
11959
11959
|
|
|
11960
11960
|
// Universalify async methods:
|
|
11961
11961
|
api.forEach(method => {
|
|
11962
|
-
exports[method] = u(fs[method]);
|
|
11962
|
+
exports$1[method] = u(fs[method]);
|
|
11963
11963
|
});
|
|
11964
11964
|
|
|
11965
11965
|
// We differ from mz/fs in that we still ship the old, broken, fs.exists()
|
|
11966
11966
|
// since we are a drop-in replacement for the native module
|
|
11967
|
-
exports.exists = function (filename, callback) {
|
|
11967
|
+
exports$1.exists = function (filename, callback) {
|
|
11968
11968
|
if (typeof callback === 'function') {
|
|
11969
11969
|
return fs.exists(filename, callback)
|
|
11970
11970
|
}
|
|
@@ -11975,7 +11975,7 @@ function retry () {
|
|
|
11975
11975
|
|
|
11976
11976
|
// fs.read(), fs.write(), fs.readv(), & fs.writev() need special treatment due to multiple callback args
|
|
11977
11977
|
|
|
11978
|
-
exports.read = function (fd, buffer, offset, length, position, callback) {
|
|
11978
|
+
exports$1.read = function (fd, buffer, offset, length, position, callback) {
|
|
11979
11979
|
if (typeof callback === 'function') {
|
|
11980
11980
|
return fs.read(fd, buffer, offset, length, position, callback)
|
|
11981
11981
|
}
|
|
@@ -11992,7 +11992,7 @@ function retry () {
|
|
|
11992
11992
|
// OR
|
|
11993
11993
|
// fs.write(fd, string[, position[, encoding]], callback)
|
|
11994
11994
|
// We need to handle both cases, so we use ...args
|
|
11995
|
-
exports.write = function (fd, buffer, ...args) {
|
|
11995
|
+
exports$1.write = function (fd, buffer, ...args) {
|
|
11996
11996
|
if (typeof args[args.length - 1] === 'function') {
|
|
11997
11997
|
return fs.write(fd, buffer, ...args)
|
|
11998
11998
|
}
|
|
@@ -12008,7 +12008,7 @@ function retry () {
|
|
|
12008
12008
|
// Function signature is
|
|
12009
12009
|
// s.readv(fd, buffers[, position], callback)
|
|
12010
12010
|
// We need to handle the optional arg, so we use ...args
|
|
12011
|
-
exports.readv = function (fd, buffers, ...args) {
|
|
12011
|
+
exports$1.readv = function (fd, buffers, ...args) {
|
|
12012
12012
|
if (typeof args[args.length - 1] === 'function') {
|
|
12013
12013
|
return fs.readv(fd, buffers, ...args)
|
|
12014
12014
|
}
|
|
@@ -12024,7 +12024,7 @@ function retry () {
|
|
|
12024
12024
|
// Function signature is
|
|
12025
12025
|
// s.writev(fd, buffers[, position], callback)
|
|
12026
12026
|
// We need to handle the optional arg, so we use ...args
|
|
12027
|
-
exports.writev = function (fd, buffers, ...args) {
|
|
12027
|
+
exports$1.writev = function (fd, buffers, ...args) {
|
|
12028
12028
|
if (typeof args[args.length - 1] === 'function') {
|
|
12029
12029
|
return fs.writev(fd, buffers, ...args)
|
|
12030
12030
|
}
|
|
@@ -12039,7 +12039,7 @@ function retry () {
|
|
|
12039
12039
|
|
|
12040
12040
|
// fs.realpath.native sometimes not available if fs is monkey-patched
|
|
12041
12041
|
if (typeof fs.realpath.native === 'function') {
|
|
12042
|
-
exports.realpath.native = u(fs.realpath.native);
|
|
12042
|
+
exports$1.realpath.native = u(fs.realpath.native);
|
|
12043
12043
|
} else {
|
|
12044
12044
|
process.emitWarning(
|
|
12045
12045
|
'fs.realpath.native is not a function. Is fs being monkey-patched?',
|
|
@@ -12314,12 +12314,41 @@ var stat$4 = {
|
|
|
12314
12314
|
areIdentical: areIdentical$2
|
|
12315
12315
|
};
|
|
12316
12316
|
|
|
12317
|
+
// https://github.com/jprichardson/node-fs-extra/issues/1056
|
|
12318
|
+
// Performing parallel operations on each item of an async iterator is
|
|
12319
|
+
// surprisingly hard; you need to have handlers in place to avoid getting an
|
|
12320
|
+
// UnhandledPromiseRejectionWarning.
|
|
12321
|
+
// NOTE: This function does not presently handle return values, only errors
|
|
12322
|
+
async function asyncIteratorConcurrentProcess$1 (iterator, fn) {
|
|
12323
|
+
const promises = [];
|
|
12324
|
+
for await (const item of iterator) {
|
|
12325
|
+
promises.push(
|
|
12326
|
+
fn(item).then(
|
|
12327
|
+
() => null,
|
|
12328
|
+
(err) => err ?? new Error('unknown error')
|
|
12329
|
+
)
|
|
12330
|
+
);
|
|
12331
|
+
}
|
|
12332
|
+
await Promise.all(
|
|
12333
|
+
promises.map((promise) =>
|
|
12334
|
+
promise.then((possibleErr) => {
|
|
12335
|
+
if (possibleErr !== null) throw possibleErr
|
|
12336
|
+
})
|
|
12337
|
+
)
|
|
12338
|
+
);
|
|
12339
|
+
}
|
|
12340
|
+
|
|
12341
|
+
var async = {
|
|
12342
|
+
asyncIteratorConcurrentProcess: asyncIteratorConcurrentProcess$1
|
|
12343
|
+
};
|
|
12344
|
+
|
|
12317
12345
|
const fs$b = fs$h;
|
|
12318
12346
|
const path$9 = require$$1;
|
|
12319
12347
|
const { mkdirs: mkdirs$1 } = mkdirs$2;
|
|
12320
12348
|
const { pathExists: pathExists$5 } = pathExists_1;
|
|
12321
12349
|
const { utimesMillis } = utimes;
|
|
12322
12350
|
const stat$3 = stat$4;
|
|
12351
|
+
const { asyncIteratorConcurrentProcess } = async;
|
|
12323
12352
|
|
|
12324
12353
|
async function copy$2 (src, dest, opts = {}) {
|
|
12325
12354
|
if (typeof opts === 'function') {
|
|
@@ -12427,28 +12456,20 @@ async function onDir$1 (srcStat, destStat, src, dest, opts) {
|
|
|
12427
12456
|
await fs$b.mkdir(dest);
|
|
12428
12457
|
}
|
|
12429
12458
|
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
// loop through the files in the current directory to copy everything
|
|
12433
|
-
for await (const item of await fs$b.opendir(src)) {
|
|
12459
|
+
// iterate through the files in the current directory to copy everything
|
|
12460
|
+
await asyncIteratorConcurrentProcess(await fs$b.opendir(src), async (item) => {
|
|
12434
12461
|
const srcItem = path$9.join(src, item.name);
|
|
12435
12462
|
const destItem = path$9.join(dest, item.name);
|
|
12436
12463
|
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
}
|
|
12447
|
-
})
|
|
12448
|
-
);
|
|
12449
|
-
}
|
|
12450
|
-
|
|
12451
|
-
await Promise.all(promises);
|
|
12464
|
+
const include = await runFilter(srcItem, destItem, opts);
|
|
12465
|
+
// only copy the item if it matches the filter function
|
|
12466
|
+
if (include) {
|
|
12467
|
+
const { destStat } = await stat$3.checkPaths(srcItem, destItem, 'copy', opts);
|
|
12468
|
+
// If the item is a copyable file, `getStatsAndPerformCopy` will copy it
|
|
12469
|
+
// If the item is a directory, `getStatsAndPerformCopy` will call `onDir` recursively
|
|
12470
|
+
await getStatsAndPerformCopy(destStat, srcItem, destItem, opts);
|
|
12471
|
+
}
|
|
12472
|
+
});
|
|
12452
12473
|
|
|
12453
12474
|
if (!destStat) {
|
|
12454
12475
|
await fs$b.chmod(dest, srcStat.mode);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builderbot/provider-wppconnect",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
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>",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/codigoencasa/bot-whatsapp#readme",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@builderbot/bot": "1.3.
|
|
29
|
+
"@builderbot/bot": "1.3.14",
|
|
30
30
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
31
31
|
"@rollup/plugin-json": "^6.1.0",
|
|
32
32
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"polka": "^0.5.2",
|
|
56
56
|
"sharp": "0.33.5"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "b9bacfa917364b27d22fe7398c1219cbd28b2a22"
|
|
59
59
|
}
|