Merge branch 'bugfix/cli-init' of https://github.com/Chigala/trigger.dev into Chigala-bugfix/cli-init
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@trigger.dev/cli": patch
|
||||
---
|
||||
|
||||
fixed the cli init log message to show the correct path to the app route created
|
||||
@@ -527,7 +527,11 @@ export * from "./examples"
|
||||
|
||||
await fs.writeFile(pathModule.join(directories, routeFileName), routeContent);
|
||||
|
||||
logger.success(`✅ Created app route at ${usesSrcDir ? "src/" : ""}app/api/trigger.ts`);
|
||||
logger.success(
|
||||
`✅ Created app route at ${usesSrcDir ? "src/" : ""}app/api/${removeFileExtension(
|
||||
triggerFileName
|
||||
)}/${routeFileName}`
|
||||
);
|
||||
|
||||
const triggerFileExists = await pathExists(pathModule.join(path, triggerFileName));
|
||||
|
||||
@@ -735,3 +739,7 @@ async function setupEnvironmentVariable(
|
||||
logger.success(`✅ Added ${variableName}=${renderer(value)} to ${fileName}`);
|
||||
}
|
||||
}
|
||||
|
||||
function removeFileExtension(filename: string) {
|
||||
return filename.replace(/\.[^.]+$/, "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user