Files
twenty/packages/twenty-sdk/src/cli/commands/app-generate.command.ts
T
martmull 7f1e69740a 1895 extensibility v1 application tokens (#16365)
First PR to implement application tokens
- add new application role in twenty-server
- move duplicated constants and types to twenty-shared
- will  add role configuration utils into twenty-sdk in another PR
2025-12-08 10:42:46 +01:00

20 lines
597 B
TypeScript

import chalk from 'chalk';
import { GenerateService } from '@/cli/services/generate.service';
import { CURRENT_EXECUTION_DIRECTORY } from '@/cli/constants/current-execution-directory';
export class AppGenerateCommand {
private generateService = new GenerateService();
async execute(appPath: string = CURRENT_EXECUTION_DIRECTORY) {
try {
await this.generateService.generateClient(appPath);
} catch (error) {
console.error(
chalk.red('Generate Twenty client failed:'),
error instanceof Error ? error.message : error,
);
throw error;
}
}
}