Skip to content

Commit

Permalink
ensure ttk regeneration happens for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome committed Nov 13, 2024
1 parent 5fe7eb2 commit 84fc577
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 84fc577

Please sign in to comment.