@valbuild/server 0.50.0 → 0.51.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.
@@ -1001,6 +1001,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
|
|
1001
1001
|
value: "export const ValImage = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValImage' in this file`) } } } )"
|
1002
1002
|
};
|
1003
1003
|
}
|
1004
|
+
if (modulePath.includes("/ValApp")) {
|
1005
|
+
return {
|
1006
|
+
value: "export const ValApp = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValApp' in this file`) } } } )"
|
1007
|
+
};
|
1008
|
+
}
|
1004
1009
|
return {
|
1005
1010
|
value: moduleLoader.getModule(modulePath)
|
1006
1011
|
};
|
@@ -1056,6 +1061,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
|
|
1056
1061
|
value: requestedName
|
1057
1062
|
};
|
1058
1063
|
}
|
1064
|
+
if (requestedName.includes("/ValApp")) {
|
1065
|
+
return {
|
1066
|
+
value: requestedName
|
1067
|
+
};
|
1068
|
+
}
|
1059
1069
|
const modulePath = moduleLoader.resolveModulePath(baseModuleName, requestedName);
|
1060
1070
|
return {
|
1061
1071
|
value: modulePath
|
@@ -2149,7 +2159,7 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
2149
2159
|
}
|
2150
2160
|
const path = url.pathname.slice(route.length);
|
2151
2161
|
if (path.startsWith("/static")) {
|
2152
|
-
return convert(await uiRequestHandler(path.slice("/static".length)));
|
2162
|
+
return convert(await uiRequestHandler(path.slice("/static".length), url.href));
|
2153
2163
|
} else if (path === "/session") {
|
2154
2164
|
return convert(await valServer.session(getCookies(req, [VAL_SESSION_COOKIE])));
|
2155
2165
|
} else if (path === "/authorize") {
|
@@ -1001,6 +1001,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
|
|
1001
1001
|
value: "export const ValImage = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValImage' in this file`) } } } )"
|
1002
1002
|
};
|
1003
1003
|
}
|
1004
|
+
if (modulePath.includes("/ValApp")) {
|
1005
|
+
return {
|
1006
|
+
value: "export const ValApp = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValApp' in this file`) } } } )"
|
1007
|
+
};
|
1008
|
+
}
|
1004
1009
|
return {
|
1005
1010
|
value: moduleLoader.getModule(modulePath)
|
1006
1011
|
};
|
@@ -1056,6 +1061,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
|
|
1056
1061
|
value: requestedName
|
1057
1062
|
};
|
1058
1063
|
}
|
1064
|
+
if (requestedName.includes("/ValApp")) {
|
1065
|
+
return {
|
1066
|
+
value: requestedName
|
1067
|
+
};
|
1068
|
+
}
|
1059
1069
|
const modulePath = moduleLoader.resolveModulePath(baseModuleName, requestedName);
|
1060
1070
|
return {
|
1061
1071
|
value: modulePath
|
@@ -2149,7 +2159,7 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
2149
2159
|
}
|
2150
2160
|
const path = url.pathname.slice(route.length);
|
2151
2161
|
if (path.startsWith("/static")) {
|
2152
|
-
return convert(await uiRequestHandler(path.slice("/static".length)));
|
2162
|
+
return convert(await uiRequestHandler(path.slice("/static".length), url.href));
|
2153
2163
|
} else if (path === "/session") {
|
2154
2164
|
return convert(await valServer.session(getCookies(req, [VAL_SESSION_COOKIE])));
|
2155
2165
|
} else if (path === "/authorize") {
|
@@ -971,6 +971,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
|
|
971
971
|
value: "export const ValImage = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValImage' in this file`) } } } )"
|
972
972
|
};
|
973
973
|
}
|
974
|
+
if (modulePath.includes("/ValApp")) {
|
975
|
+
return {
|
976
|
+
value: "export const ValApp = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValApp' in this file`) } } } )"
|
977
|
+
};
|
978
|
+
}
|
974
979
|
return {
|
975
980
|
value: moduleLoader.getModule(modulePath)
|
976
981
|
};
|
@@ -1026,6 +1031,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
|
|
1026
1031
|
value: requestedName
|
1027
1032
|
};
|
1028
1033
|
}
|
1034
|
+
if (requestedName.includes("/ValApp")) {
|
1035
|
+
return {
|
1036
|
+
value: requestedName
|
1037
|
+
};
|
1038
|
+
}
|
1029
1039
|
const modulePath = moduleLoader.resolveModulePath(baseModuleName, requestedName);
|
1030
1040
|
return {
|
1031
1041
|
value: modulePath
|
@@ -2119,7 +2129,7 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
2119
2129
|
}
|
2120
2130
|
const path = url.pathname.slice(route.length);
|
2121
2131
|
if (path.startsWith("/static")) {
|
2122
|
-
return convert(await uiRequestHandler(path.slice("/static".length)));
|
2132
|
+
return convert(await uiRequestHandler(path.slice("/static".length), url.href));
|
2123
2133
|
} else if (path === "/session") {
|
2124
2134
|
return convert(await valServer.session(getCookies(req, [VAL_SESSION_COOKIE])));
|
2125
2135
|
} else if (path === "/authorize") {
|
package/package.json
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
"./package.json": "./package.json"
|
13
13
|
},
|
14
14
|
"types": "dist/valbuild-server.cjs.d.ts",
|
15
|
-
"version": "0.
|
15
|
+
"version": "0.51.1",
|
16
16
|
"scripts": {
|
17
17
|
"typecheck": "tsc --noEmit",
|
18
18
|
"test": "jest",
|
@@ -24,9 +24,9 @@
|
|
24
24
|
"concurrently": "^7.6.0"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@valbuild/core": "~0.
|
28
|
-
"@valbuild/shared": "~0.
|
29
|
-
"@valbuild/ui": "~0.
|
27
|
+
"@valbuild/core": "~0.51.1",
|
28
|
+
"@valbuild/shared": "~0.51.1",
|
29
|
+
"@valbuild/ui": "~0.51.1",
|
30
30
|
"express": "^4.18.2",
|
31
31
|
"image-size": "^1.0.2",
|
32
32
|
"queue": "^6.0.2",
|