-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add remaining events [FTL-8912] (#95)
* feat: [FTL-8912] Added more events * feat: add time taken to generate app --------- Co-authored-by: diegoscaro <[email protected]>
- Loading branch information
1 parent
337eddf
commit 7b88fef
Showing
5 changed files
with
32 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
import { commands } from 'vscode' | ||
|
||
import { ext } from '../extensionVariables' | ||
import { telemetryHelpers } from '../features/telemetry/telemetryHelpers' | ||
import { generateAffinidiAppWithCLI } from './create-app/generator' | ||
import { labels } from '../tree/messages' | ||
import { DevToolsTreeItem } from '../tree/devToolsTreeItem' | ||
import { credentialsVault } from '../config/credentialsVault' | ||
|
||
export const initGenerators = () => { | ||
ext.context.subscriptions.push( | ||
commands.registerCommand('affinidi.codegen.app', async (element: DevToolsTreeItem) => { | ||
telemetryHelpers.trackCommand('affinidi.codegen.app') | ||
|
||
await generateAffinidiAppWithCLI( | ||
const reffAppName = | ||
element?.label?.toString() === labels.portableReputation | ||
? 'portable-reputation' | ||
: 'certification-and-verification', | ||
) | ||
: 'certification-and-verification' | ||
|
||
const timeStamp = credentialsVault.getTimeStamp() | ||
await generateAffinidiAppWithCLI(reffAppName) | ||
|
||
telemetryHelpers.trackCommand('affinidi.codegen.app.completed', { | ||
timeTaken: timeStamp ? Math.floor((Date.now() - timeStamp) / 1000) : 0, | ||
referenceApp: reffAppName, | ||
}) | ||
}), | ||
) | ||
} |