diff --git a/lib/print.js b/lib/print.js index c83f3cea8..bf692eb10 100644 --- a/lib/print.js +++ b/lib/print.js @@ -1,11 +1,18 @@ -let { WA_MESSAGE_STUB_TYPES, URL_REGEX } = require('@adiwajshing/baileys') +let { WA_MESSAGE_STUB_TYPES, URL_REGEX, MessageType } = require('@adiwajshing/baileys') +let terminalImage = require('terminal-image') let chalk = require('chalk') -module.exports = function (m, conn = {user: {}}) { +module.exports = async function (m, conn = {user: {}}) { let sender = typeof m.text == 'string' || m.mtype ? [m.sender] : m.messageStubParameters sender = sender.map(v => v.split`@`[0] + (conn.getName(v) ? ' ~' + conn.getName(v) : '')).join` & ` let chat = conn.getName(m.chat) let ansi = '\x1b[' + let img + try { + img = [MessageType.image, 1+MessageType.sticker].includes(m.mtype) ? await terminalImage.buffer(await conn.downloadM(m)) : false + } catch (e) { + console.error(e) + } console.log( `${chalk.red('%s')} ${chalk.black(chalk.bgYellow('%s'))} ${chalk.black(chalk.bgGreen('%s'))}\n${chalk.green('%s')} ${chalk.yellow('%s')} ${chalk.blue('to')} ${chalk.green('%s')} ${chalk.black(chalk.bgYellow('%s'))}`, (conn.user.jid + ' ~' + conn.user.name).replace('@s.whatsapp.net', ''), @@ -16,6 +23,7 @@ module.exports = function (m, conn = {user: {}}) { m.chat + (chat ? ' ~' + chat : ''), m.mtype ? m.mtype.replace(/message$/i, '') : '' ) + if (img) console.log(img.trimEnd()) if (typeof m.text == 'string') { let log = m.text if (m.mentionedJid) for (let user of m.mentionedJid) log = log.replace('@' + user.split`@`[0], chalk.blue('@' + conn.getName(user))) @@ -26,8 +34,8 @@ module.exports = function (m, conn = {user: {}}) { .replace(/(?<=(?:^|\s|\n|\*|_))~(.+?)~(?=(?:$|\s|\n|\*|_))/g, `${ansi}9m$1${ansi}29m`) // Strikethrough .replace(/(?<=(?:^|\s|\n|\*|_|~))\x60{3}(.+?)\x60{3}(?=(?:$|\s|\n|\*|_|~))/gm, `$1`) // Monospace (...) console.log(m.error ? chalk.red(log) : m.isCommand ? chalk.yellow(log) : log) - console.log() } + console.log() } delete require.cache[require.resolve(__filename)] diff --git a/package-lock.json b/package-lock.json index d40cdb9d9..31844792f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wabot-aq", - "version": "1.2.0", + "version": "1.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -514,6 +514,14 @@ "uri-js": "^4.2.2" } }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "requires": { + "type-fest": "^0.11.0" + } + }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -532,6 +540,14 @@ "resolved": "https://registry.npmjs.org/any-base/-/any-base-1.1.0.tgz", "integrity": "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg==" }, + "app-path": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/app-path/-/app-path-3.2.0.tgz", + "integrity": "sha512-PQPaKXi64FZuofJkrtaO3I5RZESm9Yjv7tkeJaDz4EZMeBBfGtr5MyQ3m5AC7F0HVrISBLatPxAAAgvbe418fQ==", + "requires": { + "execa": "^1.0.0" + } + }, "args": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/args/-/args-5.0.1.tgz", @@ -565,6 +581,11 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "array-range": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-range/-/array-range-1.0.1.tgz", + "integrity": "sha1-9W5GWRhDYRxqVvd+8C7afFAIm/w=" + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -578,6 +599,11 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" + }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -911,6 +937,18 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "css-select": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/css-select/-/css-select-3.1.2.tgz", @@ -953,6 +991,11 @@ "resolved": "https://registry.npmjs.org/curve25519-js/-/curve25519-js-0.0.4.tgz", "integrity": "sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w==" }, + "cycled": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cycled/-/cycled-1.2.0.tgz", + "integrity": "sha512-/BOOCEohSBflVHHtY/wUc1F6YDYPqyVs/A837gDoq4H1pm72nU/yChyGt91V4ML+MbbAmHs8uo2l1yJkkTIUdg==" + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -994,6 +1037,15 @@ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz", "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==" }, + "decode-gif": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/decode-gif/-/decode-gif-1.0.1.tgz", + "integrity": "sha512-L0MT527mwlkil9TiN1xwnJXzUxCup55bUT91CPmQlc9zYejXJ8xp17d5EVnwM80JOIGImBUk1ptJQ+hDihyzwg==", + "requires": { + "array-range": "^1.0.1", + "omggif": "^1.0.10" + } + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -1015,6 +1067,11 @@ "is-descriptor": "^1.0.0" } }, + "delay": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-4.4.0.tgz", + "integrity": "sha512-txgOrJu3OdtOfTiEOT2e76dJVfG/1dz2NZ4F0Pyt4UGZJryssMRp5vdM5wQoLwSOBNdrJv3F9PAhp/heqd7vrA==" + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1172,6 +1229,20 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, "exif-parser": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.12.tgz", @@ -1375,6 +1446,14 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1591,6 +1670,11 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", "integrity": "sha1-DFLlS8yjkbssSUsh6GJtczbG45c=" }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1601,11 +1685,25 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "iterm2-version": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/iterm2-version/-/iterm2-version-4.2.0.tgz", + "integrity": "sha512-IoiNVk4SMPu6uTcK+1nA5QaHNok2BMDLjSl5UomrOixe5g4GkylhPwuiGdw00ysSCrXAKNMfFTu+u/Lk5f6OLQ==", + "requires": { + "app-path": "^3.2.0", + "plist": "^3.0.1" + } + }, "jimp": { "version": "0.16.1", "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.16.1.tgz", @@ -1775,6 +1873,50 @@ } } }, + "log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "requires": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -1941,6 +2083,11 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", @@ -1958,6 +2105,14 @@ "request": "^2.81.0" } }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, "nth-check": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", @@ -2078,6 +2233,11 @@ } } }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -2158,6 +2318,11 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -2222,6 +2387,23 @@ "pngjs": "^3.0.0" } }, + "plist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", + "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "requires": { + "base64-js": "^1.2.3", + "xmlbuilder": "^9.0.7", + "xmldom": "0.1.x" + }, + "dependencies": { + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + } + } + }, "pngjs": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", @@ -2452,6 +2634,357 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" }, + "render-gif": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/render-gif/-/render-gif-2.0.4.tgz", + "integrity": "sha512-l5X7EwbEvdflnvVAzjL7njizwZN8ATqJ0rdaQ5WwMJ55vyWXIXIUE9Ut7W6hm+KE+HMYn5C0a+7t0B6JjGfxQA==", + "requires": { + "cycled": "^1.2.0", + "decode-gif": "^1.0.1", + "delay": "^4.3.0", + "jimp": "^0.14.0" + }, + "dependencies": { + "@jimp/bmp": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.14.0.tgz", + "integrity": "sha512-5RkX6tSS7K3K3xNEb2ygPuvyL9whjanhoaB/WmmXlJS6ub4DjTqrapu8j4qnIWmO4YYtFeTbDTXV6v9P1yMA5A==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "bmp-js": "^0.1.0" + } + }, + "@jimp/core": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.14.0.tgz", + "integrity": "sha512-S62FcKdtLtj3yWsGfJRdFXSutjvHg7aQNiFogMbwq19RP4XJWqS2nOphu7ScB8KrSlyy5nPF2hkWNhLRLyD82w==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "any-base": "^1.1.0", + "buffer": "^5.2.0", + "exif-parser": "^0.1.12", + "file-type": "^9.0.0", + "load-bmfont": "^1.3.1", + "mkdirp": "^0.5.1", + "phin": "^2.9.1", + "pixelmatch": "^4.0.2", + "tinycolor2": "^1.4.1" + } + }, + "@jimp/custom": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.14.0.tgz", + "integrity": "sha512-kQJMeH87+kWJdVw8F9GQhtsageqqxrvzg7yyOw3Tx/s7v5RToe8RnKyMM+kVtBJtNAG+Xyv/z01uYQ2jiZ3GwA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/core": "^0.14.0" + } + }, + "@jimp/gif": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.14.0.tgz", + "integrity": "sha512-DHjoOSfCaCz72+oGGEh8qH0zE6pUBaBxPxxmpYJjkNyDZP7RkbBkZJScIYeQ7BmJxmGN4/dZn+MxamoQlr+UYg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "gifwrap": "^0.9.2", + "omggif": "^1.0.9" + } + }, + "@jimp/jpeg": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.14.0.tgz", + "integrity": "sha512-561neGbr+87S/YVQYnZSTyjWTHBm9F6F1obYHiyU3wVmF+1CLbxY3FQzt4YolwyQHIBv36Bo0PY2KkkU8BEeeQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "jpeg-js": "^0.4.0" + } + }, + "@jimp/plugin-blit": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.14.0.tgz", + "integrity": "sha512-YoYOrnVHeX3InfgbJawAU601iTZMwEBZkyqcP1V/S33Qnz9uzH1Uj1NtC6fNgWzvX6I4XbCWwtr4RrGFb5CFrw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-blur": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.14.0.tgz", + "integrity": "sha512-9WhZcofLrT0hgI7t0chf7iBQZib//0gJh9WcQMUt5+Q1Bk04dWs8vTgLNj61GBqZXgHSPzE4OpCrrLDBG8zlhQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-circle": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-circle/-/plugin-circle-0.14.0.tgz", + "integrity": "sha512-o5L+wf6QA44tvTum5HeLyLSc5eVfIUd5ZDVi5iRfO4o6GT/zux9AxuTSkKwnjhsG8bn1dDmywAOQGAx7BjrQVA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-color": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.14.0.tgz", + "integrity": "sha512-JJz512SAILYV0M5LzBb9sbOm/XEj2fGElMiHAxb7aLI6jx+n0agxtHpfpV/AePTLm1vzzDxx6AJxXbKv355hBQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "tinycolor2": "^1.4.1" + } + }, + "@jimp/plugin-contain": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.14.0.tgz", + "integrity": "sha512-RX2q233lGyaxiMY6kAgnm9ScmEkNSof0hdlaJAVDS1OgXphGAYAeSIAwzESZN4x3ORaWvkFefeVH9O9/698Evg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-cover": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.14.0.tgz", + "integrity": "sha512-0P/5XhzWES4uMdvbi3beUgfvhn4YuQ/ny8ijs5kkYIw6K8mHcl820HahuGpwWMx56DJLHRl1hFhJwo9CeTRJtQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-crop": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.14.0.tgz", + "integrity": "sha512-Ojtih+XIe6/XSGtpWtbAXBozhCdsDMmy+THUJAGu2x7ZgKrMS0JotN+vN2YC3nwDpYkM+yOJImQeptSfZb2Sug==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-displace": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.14.0.tgz", + "integrity": "sha512-c75uQUzMgrHa8vegkgUvgRL/PRvD7paFbFJvzW0Ugs8Wl+CDMGIPYQ3j7IVaQkIS+cAxv+NJ3TIRBQyBrfVEOg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-dither": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.14.0.tgz", + "integrity": "sha512-g8SJqFLyYexXQQsoh4dc1VP87TwyOgeTElBcxSXX2LaaMZezypmxQfLTzOFzZoK8m39NuaoH21Ou1Ftsq7LzVQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-fisheye": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-fisheye/-/plugin-fisheye-0.14.0.tgz", + "integrity": "sha512-BFfUZ64EikCaABhCA6mR3bsltWhPpS321jpeIQfJyrILdpFsZ/OccNwCgpW1XlbldDHIoNtXTDGn3E+vCE7vDg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-flip": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.14.0.tgz", + "integrity": "sha512-WtL1hj6ryqHhApih+9qZQYA6Ye8a4HAmdTzLbYdTMrrrSUgIzFdiZsD0WeDHpgS/+QMsWwF+NFmTZmxNWqKfXw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-gaussian": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.14.0.tgz", + "integrity": "sha512-uaLwQ0XAQoydDlF9tlfc7iD9drYPriFe+jgYnWm8fbw5cN+eOIcnneEX9XCOOzwgLPkNCxGox6Kxjn8zY6GxtQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-invert": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.14.0.tgz", + "integrity": "sha512-UaQW9X9vx8orQXYSjT5VcITkJPwDaHwrBbxxPoDG+F/Zgv4oV9fP+udDD6qmkgI9taU+44Fy+zm/J/gGcMWrdg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-mask": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.14.0.tgz", + "integrity": "sha512-tdiGM69OBaKtSPfYSQeflzFhEpoRZ+BvKfDEoivyTjauynbjpRiwB1CaiS8En1INTDwzLXTT0Be9SpI3LkJoEA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-normalize": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.14.0.tgz", + "integrity": "sha512-AfY8sqlsbbdVwFGcyIPy5JH/7fnBzlmuweb+Qtx2vn29okq6+HelLjw2b+VT2btgGUmWWHGEHd86oRGSoWGyEQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-print": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.14.0.tgz", + "integrity": "sha512-MwP3sH+VS5AhhSTXk7pui+tEJFsxnTKFY3TraFJb8WFbA2Vo2qsRCZseEGwpTLhENB7p/JSsLvWoSSbpmxhFAQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "load-bmfont": "^1.4.0" + } + }, + "@jimp/plugin-resize": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.14.0.tgz", + "integrity": "sha512-qFeMOyXE/Bk6QXN0GQo89+CB2dQcXqoxUcDb2Ah8wdYlKqpi53skABkgVy5pW3EpiprDnzNDboMltdvDslNgLQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-rotate": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.14.0.tgz", + "integrity": "sha512-aGaicts44bvpTcq5Dtf93/8TZFu5pMo/61lWWnYmwJJU1RqtQlxbCLEQpMyRhKDNSfPbuP8nyGmaqXlM/82J0Q==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-scale": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.14.0.tgz", + "integrity": "sha512-ZcJk0hxY5ZKZDDwflqQNHEGRblgaR+piePZm7dPwPUOSeYEH31P0AwZ1ziceR74zd8N80M0TMft+e3Td6KGBHw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-shadow": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-shadow/-/plugin-shadow-0.14.0.tgz", + "integrity": "sha512-p2igcEr/iGrLiTu0YePNHyby0WYAXM14c5cECZIVnq/UTOOIQ7xIcWZJ1lRbAEPxVVXPN1UibhZAbr3HAb5BjQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-threshold": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-threshold/-/plugin-threshold-0.14.0.tgz", + "integrity": "sha512-N4BlDgm/FoOMV/DQM2rSpzsgqAzkP0DXkWZoqaQrlRxQBo4zizQLzhEL00T/YCCMKnddzgEhnByaocgaaa0fKw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugins": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.14.0.tgz", + "integrity": "sha512-vDO3XT/YQlFlFLq5TqNjQkISqjBHT8VMhpWhAfJVwuXIpilxz5Glu4IDLK6jp4IjPR6Yg2WO8TmRY/HI8vLrOw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/plugin-blit": "^0.14.0", + "@jimp/plugin-blur": "^0.14.0", + "@jimp/plugin-circle": "^0.14.0", + "@jimp/plugin-color": "^0.14.0", + "@jimp/plugin-contain": "^0.14.0", + "@jimp/plugin-cover": "^0.14.0", + "@jimp/plugin-crop": "^0.14.0", + "@jimp/plugin-displace": "^0.14.0", + "@jimp/plugin-dither": "^0.14.0", + "@jimp/plugin-fisheye": "^0.14.0", + "@jimp/plugin-flip": "^0.14.0", + "@jimp/plugin-gaussian": "^0.14.0", + "@jimp/plugin-invert": "^0.14.0", + "@jimp/plugin-mask": "^0.14.0", + "@jimp/plugin-normalize": "^0.14.0", + "@jimp/plugin-print": "^0.14.0", + "@jimp/plugin-resize": "^0.14.0", + "@jimp/plugin-rotate": "^0.14.0", + "@jimp/plugin-scale": "^0.14.0", + "@jimp/plugin-shadow": "^0.14.0", + "@jimp/plugin-threshold": "^0.14.0", + "timm": "^1.6.1" + } + }, + "@jimp/png": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.14.0.tgz", + "integrity": "sha512-0RV/mEIDOrPCcNfXSPmPBqqSZYwGADNRVUTyMt47RuZh7sugbYdv/uvKmQSiqRdR0L1sfbCBMWUEa5G/8MSbdA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "pngjs": "^3.3.3" + } + }, + "@jimp/tiff": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.14.0.tgz", + "integrity": "sha512-zBYDTlutc7j88G/7FBCn3kmQwWr0rmm1e0FKB4C3uJ5oYfT8645lftUsvosKVUEfkdmOaMAnhrf4ekaHcb5gQw==", + "requires": { + "@babel/runtime": "^7.7.2", + "utif": "^2.0.1" + } + }, + "@jimp/types": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.14.0.tgz", + "integrity": "sha512-hx3cXAW1KZm+b+XCrY3LXtdWy2U+hNtq0rPyJ7NuXCjU7lZR3vIkpz1DLJ3yDdS70hTi5QDXY3Cd9kd6DtloHQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/bmp": "^0.14.0", + "@jimp/gif": "^0.14.0", + "@jimp/jpeg": "^0.14.0", + "@jimp/png": "^0.14.0", + "@jimp/tiff": "^0.14.0", + "timm": "^1.6.1" + } + }, + "@jimp/utils": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.14.0.tgz", + "integrity": "sha512-MY5KFYUru0y74IsgM/9asDwb3ERxWxXEu3CRCZEvE7DtT86y1bR1XgtlSliMrptjz4qbivNGMQSvUBpEFJDp1A==", + "requires": { + "@babel/runtime": "^7.7.2", + "regenerator-runtime": "^0.13.3" + } + }, + "file-type": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz", + "integrity": "sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==" + }, + "jimp": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.14.0.tgz", + "integrity": "sha512-8BXU+J8+SPmwwyq9ELihpSV4dWPTiOKBWCEgtkbnxxAVMjXdf3yGmyaLSshBfXc8sP/JQ9OZj5R8nZzz2wPXgA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/custom": "^0.14.0", + "@jimp/plugins": "^0.14.0", + "@jimp/types": "^0.14.0", + "regenerator-runtime": "^0.13.3" + } + } + } + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -2571,6 +3104,11 @@ "xmlchars": "^2.2.0" } }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -2634,11 +3172,57 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, "sonic-boom": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.3.0.tgz", @@ -2714,6 +3298,11 @@ "ansi-regex": "^5.0.0" } }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2750,6 +3339,367 @@ "acorn-node": "^1.2.0" } }, + "term-img": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/term-img/-/term-img-5.0.0.tgz", + "integrity": "sha512-Wpi50MA7bJwJKi5bVYu/t+xu9kNqesdzg6gWHOh3+1R9NRx1LmYoCMly9bUiabMZPNPH3juT8lOhZxUYxPEIBw==", + "requires": { + "ansi-escapes": "^4.1.0", + "iterm2-version": "^4.1.0" + } + }, + "terminal-image": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/terminal-image/-/terminal-image-1.2.1.tgz", + "integrity": "sha512-jA6idV4m0RcOImxHuoCsDtjDqhZpuHOekyPPx8uvGZ0/ORQ9fLLqQr5rMUFgheqqyTUt/7dQsGUaQJYHwsvxMQ==", + "requires": { + "chalk": "^4.0.0", + "jimp": "^0.14.0", + "log-update": "^4.0.0", + "render-gif": "^2.0.4", + "term-img": "^5.0.0" + }, + "dependencies": { + "@jimp/bmp": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.14.0.tgz", + "integrity": "sha512-5RkX6tSS7K3K3xNEb2ygPuvyL9whjanhoaB/WmmXlJS6ub4DjTqrapu8j4qnIWmO4YYtFeTbDTXV6v9P1yMA5A==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "bmp-js": "^0.1.0" + } + }, + "@jimp/core": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.14.0.tgz", + "integrity": "sha512-S62FcKdtLtj3yWsGfJRdFXSutjvHg7aQNiFogMbwq19RP4XJWqS2nOphu7ScB8KrSlyy5nPF2hkWNhLRLyD82w==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "any-base": "^1.1.0", + "buffer": "^5.2.0", + "exif-parser": "^0.1.12", + "file-type": "^9.0.0", + "load-bmfont": "^1.3.1", + "mkdirp": "^0.5.1", + "phin": "^2.9.1", + "pixelmatch": "^4.0.2", + "tinycolor2": "^1.4.1" + } + }, + "@jimp/custom": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.14.0.tgz", + "integrity": "sha512-kQJMeH87+kWJdVw8F9GQhtsageqqxrvzg7yyOw3Tx/s7v5RToe8RnKyMM+kVtBJtNAG+Xyv/z01uYQ2jiZ3GwA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/core": "^0.14.0" + } + }, + "@jimp/gif": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.14.0.tgz", + "integrity": "sha512-DHjoOSfCaCz72+oGGEh8qH0zE6pUBaBxPxxmpYJjkNyDZP7RkbBkZJScIYeQ7BmJxmGN4/dZn+MxamoQlr+UYg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "gifwrap": "^0.9.2", + "omggif": "^1.0.9" + } + }, + "@jimp/jpeg": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.14.0.tgz", + "integrity": "sha512-561neGbr+87S/YVQYnZSTyjWTHBm9F6F1obYHiyU3wVmF+1CLbxY3FQzt4YolwyQHIBv36Bo0PY2KkkU8BEeeQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "jpeg-js": "^0.4.0" + } + }, + "@jimp/plugin-blit": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.14.0.tgz", + "integrity": "sha512-YoYOrnVHeX3InfgbJawAU601iTZMwEBZkyqcP1V/S33Qnz9uzH1Uj1NtC6fNgWzvX6I4XbCWwtr4RrGFb5CFrw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-blur": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.14.0.tgz", + "integrity": "sha512-9WhZcofLrT0hgI7t0chf7iBQZib//0gJh9WcQMUt5+Q1Bk04dWs8vTgLNj61GBqZXgHSPzE4OpCrrLDBG8zlhQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-circle": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-circle/-/plugin-circle-0.14.0.tgz", + "integrity": "sha512-o5L+wf6QA44tvTum5HeLyLSc5eVfIUd5ZDVi5iRfO4o6GT/zux9AxuTSkKwnjhsG8bn1dDmywAOQGAx7BjrQVA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-color": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.14.0.tgz", + "integrity": "sha512-JJz512SAILYV0M5LzBb9sbOm/XEj2fGElMiHAxb7aLI6jx+n0agxtHpfpV/AePTLm1vzzDxx6AJxXbKv355hBQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "tinycolor2": "^1.4.1" + } + }, + "@jimp/plugin-contain": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.14.0.tgz", + "integrity": "sha512-RX2q233lGyaxiMY6kAgnm9ScmEkNSof0hdlaJAVDS1OgXphGAYAeSIAwzESZN4x3ORaWvkFefeVH9O9/698Evg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-cover": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.14.0.tgz", + "integrity": "sha512-0P/5XhzWES4uMdvbi3beUgfvhn4YuQ/ny8ijs5kkYIw6K8mHcl820HahuGpwWMx56DJLHRl1hFhJwo9CeTRJtQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-crop": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.14.0.tgz", + "integrity": "sha512-Ojtih+XIe6/XSGtpWtbAXBozhCdsDMmy+THUJAGu2x7ZgKrMS0JotN+vN2YC3nwDpYkM+yOJImQeptSfZb2Sug==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-displace": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.14.0.tgz", + "integrity": "sha512-c75uQUzMgrHa8vegkgUvgRL/PRvD7paFbFJvzW0Ugs8Wl+CDMGIPYQ3j7IVaQkIS+cAxv+NJ3TIRBQyBrfVEOg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-dither": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.14.0.tgz", + "integrity": "sha512-g8SJqFLyYexXQQsoh4dc1VP87TwyOgeTElBcxSXX2LaaMZezypmxQfLTzOFzZoK8m39NuaoH21Ou1Ftsq7LzVQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-fisheye": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-fisheye/-/plugin-fisheye-0.14.0.tgz", + "integrity": "sha512-BFfUZ64EikCaABhCA6mR3bsltWhPpS321jpeIQfJyrILdpFsZ/OccNwCgpW1XlbldDHIoNtXTDGn3E+vCE7vDg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-flip": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.14.0.tgz", + "integrity": "sha512-WtL1hj6ryqHhApih+9qZQYA6Ye8a4HAmdTzLbYdTMrrrSUgIzFdiZsD0WeDHpgS/+QMsWwF+NFmTZmxNWqKfXw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-gaussian": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.14.0.tgz", + "integrity": "sha512-uaLwQ0XAQoydDlF9tlfc7iD9drYPriFe+jgYnWm8fbw5cN+eOIcnneEX9XCOOzwgLPkNCxGox6Kxjn8zY6GxtQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-invert": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.14.0.tgz", + "integrity": "sha512-UaQW9X9vx8orQXYSjT5VcITkJPwDaHwrBbxxPoDG+F/Zgv4oV9fP+udDD6qmkgI9taU+44Fy+zm/J/gGcMWrdg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-mask": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.14.0.tgz", + "integrity": "sha512-tdiGM69OBaKtSPfYSQeflzFhEpoRZ+BvKfDEoivyTjauynbjpRiwB1CaiS8En1INTDwzLXTT0Be9SpI3LkJoEA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-normalize": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.14.0.tgz", + "integrity": "sha512-AfY8sqlsbbdVwFGcyIPy5JH/7fnBzlmuweb+Qtx2vn29okq6+HelLjw2b+VT2btgGUmWWHGEHd86oRGSoWGyEQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-print": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.14.0.tgz", + "integrity": "sha512-MwP3sH+VS5AhhSTXk7pui+tEJFsxnTKFY3TraFJb8WFbA2Vo2qsRCZseEGwpTLhENB7p/JSsLvWoSSbpmxhFAQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "load-bmfont": "^1.4.0" + } + }, + "@jimp/plugin-resize": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.14.0.tgz", + "integrity": "sha512-qFeMOyXE/Bk6QXN0GQo89+CB2dQcXqoxUcDb2Ah8wdYlKqpi53skABkgVy5pW3EpiprDnzNDboMltdvDslNgLQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-rotate": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.14.0.tgz", + "integrity": "sha512-aGaicts44bvpTcq5Dtf93/8TZFu5pMo/61lWWnYmwJJU1RqtQlxbCLEQpMyRhKDNSfPbuP8nyGmaqXlM/82J0Q==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-scale": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.14.0.tgz", + "integrity": "sha512-ZcJk0hxY5ZKZDDwflqQNHEGRblgaR+piePZm7dPwPUOSeYEH31P0AwZ1ziceR74zd8N80M0TMft+e3Td6KGBHw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-shadow": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-shadow/-/plugin-shadow-0.14.0.tgz", + "integrity": "sha512-p2igcEr/iGrLiTu0YePNHyby0WYAXM14c5cECZIVnq/UTOOIQ7xIcWZJ1lRbAEPxVVXPN1UibhZAbr3HAb5BjQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugin-threshold": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-threshold/-/plugin-threshold-0.14.0.tgz", + "integrity": "sha512-N4BlDgm/FoOMV/DQM2rSpzsgqAzkP0DXkWZoqaQrlRxQBo4zizQLzhEL00T/YCCMKnddzgEhnByaocgaaa0fKw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0" + } + }, + "@jimp/plugins": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.14.0.tgz", + "integrity": "sha512-vDO3XT/YQlFlFLq5TqNjQkISqjBHT8VMhpWhAfJVwuXIpilxz5Glu4IDLK6jp4IjPR6Yg2WO8TmRY/HI8vLrOw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/plugin-blit": "^0.14.0", + "@jimp/plugin-blur": "^0.14.0", + "@jimp/plugin-circle": "^0.14.0", + "@jimp/plugin-color": "^0.14.0", + "@jimp/plugin-contain": "^0.14.0", + "@jimp/plugin-cover": "^0.14.0", + "@jimp/plugin-crop": "^0.14.0", + "@jimp/plugin-displace": "^0.14.0", + "@jimp/plugin-dither": "^0.14.0", + "@jimp/plugin-fisheye": "^0.14.0", + "@jimp/plugin-flip": "^0.14.0", + "@jimp/plugin-gaussian": "^0.14.0", + "@jimp/plugin-invert": "^0.14.0", + "@jimp/plugin-mask": "^0.14.0", + "@jimp/plugin-normalize": "^0.14.0", + "@jimp/plugin-print": "^0.14.0", + "@jimp/plugin-resize": "^0.14.0", + "@jimp/plugin-rotate": "^0.14.0", + "@jimp/plugin-scale": "^0.14.0", + "@jimp/plugin-shadow": "^0.14.0", + "@jimp/plugin-threshold": "^0.14.0", + "timm": "^1.6.1" + } + }, + "@jimp/png": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.14.0.tgz", + "integrity": "sha512-0RV/mEIDOrPCcNfXSPmPBqqSZYwGADNRVUTyMt47RuZh7sugbYdv/uvKmQSiqRdR0L1sfbCBMWUEa5G/8MSbdA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.14.0", + "pngjs": "^3.3.3" + } + }, + "@jimp/tiff": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.14.0.tgz", + "integrity": "sha512-zBYDTlutc7j88G/7FBCn3kmQwWr0rmm1e0FKB4C3uJ5oYfT8645lftUsvosKVUEfkdmOaMAnhrf4ekaHcb5gQw==", + "requires": { + "@babel/runtime": "^7.7.2", + "utif": "^2.0.1" + } + }, + "@jimp/types": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.14.0.tgz", + "integrity": "sha512-hx3cXAW1KZm+b+XCrY3LXtdWy2U+hNtq0rPyJ7NuXCjU7lZR3vIkpz1DLJ3yDdS70hTi5QDXY3Cd9kd6DtloHQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/bmp": "^0.14.0", + "@jimp/gif": "^0.14.0", + "@jimp/jpeg": "^0.14.0", + "@jimp/png": "^0.14.0", + "@jimp/tiff": "^0.14.0", + "timm": "^1.6.1" + } + }, + "@jimp/utils": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.14.0.tgz", + "integrity": "sha512-MY5KFYUru0y74IsgM/9asDwb3ERxWxXEu3CRCZEvE7DtT86y1bR1XgtlSliMrptjz4qbivNGMQSvUBpEFJDp1A==", + "requires": { + "@babel/runtime": "^7.7.2", + "regenerator-runtime": "^0.13.3" + } + }, + "file-type": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz", + "integrity": "sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==" + }, + "jimp": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.14.0.tgz", + "integrity": "sha512-8BXU+J8+SPmwwyq9ELihpSV4dWPTiOKBWCEgtkbnxxAVMjXdf3yGmyaLSshBfXc8sP/JQ9OZj5R8nZzz2wPXgA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/custom": "^0.14.0", + "@jimp/plugins": "^0.14.0", + "@jimp/types": "^0.14.0", + "regenerator-runtime": "^0.13.3" + } + } + } + }, "timm": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/timm/-/timm-1.7.1.tgz", @@ -2813,6 +3763,11 @@ "prelude-ls": "~1.1.2" } }, + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==" + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -2945,6 +3900,14 @@ "webidl-conversions": "^6.1.0" } }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", @@ -3047,6 +4010,11 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, + "xmldom": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", + "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 2d3a84193..2f8453635 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "node-gtts": "^2.0.2", "qrcode": "^1.4.4", "syntax-error": "^1.4.0", + "terminal-image": "^1.2.1", "yargs": "^16.2.0" } } diff --git a/plugins/daily.js b/plugins/daily.js index 161fff6ee..b61492c12 100644 --- a/plugins/daily.js +++ b/plugins/daily.js @@ -1,9 +1,9 @@ let handler = async (m, { conn }) => { if (new Date - global.DATABASE._data.users[m.sender].lastclaim > 86400000) { - conn.reply(m.chat, '+500 XP', m) - global.DATABASE._data.users[m.sender].exp += 500 + m.reply('+500 XP') + global0.DATABASE._data.users[m.sender].exp += 500 global.DATABASE._data.users[m.sender].lastclaim = new Date * 1 - } else conn.reply(m.chat, 'Anda sudah mengklaim klaim harian hari ini', m) + } else m.reply('Anda sudah mengklaim klaim harian hari ini') } handler.help = ['daily', 'claim'] handler.tags = ['xp'] diff --git a/plugins/fetch.js b/plugins/fetch.js new file mode 100644 index 000000000..d6ff1e43d --- /dev/null +++ b/plugins/fetch.js @@ -0,0 +1,19 @@ +let fetch = require('node-fetch') +let util = require('util') +let handler = async (m, { text }) => { + let res = await fetch(text) + let txt = await res.text() + try { + txt = util.format(JSON.parse(txt)) + } catch (e) { + txt = txt + } finally { + m.reply(txt.slice(0, 65536)) + } +} +handler.help = ['fetch', 'get'].map(v => v + ' ') +handler.tags = ['internet'] +handler.command = /^(fetch|get)$/i + +module.exports = handler + diff --git a/plugins/setbye.js b/plugins/setbye.js index 30e2656eb..9de89f4e4 100644 --- a/plugins/setbye.js +++ b/plugins/setbye.js @@ -1,11 +1,13 @@ -let handler = async (m, { conn, text }) => { +let handler = async (m, { conn, text, isROwner, isOwner }) => { if (text) { - conn.welcome = text + if (isROwner) global.conn.bye = text + else if (isOwner) conn.bye = text + else global.DATABASE._data.chats.sBye = text m.reply('Bye berhasil diatur\n@user (Mention)') } else throw 'Teksnya mana?' } handler.help = ['setbye '] -handler.tags = ['owner'] +handler.tags = ['owner', 'group'] handler.command = /^setbye$/i module.exports = handler diff --git a/plugins/setwelcome.js b/plugins/setwelcome.js index 9899fb684..1429a6861 100644 --- a/plugins/setwelcome.js +++ b/plugins/setwelcome.js @@ -1,11 +1,13 @@ -let handler = async (m, { conn, text }) => { +let handler = async (m, { conn, text, isROwner, isOwner }) => { if (text) { - conn.welcome = text - m.reply('Welcome berhasil diatur\n@user (Mention)') + if (isROwner) global.conn.welcome = text + else if (isOwner) conn.welcome = text + else global.DATABASE._data.chats.sWelcome = text + m.reply('Welcome berhasil diatur\n@user (Mention)\n@subject (Judul Grup)') } else throw 'Teksnya mana?' } handler.help = ['setwelcome '] -handler.tags = ['owner'] +handler.tags = ['owner', 'group'] handler.command = /^setwelcome$/i module.exports = handler