Comparing version 3.21.0 to 3.22.0
@@ -1,2 +0,2 @@ | ||
import { getNumericParam, setParamIfDefined, toCanonicalUrlString, toUrl, } from "../utils.js"; | ||
import { getNumericParam, setParamIfDefined, setParamIfUndefined, toCanonicalUrlString, toUrl, } from "../utils.js"; | ||
import { getImageCdnForUrlByDomain } from "../detect.js"; | ||
@@ -50,4 +50,5 @@ export const delegateUrl = (url) => { | ||
setParamIfDefined(url, "f", format); | ||
setParamIfUndefined(url, "fit", "cover"); | ||
const endpoint = cdnOptions?.astro?.endpoint ?? "/_image"; | ||
return `${endpoint}?${url.searchParams.toString()}`; | ||
}; |
{ | ||
"name": "unpic", | ||
"version": "3.21.0", | ||
"version": "3.22.0", | ||
"description": "Universal image CDN translator", | ||
@@ -5,0 +5,0 @@ "homepage": "https://unpic.pics/lib", |
@@ -55,2 +55,3 @@ "use strict"; | ||
(0, utils_js_1.setParamIfDefined)(url, "f", format); | ||
(0, utils_js_1.setParamIfUndefined)(url, "fit", "cover"); | ||
const endpoint = cdnOptions?.astro?.endpoint ?? "/_image"; | ||
@@ -57,0 +58,0 @@ return `${endpoint}?${url.searchParams.toString()}`; |
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
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
282911
5312