@valbuild/server 0.60.13 → 0.60.14

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.
@@ -927,7 +927,11 @@ class ValModuleLoader {
927
927
  }
928
928
  const matches = this.findMatchingJsFile(sourceFileName);
929
929
  if (matches.match === false) {
930
- throw Error(`Could not find matching js file for module "${requestedModuleName}" requested by: "${containingFilePath}". Tried:\n${matches.tried.join("\n")}`);
930
+ let debugInfo = "";
931
+ if (sourceFileName.includes("val.config")) {
932
+ debugInfo = `\n@valbuild directory scan:\n${this.host.readDirectory("/", ["js", "ts", "json"], [], ["**/@valbuild/*"]).join("\n")}`;
933
+ }
934
+ throw Error(`Could not find matching js file for module "${requestedModuleName}" requested by: "${containingFilePath}". Tried:\n${matches.tried.join("\n")}${debugInfo}`);
931
935
  }
932
936
  const filePath = matches.match;
933
937
  // resolve all symlinks (preconstruct for example symlinks the dist folder)
@@ -1055,7 +1059,7 @@ export const IS_DEV = false;2
1055
1059
  };
1056
1060
  } catch (e) {
1057
1061
  return {
1058
- error: Error(`Could not resolve module: '${modulePath}': `)
1062
+ error: Error(`Could not resolve module: '${modulePath}'`)
1059
1063
  };
1060
1064
  }
1061
1065
  }, (baseModuleName, requestedName) => {
@@ -927,7 +927,11 @@ class ValModuleLoader {
927
927
  }
928
928
  const matches = this.findMatchingJsFile(sourceFileName);
929
929
  if (matches.match === false) {
930
- throw Error(`Could not find matching js file for module "${requestedModuleName}" requested by: "${containingFilePath}". Tried:\n${matches.tried.join("\n")}`);
930
+ let debugInfo = "";
931
+ if (sourceFileName.includes("val.config")) {
932
+ debugInfo = `\n@valbuild directory scan:\n${this.host.readDirectory("/", ["js", "ts", "json"], [], ["**/@valbuild/*"]).join("\n")}`;
933
+ }
934
+ throw Error(`Could not find matching js file for module "${requestedModuleName}" requested by: "${containingFilePath}". Tried:\n${matches.tried.join("\n")}${debugInfo}`);
931
935
  }
932
936
  const filePath = matches.match;
933
937
  // resolve all symlinks (preconstruct for example symlinks the dist folder)
@@ -1055,7 +1059,7 @@ export const IS_DEV = false;2
1055
1059
  };
1056
1060
  } catch (e) {
1057
1061
  return {
1058
- error: Error(`Could not resolve module: '${modulePath}': `)
1062
+ error: Error(`Could not resolve module: '${modulePath}'`)
1059
1063
  };
1060
1064
  }
1061
1065
  }, (baseModuleName, requestedName) => {
@@ -896,7 +896,11 @@ class ValModuleLoader {
896
896
  }
897
897
  const matches = this.findMatchingJsFile(sourceFileName);
898
898
  if (matches.match === false) {
899
- throw Error(`Could not find matching js file for module "${requestedModuleName}" requested by: "${containingFilePath}". Tried:\n${matches.tried.join("\n")}`);
899
+ let debugInfo = "";
900
+ if (sourceFileName.includes("val.config")) {
901
+ debugInfo = `\n@valbuild directory scan:\n${this.host.readDirectory("/", ["js", "ts", "json"], [], ["**/@valbuild/*"]).join("\n")}`;
902
+ }
903
+ throw Error(`Could not find matching js file for module "${requestedModuleName}" requested by: "${containingFilePath}". Tried:\n${matches.tried.join("\n")}${debugInfo}`);
900
904
  }
901
905
  const filePath = matches.match;
902
906
  // resolve all symlinks (preconstruct for example symlinks the dist folder)
@@ -1024,7 +1028,7 @@ export const IS_DEV = false;2
1024
1028
  };
1025
1029
  } catch (e) {
1026
1030
  return {
1027
- error: Error(`Could not resolve module: '${modulePath}': `)
1031
+ error: Error(`Could not resolve module: '${modulePath}'`)
1028
1032
  };
1029
1033
  }
1030
1034
  }, (baseModuleName, 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.60.13",
15
+ "version": "0.60.14",
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.60.13",
28
- "@valbuild/shared": "~0.60.13",
29
- "@valbuild/ui": "~0.60.13",
27
+ "@valbuild/core": "~0.60.14",
28
+ "@valbuild/shared": "~0.60.14",
29
+ "@valbuild/ui": "~0.60.14",
30
30
  "express": "^4.18.2",
31
31
  "image-size": "^1.0.2",
32
32
  "minimatch": "^3.0.4",