diff --git a/backend/src/jest/snapshots/embeds/pr960.html b/backend/src/jest/snapshots/embeds/pr960.html new file mode 100644 index 000000000..9b564f09a --- /dev/null +++ b/backend/src/jest/snapshots/embeds/pr960.html @@ -0,0 +1,10042 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Editor embeds merge in nitro embed by mattwr18 · Pull Request #960 · Human-Connection/Human-Connection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + + + +
+
+ +
    + + + + + +
  • + +
    + +
    + + + Unwatch + + +
    + Notifications +
    +
    + + + + + + + +
    +
    +
    + +
    +
  • + +
  • +
    +
    + + +
    +
    + + +
    + +
  • + +
  • +
    + + Fork + +
    + +

    Fork Human-Connection

    +
    +
    + +
    +

    If this dialog fails to load, you can visit the fork page directly.

    +
    +
    +
    +
    + + +
  • +
+ +

+ + /Human-Connection + + + + + + + + + +
+
+ + Select a Repo + + shift + + + z + + +
+
+
+
+ +
+
+ + +
+ Switch repository + + + + +
+ + +
+
+ +
+
+ + + +
+ Loading your repositories... +
+ + +
+
+
/Nitro +
+ + +

+ +
+ + + + +
+
+
+ + + +
+ + + + +
+ + +
+ +
+
+
+ + +
+ +

+ + Editor embeds merge in nitro embed + + #960 +

+
+ +
+
+ + + +
+
+
+ + + Open + + + +
+
+ + + wants to merge + 55 + commits into + + + + + +
+
+ + base: + master + + + + + + +
+
+ +
+ +from + + + + + +
+
+ + + +
+
+ + + + + + + +

Conversation

+
+ +
+ +
Pipelines
+ + + + + + + + +
+
+ +
+ + + + Projects + + +
+
+ Projects + +
+ +
+ +
+
+ +
+
+
+ + + + None yet + + +
+ +
Not inside a Release
+ + + +
+
+ +
+ 4 participants +
+ +
+
+ + + +
+
+ + + Lock conversation + + +
+
+ +

+ Lock conversation on this pull request +

+
+
+
    +
  • Other users can’t add new comments to this pull request.
  • +
  • + You and other members of teams with + write access + to this repository can still leave comments that others can see. +
  • +
  • You can always unlock this pull request again in the future.
  • +
+ +
+
+ +
+
+ +

+ Optionally, choose a reason for locking that others can see. Learn more about when + it’s appropriate to lock conversations. +

+
+
+
+ +
+
+
+ + + + + + +
+ +
+ +
+
+ + +
+ Move issue to another repository + + + + + +
+ + + + +
+
+ +
+
+ + +
+
+ Loading your repositories... +
+
+
+
+
+
+ + + +
+
+ + +
+ +
+
+ + +
+ + + +
+ @mattwr18 + +
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+

+ Pick your reaction +

+ + + +
+ + + + + + + + + + +
+
+ +
+ + + + +
+ + + + + + Copy link + + + + + + + + + + + + Report abuse + + + +
+ +
+ + + + + Member + + + + + + +

+ + + + + commented + + + 18 days ago + + + + +

+
+ + +
+ + + + + + + + + +
+

cake Pullrequest

+ +

Issues

+ + +
+
+ + + + +
+
+ +
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+ +
Editor embeds merge in nitro embed hasno dependencies
+ + + + +
+ + + + +
+ + +
+

+ + + + + appinteractive + and others + added some commits + + on Dec 27, 2018 + +

