@allthings/cloud-toolkit 5.3.2-beta.1 → 5.3.2
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/dist/alagarr.cjs.js +6 -6
- package/dist/alagarr.esm.mjs +6 -6
- package/dist/lib.cjs.js +6 -6
- package/dist/lib.esm.mjs +6 -6
- package/package.json +1 -1
package/dist/alagarr.cjs.js
CHANGED
|
@@ -234,13 +234,13 @@ const withAcceptEncodingVary = (headers = {}) => {
|
|
|
234
234
|
.flatMap((key) => splitDirectives(headers[key]))
|
|
235
235
|
.filter((directive, index, all) => all.findIndex((other) => other.toLowerCase() === directive.toLowerCase()) === index);
|
|
236
236
|
const hasAcceptEncoding = directives.some((directive) => directive.toLowerCase() === 'accept-encoding');
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
[varyKeys[0] ?? 'vary']: (hasAcceptEncoding
|
|
237
|
+
const merged = directives.includes('*')
|
|
238
|
+
? ['*']
|
|
239
|
+
: hasAcceptEncoding
|
|
241
240
|
? directives
|
|
242
|
-
: [...directives, 'Accept-Encoding']
|
|
243
|
-
|
|
241
|
+
: [...directives, 'Accept-Encoding'];
|
|
242
|
+
const otherHeaders = Object.fromEntries(Object.entries(headers).filter(([key]) => !varyKeys.includes(key)));
|
|
243
|
+
return { ...otherHeaders, [varyKeys[0] ?? 'vary']: merged.join(', ') };
|
|
244
244
|
};
|
|
245
245
|
|
|
246
246
|
const COMPRESSIBLE = [
|
package/dist/alagarr.esm.mjs
CHANGED
|
@@ -211,13 +211,13 @@ const withAcceptEncodingVary = (headers = {}) => {
|
|
|
211
211
|
.flatMap((key) => splitDirectives(headers[key]))
|
|
212
212
|
.filter((directive, index, all) => all.findIndex((other) => other.toLowerCase() === directive.toLowerCase()) === index);
|
|
213
213
|
const hasAcceptEncoding = directives.some((directive) => directive.toLowerCase() === 'accept-encoding');
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
[varyKeys[0] ?? 'vary']: (hasAcceptEncoding
|
|
214
|
+
const merged = directives.includes('*')
|
|
215
|
+
? ['*']
|
|
216
|
+
: hasAcceptEncoding
|
|
218
217
|
? directives
|
|
219
|
-
: [...directives, 'Accept-Encoding']
|
|
220
|
-
|
|
218
|
+
: [...directives, 'Accept-Encoding'];
|
|
219
|
+
const otherHeaders = Object.fromEntries(Object.entries(headers).filter(([key]) => !varyKeys.includes(key)));
|
|
220
|
+
return { ...otherHeaders, [varyKeys[0] ?? 'vary']: merged.join(', ') };
|
|
221
221
|
};
|
|
222
222
|
|
|
223
223
|
const COMPRESSIBLE = [
|
package/dist/lib.cjs.js
CHANGED
|
@@ -243,13 +243,13 @@ const withAcceptEncodingVary = (headers = {}) => {
|
|
|
243
243
|
.flatMap((key) => splitDirectives(headers[key]))
|
|
244
244
|
.filter((directive, index, all) => all.findIndex((other) => other.toLowerCase() === directive.toLowerCase()) === index);
|
|
245
245
|
const hasAcceptEncoding = directives.some((directive) => directive.toLowerCase() === 'accept-encoding');
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
[varyKeys[0] ?? 'vary']: (hasAcceptEncoding
|
|
246
|
+
const merged = directives.includes('*')
|
|
247
|
+
? ['*']
|
|
248
|
+
: hasAcceptEncoding
|
|
250
249
|
? directives
|
|
251
|
-
: [...directives, 'Accept-Encoding']
|
|
252
|
-
|
|
250
|
+
: [...directives, 'Accept-Encoding'];
|
|
251
|
+
const otherHeaders = Object.fromEntries(Object.entries(headers).filter(([key]) => !varyKeys.includes(key)));
|
|
252
|
+
return { ...otherHeaders, [varyKeys[0] ?? 'vary']: merged.join(', ') };
|
|
253
253
|
};
|
|
254
254
|
|
|
255
255
|
const COMPRESSIBLE = [
|
package/dist/lib.esm.mjs
CHANGED
|
@@ -221,13 +221,13 @@ const withAcceptEncodingVary = (headers = {}) => {
|
|
|
221
221
|
.flatMap((key) => splitDirectives(headers[key]))
|
|
222
222
|
.filter((directive, index, all) => all.findIndex((other) => other.toLowerCase() === directive.toLowerCase()) === index);
|
|
223
223
|
const hasAcceptEncoding = directives.some((directive) => directive.toLowerCase() === 'accept-encoding');
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
[varyKeys[0] ?? 'vary']: (hasAcceptEncoding
|
|
224
|
+
const merged = directives.includes('*')
|
|
225
|
+
? ['*']
|
|
226
|
+
: hasAcceptEncoding
|
|
228
227
|
? directives
|
|
229
|
-
: [...directives, 'Accept-Encoding']
|
|
230
|
-
|
|
228
|
+
: [...directives, 'Accept-Encoding'];
|
|
229
|
+
const otherHeaders = Object.fromEntries(Object.entries(headers).filter(([key]) => !varyKeys.includes(key)));
|
|
230
|
+
return { ...otherHeaders, [varyKeys[0] ?? 'vary']: merged.join(', ') };
|
|
231
231
|
};
|
|
232
232
|
|
|
233
233
|
const COMPRESSIBLE = [
|