Permalink
Browse files

Update '@babel/core' and 'netlify-lambda'

  • Loading branch information...
marcomontalbano committed Dec 14, 2018
1 parent b8962cd commit 00a2231b271963a43aadd52813e5b5c29c02b04b
@@ -32,19 +32,20 @@
},
"babel": {
"presets": [
"env"
"@babel/preset-env"
]
},
"devDependencies": {
"babel-core": "^6.26.3",
"@babel/core": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"babel-loader": "^7.1.5",
"babel-preset-env": "^1.7.0",
"babel-loader": "^8.0.4",
"dotenv": "^6.2.0",
"file-loader": "^2.0.0",
"https-proxy-agent": "^2.2.1",
"jest": "^23.6.0",
"netlify-lambda": "^0.4.0",
"netlify-lambda": "^1.1.0",
"node-fetch": "^2.3.0",
"node-sass": "^4.11.0",
"npm-run-all": "^4.1.5",
@@ -87,8 +87,8 @@ $('form').on('submit', function(e) {

const title = $form.find('[name="title"]').val();
const videoUrl = $form.find('[name="url"]').val();
const jsonUrl = `${lambdaUrl}/image-json?url=${videoUrl}`;
const imageUrl = `${lambdaUrl}/image?url=${videoUrl}`;
const jsonUrl = `${lambdaUrl}/image-json?url=${encodeURIComponent(videoUrl)}`;
const imageUrl = `${lambdaUrl}/image?url=${encodeURIComponent(videoUrl)}`;

if (videoUrl_memo === videoUrl) {
updateMarkdown(title, imageUrl, videoUrl);
@@ -3,6 +3,11 @@ import VideoProvider from '../VideoProvider';
// https://asciinema.org/

export default class Asciinema extends VideoProvider {

get providerName() {
return 'asciinema';
}

static get regex() {
return [
// - //asciinema.org/a/113463
@@ -4,6 +4,11 @@ import fetch from '../proxiedFetch';
// https://developer.dailymotion.com/api

export default class Dailymotion extends VideoProvider {

get providerName() {
return 'dailymotion';
}

static get regex() {
return [
// - //www.dailymotion.com/video/x3ke49
@@ -6,6 +6,11 @@ const { FACEBOOK_ACCESS_TOKEN } = process.env;
// https://www.facebook.com/backintimetheparty/videos/1588846901182916/

export default class Facebook extends VideoProvider {

get providerName() {
return 'facebook';
}

static get regex() {
return [
// - //www.facebook.com/backintimetheparty/videos/1588846901182916/
@@ -4,6 +4,11 @@ import fetch from '../proxiedFetch';
// https://vimeo.com/

export default class Vimeo extends VideoProvider {

get providerName() {
return 'vimeo';
}

static get regex() {
return [
// - //vimeo.com/263856289
@@ -4,6 +4,11 @@ import fetch from '../proxiedFetch';
// https://www.youtube.com/

export default class Youtube extends VideoProvider {

get providerName() {
return 'youtube';
}

static get regex() {
return [
// - //www.youtube.com/watch?v=oRdzL2DX0yU
@@ -7,6 +7,8 @@ export default class VideoProvider {

static get useCloudinary() { return true }

get providerName() { }

static check(url) {
return this.getVideoId(url) ? true : false;
}
@@ -28,10 +30,6 @@ export default class VideoProvider {
return this.constructor.getVideoId(this.url);
}

get providerName() {
return this.constructor.name.toLowerCase();
}

getThumbnail_asUrl() {
return new Promise()
}
@@ -3,7 +3,7 @@ import HttpsProxyAgent from 'https-proxy-agent';

const { HTTP_PROXY, HTTPS_PROXY } = process.env;

module.exports = (url, options = {}) => {
export default (url, options = {}) => {

if (HTTP_PROXY) {
options.agent = new HttpsProxyAgent(HTTP_PROXY);
Oops, something went wrong.

0 comments on commit 00a2231

Please sign in to comment.