Skip to content

Commit

Permalink
Task: Correct placement of the ttk regerate app command (#5767)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome authored Nov 18, 2024
1 parent ec33ded commit e0d9478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ export class RegenerateButtonCommand extends Command {

if (isClientType(generationType)) {
await regenerateService.regenerateClient(settings, selectedPaths);

}
if (isPluginType(generationType)) {
await regenerateService.regeneratePlugin(settings, selectedPaths);
const workspaceJson = vscode.workspace.textDocuments.find(doc => doc.fileName.endsWith(KIOTA_WORKSPACE_FILE));
if (workspaceJson && !workspaceJson.isDirty) {
await regenerateService.regenerateTeamsApp(workspaceJson, clientOrPluginKey);
}
}
if (isPluginType(generationType)) {
await regenerateService.regeneratePlugin(settings, selectedPaths);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ export class RegenerateCommand extends Command {
const regenerateService = new RegenerateService(this._context, this._openApiTreeProvider, clientOrPluginKey, clientOrPluginObject);
if (isClientType(generationType)) {
await regenerateService.regenerateClient(settings);
if (workspaceJson) {
await regenerateService.regenerateTeamsApp(workspaceJson, clientOrPluginKey);
}
}
if (isPluginType(generationType)) {
await regenerateService.regeneratePlugin(settings);
if (workspaceJson) {
await regenerateService.regenerateTeamsApp(workspaceJson, clientOrPluginKey);
}
}
}
}

0 comments on commit e0d9478

Please sign in to comment.