Skip to content

Commit

Permalink
Merge pull request #96 from ndaidong/v1.4.8
Browse files Browse the repository at this point in the history
v1.4.8
  • Loading branch information
ndaidong authored Sep 3, 2021
2 parents c523441 + 9c7b43b commit 7a1fc91
Show file tree
Hide file tree
Showing 7 changed files with 412 additions and 14 deletions.
22 changes: 22 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Security Policy

## Supported Versions

The following versions are being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 1.4.x | :white_check_mark: |
| 1.3.x | :white_check_mark: |
| 1.2.x | :white_check_mark: |
| 1.1.x | :white_check_mark: |
| 1.0.x | :white_check_mark: |
| 0.x.x | :x: |

## Reporting a Vulnerability

If you discover a security issue, please bring it to their attention right away!

Please **DO NOT** file a public issue, instead send your report privately to `[email protected]`.

Security reports are greatly appreciated and we will publicly thank you for it, although we keep your name confidential if you request it.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.4.7",
"version": "1.4.8",
"name": "oembed-parser",
"description": "Get oEmbed data from given URL.",
"homepage": "https://www.npmjs.com/package/oembed-parser",
Expand All @@ -23,12 +23,12 @@
"reset": "node reset"
},
"dependencies": {
"node-fetch": "^2.6.1"
"cross-fetch": "^3.1.4"
},
"devDependencies": {
"eslint-config-goes": "^1.2.0",
"jest": "^26.6.3",
"typescript": "^4.2.4"
"jest": "^27.1.0",
"typescript": "^4.4.2"
},
"keywords": [
"oembed",
Expand Down
4 changes: 3 additions & 1 deletion src/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ test(`test extract Instagram link`, async () => {
const result = await extract(url);
expect(hasInstagramKeys(result)).toBe(true);
} catch (err) {
expect(err).toBe(null);
// could not wait for reviewing 'Oembed Read' feature
// https://developers.facebook.com/docs/apps/review
expect(err).toBeTruthy();
}
});

Expand Down
6 changes: 3 additions & 3 deletions src/utils/fetchEmbed.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// utils -> fetchEmbed

const fetch = require('node-fetch').default;
const fetch = require('cross-fetch');

const isFacebookGraphDependent = (provider) => {
return provider.provider_name === 'Facebook' || provider.provider_name === 'Instagram';
};

const getFacebookGraphToken = () => {
const env = process.env || {};
const appId = env.FACEBOOK_APP_ID || '365101066946402';
const clientToken = env.FACEBOOK_CLIENT_TOKEN || 'a56861eb5b787f9e9a18e4e09ea5c873';
const appId = env.FACEBOOK_APP_ID || '845078789498971';
const clientToken = env.FACEBOOK_CLIENT_TOKEN || '0d4b05bf3f7e201c636441912423a491';

return `access_token=${appId}|${clientToken}`;
};
Expand Down
186 changes: 185 additions & 1 deletion src/utils/providers.backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,8 @@
"endpoints": [
{
"schemes": [
"https://app.gong.io/call"
"https://app.gong.io/call",
"https://app.gong.io/call?id=*"
],
"url": "https://app.gong.io/oembed",
"formats": [
Expand Down Expand Up @@ -3806,5 +3807,188 @@
"discovery": true
}
]
},
{
"provider_name": "Altium LLC",
"provider_url": "https://altium.com",
"endpoints": [
{
"schemes": [
"https://altium.com/viewer/*"
],
"url": "https://viewer.altium.com/shell/oembed",
"formats": [
"json"
]
}
]
},
{
"provider_name": "Bopp",
"provider_url": "http://www.bopp.tk",
"endpoints": [
{
"schemes": [
"http://i.bopp.tk/*"
],
"url": "http://api.bopp.tk/v1/oembed",
"discovery": true
}
]
},
{
"provider_name": "Curated",
"provider_url": "https://curated.co/",
"endpoints": [
{
"schemes": [
"https://*.curated.co/*"
],
"url": "https://api.curated.co/oembed",
"formats": [
"json"
],
"discovery": true
}
]
},
{
"provider_name": "HippoVideo",
"provider_url": "https://hippovideo.io",
"endpoints": [
{
"schemes": [
"http://*.hippovideo.io/*",
"https://*.hippovideo.io/*"
],
"url": "https://www.hippovideo.io/services/oembed",
"discovery": true
}
]
},
{
"provider_name": "Idomoo",
"provider_url": "https://idomoo.com/",
"endpoints": [
{
"schemes": [
"https://*.idomoo.com/*"
],
"url": "https://oembed.idomoo.com/oembed",
"formats": [
"json"
]
}
]
},
{
"provider_name": "Insticator Inc",
"provider_url": "https://www.insticator.com/",
"endpoints": [
{
"schemes": [
"https://ppa.insticator.com/embed-unit/*"
],
"url": "https://www.insticator.com/oembed",
"discovery": true
}
]
},
{
"provider_name": "LottieFiles",
"provider_url": "https://lottiefiles.com/",
"endpoints": [
{
"schemes": [
"https://lottiefiles.com/*",
"https://*.lottiefiles.com/*"
],
"url": "https://embed.lottiefiles.com/oembed",
"discovery": true,
"formats": [
"json"
]
}
]
},
{
"provider_name": "Minerva",
"provider_url": "https://www.minervaknows.com",
"endpoints": [
{
"schemes": [
"https://www.minervaknows.com/featured-recipes/*",
"https://www.minervaknows.com/themes/*",
"https://www.minervaknows.com/themes/*/recipes/*",
"https://app.minervaknows.com/recipes/*",
"https://app.minervaknows.com/recipes/*/follow"
],
"url": "https://oembed.minervaknows.com",
"formats": [
"json"
],
"discovery": true
}
]
},
{
"provider_name": "Omny Studio",
"provider_url": "https://omnystudio.com",
"endpoints": [
{
"schemes": [
"https://omny.fm/shows/*"
],
"url": "https://omny.fm/oembed",
"formats": [
"json"
]
}
]
},
{
"provider_name": "Prezi Video",
"provider_url": "https://prezi.com/",
"endpoints": [
{
"schemes": [
"https://prezi.com/v/*",
"https://*.prezi.com/v/*"
],
"url": "https://prezi.com/v/oembed",
"discovery": true
}
]
},
{
"provider_name": "SproutVideo",
"provider_url": "https://sproutvideo.com",
"endpoints": [
{
"schemes": [
"https://sproutvideo.com/videos/*",
"https://*.vids.io/videos/*"
],
"url": "http://sproutvideo.com/oembed.{format}",
"formats": [
"json",
"xml"
],
"discovery": true
}
]
},
{
"provider_name": "Upec.Pod",
"provider_url": "https://pod.u-pec.fr/",
"endpoints": [
{
"schemes": [
"https://pod.u-pec.fr/video/*"
],
"url": "https://pod.u-pec.fr/oembed",
"discovery": true
}
]
}
]
Loading

0 comments on commit 7a1fc91

Please sign in to comment.