@jetshop/core 6.5.8-alpha.1 → 6.5.8
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as Sentry from '@sentry/node';
|
|
2
2
|
import express from 'express';
|
|
3
3
|
import compression from 'compression';
|
|
4
|
-
import { constants as zlibConstants } from 'zlib';
|
|
5
4
|
import breakpointMiddleware from '@jetshop/core/boot/server/breakpointMiddleware';
|
|
6
5
|
import cookiesMiddleware from 'universal-cookie-express';
|
|
7
6
|
import report from '../../errorReporting';
|
|
@@ -19,19 +18,7 @@ const createServer = ({ apolloServer, middlewares }) => {
|
|
|
19
18
|
app.use(Sentry.Handlers.requestHandler());
|
|
20
19
|
}
|
|
21
20
|
app.set('trust proxy', true);
|
|
22
|
-
app.use(compression(
|
|
23
|
-
// Brotli when the client accepts it, gzip otherwise.
|
|
24
|
-
//
|
|
25
|
-
// Quality is set explicitly. zlib defaults Brotli to 11, which is meant
|
|
26
|
-
// for build-time precompression and costs roughly 100x gzip per
|
|
27
|
-
// response. At 5 the CPU matches gzip level 6 and the payload is about
|
|
28
|
-
// 20% smaller.
|
|
29
|
-
brotli: {
|
|
30
|
-
params: {
|
|
31
|
-
[zlibConstants.BROTLI_PARAM_QUALITY]: 5
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}));
|
|
21
|
+
app.use(compression());
|
|
35
22
|
app.use(breakpointMiddleware);
|
|
36
23
|
app.use(cookiesMiddleware());
|
|
37
24
|
if (apolloServer) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createServer.js","sourceRoot":"","sources":["createServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAEvC,OAAO,OAAqD,MAAM,SAAS,CAAC;AAC5E,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"createServer.js","sourceR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AE,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAEnE,GAAG,CAAC,GAAG,CACL,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;QAC5C,MAAM,EAAE,MAAM;KACf,CAAC,CACH,CAAC;IAEF,8DAA8D;IAC9D,IAAI,cAAc,EAAE;QAClB,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;KACzC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -95,6 +95,12 @@ export interface BootOptions {
|
|
|
95
95
|
* Pass `true` to enable for every channel, or an array of channel IDs to enable
|
|
96
96
|
* only on those channels. Defaults to `false` (Akamai). */
|
|
97
97
|
useCloudflareImageTransformation?: boolean | number[];
|
|
98
|
+
/** Request a blurred low-quality placeholder to show while each image loads.
|
|
99
|
+
* Defaults to `true`, which is the long-standing behaviour. Every placeholder
|
|
100
|
+
* is a separate transform request, so a shop that sets this to `false` roughly
|
|
101
|
+
* halves the image requests its pages make, at the cost of the blur-up effect.
|
|
102
|
+
* Images marked `critical` never get a placeholder either way. */
|
|
103
|
+
useLowQualityImagePlaceholder?: boolean;
|
|
98
104
|
}
|
|
99
105
|
interface Sentry {
|
|
100
106
|
/** DSN used to track client side errors */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigProvider.js","sourceRoot":"","sources":["ConfigProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAM3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigProvider.js","sourceRoot":"","sources":["ConfigProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAM3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAoI5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC5C,SAAS,CACV,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,EAO9B;QAP8B,EAC7B,MAAM,EAAE,UAAU,EAClB,QAAQ,OAKT,EAJI,IAAI,cAHsB,sBAI9B,CADQ;IAKP,MAAM,MAAM,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC5C,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,kBAAC,KAAK,EAAE,MAAM,IAAM,IAAI,GAChD,QAAQ,CACkB,CAC9B,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetshop/core",
|
|
3
|
-
"version": "6.5.8
|
|
3
|
+
"version": "6.5.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"apollo-server": "~2.6.9",
|
|
48
48
|
"apollo-server-caching": "^0.4.0",
|
|
49
49
|
"apollo-server-express": "~2.6.9",
|
|
50
|
-
"compression": "^1.
|
|
50
|
+
"compression": "^1.7.2",
|
|
51
51
|
"dnscache": "^1.0.2",
|
|
52
52
|
"eventemitter3": "^3.1.2",
|
|
53
53
|
"express": "^4.16.3",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@graphql-codegen/typescript": "^1.21.0",
|
|
81
81
|
"@react-mock/localstorage": "^0.1.2",
|
|
82
82
|
"@types/accept-language-parser": "^1.5.1",
|
|
83
|
-
"@types/compression": "^
|
|
83
|
+
"@types/compression": "^0.0.36",
|
|
84
84
|
"@types/express": "^4.11.1",
|
|
85
85
|
"@types/fontfaceobserver": "^0.0.6",
|
|
86
86
|
"@types/graphql": "^14.2.2",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"react": "^18",
|
|
114
114
|
"react-dom": "^18"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "4f2e8964a7c031860b2b2b5f8cc7ab9884d6b1ec"
|
|
117
117
|
}
|