From 3212c68855158a79c1a55955a18e54617039853c Mon Sep 17 00:00:00 2001 From: MrOrz Date: Mon, 29 Aug 2022 01:50:44 +0800 Subject: [PATCH 1/2] [Article] add media article support for relatedArticles --- src/graphql/models/Article.js | 45 ++++++++- .../__fixtures__/GetReplyAndArticle.js | 7 ++ .../__tests__/GetReplyAndGetArticle.js | 67 +++++++++++++- .../GetReplyAndGetArticle.js.snap | 91 ++++++++++++++++--- 4 files changed, 193 insertions(+), 17 deletions(-) diff --git a/src/graphql/models/Article.js b/src/graphql/models/Article.js index 6970fcda..df7e7734 100644 --- a/src/graphql/models/Article.js +++ b/src/graphql/models/Article.js @@ -262,7 +262,7 @@ const Article = new GraphQLObjectType({ ...pagingArgs, }, async resolve( - { id }, + { id, attachmentHash }, { filter = {}, orderBy = [{ _score: 'DESC' }], ...otherParams } ) { const body = { @@ -331,6 +331,49 @@ const Article = new GraphQLObjectType({ ]; } + // If the article has attachment hash, use Media Manager to get similar media entries + if (attachmentHash) { + // `hits` may include exact match attachmentHash. + // + // It is possible for 2 articles to have exactly the same attachmentHash + // (when created simutaneiously, through a race conditions), and we want these articles + // with exact match attachmentHash to be returned as well. + // Thus, we cannot simply remove the exact match hit here. + // + const { hits } = await mediaManager.query({ id: attachmentHash }); + const similarityMap = hits.reduce((map, hit) => { + map[hit.entry.id] = hit.similarity; + return map; + }, {}); + + body.query.bool.should.push({ + function_score: { + query: { + terms: { + attachmentHash: hits.map(hit => hit.entry.id), + }, + }, + script_score: { + script: { + lang: 'painless', + params: { similarityMap }, + source: + // Boost the score by 10, we want to prioritize media search hits + // + "10 * params.similarityMap.get(doc['attachmentHash'].value)", + }, + }, + }, + }); + + // Exclude self from function_score query + body.query.bool.must_not = [ + { + ids: { values: [id] }, + }, + ]; + } + return { index: 'articles', type: 'doc', diff --git a/src/graphql/queries/__fixtures__/GetReplyAndArticle.js b/src/graphql/queries/__fixtures__/GetReplyAndArticle.js index 94819dcc..bbe03f5e 100644 --- a/src/graphql/queries/__fixtures__/GetReplyAndArticle.js +++ b/src/graphql/queries/__fixtures__/GetReplyAndArticle.js @@ -119,6 +119,13 @@ export default { text: 'Popular', replyRequestCount: 11, }, + '/articles/doc/mediaArticle': { + text: 'Lorum ipsum', // Transcript + attachmentHash: 'hash-for-media-article', + }, + '/articles/doc/similarMediaArticle': { + attachmentHash: 'hash-for-similar-media-article', + }, '/replies/doc/bar': { text: 'bar', reference: 'barbar', diff --git a/src/graphql/queries/__tests__/GetReplyAndGetArticle.js b/src/graphql/queries/__tests__/GetReplyAndGetArticle.js index 619c5d86..8be5e5de 100644 --- a/src/graphql/queries/__tests__/GetReplyAndGetArticle.js +++ b/src/graphql/queries/__tests__/GetReplyAndGetArticle.js @@ -1,9 +1,15 @@ import gql from 'util/GraphQL'; import { loadFixtures, unloadFixtures } from 'util/fixtures'; import fixtures from '../__fixtures__/GetReplyAndArticle'; +import mediaManager from 'util/mediaManager'; + +jest.mock('util/mediaManager'); describe('GetReplyAndGetArticle', () => { beforeAll(() => loadFixtures(fixtures)); + beforeEach(() => { + mediaManager.insert.mockClear(); + }); describe('GetArticle', () => { it('should get the specified article & associated replies from ID', async () => { @@ -187,7 +193,7 @@ describe('GetReplyAndGetArticle', () => { ).toMatchSnapshot(); }); - it('relatedArticles should work', async () => { + it('relatedArticles should work for text articles', async () => { // No param // expect( @@ -259,6 +265,65 @@ describe('GetReplyAndGetArticle', () => { ).toMatchSnapshot('relatedArticle sorting test'); }); + it('realtedArticles should work for media articles', async () => { + mediaManager.query.mockImplementationOnce(async () => ({ + queryInfo: { + type: 'image', + id: fixtures['/articles/doc/mediaArticle'].attachmentHash, + }, + hits: [ + { + similarity: 1, + entry: { + id: fixtures['/articles/doc/mediaArticle'].attachmentHash, + }, + }, + { + // Simulate the case when Google drive has a media entry, + // but no article is in Elasticsearch has that attachmentHash + similarity: 0.9, + entry: { id: 'exist-on-google-drive-but-not-in-db' }, + }, + { + similarity: 0.75, + entry: { + id: fixtures['/articles/doc/similarMediaArticle'].attachmentHash, + }, + }, + ], + })); + + expect( + await gql` + { + GetArticle(id: "mediaArticle") { + relatedArticles { + edges { + cursor + node { + id + } + score + } + } + } + } + `() + ).toMatchSnapshot(); + + // Expect called exactly once with {id: ...} + // + expect(mediaManager.query.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "id": "hash-for-media-article", + }, + ], + ] + `); + }); + it('feedbacks should work', async () => { expect( await gql` diff --git a/src/graphql/queries/__tests__/__snapshots__/GetReplyAndGetArticle.js.snap b/src/graphql/queries/__tests__/__snapshots__/GetReplyAndGetArticle.js.snap index 480e4b24..c5ec5677 100644 --- a/src/graphql/queries/__tests__/__snapshots__/GetReplyAndGetArticle.js.snap +++ b/src/graphql/queries/__tests__/__snapshots__/GetReplyAndGetArticle.js.snap @@ -121,27 +121,68 @@ Object { } `; -exports[`GetReplyAndGetArticle GetArticle relatedArticles should work: relatedArticle filter test 1`] = ` +exports[`GetReplyAndGetArticle GetArticle realtedArticles should work for media articles 1`] = ` Object { "data": Object { "GetArticle": Object { "relatedArticles": Object { "edges": Array [ Object { - "cursor": "WzEuMzg5MjM0OCwiZm9vMyJd", + "cursor": "WzcuNSwic2ltaWxhck1lZGlhQXJ0aWNsZSJd", + "node": Object { + "id": "similarMediaArticle", + }, + "score": 7.5, + }, + Object { + "cursor": "WzAuNzQ0NTg4ODUsImZvbzMiXQ==", + "node": Object { + "id": "foo3", + }, + "score": 0.74458885, + }, + Object { + "cursor": "WzAuNzIzMzE0OTQsImZvbzIiXQ==", + "node": Object { + "id": "foo2", + }, + "score": 0.72331494, + }, + Object { + "cursor": "WzAuNjY2MjExMSwiZm9vIl0=", + "node": Object { + "id": "foo", + }, + "score": 0.6662111, + }, + ], + }, + }, + }, +} +`; + +exports[`GetReplyAndGetArticle GetArticle relatedArticles should work for text articles: relatedArticle filter test 1`] = ` +Object { + "data": Object { + "GetArticle": Object { + "relatedArticles": Object { + "edges": Array [ + Object { + "cursor": "WzEuMTg0OTAyMywiZm9vMyJd", "node": Object { "id": "foo3", "text": "Lorum ipsum Lorum ipsum Lorum ipsum", }, - "score": 1.3892348, + "score": 1.1849023, }, Object { - "cursor": "WzAuOTIxMDc0OCwiZm9vMiJd", + "cursor": "WzAuNzIzMzE0OTQsImZvbzIiXQ==", "node": Object { "id": "foo2", "text": "Lorum ipsum Lorum ipsum", }, - "score": 0.9210748, + "score": 0.72331494, }, ], }, @@ -150,14 +191,14 @@ Object { } `; -exports[`GetReplyAndGetArticle GetArticle relatedArticles should work: relatedArticle no-param test 1`] = ` +exports[`GetReplyAndGetArticle GetArticle relatedArticles should work for text articles: relatedArticle no-param test 1`] = ` Object { "data": Object { "GetArticle": Object { "relatedArticles": Object { "edges": Array [ Object { - "cursor": "WzEuMzg5MjM0OCwiZm9vMyJd", + "cursor": "WzEuMTg0OTAyMywiZm9vMyJd", "highlight": Object { "hyperlinks": Array [ Object { @@ -171,10 +212,10 @@ Object { "node": Object { "id": "foo3", }, - "score": 1.3892348, + "score": 1.1849023, }, Object { - "cursor": "WzAuOTIxMDc0OCwiZm9vMiJd", + "cursor": "WzAuNzIzMzE0OTQsImZvbzIiXQ==", "highlight": Object { "hyperlinks": Array [], "reference": null, @@ -183,7 +224,19 @@ Object { "node": Object { "id": "foo2", }, - "score": 0.9210748, + "score": 0.72331494, + }, + Object { + "cursor": "WzAuNjY2MjExMSwibWVkaWFBcnRpY2xlIl0=", + "highlight": Object { + "hyperlinks": Array [], + "reference": null, + "text": "Lorum ipsum", + }, + "node": Object { + "id": "mediaArticle", + }, + "score": 0.6662111, }, ], }, @@ -192,27 +245,35 @@ Object { } `; -exports[`GetReplyAndGetArticle GetArticle relatedArticles should work: relatedArticle sorting test 1`] = ` +exports[`GetReplyAndGetArticle GetArticle relatedArticles should work for text articles: relatedArticle sorting test 1`] = ` Object { "data": Object { "GetArticle": Object { "relatedArticles": Object { "edges": Array [ Object { - "cursor": "WzAuOTIxMDc0OCwiZm9vMiJd", + "cursor": "WzAuNjY2MjExMSwibWVkaWFBcnRpY2xlIl0=", + "node": Object { + "id": "mediaArticle", + "text": "Lorum ipsum", + }, + "score": 0.6662111, + }, + Object { + "cursor": "WzAuNzIzMzE0OTQsImZvbzIiXQ==", "node": Object { "id": "foo2", "text": "Lorum ipsum Lorum ipsum", }, - "score": 0.9210748, + "score": 0.72331494, }, Object { - "cursor": "WzEuMzg5MjM0OCwiZm9vMyJd", + "cursor": "WzEuMTg0OTAyMywiZm9vMyJd", "node": Object { "id": "foo3", "text": "Lorum ipsum Lorum ipsum Lorum ipsum", }, - "score": 1.3892348, + "score": 1.1849023, }, ], }, From af663d7e8dcf24a31cd2d0339087c6fa0b9fd92b Mon Sep 17 00:00:00 2001 From: MrOrz Date: Mon, 29 Aug 2022 01:55:56 +0800 Subject: [PATCH 2/2] Install media manager v0.3.0 --- package-lock.json | 779 ++++++++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 443 insertions(+), 338 deletions(-) diff --git a/package-lock.json b/package-lock.json index a4fd8bd4..ccb3b0c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@cofacts/media-manager": "^0.2.0", + "@cofacts/media-manager": "^0.3.0", "@elastic/elasticsearch": "^6.8.6", "@grpc/grpc-js": "^1.6.7", "@grpc/proto-loader": "^0.5.0", @@ -2114,9 +2114,9 @@ "license": "MIT" }, "node_modules/@cofacts/media-manager": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@cofacts/media-manager/-/media-manager-0.2.0.tgz", - "integrity": "sha512-hAH0iDOt8/m7USVen64ypJjUQmFSKoi/Pq6akR34Xk1rNh2oaNq3Ugo/DL7LZYYKKHXCncU+BYeoZsqRPoc+NQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@cofacts/media-manager/-/media-manager-0.3.0.tgz", + "integrity": "sha512-SAY5bEElxjNaBKA+c7EIrNB65r1PcoUS1PQkLBppkU3bxePJiHYK56ztQlBcVbv/WsWuJkjzHVIhaleBj26Jiw==", "dependencies": { "@google-cloud/storage": "^5.19.4", "content-type": "^1.0.4", @@ -2128,7 +2128,115 @@ "node": ">=16" } }, - "node_modules/@cofacts/media-manager/node_modules/@google-cloud/projectify": { + "node_modules/@cwasm/webp": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@cwasm/webp/-/webp-0.1.5.tgz", + "integrity": "sha512-ceIZQkyxK+s7mmItNcWqqHdOBiJAxYxTnrnPNgUNjldB1M9j+Bp/3eVIVwC8rUFyN/zoFwuT0331pyY3ackaNA==", + "dependencies": { + "@canvas/image-data": "^1.0.0" + } + }, + "node_modules/@elastic/elasticsearch": { + "version": "6.8.6", + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.1.1", + "decompress-response": "^4.2.0", + "into-stream": "^5.1.0", + "ms": "^2.1.1", + "once": "^1.4.0", + "pump": "^3.0.0", + "secure-json-parse": "^2.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@elastic/elasticsearch/node_modules/debug": { + "version": "4.1.1", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@eslint/eslintrc/node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/@google-cloud/paginator": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-3.0.7.tgz", + "integrity": "sha512-jJNutk0arIQhmpUUQJPJErsojqo834KcyB6X7a1mxuic8i1tKXxde8E69IZxNZawRIlZdIK2QY4WALvlK5MzYQ==", + "dependencies": { + "arrify": "^2.0.0", + "extend": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@google-cloud/projectify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.1.1.tgz", "integrity": "sha512-+rssMZHnlh0twl122gXY4/aCrk0G1acBqkHFfYddtsqpYXGxA29nj9V5V9SfC+GyOG00l650f6lG9KL+EpFEWQ==", @@ -2136,7 +2244,7 @@ "node": ">=10" } }, - "node_modules/@cofacts/media-manager/node_modules/@google-cloud/promisify": { + "node_modules/@google-cloud/promisify": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.4.tgz", "integrity": "sha512-j8yRSSqswWi1QqUGKVEKOG03Q7qOoZP6/h2zN2YO+F5h2+DHU0bSrHCK9Y7lo2DI9fBd8qGAw795sf+3Jva4yA==", @@ -2144,7 +2252,7 @@ "node": ">=10" } }, - "node_modules/@cofacts/media-manager/node_modules/@google-cloud/storage": { + "node_modules/@google-cloud/storage": { "version": "5.20.5", "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-5.20.5.tgz", "integrity": "sha512-lOs/dCyveVF8TkVFnFSF7IGd0CJrTm91qiK6JLu+Z8qiT+7Ag0RyVhxZIWkhiACqwABo7kSHDm8FdH8p2wxSSw==", @@ -2177,7 +2285,7 @@ "node": ">=10" } }, - "node_modules/@cofacts/media-manager/node_modules/agent-base": { + "node_modules/@google-cloud/storage/node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", @@ -2188,7 +2296,7 @@ "node": ">= 6.0.0" } }, - "node_modules/@cofacts/media-manager/node_modules/debug": { + "node_modules/@google-cloud/storage/node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", @@ -2204,7 +2312,7 @@ } } }, - "node_modules/@cofacts/media-manager/node_modules/gaxios": { + "node_modules/@google-cloud/storage/node_modules/gaxios": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.3.3.tgz", "integrity": "sha512-gSaYYIO1Y3wUtdfHmjDUZ8LWaxJQpiavzbF5Kq53akSzvmVg0RfyOcFDbO1KJ/KCGRFz2qG+lS81F0nkr7cRJA==", @@ -2219,7 +2327,7 @@ "node": ">=10" } }, - "node_modules/@cofacts/media-manager/node_modules/google-auth-library": { + "node_modules/@google-cloud/storage/node_modules/google-auth-library": { "version": "7.14.1", "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.14.1.tgz", "integrity": "sha512-5Rk7iLNDFhFeBYc3s8l1CqzbEBcdhwR193RlD4vSNFajIcINKI8W8P0JLmBpwymHqqWbX34pJDQu39cSy/6RsA==", @@ -2238,20 +2346,7 @@ "node": ">=10" } }, - "node_modules/@cofacts/media-manager/node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@cofacts/media-manager/node_modules/https-proxy-agent": { + "node_modules/@google-cloud/storage/node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", @@ -2263,7 +2358,7 @@ "node": ">= 6" } }, - "node_modules/@cofacts/media-manager/node_modules/is-stream": { + "node_modules/@google-cloud/storage/node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", @@ -2274,7 +2369,7 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@cofacts/media-manager/node_modules/lru-cache": { + "node_modules/@google-cloud/storage/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", @@ -2285,7 +2380,7 @@ "node": ">=10" } }, - "node_modules/@cofacts/media-manager/node_modules/p-limit": { + "node_modules/@google-cloud/storage/node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", @@ -2299,34 +2394,7 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@cofacts/media-manager/node_modules/retry-request": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.2.2.tgz", - "integrity": "sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg==", - "dependencies": { - "debug": "^4.1.1", - "extend": "^3.0.2" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/@cofacts/media-manager/node_modules/teeny-request": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.2.0.tgz", - "integrity": "sha512-SyY0pek1zWsi0LRVAALem+avzMLc33MKW/JLLakdP4s9+D7+jHcy5x6P+h94g2QNZsAqQNfX5lsbd3WSeJXrrw==", - "dependencies": { - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "stream-events": "^1.0.5", - "uuid": "^8.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@cofacts/media-manager/node_modules/uuid": { + "node_modules/@google-cloud/storage/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", @@ -2334,119 +2402,11 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/@cofacts/media-manager/node_modules/yallist": { + "node_modules/@google-cloud/storage/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "node_modules/@cwasm/webp": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@cwasm/webp/-/webp-0.1.5.tgz", - "integrity": "sha512-ceIZQkyxK+s7mmItNcWqqHdOBiJAxYxTnrnPNgUNjldB1M9j+Bp/3eVIVwC8rUFyN/zoFwuT0331pyY3ackaNA==", - "dependencies": { - "@canvas/image-data": "^1.0.0" - } - }, - "node_modules/@elastic/elasticsearch": { - "version": "6.8.6", - "license": "Apache-2.0", - "dependencies": { - "debug": "^4.1.1", - "decompress-response": "^4.2.0", - "into-stream": "^5.1.0", - "ms": "^2.1.1", - "once": "^1.4.0", - "pump": "^3.0.0", - "secure-json-parse": "^2.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@elastic/elasticsearch/node_modules/debug": { - "version": "4.1.1", - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@eslint/eslintrc/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/@google-cloud/paginator": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-3.0.7.tgz", - "integrity": "sha512-jJNutk0arIQhmpUUQJPJErsojqo834KcyB6X7a1mxuic8i1tKXxde8E69IZxNZawRIlZdIK2QY4WALvlK5MzYQ==", - "dependencies": { - "arrify": "^2.0.0", - "extend": "^3.0.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@grpc/grpc-js": { "version": "1.6.7", "license": "Apache-2.0", @@ -7565,9 +7525,9 @@ } }, "node_modules/file-type": { - "version": "16.5.3", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.3.tgz", - "integrity": "sha512-uVsl7iFhHSOY4bEONLlTK47iAHtNsFHWP5YE4xJfZ4rnX7S1Q3wce09XgqSC7E/xh8Ncv/be1lNoyprlUH/x6A==", + "version": "16.5.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz", + "integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==", "dependencies": { "readable-web-to-node-stream": "^3.0.0", "strtok3": "^6.2.4", @@ -14163,7 +14123,35 @@ "node": ">= 4" } }, - "node_modules/right-align": { + "node_modules/retry-request": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.2.2.tgz", + "integrity": "sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg==", + "dependencies": { + "debug": "^4.1.1", + "extend": "^3.0.2" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/retry-request/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/right-align": { "version": "0.1.3", "license": "MIT", "dependencies": { @@ -15534,6 +15522,81 @@ "node": ">= 6" } }, + "node_modules/teeny-request": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.2.0.tgz", + "integrity": "sha512-SyY0pek1zWsi0LRVAALem+avzMLc33MKW/JLLakdP4s9+D7+jHcy5x6P+h94g2QNZsAqQNfX5lsbd3WSeJXrrw==", + "dependencies": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "stream-events": "^1.0.5", + "uuid": "^8.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/teeny-request/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/teeny-request/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/teeny-request/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/teeny-request/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/teeny-request/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/terminal-link": { "version": "2.1.1", "dev": true, @@ -15677,9 +15740,9 @@ "license": "MIT" }, "node_modules/token-types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-4.2.0.tgz", - "integrity": "sha512-P0rrp4wUpefLncNamWIef62J0v0kQR/GfDVji9WKY7GDCWy5YbVSrKUTam07iWPZQGy0zWNOfstYTykMmPNR7w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-4.2.1.tgz", + "integrity": "sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==", "dependencies": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" @@ -18039,57 +18102,146 @@ } }, "@cofacts/media-manager": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@cofacts/media-manager/-/media-manager-0.2.0.tgz", - "integrity": "sha512-hAH0iDOt8/m7USVen64ypJjUQmFSKoi/Pq6akR34Xk1rNh2oaNq3Ugo/DL7LZYYKKHXCncU+BYeoZsqRPoc+NQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@cofacts/media-manager/-/media-manager-0.3.0.tgz", + "integrity": "sha512-SAY5bEElxjNaBKA+c7EIrNB65r1PcoUS1PQkLBppkU3bxePJiHYK56ztQlBcVbv/WsWuJkjzHVIhaleBj26Jiw==", "requires": { "@google-cloud/storage": "^5.19.4", "content-type": "^1.0.4", "image-hash": "^5.3.1", "node-fetch": "^2.6.7", "sharp": "^0.30.5" + } + }, + "@cwasm/webp": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@cwasm/webp/-/webp-0.1.5.tgz", + "integrity": "sha512-ceIZQkyxK+s7mmItNcWqqHdOBiJAxYxTnrnPNgUNjldB1M9j+Bp/3eVIVwC8rUFyN/zoFwuT0331pyY3ackaNA==", + "requires": { + "@canvas/image-data": "^1.0.0" + } + }, + "@elastic/elasticsearch": { + "version": "6.8.6", + "requires": { + "debug": "^4.1.1", + "decompress-response": "^4.2.0", + "into-stream": "^5.1.0", + "ms": "^2.1.1", + "once": "^1.4.0", + "pump": "^3.0.0", + "secure-json-parse": "^2.1.0" }, "dependencies": { - "@google-cloud/projectify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.1.1.tgz", - "integrity": "sha512-+rssMZHnlh0twl122gXY4/aCrk0G1acBqkHFfYddtsqpYXGxA29nj9V5V9SfC+GyOG00l650f6lG9KL+EpFEWQ==" - }, - "@google-cloud/promisify": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.4.tgz", - "integrity": "sha512-j8yRSSqswWi1QqUGKVEKOG03Q7qOoZP6/h2zN2YO+F5h2+DHU0bSrHCK9Y7lo2DI9fBd8qGAw795sf+3Jva4yA==" + "debug": { + "version": "4.1.1", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } }, - "@google-cloud/storage": { - "version": "5.20.5", - "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-5.20.5.tgz", - "integrity": "sha512-lOs/dCyveVF8TkVFnFSF7IGd0CJrTm91qiK6JLu+Z8qiT+7Ag0RyVhxZIWkhiACqwABo7kSHDm8FdH8p2wxSSw==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "requires": { - "@google-cloud/paginator": "^3.0.7", - "@google-cloud/projectify": "^2.0.0", - "@google-cloud/promisify": "^2.0.0", - "abort-controller": "^3.0.0", - "arrify": "^2.0.0", - "async-retry": "^1.3.3", - "compressible": "^2.0.12", - "configstore": "^5.0.0", - "duplexify": "^4.0.0", - "ent": "^2.2.0", - "extend": "^3.0.2", - "gaxios": "^4.0.0", - "google-auth-library": "^7.14.1", - "hash-stream-validation": "^0.2.2", - "mime": "^3.0.0", - "mime-types": "^2.0.8", - "p-limit": "^3.0.1", - "pumpify": "^2.0.0", - "retry-request": "^4.2.2", - "stream-events": "^1.0.4", - "teeny-request": "^7.1.3", - "uuid": "^8.0.0", - "xdg-basedir": "^4.0.0" + "ms": "2.1.2" } }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + } + } + }, + "@google-cloud/paginator": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-3.0.7.tgz", + "integrity": "sha512-jJNutk0arIQhmpUUQJPJErsojqo834KcyB6X7a1mxuic8i1tKXxde8E69IZxNZawRIlZdIK2QY4WALvlK5MzYQ==", + "requires": { + "arrify": "^2.0.0", + "extend": "^3.0.2" + } + }, + "@google-cloud/projectify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.1.1.tgz", + "integrity": "sha512-+rssMZHnlh0twl122gXY4/aCrk0G1acBqkHFfYddtsqpYXGxA29nj9V5V9SfC+GyOG00l650f6lG9KL+EpFEWQ==" + }, + "@google-cloud/promisify": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.4.tgz", + "integrity": "sha512-j8yRSSqswWi1QqUGKVEKOG03Q7qOoZP6/h2zN2YO+F5h2+DHU0bSrHCK9Y7lo2DI9fBd8qGAw795sf+3Jva4yA==" + }, + "@google-cloud/storage": { + "version": "5.20.5", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-5.20.5.tgz", + "integrity": "sha512-lOs/dCyveVF8TkVFnFSF7IGd0CJrTm91qiK6JLu+Z8qiT+7Ag0RyVhxZIWkhiACqwABo7kSHDm8FdH8p2wxSSw==", + "requires": { + "@google-cloud/paginator": "^3.0.7", + "@google-cloud/projectify": "^2.0.0", + "@google-cloud/promisify": "^2.0.0", + "abort-controller": "^3.0.0", + "arrify": "^2.0.0", + "async-retry": "^1.3.3", + "compressible": "^2.0.12", + "configstore": "^5.0.0", + "duplexify": "^4.0.0", + "ent": "^2.2.0", + "extend": "^3.0.2", + "gaxios": "^4.0.0", + "google-auth-library": "^7.14.1", + "hash-stream-validation": "^0.2.2", + "mime": "^3.0.0", + "mime-types": "^2.0.8", + "p-limit": "^3.0.1", + "pumpify": "^2.0.0", + "retry-request": "^4.2.2", + "stream-events": "^1.0.4", + "teeny-request": "^7.1.3", + "uuid": "^8.0.0", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -18134,16 +18286,6 @@ "lru-cache": "^6.0.0" } }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, "https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -18174,27 +18316,6 @@ "yocto-queue": "^0.1.0" } }, - "retry-request": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.2.2.tgz", - "integrity": "sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg==", - "requires": { - "debug": "^4.1.1", - "extend": "^3.0.2" - } - }, - "teeny-request": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.2.0.tgz", - "integrity": "sha512-SyY0pek1zWsi0LRVAALem+avzMLc33MKW/JLLakdP4s9+D7+jHcy5x6P+h94g2QNZsAqQNfX5lsbd3WSeJXrrw==", - "requires": { - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "stream-events": "^1.0.5", - "uuid": "^8.0.0" - } - }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -18207,95 +18328,6 @@ } } }, - "@cwasm/webp": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@cwasm/webp/-/webp-0.1.5.tgz", - "integrity": "sha512-ceIZQkyxK+s7mmItNcWqqHdOBiJAxYxTnrnPNgUNjldB1M9j+Bp/3eVIVwC8rUFyN/zoFwuT0331pyY3ackaNA==", - "requires": { - "@canvas/image-data": "^1.0.0" - } - }, - "@elastic/elasticsearch": { - "version": "6.8.6", - "requires": { - "debug": "^4.1.1", - "decompress-response": "^4.2.0", - "into-stream": "^5.1.0", - "ms": "^2.1.1", - "once": "^1.4.0", - "pump": "^3.0.0", - "secure-json-parse": "^2.1.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "@google-cloud/paginator": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-3.0.7.tgz", - "integrity": "sha512-jJNutk0arIQhmpUUQJPJErsojqo834KcyB6X7a1mxuic8i1tKXxde8E69IZxNZawRIlZdIK2QY4WALvlK5MzYQ==", - "requires": { - "arrify": "^2.0.0", - "extend": "^3.0.2" - } - }, "@grpc/grpc-js": { "version": "1.6.7", "requires": { @@ -21909,9 +21941,9 @@ } }, "file-type": { - "version": "16.5.3", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.3.tgz", - "integrity": "sha512-uVsl7iFhHSOY4bEONLlTK47iAHtNsFHWP5YE4xJfZ4rnX7S1Q3wce09XgqSC7E/xh8Ncv/be1lNoyprlUH/x6A==", + "version": "16.5.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.4.tgz", + "integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==", "requires": { "readable-web-to-node-stream": "^3.0.0", "strtok3": "^6.2.4", @@ -26342,6 +26374,25 @@ "retry": { "version": "0.13.1" }, + "retry-request": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.2.2.tgz", + "integrity": "sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg==", + "requires": { + "debug": "^4.1.1", + "extend": "^3.0.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + } + } + }, "right-align": { "version": "0.1.3", "requires": { @@ -27307,6 +27358,60 @@ } } }, + "teeny-request": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.2.0.tgz", + "integrity": "sha512-SyY0pek1zWsi0LRVAALem+avzMLc33MKW/JLLakdP4s9+D7+jHcy5x6P+h94g2QNZsAqQNfX5lsbd3WSeJXrrw==", + "requires": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "stream-events": "^1.0.5", + "uuid": "^8.0.0" + }, + "dependencies": { + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, "terminal-link": { "version": "2.1.1", "dev": true, @@ -27402,9 +27507,9 @@ "version": "0.0.1" }, "token-types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-4.2.0.tgz", - "integrity": "sha512-P0rrp4wUpefLncNamWIef62J0v0kQR/GfDVji9WKY7GDCWy5YbVSrKUTam07iWPZQGy0zWNOfstYTykMmPNR7w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-4.2.1.tgz", + "integrity": "sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==", "requires": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" diff --git a/package.json b/package.json index 0f16736c..18653059 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "rumors-db:test": "cd test/rumors-db && ELASTICSEARCH_URL=http://localhost:62223 npm t" }, "dependencies": { - "@cofacts/media-manager": "^0.2.0", + "@cofacts/media-manager": "^0.3.0", "@elastic/elasticsearch": "^6.8.6", "@grpc/grpc-js": "^1.6.7", "@grpc/proto-loader": "^0.5.0",