@loomhq/loom-embed
Advanced tools
Comparing version 1.2.12 to 1.2.13
@@ -1,1 +0,1 @@ | ||
import 'isomorphic-fetch'; | ||
export {}; |
@@ -12,6 +12,10 @@ (function(global, factory) { | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __defProps = Object.defineProperties; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -38,2 +42,13 @@ var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
}; | ||
var __reExport = (target, module2, desc) => { | ||
if (module2 && typeof module2 === "object" || typeof module2 === "function") { | ||
for (let key of __getOwnPropNames(module2)) | ||
if (!__hasOwnProp.call(target, key) && key !== "default") | ||
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); | ||
} | ||
return target; | ||
}; | ||
var __toModule = (module2) => { | ||
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); | ||
}; | ||
@@ -64,2 +79,3 @@ // src/index.ts | ||
// src/oembed.ts | ||
var import_cross_fetch = __toModule(require("cross-fetch")); | ||
var SRC_URL_REGEX = /src=["']+(https?:\/\/[a-zA-z\d:\.\/?&]+)/; | ||
@@ -108,3 +124,3 @@ var getResponsiveEmbedCode = (embedURL, heightAspectRatio) => { | ||
if (isSupportedUrl) { | ||
return fetch(buildLoomOembedUrl(linkUrl, options)).then((resp) => resp.json()).then((videoData) => enhanceEmbedCode(videoData, options)).catch((e) => { | ||
return (0, import_cross_fetch.default)(buildLoomOembedUrl(linkUrl, options)).then((resp) => resp.json()).then((videoData) => enhanceEmbedCode(videoData, options)).catch((e) => { | ||
throw new Error("Unable to fetch oembed data:" + e); | ||
@@ -111,0 +127,0 @@ }); |
@@ -37,2 +37,3 @@ var __defProp = Object.defineProperty; | ||
// src/oembed.ts | ||
import fetch from "cross-fetch"; | ||
var SRC_URL_REGEX = /src=["']+(https?:\/\/[a-zA-z\d:\.\/?&]+)/; | ||
@@ -39,0 +40,0 @@ var getResponsiveEmbedCode = (embedURL, heightAspectRatio) => { |
{ | ||
"name": "@loomhq/loom-embed", | ||
"version": "1.2.12", | ||
"version": "1.2.13", | ||
"description": "SDK for easily embedding videos", | ||
@@ -25,3 +25,3 @@ "main": "dist/cjs/index.js", | ||
"@types/jsdom": "^16.2.12", | ||
"isomorphic-fetch": "^3.0.0", | ||
"cross-fetch": "^3.0.6", | ||
"jest": "^27.0.4", | ||
@@ -28,0 +28,0 @@ "jsdom": "^16.6.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36344
358
1
1