feat: add module schema discovery and validation
This commit is contained in:
@@ -238,15 +238,15 @@ async function resolveEntrypoints(
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
entrypointName === "server" &&
|
||||
["schema", "server"].includes(entrypointName) &&
|
||||
![".js", ".mjs"].includes(path.extname(relativeEntrypoint).toLowerCase())
|
||||
) {
|
||||
issues.push({
|
||||
code: "MODULE_ENTRYPOINT_INVALID",
|
||||
message: "server must reference compiled ESM JavaScript with a .js or .mjs extension.",
|
||||
message: `${entrypointName} must reference compiled ESM JavaScript with a .js or .mjs extension.`,
|
||||
moduleDirectory: directoryName,
|
||||
moduleId: manifest.id,
|
||||
path: "entrypoints.server",
|
||||
path: `entrypoints.${entrypointName}`,
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user