+
+
+ + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + cc06d53 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + +
+ + Create README.md + + + +
+ +
+ + + +
+ +
+
+ +
+ + 3b49e9f + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + 18bfc85 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + f44121b + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + 32fad61 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + f8f0ff3 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + 8e71c27 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + +
+ + Improved readme + + + +
+ +
+ + + +
+ +
+
+ +
+ + 053cc86 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + 9ddf89d + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + +
+ + Upgraded screenshot + + + +
+ +
+ + + +
+ +
+
+ +
+ + c310644 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + 296fc5a + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-bot +
+
+ + + +
+ + Bump got from 9.5.0 to 9.6.0 + + + + + +
Bumps [got](https://github.com/sindresorhus/got) from 9.5.0 to 9.6.0.
+- [Release notes](https://github.com/sindresorhus/got/releases)
+- [Commits](sindresorhus/got@v9.5.0...v9.6.0)
+
+Signed-off-by: dependabot[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + 6461a43 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-bot +
+
+ + + +
+ + Bump metascraper from 4.8.5 to 4.10.3 + + + + + +
Bumps [metascraper](https://github.com/microlinkhq/metascraper) from 4.8.5 to 4.10.3.
+- [Release notes](https://github.com/microlinkhq/metascraper/releases)
+- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
+- [Commits](microlinkhq/metascraper@v4.8.5...v4.10.3)
+
+Signed-off-by: dependabot[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + f228eb3 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @appinteractive +
+
+ + + +
+ + Update README.md + + + +
+ +
+ + + +
+ +
+
+ +
+ + d3624ab + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + +
+ + Bump metascraper-description from 4.8.5 to 5.5.0 + + + + + +
Bumps [metascraper-description](https://github.com/microlinkhq/metascraper) from 4.8.5 to 5.5.0.
+- [Release notes](https://github.com/microlinkhq/metascraper/releases)
+- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
+- [Commits](microlinkhq/metascraper@v4.8.5...v5.5.0)
+
+Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + 2a81c5b + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #7 from Human-Connection/dependabot/npm_and_yarn/g… + + + + + +
…ot-9.6.0
+
+Bump got from 9.5.0 to 9.6.0
+ +
+ +
+ + + +
+ +
+
+ +
+ + 2e66ee4 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #17 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…metascraper-4.10.3
+
+Bump metascraper from 4.8.5 to 4.10.3
+ +
+ +
+ + + +
+ +
+
+ +
+ + b7e7f22 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + +
+ + Bump metascraper-clearbit-logo from 4.8.5 to 5.3.0 + + + + + +
Bumps [metascraper-clearbit-logo](https://github.com/microlinkhq/metascraper-clearbit-logo) from 4.8.5 to 5.3.0.
+- [Release notes](https://github.com/microlinkhq/metascraper-clearbit-logo/releases)
+- [Commits](https://github.com/microlinkhq/metascraper-clearbit-logo/commits)
+
+Signed-off-by: dependabot[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + 4ceff96 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + +
+ + Bump metascraper-video from 4.8.5 to 5.5.0 + + + + + +
Bumps [metascraper-video](https://github.com/microlinkhq/metascraper) from 4.8.5 to 5.5.0.
+- [Release notes](https://github.com/microlinkhq/metascraper/releases)
+- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
+- [Commits](microlinkhq/metascraper@v4.8.5...v5.5.0)
+
+Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + 69b1a25 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + +
+ + Bump metascraper-logo from 4.8.5 to 5.5.0 + + + + + +
Bumps [metascraper-logo](https://github.com/microlinkhq/metascraper) from 4.8.5 to 5.5.0.
+- [Release notes](https://github.com/microlinkhq/metascraper/releases)
+- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
+- [Commits](microlinkhq/metascraper@v4.8.5...v5.5.0)
+
+Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + b7ef87e + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + +
+ + Bump metascraper-audio from 4.8.5 to 5.5.0 + + + + + +
Bumps [metascraper-audio](https://github.com/microlinkhq/metascraper) from 4.8.5 to 5.5.0.
+- [Release notes](https://github.com/microlinkhq/metascraper/releases)
+- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
+- [Commits](microlinkhq/metascraper@v4.8.5...v5.5.0)
+
+Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + 82dcc99 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + + + +
+ + + +
+ +
+
+ +
+ + af8ed1c + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + +
+ + Bump metascraper-description from 4.8.5 to 5.5.0 + + + + + +
Bumps [metascraper-description](https://github.com/microlinkhq/metascraper) from 4.8.5 to 5.5.0.
+- [Release notes](https://github.com/microlinkhq/metascraper/releases)
+- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
+- [Commits](microlinkhq/metascraper@v4.8.5...v5.5.0)
+
+Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + d1efdad + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + +
+ + Bump metascraper-url from 4.8.5 to 5.5.0 + + + + + +
Bumps [metascraper-url](https://github.com/microlinkhq/metascraper) from 4.8.5 to 5.5.0.
+- [Release notes](https://github.com/microlinkhq/metascraper/releases)
+- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
+- [Commits](microlinkhq/metascraper@v4.8.5...v5.5.0)
+
+Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + b8725f1 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge branch 'master' of github.com:Human-Connection/Nitro-Embed into… + + + + + +
… dependabot/npm_and_yarn/metascraper-description-5.5.0
+ +
+ +
+ + +
+ +
+
+ +
+ + 05db6fe + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge branch 'dependabot/npm_and_yarn/metascraper-description-5.5.0' … + + + + + +
…of github.com:Human-Connection/Nitro-Embed into dependabot/npm_and_yarn/metascraper-description-5.5.0
+ +
+ +
+ + +
+ +
+
+ +
+ + bc9c21c + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #67 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…metascraper-description-5.5.0
+
+Bump metascraper-description from 4.8.5 to 5.5.0
+ +
+ +
+ + + +
+ +
+
+ +
+ + d633331 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #25 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…metascraper-clearbit-logo-5.3.0
+
+Bump metascraper-clearbit-logo from 4.8.5 to 5.3.0
+ +
+ +
+ + + +
+ +
+
+ +
+ + acfc956 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #69 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…metascraper-logo-5.5.0
+
+Bump metascraper-logo from 4.8.5 to 5.5.0
+ +
+ +
+ + + +
+ +
+
+ +
+ + a22edd9 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #71 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…metascraper-audio-5.5.0
+
+Bump metascraper-audio from 4.8.5 to 5.5.0
+ +
+ +
+ + + +
+ +
+
+ +
+ + 0e89f27 + +
+
+ + +
+
+
+ + +
+ + + + + +
+ + +
+

+ + + + + mattwr18 + and others + added some commits + + 19 days ago + +

+
+
+ + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #72 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…metascraper-video-5.5.0
+
+Bump metascraper-video from 4.8.5 to 5.5.0
+ +
+ +
+ + + +
+ +
+
+ +
+ + 46edb24 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @dependabot-preview +
+
+ + + +
+ + Bump metascraper-soundcloud from 4.8.5 to 5.5.3 + + + + + +
Bumps [metascraper-soundcloud](https://github.com/microlinkhq/metascraper-soundcloud) from 4.8.5 to 5.5.3.
+- [Release notes](https://github.com/microlinkhq/metascraper-soundcloud/releases)
+- [Commits](https://github.com/microlinkhq/metascraper-soundcloud/commits)
+
+Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
+ +
+ +
+ + + +
+ +
+
+ +
+ + 721c75e + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge branch 'master' of github.com:Human-Connection/Nitro-Embed into… + + + + + +
… dependabot/npm_and_yarn/metascraper-url-5.5.0
+ +
+ +
+ + +
+ +
+
+ +
+ + 93e82de + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #73 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…metascraper-url-5.5.0
+
+Bump metascraper-url from 4.8.5 to 5.5.0
+ +
+ +
+ + + +
+ +
+
+ +
+ + 27eb5a2 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #75 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…apollo-server-2.6.7
+
+Bump apollo-server from 2.3.1 to 2.6.7
+ +
+ +
+ + + +
+ +
+
+ +
+ + 638f1f3 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge pull request #76 from Human-Connection/dependabot/npm_and_yarn/… + + + + + +
…metascraper-soundcloud-5.5.3
+
+Bump metascraper-soundcloud from 4.8.5 to 5.5.3
+ +
+ +
+ + + +
+ +
+
+ +
+ + 5091fe5 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + + + +
+ + +
+ +
+
+ +
+ + 089b07c + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + + + +
+ + +
+ +
+
+ +
+ + cc6819e + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + + + +
+ + +
+ +
+
+ +
+ + 7a3694a + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + +
+ + Merge in Nitro-Embed + + + +
+ +
+ + +
+ +
+ +
+ + + + +
+ + +
+ +
+ + eabb58e + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @mattwr18 +
+
+ + + + + +
+ + +
+ +
+ +
+ + + + +
+ + +
+ +
+ + ed658e9 + +
+
+ + +
+
+
+ + +
+ + + +
+ + +
+ + + +
+ @codecov + +
+ + + +
+
+ + + + +
+ +
+

+ This comment has been minimized. + +

+
Show comment
+
Hide comment
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
+ + + + + + Copy link + + + + + + + + +
+ + +
+
+ + +
+ + + + Report abuse + +
+ Block user + + + +
+ + + +
+
+ +
+ @codecov +
+

+ + + + codecov + bot + + + + 18 days ago + +

+ + + + +
+

Codecov Report

+
+

exclamation No coverage uploaded for pull request base (master@324330a). Click here to learn what that means.
+The diff coverage is n/a.

+
+
+
+
+
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+

+ Pick your reaction +

+ + + +
+ + + + + + + + + + +
+
+ +
+ + + + +
+ + + + + + Copy link + + + + + + +
+ + + Reference in new issue + + +
+ +

Reference in new issue

+
+ +
+ +
+
+
+
+
+ + + Human-Connection + + +
+ Repositories +
+
+
+ + + +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+ + + + + + + +
+ + +
+ + + + Report abuse + +
+ Block user + + + +
+ + + +
+
+ +
+ + + + + + + + +

+ + + + + commented + + + 18 days ago + + + + +

+
+ + +
+
+ + +
+ +

Choose a reason for hiding this comment

+

The reason will be displayed to describe this comment to others. Learn more.

+
+ + + +
+ +
+ + + + + + + + + +
+

Codecov Report

+
+

exclamation No coverage uploaded for pull request base (master@324330a). Click here to learn what that means.
+The diff coverage is n/a.

+
+
+
+ + + + +
+
+ +
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+ + +
+ + +
+ + + + +
+ +
+

+ + + + @mattwr18 + mattwr18 + + + referenced this pull request + + 16 days ago + +

+ + + + + Closed + + + + + + +

+ + Editor embeds + #953 +

+ + + + + + + +
+ + + +
+ + + +
+ + +
+ + + +
+ @mattwr18 + +
+ + + +
+
+ + + + +
+ +
+

+ This comment has been minimized. + +

+
Show comment
+
Hide comment
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
+ + + + + + Copy link + + + + + + + + +
+ + +
+
+ + +
+ + + + Report abuse + + +
+
+ +
+ @mattwr18 +
+

+ + + + mattwr18 + + + + + 9 days ago + +

+ + + Member + + + + Author + + + +
+

does this look ok @roschaefer? I used tomono, but because I already had a repo with the name Human-Connection, I needed to remove it and recreate it with the merged commit history. This caused some small issues for me locally, but I think others won't face the same.

+

The files changed and commit history look good to me

+
+
+
+
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+

+ Pick your reaction +

+ + + +
+ + + + + + + + + + +
+
+ +
+ + + + +
+ + + + + + Copy link + + + + + + +
+ + + Reference in new issue + + +
+ +

Reference in new issue

+
+ +
+ +
+
+
+
+
+ + + Human-Connection + + +
+ Repositories +
+
+
+ + + +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+ + + + + + + +
+ + +
+ + + + Report abuse + + +
+
+ +
+ + + + + Member + + + + + Author + + + + +

+ + + + + commented + + + 9 days ago + + + + +

+
+ + +
+
+ + +
+ +

Choose a reason for hiding this comment

+

The reason will be displayed to describe this comment to others. Learn more.

+
+ + + +
+ +
+ + + + + + + + + +
+

does this look ok @roschaefer? I used tomono, but because I already had a repo with the name Human-Connection, I needed to remove it and recreate it with the merged commit history. This caused some small issues for me locally, but I think others won't face the same.

+

The files changed and commit history look good to me

+
+
+ + + + +
+
+ +
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+ + +
+ + +
+ + + + +
+ + +
+
+
+ + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + +
+ + Merge remote-tracking branch 'origin/master' into 256-editor-embeds-m… + + + + + +
…erge-in-nitro-embed
+ +
+ +
+ + +
+ +
+
+ +
+ + b745908 + +
+
+ + +
+
+
+ + +
+ + + +
+ + +
+ + + +
+ @roschaefer + +
+ + + +
+
+ + + + +
+ +
+

+ This comment has been minimized. + +

+
Show comment
+
Hide comment
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
+ + + + + + Copy link + + + + + + + + +
+ + +
+
+ + +
+ +
+
+ +
+ @roschaefer +
+

+ + + + roschaefer + + + + + 5 days ago + +

+ + + Member + + + + +
+

@mattwr18 this looks good, but could sb. explain me why this is a separate service and not just another resolver in our backend?

+

@appinteractive maybe?

+
+
+
+
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+

+ Pick your reaction +

+ + + +
+ + + + + + + + + + +
+
+ +
+ + + + +
+ + + + + + Copy link + + + + + + +
+ + + Reference in new issue + + +
+ +

Reference in new issue

+
+ +
+ +
+
+
+
+
+ + + Human-Connection + + +
+ Repositories +
+
+
+ + + +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+ + + + + + + +
+ + +
+ +
+
+ +
+ + + + + Member + + + + + + +

+ + + + + commented + + + 5 days ago + + + + +

+
+ + +
+
+ + +
+ +

Choose a reason for hiding this comment

+

The reason will be displayed to describe this comment to others. Learn more.

+
+ + + +
+ +
+ + + + + + + + + +
+

@mattwr18 this looks good, but could sb. explain me why this is a separate service and not just another resolver in our backend?

+

@appinteractive maybe?

+
+
+ + + + +
+
+ +
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+ + +
+ + +
+ + + + +
+ + +
+ + + +
+ @mattwr18 + +
+ + + +
+
+ + + + +
+ +
+

+ This comment has been minimized. + +

+
Show comment
+
Hide comment
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
+ + + + + + Copy link + + + + + + + + +
+ + +
+
+ + +
+ + + + Report abuse + + +
+
+ +
+ @mattwr18 +
+

+ + + + mattwr18 + + + + + 5 days ago + +

+ + + Member + + + + Author + + + +
+

I think it could be, I thought the same thing myself @roschaefer

+
+
+
+
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+

+ Pick your reaction +

+ + + +
+ + + + + + + + + + +
+
+ +
+ + + + +
+ + + + + + Copy link + + + + + + +
+ + + Reference in new issue + + +
+ +

Reference in new issue

+
+ +
+ +
+
+
+
+
+ + + Human-Connection + + +
+ Repositories +
+
+
+ + + +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+ + + + + + + +
+ + +
+ + + + Report abuse + + +
+
+ +
+ + + + + Member + + + + + Author + + + + +

+ + + + + commented + + + 5 days ago + + + + +

+
+ + +
+
+ + +
+ +

Choose a reason for hiding this comment

+

The reason will be displayed to describe this comment to others. Learn more.

+
+ + + +
+ +
+ + + + + + + + + +
+

I think it could be, I thought the same thing myself @roschaefer

+
+
+ + + + +
+
+ +
+ +
+
+ +
+ + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + +

+ The content you are editing has changed. Please try again. +

+ + +
+ + + + + + + + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+ + +
+
+
+

Nothing to preview

+
+
+ +
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+ + +
+ + +
+ + + + +
+ + +
+

+ + + + + roschaefer + + added some commits + + 2 days ago + +

+
+
+ + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + +
+ + Merge remote-tracking branch 'origin/master' into 256-editor-embeds-m… + + + + + +
…erge-in-nitro-embed
+ +
+ +
+ + +
+ +
+
+ +
+ + b3712d9 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + + + +
+ + +
+ +
+
+ +
+ + d4c3b7a + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + + + +
+ + +
+ +
+
+ +
+ + 2e6ea62 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + + + +
+ + +
+ +
+ +
+ + + + +
+ + +
+ +
+ + f82b2c3 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + + + +
+ + +
+ +
+ +
+ + + + +
+ + +
+ +
+ + 17ccbce + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + +
+ + Fix lint + + + +
+ +
+ + +
+ +
+ +
+ + + + +
+ + +
+ +
+ + 73e879e + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + +
+ + Merge branch 'master' of github.com:Human-Connection/Human-Connection… + + + + + +
… into 256-editor-embeds-merge-in-nitro-embed
+ +
+ +
+ + +
+ +
+
+ +
+ + 7a9d933 + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + +
+ + Remove obscure `embed` attribute and remove cache + + + + + +
The cache is a possible memory leak: It grows over time and never gets
+cleaned.
+ +
+ +
+ + +
+ +
+
+ +
+ + d81c38c + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + +
+ + Start to mock+test embeds resolver + + + + + +
+ Put oembed providers into a file
++ Add test snapshots
++ Remove unnecessary request-native dependency
+ +
+ +
+ + +
+ +
+
+ +
+ + f5730fc + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + + + +
+ + +
+ +
+
+ +
+ + 579ec7e + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + +
+ + Add npm script to run tests without http servers + + + + + +
Remove this script once we refactored all tests to use
+`apollo-server-testing`.
+ +
+ +
+ + +
+ +
+
+ +
+ + d7d2c2e + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + + + +
+ + +
+ +
+ +
+ + + + +
+ + +
+ +
+ + 75743ca + +
+
+ + + + +
+ +
+ +
+ + +
+
+ + @roschaefer +
+
+ + + +
+ + Remove `metascraper-logo-favicon` altogether + + + + + +
It's doing http requests which are hard to test and hard to maintain.
+Therefore let's remove it until we really need it.
+ +
+ +
+ + +
+ +
+ +
+ + + + +
+ + +
+ +
+ + 3d7a30d + +
+
+ + +
+
+
+ + +
+ + + + + +
+
+ +
+ + +
+ +
+ + + +
+ +

Merge state

+
+

Add more commits by pushing to the 256-editor-embeds-merge-in-nitro-embed branch on Human-Connection/Human-Connection.

+ + + + + + +
+ + + +
+
+ +
+
+ +
+ + + Add your review + + +

+ Review required +

+ + + At least 1 approving review is required by reviewers with write access. + Learn more. + + + +
+ + +
+
+ +
+ +
+ + +

All checks have passed

+ 4 successful checks +
+ +
+
+
+ +
+ + + @travis-ci + + + +
+ + Travis CI - Branch + + + Successful in 18m + + — + Build Passed +
+ +
+ Required + + Details +
+ +
+
+
+ +
+ + + @travis-ci + + + +
+ + Travis CI - Pull Request + + + Successful in 17m + + — + Build Passed +
+ +
+ Required + + Details +
+ +
+
+
+ +
+ + + @codecov + + + +
+ + codecov/project/backend + + + + + — + 25.29% (+1.97%) compared to d901432 +
+ +
+ + Details +
+ +
+
+
+ +
+ + + @codecov + + + +
+ + codecov/project/webapp + + + + + — + 45.23% remains the same compared to d901432 +
+ +
+ + Details +
+ +
+ +
+
+ + +
+
+ +
+
Merging is blocked
+ Merging can be performed automatically with 1 approving review. +
+ + + +
+ + +
+
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+
+ +
+
+
+ + +

+ + + + or view . +

+ + +
+

Merging via command line

+

+ If you do not want to use the merge button or an automatic merge cannot be + performed, you can perform a manual merge on the command line. +

+ +
+
+
+ +
+ +
+ + + + + + + + +
+
+ +

Step 1: From your project repository, bring in the changes and test.

+
+
+ + + +
+
git fetch origin
+git checkout -b 256-editor-embeds-merge-in-nitro-embed origin/256-editor-embeds-merge-in-nitro-embed
+git merge master
+
+ +

Step 2: Merge the changes and update on GitHub.

+
+
+ + + +
+
git checkout master
+git merge --no-ff 256-editor-embeds-merge-in-nitro-embed
+git push origin master
+
+
+ +
+
+
+
+ + + + +
+ + + + + +
+ + + +
+ +

Couldn’t update branch

+

Oops, something went wrong.

+ +
+
+ +

Connect this pull request with an existing issue

+ +
+ @roschaefer + +
+ + + + +
+ +
+
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ + + + + +
+ Select a reply + ctrl . +
+ + + +
+
+ +
+ +
+ +
+ + + + + +
+ + + + + + + +

+ + + + + Attach files by dragging & dropping, selecting or pasting them. + + + Uploading your files… + + + We don’t support that file type. + + with a + GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Attaching documents requires write permission to this repository. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + We don’t support that file type. + + with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. + + + + Yowza, that’s a big file + + with a file smaller than 10MB. + + + + This file is empty. + + with a file that’s not empty. + + + + This file is hidden. + + with another file. + + + + Something went really wrong, and we can’t process that file. + + + + + + + + + + +

+ +
+
+
+ + + +
+
+

Nothing to preview

+
+
+ +
+ + + + +
+ +
+
+ + + + + + +
+ +
+
+
+
+ + ProTip! + Add .patch or .diff to the end of URLs for Git’s plaintext views. +
+
+ + +
+
+ +
+
+ + + +
+ + +
+ +
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + +
\ No newline at end of file diff --git a/backend/src/middleware/index.js b/backend/src/middleware/index.js index 19c72c19f..a0b36f9ea 100644 --- a/backend/src/middleware/index.js +++ b/backend/src/middleware/index.js @@ -52,10 +52,10 @@ export default schema => { if (CONFIG.DISABLED_MIDDLEWARES) { const disabledMiddlewares = CONFIG.DISABLED_MIDDLEWARES.split(',') order = order.filter(key => { + if(disabledMiddlewares.includes(key)) console.log(`Warning: Disabled "${disabledMiddlewares}" middleware.`) return !disabledMiddlewares.includes(key) }) /* eslint-disable-next-line no-console */ - console.log(`Warning: "${disabledMiddlewares}" middlewares have been disabled.`) } const appliedMiddlewares = order.map(key => middlewares[key]) diff --git a/backend/src/schema/resolvers/embeds.spec.js b/backend/src/schema/resolvers/embeds.spec.js index 6414fbd8f..5cc382dc4 100644 --- a/backend/src/schema/resolvers/embeds.spec.js +++ b/backend/src/schema/resolvers/embeds.spec.js @@ -1,15 +1,19 @@ import fetch from 'node-fetch' - import fs from 'fs' import path from 'path' import { createTestClient } from 'apollo-server-testing' import createServer from '../../server' import { gql } from '../../jest/helpers' + jest.mock('node-fetch') const { Response } = jest.requireActual('node-fetch') let variables = {} +const pr960 = fs.readFileSync( + path.join(__dirname, '../../jest/snapshots/embeds/pr960.html'), + 'utf8', +) const babyLovesCat = fs.readFileSync( path.join(__dirname, '../../jest/snapshots/embeds/babyLovesCat.html'), 'utf8', @@ -67,6 +71,39 @@ describe('Query', () => { } }) + describe('given a Github link', () => { + beforeEach(() => { + fetch + .mockReturnValueOnce(Promise.resolve(new Response(pr960))) + variables = { url: "https://github.com/Human-Connection/Human-Connection/pull/960" } + }) + + it('returns meta data even if no embed html can be retrieved', async () => { + const expected = expect.objectContaining({ + data: { + embed: { + "type": "link", + "title": "Editor embeds merge in nitro embed by mattwr18 · Pull Request #960 · Human-Connection/Human-Connection", + "author": "Human-Connection", + "publisher": "GitHub", + "date": "2019-07-21T00:56:00.000Z", + "description": "🍰 Pullrequest Issues fixes #256", + "url": "https://github.com/Human-Connection/Human-Connection/pull/960", + "image": "https://repository-images.githubusercontent.com/112590397/52c9a000-7e11-11e9-899d-aaa55f3a3d72", + "audio": null, + "video": null, + "lang": "en", + "sources": [ + "resource" + ], + "html": null + }, + }, + }) + await expect(embedAction(variables)).resolves.toEqual(expected) + }) + }) + describe('given a youtube link', () => { beforeEach(() => { fetch @@ -75,7 +112,7 @@ describe('Query', () => { variables = { url: 'https://www.youtube.com/watch?v=qkdXAtO40Fo&t=18s' } }) - it('returns meta data', async () => { + it('returns meta data plus youtube iframe html', async () => { const expected = expect.objectContaining({ data: { embed: { diff --git a/backend/src/schema/resolvers/embeds/scraper.js b/backend/src/schema/resolvers/embeds/scraper.js index 11a70e362..a35fa7e9c 100644 --- a/backend/src/schema/resolvers/embeds/scraper.js +++ b/backend/src/schema/resolvers/embeds/scraper.js @@ -49,26 +49,23 @@ const fetchEmbed = async url => { endpointUrl.searchParams.append('format', 'json') const response = await fetch(endpointUrl) const json = await response.json() - const { - type = 'link', - html, - author_name, // eslint-disable-line camelcase - upload_date, // eslint-disable-line camelcase - sources = ['oembed'], - } = json - - return { type, html, author: author_name, date: upload_date, sources } -} - -const fetchMeta = async url => { - const response = await fetch(url) - const html = await response.text() - const metadata = await metascraper({ html, url }) return { - type: 'link', + type: json.type, + html: json.html, + author: json.author_name, + date: json.upload_date, + sources: ['oembed'], + } +} + +const fetchResource = async url => { + const response = await fetch(url) + const html = await response.text() + const resource = await metascraper({ html, url }) + return { sources: ['resource'], - ...metadata, + ...resource } } @@ -79,8 +76,7 @@ export default async function scrape(url) { url.hostname = 'youtube.com' } - const [meta, embed] = await Promise.all([fetchMeta(url), fetchEmbed(url)]) - + const [meta, embed] = await Promise.all([fetchResource(url), fetchEmbed(url)]) const output = mergeWith(meta, embed, (objValue, srcValue) => { if (isArray(objValue)) { return objValue.concat(srcValue) @@ -91,5 +87,23 @@ export default async function scrape(url) { throw new ApolloError('Not found', 'NOT_FOUND') } - return output + const defaults = { + type: 'link', + title: null, + author: null, + publisher: null, + date: null, + description: null, + url: null, + image: null, + audio: null, + video: null, + lang: null, + html: null, + } + + return { + ...defaults, + ...output + } }