New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cloudinary-util/util

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudinary-util/util - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

13

./dist/index.js

@@ -34,3 +34,4 @@ "use strict";

var REGEX_VERSION = /\/v\d+\//;
var REGEX_URL = /https?:\/\/(?<host>[^\/]+)\/(?<cloudName>[^\/]+)\/(?<assetType>image|images|video|videos|raw|files)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)?\/?(?<signature>s\-\-[a-zA-Z0-9]+\-\-)?\/?(?<transformations>(?:[^_\/]+_[^,\/]+,?\/?)*\/)*(?<version>v\d+|\w{1,2})\/(?<publicId>[^\.^\s]+)(?<format>\.[a-zA-Z0-9]+$)?$/;
var REGEX_FORMAT = /\.(ai|avif|gif|png|webp|bmp|bw|djvu|dng|ps|ept|eps|eps3|fbx|flif|gif|glb|gltf|heif|heic|ico|indd|jpg|jpe|jpeg|jp2|wdp|jxr|hdp|obj|pdf|ply|png|psd|arw|cr2|svg|tga|tif|tiff|u3ma|usdz|webp|3g2|3gp|avi|flv|m3u8|ts|m2ts|mts|mov|mkv|mp4|mpeg|mpd|mxf|ogv|webm|wmv)$/i;
var REGEX_URL = /https?:\/\/(?<host>[^\/]+)\/(?<cloudName>[^\/]+)\/(?<assetType>image|images|video|videos|raw|files)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)?\/?(?<signature>s\-\-[a-zA-Z0-9]+\-\-)?\/?(?<transformations>(?:[^_\/]+_[^,\/]+,?\/?)*\/)*(?<version>v\d+|\w{1,2})\/(?<publicId>[^\s]+)$/;
var ASSET_TYPES_SEO = ["images", "videos", "files"];

@@ -46,3 +47,10 @@ function parseUrl(src) {

}
const [baseUrl, queryString] = src.split("?");
const [baseUrlWithExtension, queryString] = src.split("?");
const formatMatches = baseUrlWithExtension.match(REGEX_FORMAT);
let baseUrl = baseUrlWithExtension;
let format;
if (formatMatches !== null) {
format = `${formatMatches[0]}`;
baseUrl = baseUrlWithExtension.replace(new RegExp(`${format}$`), "");
}
const results = baseUrl.match(REGEX_URL);

@@ -52,2 +60,3 @@ const transformations = (_b = (_a = results == null ? void 0 : results.groups) == null ? void 0 : _a.transformations) == null ? void 0 : _b.split("/").filter((t) => !!t);

...results == null ? void 0 : results.groups,
format,
seoSuffix: void 0,

@@ -54,0 +63,0 @@ transformations: transformations || [],

@@ -34,3 +34,4 @@ "use strict";

var REGEX_VERSION = /\/v\d+\//;
var REGEX_URL = /https?:\/\/(?<host>[^\/]+)\/(?<cloudName>[^\/]+)\/(?<assetType>image|images|video|videos|raw|files)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)?\/?(?<signature>s\-\-[a-zA-Z0-9]+\-\-)?\/?(?<transformations>(?:[^_\/]+_[^,\/]+,?\/?)*\/)*(?<version>v\d+|\w{1,2})\/(?<publicId>[^\.^\s]+)(?<format>\.[a-zA-Z0-9]+$)?$/;
var REGEX_FORMAT = /\.(ai|avif|gif|png|webp|bmp|bw|djvu|dng|ps|ept|eps|eps3|fbx|flif|gif|glb|gltf|heif|heic|ico|indd|jpg|jpe|jpeg|jp2|wdp|jxr|hdp|obj|pdf|ply|png|psd|arw|cr2|svg|tga|tif|tiff|u3ma|usdz|webp|3g2|3gp|avi|flv|m3u8|ts|m2ts|mts|mov|mkv|mp4|mpeg|mpd|mxf|ogv|webm|wmv)$/i;
var REGEX_URL = /https?:\/\/(?<host>[^\/]+)\/(?<cloudName>[^\/]+)\/(?<assetType>image|images|video|videos|raw|files)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)?\/?(?<signature>s\-\-[a-zA-Z0-9]+\-\-)?\/?(?<transformations>(?:[^_\/]+_[^,\/]+,?\/?)*\/)*(?<version>v\d+|\w{1,2})\/(?<publicId>[^\s]+)$/;
var ASSET_TYPES_SEO = ["images", "videos", "files"];

@@ -46,3 +47,10 @@ function parseUrl(src) {

}
const [baseUrl, queryString] = src.split("?");
const [baseUrlWithExtension, queryString] = src.split("?");
const formatMatches = baseUrlWithExtension.match(REGEX_FORMAT);
let baseUrl = baseUrlWithExtension;
let format;
if (formatMatches !== null) {
format = `${formatMatches[0]}`;
baseUrl = baseUrlWithExtension.replace(new RegExp(`${format}$`), "");
}
const results = baseUrl.match(REGEX_URL);

@@ -52,2 +60,3 @@ const transformations = (_b = (_a = results == null ? void 0 : results.groups) == null ? void 0 : _a.transformations) == null ? void 0 : _b.split("/").filter((t) => !!t);

...results == null ? void 0 : results.groups,
format,
seoSuffix: void 0,

@@ -54,0 +63,0 @@ transformations: transformations || [],

2

package.json
{
"name": "@cloudinary-util/util",
"version": "2.0.0",
"version": "2.0.1",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "module": "./dist/index.mjs",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc