Improved messages

This commit is contained in:
Matt Aitken
2023-06-29 21:53:16 +01:00
parent 8626172faa
commit 90abcb2cf7
+4 -8
View File
@@ -25,10 +25,12 @@ export async function devCommand(path: string, anyOptions: any) {
// Detect if are are in a Next.js project
const isNextJsProject = await detectNextJsProject(resolvedPath);
if (!isNextJsProject) {
logger.error("You must run this command in a Next.js project.");
logger.error(
`You must run this command in a Next.js project: ${resolvedPath}`
);
process.exit(1);
}
logger.success(`✅ Detected valid Next.js project at ${resolvedPath}`);
logger.success(`✅ Detected valid Next.js project`);
// Read from package.json to get the endpointId
const endpointId = await getEndpointIdFromPackageJson(resolvedPath);
@@ -137,9 +139,3 @@ async function refreshEndpoint(
return response.data;
}
function wait(duration: number) {
return new Promise((resolve) => {
setTimeout(resolve, duration);
});
}