@valbuild/server 0.37.0 → 0.38.0

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.
@@ -961,14 +961,19 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
961
961
  value: "export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } );"
962
962
  };
963
963
  }
964
+ if (modulePath.startsWith("react/jsx-runtime")) {
965
+ return {
966
+ value: "export const jsx = () => { throw Error(`Cannot use 'jsx' in this type of file`) }; export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } ); export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
967
+ };
968
+ }
964
969
  if (modulePath.startsWith("react")) {
965
970
  return {
966
- value: "export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
971
+ value: "export const useTransition = () => { throw Error(`Cannot use 'useTransition' in this type of file`) }; export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } ); export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
967
972
  };
968
973
  }
969
974
  if (modulePath.includes("/ValNextProvider")) {
970
975
  return {
971
- value: "export const ValNextProvider = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValProvider' in this file`) } } } )"
976
+ value: "export const ValNextProvider = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValNextProvider' in this file`) } } } )"
972
977
  };
973
978
  }
974
979
  return {
@@ -1006,6 +1011,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
1006
1011
  value: requestedName
1007
1012
  };
1008
1013
  }
1014
+ if (requestedName.startsWith("react/jsx-runtime")) {
1015
+ return {
1016
+ value: requestedName
1017
+ };
1018
+ }
1009
1019
  if (requestedName.startsWith("react")) {
1010
1020
  return {
1011
1021
  value: requestedName
@@ -961,14 +961,19 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
961
961
  value: "export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } );"
962
962
  };
963
963
  }
964
+ if (modulePath.startsWith("react/jsx-runtime")) {
965
+ return {
966
+ value: "export const jsx = () => { throw Error(`Cannot use 'jsx' in this type of file`) }; export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } ); export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
967
+ };
968
+ }
964
969
  if (modulePath.startsWith("react")) {
965
970
  return {
966
- value: "export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
971
+ value: "export const useTransition = () => { throw Error(`Cannot use 'useTransition' in this type of file`) }; export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } ); export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
967
972
  };
968
973
  }
969
974
  if (modulePath.includes("/ValNextProvider")) {
970
975
  return {
971
- value: "export const ValNextProvider = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValProvider' in this file`) } } } )"
976
+ value: "export const ValNextProvider = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValNextProvider' in this file`) } } } )"
972
977
  };
973
978
  }
974
979
  return {
@@ -1006,6 +1011,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
1006
1011
  value: requestedName
1007
1012
  };
1008
1013
  }
1014
+ if (requestedName.startsWith("react/jsx-runtime")) {
1015
+ return {
1016
+ value: requestedName
1017
+ };
1018
+ }
1009
1019
  if (requestedName.startsWith("react")) {
1010
1020
  return {
1011
1021
  value: requestedName
@@ -931,14 +931,19 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
931
931
  value: "export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } );"
932
932
  };
933
933
  }
934
+ if (modulePath.startsWith("react/jsx-runtime")) {
935
+ return {
936
+ value: "export const jsx = () => { throw Error(`Cannot use 'jsx' in this type of file`) }; export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } ); export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
937
+ };
938
+ }
934
939
  if (modulePath.startsWith("react")) {
935
940
  return {
936
- value: "export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
941
+ value: "export const useTransition = () => { throw Error(`Cannot use 'useTransition' in this type of file`) }; export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'next' in this file`) } } } ); export default new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'react' in this file`) } } } )"
937
942
  };
938
943
  }
939
944
  if (modulePath.includes("/ValNextProvider")) {
940
945
  return {
941
- value: "export const ValNextProvider = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValProvider' in this file`) } } } )"
946
+ value: "export const ValNextProvider = new Proxy({}, { get() { return () => { throw new Error(`Cannot import 'ValNextProvider' in this file`) } } } )"
942
947
  };
943
948
  }
944
949
  return {
@@ -976,6 +981,11 @@ async function newValQuickJSRuntime(quickJSModule, moduleLoader, {
976
981
  value: requestedName
977
982
  };
978
983
  }
984
+ if (requestedName.startsWith("react/jsx-runtime")) {
985
+ return {
986
+ value: requestedName
987
+ };
988
+ }
979
989
  if (requestedName.startsWith("react")) {
980
990
  return {
981
991
  value: requestedName
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.37.0",
15
+ "version": "0.38.0",
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.37.0",
28
- "@valbuild/shared": "~0.37.0",
29
- "@valbuild/ui": "~0.37.0",
27
+ "@valbuild/core": "~0.38.0",
28
+ "@valbuild/shared": "~0.38.0",
29
+ "@valbuild/ui": "~0.38.0",
30
30
  "express": "^4.18.2",
31
31
  "image-size": "^1.0.2",
32
32
  "queue": "^6.0.2",