@cloudinary/html
Advanced tools
+13
-1
@@ -0,1 +1,12 @@ | ||
| 1.6.0 / 2022-11-17 | ||
| ================== | ||
| Html | ||
| ------- | ||
| * Add an optional analytics option to be passed to serverSideSrc | ||
| React | ||
| ------- | ||
| * use the same analytics token in react ssr and csr | ||
| 1.5.0 / 2022-09-18 | ||
@@ -10,3 +21,3 @@ ================== | ||
| ------------------ | ||
| * Fix react jest configuration (#173) | ||
| * Fix react jest configuration (#173) | ||
| * Update React SDK readme (#175) | ||
@@ -18,2 +29,3 @@ | ||
| 1.4.2 / 2022-08-09 | ||
@@ -20,0 +32,0 @@ ================== |
+2
-2
| { | ||
| "name": "@cloudinary/html", | ||
| "version": "1.5.0", | ||
| "version": "1.6.0", | ||
| "description": "An HTML wrapper for Cloudinary", | ||
@@ -20,3 +20,3 @@ "main": "./index.js", | ||
| "@babel/preset-typescript": "^7.14.5", | ||
| "@cloudinary/url-gen": "^1.8.0", | ||
| "@cloudinary/url-gen": "^1.8.6", | ||
| "@rollup/plugin-commonjs": "^19.0.0", | ||
@@ -23,0 +23,0 @@ "@rollup/plugin-node-resolve": "^13.0.0", |
+10
-10
| import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage"; | ||
| import { VideoCodecAction } from "@cloudinary/url-gen/actions/transcode/VideoCodecAction"; | ||
| export declare type Plugin = (element: HTMLImageElement | HTMLVideoElement, cloudinaryImage: CloudinaryImage, htmlPluginState?: HtmlPluginState) => Promise<string | void>; | ||
| export declare type Plugins = Plugin[]; | ||
| export declare type AccessibilityMode = 'darkmode' | 'brightmode' | 'monochrome' | 'colorblind'; | ||
| export declare type PlaceholderMode = 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'; | ||
| export declare type HtmlPluginState = { | ||
| export type Plugin = (element: HTMLImageElement | HTMLVideoElement, cloudinaryImage: CloudinaryImage, htmlPluginState?: HtmlPluginState) => Promise<string | void>; | ||
| export type Plugins = Plugin[]; | ||
| export type AccessibilityMode = 'darkmode' | 'brightmode' | 'monochrome' | 'colorblind'; | ||
| export type PlaceholderMode = 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'; | ||
| export type HtmlPluginState = { | ||
| cleanupCallbacks: Function[]; | ||
| pluginEventSubscription: Function[]; | ||
| }; | ||
| export declare type VideoSources = { | ||
| export type VideoSources = { | ||
| type: VideoType; | ||
@@ -16,4 +16,4 @@ codecs: Array<string>; | ||
| }[] | undefined; | ||
| export declare type VideoType = 'flv' | '3gp' | 'mov' | 'mpg' | 'avi' | 'wmv' | 'ogv' | string; | ||
| export declare type PictureSources = { | ||
| export type VideoType = 'flv' | '3gp' | 'mov' | 'mpg' | 'avi' | 'wmv' | 'ogv' | string; | ||
| export type PictureSources = { | ||
| minWidth?: number; | ||
@@ -24,3 +24,3 @@ maxWidth?: number; | ||
| }[]; | ||
| export declare type PictureSource = { | ||
| export type PictureSource = { | ||
| minWidth?: number; | ||
@@ -31,3 +31,3 @@ maxWidth?: number; | ||
| }; | ||
| export declare type AnalyticsOptions = { | ||
| export type AnalyticsOptions = { | ||
| sdkSemver: string; | ||
@@ -34,0 +34,0 @@ techVersion: string; |
+1
-1
@@ -16,3 +16,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| if (f) throw new TypeError("Generator is already executing."); | ||
| while (_) try { | ||
| while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
| if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -19,0 +19,0 @@ if (y = 0, t) op = [op[0] & 2, t.value]; |
@@ -8,3 +8,3 @@ /** | ||
| import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage"; | ||
| import { Plugins } from "../types.js"; | ||
| export declare function serverSideSrc(plugins?: Plugins, serverCloudinaryImage?: CloudinaryImage): string; | ||
| import { AnalyticsOptions, Plugins } from "../types.js"; | ||
| export declare function serverSideSrc(plugins?: Plugins, serverCloudinaryImage?: CloudinaryImage, analyticsOptions?: AnalyticsOptions): string; |
| import cloneDeep from 'lodash.clonedeep'; | ||
| export function serverSideSrc(plugins, serverCloudinaryImage) { | ||
| export function serverSideSrc(plugins, serverCloudinaryImage, analyticsOptions) { | ||
| var clonedServerCloudinaryImage = cloneDeep(serverCloudinaryImage); | ||
@@ -12,3 +12,3 @@ if (plugins) { | ||
| } | ||
| return clonedServerCloudinaryImage.toURL(); | ||
| return clonedServerCloudinaryImage.toURL(analyticsOptions ? { trackedAnalytics: analyticsOptions } : null); | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1138451
0.17%4
-20%