Skip to content

Commit

Permalink
Merge pull request #182 from extractus/dev
Browse files Browse the repository at this point in the history
v4.0.2
  • Loading branch information
ndaidong authored Jan 22, 2024
2 parents 0a18060 + 26287c7 commit 2240c26
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 48 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ on: [push, pull_request]
jobs:
test:

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

strategy:
matrix:
node_version: [14.x, 16.x, 18.x, 20.x]
node_version: [18.x, 20.x, 21.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: setup Node.js v${{ matrix.node_version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

Expand All @@ -33,18 +33,29 @@ jobs:
npm run build --if-present
npm run test
- name: sync to coveralls
uses: coverallsapp/github-action@v1.1.2
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "run-18.x,run-20.x,run-21.x"

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.1",
"version": "4.0.2",
"name": "@extractus/oembed-extractor",
"description": "Get oEmbed data from given URL.",
"homepage": "https://github.com/extractus/oembed-extractor",
Expand All @@ -18,7 +18,7 @@
},
"types": "./index.d.ts",
"engines": {
"node": ">= 15"
"node": ">= 18"
},
"scripts": {
"lint": "eslint .",
Expand All @@ -33,10 +33,10 @@
"cross-fetch": "^4.0.0"
},
"devDependencies": {
"eslint": "^8.47.0",
"https-proxy-agent": "^7.0.1",
"jest": "^29.6.2",
"nock": "^13.3.2"
"eslint": "^8.56.0",
"https-proxy-agent": "^7.0.2",
"jest": "^29.7.0",
"nock": "^13.5.0"
},
"keywords": [
"oembed",
Expand Down
2 changes: 1 addition & 1 deletion src/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('test if extract() with some popular providers', () => {
const cases = [
{
input: {
url: 'https://youtu.be/qQpb1oCernE',
url: 'https://youtu.be/iQzwqZgr8Hc',
file: './test-data/youtube.json',
},
expected: {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fetchEmbed.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('test if fetchEmbed() works correctly', () => {
const cases = [
{
input: {
url: 'https://youtu.be/qQpb1oCernE',
url: 'https://youtu.be/iQzwqZgr8Hc',
file: './test-data/youtube.json',
},
expected: {
Expand Down
28 changes: 17 additions & 11 deletions src/utils/providers.latest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// provider data, synchronized at 2023-08-16T03:16:17.352Z
// provider data, synchronized at 2024-01-22T08:51:16.050Z

/* eslint-disable */

Expand Down Expand Up @@ -103,10 +103,11 @@ export const providers = [
},
{
"s": [
"studio\\.assemblrworld\\.com/*",
"*\\.studio\\.assemblrworld\\.com/creation/*",
"studio\\.assemblrworld\\.com/creation/*",
"*\\.app-edu\\.assemblrworld\\.com/Creation/*",
"app-edu\\.assemblrworld\\.com/Creation/*",
"assemblr\\.world/*",
"app-edu\\.assemblrworld\\.com/*",
"staging\\.d1o2otincy91d\\.amplifyapp\\.com/*",
"editor\\.assemblrworld\\.com/*"
],
"e": "studio.assemblrworld.com/api/oembed"
Expand Down Expand Up @@ -166,6 +167,12 @@ export const providers = [
],
"e": "backtracks.fm/oembed"
},
{
"s": [
"balsamiq\\.cloud/*"
],
"e": "balsamiq.cloud/oembed"
},
{
"s": [
"beams\\.fm/*"
Expand Down Expand Up @@ -465,6 +472,12 @@ export const providers = [
],
"e": "api.d.tube/oembed"
},
{
"s": [
"app\\.echoeshq\\.com/embed/*"
],
"e": "api.echoeshq.com/oembed"
},
{
"s": [],
"e": "www.edumedia-sciences.com/oembed.json"
Expand Down Expand Up @@ -651,13 +664,6 @@ export const providers = [
],
"e": "embed.gettyimages.com/oembed"
},
{
"s": [
"gfycat\\.com/*",
"www\\.gfycat\\.com/*"
],
"e": "api.gfycat.com/v1/oembed"
},
{
"s": [
"www\\.gifnote\\.com/play/*"
Expand Down
59 changes: 40 additions & 19 deletions src/utils/providers.orginal.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,17 @@
"endpoints": [
{
"schemes": [
"https://studio.assemblrworld.com/*",
"http://*.studio.assemblrworld.com/creation/*",
"http://studio.assemblrworld.com/creation/*",
"http://*.app-edu.assemblrworld.com/Creation/*",
"http://app-edu.assemblrworld.com/Creation/*",
"http://assemblr.world/*",
"http://editor.assemblrworld.com/*",
"https://*.studio.assemblrworld.com/creation/*",
"https://studio.assemblrworld.com/creation/*",
"https://*.app-edu.assemblrworld.com/Creation/*",
"https://app-edu.assemblrworld.com/Creation/*",
"https://assemblr.world/*",
"https://app-edu.assemblrworld.com/*",
"https://staging.d1o2otincy91d.amplifyapp.com/*",
"https://editor.assemblrworld.com/*"
],
"url": "https://studio.assemblrworld.com/api/oembed",
Expand Down Expand Up @@ -339,6 +346,19 @@
}
]
},
{
"provider_name": "Balsamiq Cloud",
"provider_url": "https://balsamiq.cloud/",
"endpoints": [
{
"schemes": [
"https://balsamiq.cloud/*"
],
"url": "https://balsamiq.cloud/oembed",
"discovery": true
}
]
},
{
"provider_name": "Beams.fm",
"provider_url": "http://beams.fm",
Expand Down Expand Up @@ -986,6 +1006,23 @@
}
]
},
{
"provider_name": "EchoesHQ",
"provider_url": "https://echoeshq.com",
"endpoints": [
{
"schemes": [
"http://app.echoeshq.com/embed/*"
],
"url": "https://api.echoeshq.com/oembed",
"formats": [
"json",
"xml"
],
"discovery": true
}
]
},
{
"provider_name": "eduMedia",
"provider_url": "https://www.edumedia-sciences.com/",
Expand Down Expand Up @@ -1340,22 +1377,6 @@
}
]
},
{
"provider_name": "Gfycat",
"provider_url": "https://gfycat.com/",
"endpoints": [
{
"schemes": [
"http://gfycat.com/*",
"http://www.gfycat.com/*",
"https://gfycat.com/*",
"https://www.gfycat.com/*"
],
"url": "https://api.gfycat.com/v1/oembed",
"discovery": true
}
]
},
{
"provider_name": "Gifnote",
"provider_url": "https://www.gifnote.com/",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/providers.prev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// provider data, synchronized at 2023-07-12T01:33:32.812Z
// provider data, synchronized at 2023-08-16T03:16:17.352Z

/* eslint-disable */

Expand Down

0 comments on commit 2240c26

Please sign in to comment.