@lwrjs/core 0.15.0-alpha.40 → 0.15.0-alpha.41
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.
|
@@ -159,15 +159,12 @@ function createViewMiddleware(route, errorRoutes, context, viewHandler) {
|
|
|
159
159
|
if (shouldCompress) {
|
|
160
160
|
const start = performance.now();
|
|
161
161
|
let compressionMethod;
|
|
162
|
-
if (req.headers["accept-encoding"]?.includes("
|
|
163
|
-
res.setHeader("Content-Encoding", "br");
|
|
164
|
-
compressionMethod = import_zlib.brotliCompressSync;
|
|
165
|
-
} else if (req.headers["accept-encoding"]?.includes("gzip")) {
|
|
162
|
+
if (req.headers["accept-encoding"]?.includes("gzip")) {
|
|
166
163
|
compressionMethod = import_zlib.gzipSync;
|
|
167
164
|
res.setHeader("Content-Encoding", "gzip");
|
|
168
165
|
} else {
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
res.setHeader("Content-Encoding", "br");
|
|
167
|
+
compressionMethod = import_zlib.brotliCompressSync;
|
|
171
168
|
}
|
|
172
169
|
const compressedView = compressionMethod(viewResponseBody);
|
|
173
170
|
const end = performance.now();
|
|
@@ -137,6 +137,7 @@ function createViewMiddleware(route, errorRoutes, context, viewHandler) {
|
|
|
137
137
|
}
|
|
138
138
|
res.status(status);
|
|
139
139
|
// LWR@MRT 254 temporary safeguard for "dupe styles" issue causing huge base docs
|
|
140
|
+
// Re-evaluate for removal once we determine it is no longer needed: W-17201070
|
|
140
141
|
const viewResponseBody = viewResponse.body;
|
|
141
142
|
let shouldCompress, viewResponseSize;
|
|
142
143
|
if (isLambdaEnv() && typeof viewResponseBody === 'string') {
|
|
@@ -147,17 +148,14 @@ function createViewMiddleware(route, errorRoutes, context, viewHandler) {
|
|
|
147
148
|
if (shouldCompress) {
|
|
148
149
|
const start = performance.now();
|
|
149
150
|
let compressionMethod;
|
|
150
|
-
if (req.headers['accept-encoding']?.includes('
|
|
151
|
-
res.setHeader('Content-Encoding', 'br');
|
|
152
|
-
compressionMethod = brotliCompressSync;
|
|
153
|
-
}
|
|
154
|
-
else if (req.headers['accept-encoding']?.includes('gzip')) {
|
|
151
|
+
if (req.headers['accept-encoding']?.includes('gzip')) {
|
|
155
152
|
compressionMethod = gzipSync;
|
|
156
153
|
res.setHeader('Content-Encoding', 'gzip');
|
|
157
154
|
}
|
|
158
155
|
else {
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
// Default to Brotli compression even if the header is missing.
|
|
157
|
+
res.setHeader('Content-Encoding', 'br');
|
|
158
|
+
compressionMethod = brotliCompressSync;
|
|
161
159
|
}
|
|
162
160
|
const compressedView = compressionMethod(viewResponseBody);
|
|
163
161
|
const end = performance.now();
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.15.0-alpha.
|
|
7
|
+
"version": "0.15.0-alpha.41",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -43,34 +43,34 @@
|
|
|
43
43
|
"build": "tsc -b"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@lwrjs/app-service": "0.15.0-alpha.
|
|
47
|
-
"@lwrjs/asset-registry": "0.15.0-alpha.
|
|
48
|
-
"@lwrjs/asset-transformer": "0.15.0-alpha.
|
|
49
|
-
"@lwrjs/base-view-provider": "0.15.0-alpha.
|
|
50
|
-
"@lwrjs/base-view-transformer": "0.15.0-alpha.
|
|
51
|
-
"@lwrjs/client-modules": "0.15.0-alpha.
|
|
52
|
-
"@lwrjs/config": "0.15.0-alpha.
|
|
53
|
-
"@lwrjs/diagnostics": "0.15.0-alpha.
|
|
54
|
-
"@lwrjs/esbuild": "0.15.0-alpha.
|
|
55
|
-
"@lwrjs/fs-asset-provider": "0.15.0-alpha.
|
|
56
|
-
"@lwrjs/fs-watch": "0.15.0-alpha.
|
|
57
|
-
"@lwrjs/html-view-provider": "0.15.0-alpha.
|
|
58
|
-
"@lwrjs/instrumentation": "0.15.0-alpha.
|
|
59
|
-
"@lwrjs/loader": "0.15.0-alpha.
|
|
60
|
-
"@lwrjs/lwc-module-provider": "0.15.0-alpha.
|
|
61
|
-
"@lwrjs/lwc-ssr": "0.15.0-alpha.
|
|
62
|
-
"@lwrjs/markdown-view-provider": "0.15.0-alpha.
|
|
63
|
-
"@lwrjs/module-bundler": "0.15.0-alpha.
|
|
64
|
-
"@lwrjs/module-registry": "0.15.0-alpha.
|
|
65
|
-
"@lwrjs/npm-module-provider": "0.15.0-alpha.
|
|
66
|
-
"@lwrjs/nunjucks-view-provider": "0.15.0-alpha.
|
|
67
|
-
"@lwrjs/o11y": "0.15.0-alpha.
|
|
68
|
-
"@lwrjs/resource-registry": "0.15.0-alpha.
|
|
69
|
-
"@lwrjs/router": "0.15.0-alpha.
|
|
70
|
-
"@lwrjs/server": "0.15.0-alpha.
|
|
71
|
-
"@lwrjs/shared-utils": "0.15.0-alpha.
|
|
72
|
-
"@lwrjs/static": "0.15.0-alpha.
|
|
73
|
-
"@lwrjs/view-registry": "0.15.0-alpha.
|
|
46
|
+
"@lwrjs/app-service": "0.15.0-alpha.41",
|
|
47
|
+
"@lwrjs/asset-registry": "0.15.0-alpha.41",
|
|
48
|
+
"@lwrjs/asset-transformer": "0.15.0-alpha.41",
|
|
49
|
+
"@lwrjs/base-view-provider": "0.15.0-alpha.41",
|
|
50
|
+
"@lwrjs/base-view-transformer": "0.15.0-alpha.41",
|
|
51
|
+
"@lwrjs/client-modules": "0.15.0-alpha.41",
|
|
52
|
+
"@lwrjs/config": "0.15.0-alpha.41",
|
|
53
|
+
"@lwrjs/diagnostics": "0.15.0-alpha.41",
|
|
54
|
+
"@lwrjs/esbuild": "0.15.0-alpha.41",
|
|
55
|
+
"@lwrjs/fs-asset-provider": "0.15.0-alpha.41",
|
|
56
|
+
"@lwrjs/fs-watch": "0.15.0-alpha.41",
|
|
57
|
+
"@lwrjs/html-view-provider": "0.15.0-alpha.41",
|
|
58
|
+
"@lwrjs/instrumentation": "0.15.0-alpha.41",
|
|
59
|
+
"@lwrjs/loader": "0.15.0-alpha.41",
|
|
60
|
+
"@lwrjs/lwc-module-provider": "0.15.0-alpha.41",
|
|
61
|
+
"@lwrjs/lwc-ssr": "0.15.0-alpha.41",
|
|
62
|
+
"@lwrjs/markdown-view-provider": "0.15.0-alpha.41",
|
|
63
|
+
"@lwrjs/module-bundler": "0.15.0-alpha.41",
|
|
64
|
+
"@lwrjs/module-registry": "0.15.0-alpha.41",
|
|
65
|
+
"@lwrjs/npm-module-provider": "0.15.0-alpha.41",
|
|
66
|
+
"@lwrjs/nunjucks-view-provider": "0.15.0-alpha.41",
|
|
67
|
+
"@lwrjs/o11y": "0.15.0-alpha.41",
|
|
68
|
+
"@lwrjs/resource-registry": "0.15.0-alpha.41",
|
|
69
|
+
"@lwrjs/router": "0.15.0-alpha.41",
|
|
70
|
+
"@lwrjs/server": "0.15.0-alpha.41",
|
|
71
|
+
"@lwrjs/shared-utils": "0.15.0-alpha.41",
|
|
72
|
+
"@lwrjs/static": "0.15.0-alpha.41",
|
|
73
|
+
"@lwrjs/view-registry": "0.15.0-alpha.41",
|
|
74
74
|
"chokidar": "^3.6.0",
|
|
75
75
|
"esbuild": "^0.9.7",
|
|
76
76
|
"fs-extra": "^11.2.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"ws": "^8.18.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@lwrjs/types": "0.15.0-alpha.
|
|
83
|
+
"@lwrjs/types": "0.15.0-alpha.41",
|
|
84
84
|
"@types/ws": "^8.5.12",
|
|
85
85
|
"memfs": "^4.13.0"
|
|
86
86
|
},
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"volta": {
|
|
94
94
|
"extends": "../../../package.json"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "26a304d3a5f92daf1d3eff3d9c937eccf1372fd3"
|
|
97
97
|
}
|