netlify-cli 17.3.0 → 17.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/src/lib/images/proxy.mjs +2 -20
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "17.3.
|
|
3
|
+
"version": "17.3.1",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "17.3.
|
|
9
|
+
"version": "17.3.1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
package/src/lib/images/proxy.mjs
CHANGED
|
@@ -65,8 +65,8 @@ export const transformImageParams = function (query) {
|
|
|
65
65
|
params.h = query.h || query.height || null
|
|
66
66
|
params.quality = query.q || query.quality || null
|
|
67
67
|
params.format = query.fm || null
|
|
68
|
-
params.fit =
|
|
69
|
-
params.position = query.
|
|
68
|
+
params.fit = query.fit || null
|
|
69
|
+
params.position = query.position || null
|
|
70
70
|
|
|
71
71
|
return Object.entries(params)
|
|
72
72
|
.filter(([, value]) => value !== null)
|
|
@@ -74,24 +74,6 @@ export const transformImageParams = function (query) {
|
|
|
74
74
|
.join(',')
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
function mapImgixToFitIpx(fit, crop) {
|
|
78
|
-
if (crop) {
|
|
79
|
-
return 'cover'
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const fitMapping = {
|
|
83
|
-
// IPX doesn't have exact equivalent.
|
|
84
|
-
clamp: null,
|
|
85
|
-
clip: 'contain',
|
|
86
|
-
crop: 'cover',
|
|
87
|
-
max: 'inside',
|
|
88
|
-
min: 'outside',
|
|
89
|
-
scale: 'fill',
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return fitMapping[fit] ?? 'contain'
|
|
93
|
-
}
|
|
94
|
-
|
|
95
77
|
export const initializeProxy = async function ({ config }) {
|
|
96
78
|
const remoteDomains = await parseRemoteImageDomains({ config })
|
|
97
79
|
|