@graphql-mesh/http 0.3.18 → 0.3.19
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/cjs/index.js +3 -2
- package/esm/index.js +3 -2
- package/package.json +4 -4
package/cjs/index.js
CHANGED
|
@@ -53,8 +53,9 @@ function createMeshHTTPHandler({ baseDir, getBuiltMesh, rawServeConfig = {}, pla
|
|
|
53
53
|
if (!relativePath) {
|
|
54
54
|
relativePath = 'index.html';
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
const absoluteStaticFilesPath = cross_helpers_1.path.join(baseDir, staticFiles);
|
|
57
|
+
const absolutePath = cross_helpers_1.path.join(absoluteStaticFilesPath, relativePath);
|
|
58
|
+
if (absolutePath.startsWith(absoluteStaticFilesPath) && (await (0, utils_1.pathExists)(absolutePath))) {
|
|
58
59
|
const readStream = cross_helpers_1.fs.createReadStream(absolutePath);
|
|
59
60
|
return new router_1.Response(readStream, {
|
|
60
61
|
status: 200,
|
package/esm/index.js
CHANGED
|
@@ -50,8 +50,9 @@ export function createMeshHTTPHandler({ baseDir, getBuiltMesh, rawServeConfig =
|
|
|
50
50
|
if (!relativePath) {
|
|
51
51
|
relativePath = 'index.html';
|
|
52
52
|
}
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
const absoluteStaticFilesPath = path.join(baseDir, staticFiles);
|
|
54
|
+
const absolutePath = path.join(absoluteStaticFilesPath, relativePath);
|
|
55
|
+
if (absolutePath.startsWith(absoluteStaticFilesPath) && (await pathExists(absolutePath))) {
|
|
55
56
|
const readStream = fs.createReadStream(absolutePath);
|
|
56
57
|
return new Response(readStream, {
|
|
57
58
|
status: 200,
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/http",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.19",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@graphql-mesh/cross-helpers": "0.3.3",
|
|
10
|
-
"@graphql-mesh/runtime": "0.46.
|
|
11
|
-
"@graphql-mesh/types": "0.91.
|
|
12
|
-
"@graphql-mesh/utils": "0.43.
|
|
10
|
+
"@graphql-mesh/runtime": "0.46.14",
|
|
11
|
+
"@graphql-mesh/types": "0.91.5",
|
|
12
|
+
"@graphql-mesh/utils": "0.43.13",
|
|
13
13
|
"@whatwg-node/router": "0.2.7",
|
|
14
14
|
"graphql-yoga": "3.6.0",
|
|
15
15
|
"tslib": "^2.4.0"
|