diff --git a/.gitignore b/.gitignore index df8ae9a..375c8cd 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ mastodon_multi_accounts.db assets/pictures/meme/not_published/* assets/pictures/meme/published/* #!/assets/documents/qzine_posts_all.json +assets/blog_posts_medias/* \ No newline at end of file diff --git a/assets/pictures/tykayn/nsfw/not_published/pouets_disparus_tykayn_mastodon.jpg b/assets/pictures/tykayn/nsfw/not_published/pouets_disparus_tykayn_mastodon.jpg new file mode 100644 index 0000000..95ca2a8 Binary files /dev/null and b/assets/pictures/tykayn/nsfw/not_published/pouets_disparus_tykayn_mastodon.jpg differ diff --git a/helpers/tykayn_blog.mjs b/helpers/tykayn_blog.mjs index 0dd440f..19ded46 100644 --- a/helpers/tykayn_blog.mjs +++ b/helpers/tykayn_blog.mjs @@ -1,10 +1,14 @@ import fs from "fs"; import path from 'path'; -import sendPostMastodon, {randomIntFromInterval} from './utils.mjs' +import sendPostMastodon, {findFirstImageInContent, randomIntFromInterval, downloadImage} from './utils.mjs' +import Masto from "mastodon"; const __dirname = path.resolve(); +const folderBlogPostsPreview = process.cwd() + '/assets/blog_posts_medias/' const tkpostsjson = JSON.parse(fs.readFileSync(__dirname + "/assets/documents/tykayn_wptkblog_posts.json", 'utf-8')) + let reallySendPost = false; + reallySendPost = true; @@ -21,11 +25,10 @@ function getRandomLink() { function postLink() { let postObject = getRandomLink() - console.log("envoi de post par le Curator") + console.log("envoi de post par tykayn") let filteredExcerpt = postObject.post_content.replace(/<[^>]+>/g, '') let counterLength = filteredExcerpt.length; - let limitExcerpt = 250 filteredExcerpt = filteredExcerpt.substring(0, limitExcerpt) if (filteredExcerpt && counterLength > limitExcerpt) { @@ -34,7 +37,7 @@ function postLink() { let configPost = { author: 'tykayn', - image: 'tk_blog_bannieres_oct2010-' + randomIntFromInterval(1 , 10) + '.jpg', + image: 'tk_blog_bannieres_oct2010-' + randomIntFromInterval(1, 10) + '.jpg', message: `# [${postObject.post_title}](${postObject.guid}) * ${postObject.post_date} - ${postObject.guid} @@ -42,8 +45,39 @@ ${filteredExcerpt} * #tykayn #tkblog #blog`, reallySendPost } - console.log("configPost.message", configPost.message) - sendPostMastodon(configPost) + + // ajouter la première image du post de blog + let firstPictureSource = findFirstImageInContent(postObject.post_content); + if (firstPictureSource) { + console.log("firstPictureSource found", firstPictureSource) + + downloadImage(firstPictureSource, folderBlogPostsPreview + 'media_post_' + postObject.post_name + '.jpg') + .then((res) => { + // suite du poste avec upload d'image + console.log('on envoie le media et l image') + configPost.image = 'media_post_' + postObject.post_name + '.jpg'; + sendPostMastodon(configPost) + + }, + (err) => { + console.log('pas dimage trouvée pour l URL ', firstPictureSource, err) + sendPostMastodon(configPost) + } + ) + .catch((err) => { + console.log('erreur avec cette URL ', firstPictureSource, err) + sendPostMastodon(configPost) + }) + } else { + + // no image provided + + console.log("pas d'image dans le corps du texte") + // on envoie avec l'image par défaut + sendPostMastodon(configPost) + } + + } postLink(); \ No newline at end of file diff --git a/helpers/utils.mjs b/helpers/utils.mjs index d4e39f1..81ea799 100644 --- a/helpers/utils.mjs +++ b/helpers/utils.mjs @@ -1,13 +1,12 @@ import Masto from "mastodon"; import dotenv from "dotenv"; -import fs from "node-fs"; -import loadedHtml, {load} from "cheerio"; -import $ from "cheerio"; +import sharp from 'sharp'; +import fs from 'fs'; +import https from 'https'; + let local_node_env_conf = dotenv.config() -// console.log("conf", local_node_env_conf) - export function randomIntFromInterval(min, max) { // min and max included return Math.floor(Math.random() * (max - min + 1) + min) | 1 } @@ -33,11 +32,11 @@ export let defaultConfigMasto = { export function tokenForAuthorIsPresentInDotEnv(author) { - console.log(" process.env['TOKEN_' + author.toUpperCase()]", process.env['TOKEN_' + author.toUpperCase()]) + console.log(" process.env['TOKEN_' + author.toUpperCase()]", process.env['TOKEN_' + author.toUpperCase()]) return process.env['TOKEN_' + author.toUpperCase()]; } -export default function sendPostMastodon(config){ +export default function sendPostMastodon(config) { // override defaults with input argument config = { @@ -45,7 +44,7 @@ export default function sendPostMastodon(config){ ...config, } - console.log("sendPostMastodon config", config) + // console.log("sendPostMastodon config", config) if (!config.reallySendPost) { console.log(" =========== le message ne sera PAS réellement posté sur le compte @" + config.author + "@" + process.env.INSTANCE_MASTODON + " =========== ") @@ -77,7 +76,6 @@ export default function sendPostMastodon(config){ let dateschedule = new Date(config.scheduled_at) params['scheduled_at'] = dateschedule.toISOString() } - console.log(config) /** * envoi sans fichier joint @@ -87,7 +85,7 @@ export default function sendPostMastodon(config){ if (config.reallySendPost) { masto.post('statuses', params).then(rep => { - // console.log('rep', rep) + console.log("posté, yay!") }, err => { console.error(err) @@ -104,34 +102,21 @@ export default function sendPostMastodon(config){ var id; console.log("envoi du média", config.image) - // if(config.image === 'osm_default.jpg'){ - // id = '108787661095227871'; - // params.media_ids = [id] - // masto.post('statuses', params).then(rep => { - // console.log("posté avec l'image osm_default déjà enregistrée") - // // console.log('rep', rep) - // }, err => { - // - // console.error(err) - // console.log("erreur T_T") - // }) - // - // }else{ - // upload new media - return masto.post('media', {file: fs.createReadStream('assets/' + config.image)}) - .then(resp => { - id = resp.data.id; - params.media_ids = [id] - masto.post('statuses', params).then(rep => { - // console.log('rep', rep) - console.log("posté avec une nouvelle image, WOOT") - }, err => { - console.error(err) + // upload new media + return masto.post('media', {file: fs.createReadStream('assets/' + config.image)}) + .then(resp => { + id = resp.data.id; + params.media_ids = [id] + masto.post('statuses', params).then(rep => { + // console.log('rep', rep) + console.log("posté avec une nouvelle image, WOOT") + }, err => { + console.error(err) - console.log("erreur T_T") - }) + console.log("erreur T_T") }) - } + }) + } // } @@ -147,7 +132,7 @@ export default function sendPostMastodon(config){ * lister les noms de fichier que l'on peut publier dans un dossier. * retourne un tableau */ -export function listFilesOfFolder(folderPath){ +export function listFilesOfFolder(folderPath) { let filesNames = [] fs.readdirSync(folderPath).map(fileName => { return filesNames.push(fileName); @@ -161,7 +146,7 @@ export function listFilesOfFolder(folderPath){ * crée un dossier d'assets, avec ses sous dossiers not_published et published si ils manquent. * une fois que l'on prendra une image dans le dossier non publié, on la déplacera dans le dossier des images publées. */ -export function initializeFolderForPictures(folderName){ +export function initializeFolderForPictures(folderName) { try { if (!fs.existsSync(folderName)) { fs.mkdirSync(folderName); @@ -171,13 +156,67 @@ export function initializeFolderForPictures(folderName){ } } -export function findFirstImageInContent(htmlContent){ - let firstImgSource = '' - let loadedHtmlCheerio = load(htmlContent) - let imageObj = loadedHtmlCheerio(htmlContent).find('img').get() - - if($(imageObj) && $(imageObj).attr('src')){ - firstImgSource = $(imageObj).attr('src') +/** + * find first image in blog post and return the src value of the img tag + * @param htmlContent + * @returns {string} + */ +export function findFirstImageInContent(htmlContent) { + let result = '' + let first = htmlContent.match(/]*?src\s*=\s*['\"]([^'\"]*?)['\"][^>]*?>/)[0]; + if (first) { + result = first.match(/src\=\"(.*)\"/i) + if(result.length && result[0]){ + result = result[0].split('"') + result = result[1] + } } - return firstImgSource; + console.log(result) + result = result.replace('http:', 'https:') + result = result.replace('https://www.ailesse.info/~tykayn/bazar/kotlife', 'https://www.tykayn.fr/wp-content/uploads/i/kotlife') + return result; +} + +/** + * usage: + * downloadImage('https://upload.wikimedia.org/wikipedia/en/thumb/7/7d/Lenna_%28test_image%29.png/440px-Lenna_%28test_image%29.png', 'lena.png') + * .then(console.log) + * .catch(console.error); + * @param url + * @param filepath + * @returns {Promise} + */ +export function downloadImage(url, filepath) { + return new Promise((resolve, reject) => { + https.get(url, (res) => { + if (res.statusCode === 200) { + res.pipe(fs.createWriteStream(filepath)) + .on('error', reject) + .once('close', () => resolve(filepath)); + } else { + // Consume response data to free up memory + res.resume(); + reject(new Error(`Request Failed With a Status Code: ${res.statusCode}; \n ${res.statusMessage} `)); + + } + }); + }); +} + +/** + * faire un + * @param pictureName + * @param width + * @param height + * @returns {Promise} + * @constructor + */ +export function CropPictue(pictureName, width = 500, height = 300) { + + return sharp(pictureName) + + .extract({left: 0, top: 0, width, height}) + .toFile('thumb_' + pictureName, function (err) { + if (err) console.log(err); + }); } \ No newline at end of file diff --git a/helpers/wip/tykayn_art_random.mjs b/helpers/wip/tykayn_art_random.mjs new file mode 100644 index 0000000..f73db4b --- /dev/null +++ b/helpers/wip/tykayn_art_random.mjs @@ -0,0 +1,86 @@ +import fs from "fs"; +import path from 'path'; +import {getRandomElementOfArray, listFilesOfFolder} from '../utils.mjs' +import Masto from "mastodon"; + +const __dirname = path.resolve(); +const folderUnpublishedNSFW = 'assets/pictures/tykayn/nsfw/not_published/' +const folderPublishedNSFW = 'assets/pictures/tykayn/nsfw/published/' +const folderUnpublished = 'assets/pictures/tykayn/sfw/not_published/' +const folderPublished = 'assets/pictures/tykayn/sfw/published/' + +const kindOfPic="nsfw" // or sfw +const author="tykayn" // or sfw + +const list_unpublished_images = listFilesOfFolder(folderUnpublishedNSFW) + +let reallySendPost = false; +// reallySendPost = true; + + +function postLink() { + + console.log("envoi de post par le compte ",author) + + + let selectedImage = 'meme_default.jpg'; + if (list_unpublished_images.length) { + selectedImage = getRandomElementOfArray(list_unpublished_images) + }else{ + console.log("----- nothing to publish -----") + return; + } + console.log("selectedImage", selectedImage) + let visibility = 'public'; + let language = 'fr'; + let sensitive = !!(kindOfPic == 'nsfw') | false; + + let configPost = { + author, + image: selectedImage, + visibility, + language, + sensitive, + status: `#${kindOfPic} Illustration par @${author}`, + reallySendPost + } + console.log("configPost", configPost) + let id = ''; + if (reallySendPost) { + + + let accessToken = process.env['TOKEN_' + configPost.author.toUpperCase()] + const masto = new Masto({ + access_token: accessToken, + api_url: process.env.INSTANCE_MASTODON + '/api/v1/', + }); + + masto.post('media', {file: fs.createReadStream( folderUnpublished + configPost.image)}) + .then(resp => { + id = resp.data.id; + configPost.media_ids = [id] + masto.post('statuses', configPost).then(rep => { + // console.log('rep', rep) + console.log(`posté avec une nouvelle image, ${configPost.image} WOOT`) + console.log("post has been sent, time to move image from unpublished folder: ", selectedImage) + moveImageToPublishedFolder(selectedImage) + }, err => { + console.error(err) + console.log("erreur T_T") + }) + }) + } else { + console.log("send post disabled in this script for author ", author) + console.log("image", configPost.image) + console.log("image NON envoyée") + } +} + +/** + * move to published + * @param imageName + */ +function moveImageToPublishedFolder(imageName){ + return fs.renameSync(folderUnpublished + imageName, folderPublished + imageName) +} +postLink(); \ No newline at end of file diff --git a/package.json b/package.json index 0b37f04..3770e35 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,10 @@ }, "devDependencies": { "cheerio": "^1.0.0-rc.12", + "fs": "^0.0.1-security", + "https": "^1.0.0", "node-fetch": "^3.2.10", - "request-promise": "^4.2.6" + "request-promise": "^4.2.6", + "sharp": "^0.31.2" } } diff --git a/yarn.lock b/yarn.lock index 6a7cc1f..a9dfc73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -520,16 +520,32 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@~1.1.4: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-string@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" + integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + color-support@^1.1.2, color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== +color@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a" + integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== + dependencies: + color-convert "^2.0.1" + color-string "^1.9.0" + combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -698,6 +714,18 @@ decamelize@^1.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -718,7 +746,7 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg== -detect-libc@^2.0.0: +detect-libc@^2.0.0, detect-libc@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== @@ -840,6 +868,11 @@ eventemitter3@^4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + express@~4.16.1: version "4.16.4" resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" @@ -1003,6 +1036,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fs@^0.0.1-security: + version "0.0.1-security" + resolved "https://registry.yarnpkg.com/fs/-/fs-0.0.1-security.tgz#8a7bd37186b6dddf3813f23858b57ecaaf5e41d4" + integrity sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w== + fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" @@ -1056,6 +1094,11 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1172,6 +1215,11 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https/-/https-1.0.0.tgz#3c37c7ae1a8eeb966904a2ad1e975a194b7ed3a4" + integrity sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -1243,6 +1291,11 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + ip@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" @@ -1253,6 +1306,11 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -1501,6 +1559,11 @@ mime@^1.3.4: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -1508,7 +1571,7 @@ minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== @@ -1567,6 +1630,11 @@ minizlib@^2.0.0, minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" @@ -1605,16 +1673,33 @@ ms@^2.0.0, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + negotiator@0.6.3, negotiator@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== +node-abi@^3.3.0: + version "3.30.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.30.0.tgz#d84687ad5d24ca81cdfa912a36f2c5c19b137359" + integrity sha512-qWO5l3SCqbwQavymOmtTVuCWZE23++S+rxyoHjXqUmPyzRcaoI4lA2gO55/drddGnedAyjA7sk76SfQ5lfUMnw== + dependencies: + semver "^7.3.5" + node-addon-api@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== +node-addon-api@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.0.0.tgz#7d7e6f9ef89043befdb20c1989c905ebde18c501" + integrity sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA== + node-domexception@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" @@ -1890,6 +1975,24 @@ pngjs@2.3.1: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-2.3.1.tgz#11d1e12b9cb64d63e30c143a330f4c1f567da85f" integrity sha512-ITNPqvx+SSssNFOgHQzGG87HrqQ0g2nMSHc1jjU5Piq9xJEJ40fiFEPz0S5HSSXxBHrTnhaBHIayTO5aRfk2vw== +prebuild-install@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== + dependencies: + detect-libc "^2.0.0" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^3.3.0" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^4.0.0" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + preceptor-core@~0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/preceptor-core/-/preceptor-core-0.10.1.tgz#c31eb026fad91c24b44351308ac97e625ec69511" @@ -2016,6 +2119,16 @@ raw-body@2.3.3: iconv-lite "0.4.23" unpipe "1.0.0" +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + readable-stream@^1.1.7: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -2134,7 +2247,7 @@ semver@^6.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.5: +semver@^7.3.5, semver@^7.3.8: version "7.3.8" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== @@ -2185,11 +2298,46 @@ setprototypeof@1.1.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== +sharp@^0.31.2: + version "0.31.2" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.31.2.tgz#a8411c80512027f5a452b76d599268760c4e5dfa" + integrity sha512-DUdNVEXgS5A97cTagSLIIp8dUZ/lZtk78iNVZgHdHbx1qnQR7JAHY0BnXnwwH39Iw+VKhO08CTYhIg0p98vQ5Q== + dependencies: + color "^4.2.3" + detect-libc "^2.0.1" + node-addon-api "^5.0.0" + prebuild-install "^7.1.1" + semver "^7.3.8" + simple-get "^4.0.1" + tar-fs "^2.1.1" + tunnel-agent "^0.6.0" + signal-exit@^3.0.0, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^4.0.0, simple-get@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== + dependencies: + decompress-response "^6.0.0" + once "^1.3.1" + simple-concat "^1.0.0" + +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== + dependencies: + is-arrayish "^0.3.1" + simple-update-notifier@^1.0.7: version "1.1.0" resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz#67694c121de354af592b347cdba798463ed49c82" @@ -2346,6 +2494,11 @@ strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -2370,7 +2523,17 @@ tar-fs@2.0.0: pump "^3.0.0" tar-stream "^2.0.0" -tar-stream@^2.0.0: +tar-fs@^2.0.0, tar-fs@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-stream@^2.0.0, tar-stream@^2.1.4: version "2.2.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==