Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unpic

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unpic - npm Package Compare versions

Comparing version 3.14.1 to 3.15.0

esm/src/transformers/astro.d.ts

1

esm/data/paths.d.ts

@@ -9,4 +9,5 @@ declare const _default: {

"/_ipx/": string;
"/_image": string;
"/.netlify/images": string;
};
export default _default;

@@ -9,3 +9,4 @@ export default {

"/_ipx/": "ipx",
"/_image": "astro",
"/.netlify/images": "netlify"
};

@@ -42,2 +42,3 @@ import { ImageCdn, ParsedUrl, UrlParser } from "./types.js";

ipx: UrlParser<Record<string, unknown>>;
astro: UrlParser<import("./transformers/astro.js").AstroParams>;
netlify: UrlParser<Record<string, unknown>>;

@@ -44,0 +45,0 @@ imagekit: UrlParser<Record<string, unknown>>;

@@ -21,2 +21,3 @@ import { getImageCdnForUrl } from "./detect.js";

import { parse as ipx } from "./transformers/ipx.js";
import { parse as astro } from "./transformers/astro.js";
import { parse as netlify } from "./transformers/netlify.js";

@@ -44,2 +45,3 @@ import { parse as imagekit } from "./transformers/imagekit.js";

ipx,
astro,
netlify,

@@ -46,0 +48,0 @@ imagekit,

@@ -21,2 +21,3 @@ import { getImageCdnForUrl } from "./detect.js";

import { transform as ipx } from "./transformers/ipx.js";
import { transform as astro } from "./transformers/astro.js";
import { transform as netlify } from "./transformers/netlify.js";

@@ -45,2 +46,3 @@ import { transform as imagekit } from "./transformers/imagekit.js";

ipx,
astro,
netlify,

@@ -47,0 +49,0 @@ imagekit,

@@ -21,2 +21,14 @@ import { getNumericParam, setParamIfDefined, setParamIfUndefined, toUrl, } from "../utils.js";

const url = toUrl(originalUrl);
if (width && width > 4000) {
if (height) {
height = Math.round(height * 4000 / width);
}
width = 4000;
}
if (height && height > 4000) {
if (width) {
width = Math.round(width * 4000 / height);
}
height = 4000;
}
setParamIfDefined(url, "w", width, true, true);

@@ -23,0 +35,0 @@ setParamIfDefined(url, "h", height, true, true);

2

esm/src/types.d.ts

@@ -69,3 +69,3 @@ /**

}
export type ImageCdn = "contentful" | "builder.io" | "cloudinary" | "cloudflare" | "imgix" | "shopify" | "wordpress" | "bunny" | "storyblok" | "kontent.ai" | "vercel" | "nextjs" | "scene7" | "keycdn" | "directus" | "imageengine" | "contentstack" | "cloudflare_images" | "ipx" | "netlify" | "imagekit";
export type ImageCdn = "contentful" | "builder.io" | "cloudinary" | "cloudflare" | "imgix" | "shopify" | "wordpress" | "bunny" | "storyblok" | "kontent.ai" | "vercel" | "nextjs" | "scene7" | "keycdn" | "directus" | "imageengine" | "contentstack" | "cloudflare_images" | "ipx" | "astro" | "netlify" | "imagekit";
export type SupportedImageCdn = ImageCdn;

@@ -5,3 +5,3 @@ {

"name": "unpic",
"version": "3.14.1",
"version": "3.15.0",
"description": "Universal image CDN translator",

@@ -33,2 +33,18 @@ "license": "MIT",

},
"./transformers/contentstack": {
"import": "./esm/src/transformers/contentstack.js",
"require": "./script/src/transformers/contentstack.js"
},
"./transformers/astro": {
"import": "./esm/src/transformers/astro.js",
"require": "./script/src/transformers/astro.js"
},
"./transformers/kontent.ai": {
"import": "./esm/src/transformers/kontent.ai.js",
"require": "./script/src/transformers/kontent.ai.js"
},
"./transformers/cloudinary": {
"import": "./esm/src/transformers/cloudinary.js",
"require": "./script/src/transformers/cloudinary.js"
},
"./transformers/builder.io": {

@@ -38,10 +54,2 @@ "import": "./esm/src/transformers/builder.io.js",

},
"./transformers/imageengine": {
"import": "./esm/src/transformers/imageengine.js",
"require": "./script/src/transformers/imageengine.js"
},
"./transformers/wordpress": {
"import": "./esm/src/transformers/wordpress.js",
"require": "./script/src/transformers/wordpress.js"
},
"./transformers/nextjs": {

@@ -51,2 +59,6 @@ "import": "./esm/src/transformers/nextjs.js",

},
"./transformers/imgix": {
"import": "./esm/src/transformers/imgix.js",
"require": "./script/src/transformers/imgix.js"
},
"./transformers/vercel": {

@@ -56,5 +68,5 @@ "import": "./esm/src/transformers/vercel.js",

},
"./transformers/imgix": {
"import": "./esm/src/transformers/imgix.js",
"require": "./script/src/transformers/imgix.js"
"./transformers/shopify": {
"import": "./esm/src/transformers/shopify.js",
"require": "./script/src/transformers/shopify.js"
},

@@ -65,14 +77,10 @@ "./transformers/storyblok": {

},
"./transformers/contentstack": {
"import": "./esm/src/transformers/contentstack.js",
"require": "./script/src/transformers/contentstack.js"
"./transformers/contentful": {
"import": "./esm/src/transformers/contentful.js",
"require": "./script/src/transformers/contentful.js"
},
"./transformers/scene7": {
"import": "./esm/src/transformers/scene7.js",
"require": "./script/src/transformers/scene7.js"
"./transformers/imageengine": {
"import": "./esm/src/transformers/imageengine.js",
"require": "./script/src/transformers/imageengine.js"
},
"./transformers/ipx": {
"import": "./esm/src/transformers/ipx.js",
"require": "./script/src/transformers/ipx.js"
},
"./transformers/bunny": {

@@ -82,9 +90,9 @@ "import": "./esm/src/transformers/bunny.js",

},
"./transformers/cloudflare": {
"import": "./esm/src/transformers/cloudflare.js",
"require": "./script/src/transformers/cloudflare.js"
"./transformers/wordpress": {
"import": "./esm/src/transformers/wordpress.js",
"require": "./script/src/transformers/wordpress.js"
},
"./transformers/cloudinary": {
"import": "./esm/src/transformers/cloudinary.js",
"require": "./script/src/transformers/cloudinary.js"
"./transformers/scene7": {
"import": "./esm/src/transformers/scene7.js",
"require": "./script/src/transformers/scene7.js"
},

@@ -95,9 +103,9 @@ "./transformers/imagekit": {

},
"./transformers/cloudflare_images": {
"import": "./esm/src/transformers/cloudflare_images.js",
"require": "./script/src/transformers/cloudflare_images.js"
"./transformers/cloudflare": {
"import": "./esm/src/transformers/cloudflare.js",
"require": "./script/src/transformers/cloudflare.js"
},
"./transformers/kontent.ai": {
"import": "./esm/src/transformers/kontent.ai.js",
"require": "./script/src/transformers/kontent.ai.js"
"./transformers/netlify": {
"import": "./esm/src/transformers/netlify.js",
"require": "./script/src/transformers/netlify.js"
},

@@ -108,17 +116,13 @@ "./transformers/directus": {

},
"./transformers/netlify": {
"import": "./esm/src/transformers/netlify.js",
"require": "./script/src/transformers/netlify.js"
"./transformers/ipx": {
"import": "./esm/src/transformers/ipx.js",
"require": "./script/src/transformers/ipx.js"
},
"./transformers/contentful": {
"import": "./esm/src/transformers/contentful.js",
"require": "./script/src/transformers/contentful.js"
},
"./transformers/shopify": {
"import": "./esm/src/transformers/shopify.js",
"require": "./script/src/transformers/shopify.js"
},
"./transformers/keycdn": {
"import": "./esm/src/transformers/keycdn.js",
"require": "./script/src/transformers/keycdn.js"
},
"./transformers/cloudflare_images": {
"import": "./esm/src/transformers/cloudflare_images.js",
"require": "./script/src/transformers/cloudflare_images.js"
}

@@ -125,0 +129,0 @@ },

@@ -9,4 +9,5 @@ declare const _default: {

"/_ipx/": string;
"/_image": string;
"/.netlify/images": string;
};
export default _default;

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

"/_ipx/": "ipx",
"/_image": "astro",
"/.netlify/images": "netlify"
};

@@ -42,2 +42,3 @@ import { ImageCdn, ParsedUrl, UrlParser } from "./types.js";

ipx: UrlParser<Record<string, unknown>>;
astro: UrlParser<import("./transformers/astro.js").AstroParams>;
netlify: UrlParser<Record<string, unknown>>;

@@ -44,0 +45,0 @@ imagekit: UrlParser<Record<string, unknown>>;

@@ -24,2 +24,3 @@ "use strict";

const ipx_js_1 = require("./transformers/ipx.js");
const astro_js_1 = require("./transformers/astro.js");
const netlify_js_1 = require("./transformers/netlify.js");

@@ -47,2 +48,3 @@ const imagekit_js_1 = require("./transformers/imagekit.js");

ipx: ipx_js_1.parse,
astro: astro_js_1.parse,
netlify: netlify_js_1.parse,

@@ -49,0 +51,0 @@ imagekit: imagekit_js_1.parse,

@@ -24,2 +24,3 @@ "use strict";

const ipx_js_1 = require("./transformers/ipx.js");
const astro_js_1 = require("./transformers/astro.js");
const netlify_js_1 = require("./transformers/netlify.js");

@@ -48,2 +49,3 @@ const imagekit_js_1 = require("./transformers/imagekit.js");

ipx: ipx_js_1.transform,
astro: astro_js_1.transform,
netlify: netlify_js_1.transform,

@@ -50,0 +52,0 @@ imagekit: imagekit_js_1.transform,

@@ -25,2 +25,14 @@ "use strict";

const url = (0, utils_js_1.toUrl)(originalUrl);
if (width && width > 4000) {
if (height) {
height = Math.round(height * 4000 / width);
}
width = 4000;
}
if (height && height > 4000) {
if (width) {
width = Math.round(width * 4000 / height);
}
height = 4000;
}
(0, utils_js_1.setParamIfDefined)(url, "w", width, true, true);

@@ -27,0 +39,0 @@ (0, utils_js_1.setParamIfDefined)(url, "h", height, true, true);

@@ -69,3 +69,3 @@ /**

}
export type ImageCdn = "contentful" | "builder.io" | "cloudinary" | "cloudflare" | "imgix" | "shopify" | "wordpress" | "bunny" | "storyblok" | "kontent.ai" | "vercel" | "nextjs" | "scene7" | "keycdn" | "directus" | "imageengine" | "contentstack" | "cloudflare_images" | "ipx" | "netlify" | "imagekit";
export type ImageCdn = "contentful" | "builder.io" | "cloudinary" | "cloudflare" | "imgix" | "shopify" | "wordpress" | "bunny" | "storyblok" | "kontent.ai" | "vercel" | "nextjs" | "scene7" | "keycdn" | "directus" | "imageengine" | "contentstack" | "cloudflare_images" | "ipx" | "astro" | "netlify" | "imagekit";
export type SupportedImageCdn = ImageCdn;
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