1825 extensibility v1 see serverless logs using subscriptions in twnty cli or settings serverkess section (#16321)
- Adds a log section to settings serverless functions test tab <img width="1303" height="827" alt="image" src="https://github.com/user-attachments/assets/2ce70558-91bc-4cfc-aced-42ac9e0226bf" /> - Adds a new subscription endpoint to graphql api `serverlessFunctionLogs` that that emit function logs - Adds a new command `twenty app logs` to `twenty-sdk` to watch logs in terminal <img width="1109" height="182" alt="image" src="https://github.com/user-attachments/assets/2e874060-e99d-4978-ab9c-c91e52cb7478" /> <img width="1061" height="176" alt="image" src="https://github.com/user-attachments/assets/1f533e32-7435-4d7b-89c6-d1154816a8ab" /> - add new version for create-twenty-app and twenty-sdk `0.1.3`
This commit is contained in:
@@ -10,6 +10,7 @@ import { AppDevCommand } from './app-dev.command';
|
||||
import { AppSyncCommand } from './app-sync.command';
|
||||
import { formatPath } from '../utils/format-path';
|
||||
import { AppGenerateCommand } from './app-generate.command';
|
||||
import { AppLogsCommand } from '@/cli/commands/app-logs.command';
|
||||
|
||||
export class AppCommand {
|
||||
private devCommand = new AppDevCommand();
|
||||
@@ -17,6 +18,7 @@ export class AppCommand {
|
||||
private uninstallCommand = new AppUninstallCommand();
|
||||
private addCommand = new AppAddCommand();
|
||||
private generateCommand = new AppGenerateCommand();
|
||||
private logsCommand = new AppLogsCommand();
|
||||
|
||||
getCommand(): Command {
|
||||
const appCommand = new Command('app');
|
||||
@@ -110,6 +112,32 @@ export class AppCommand {
|
||||
await this.generateCommand.execute(formatPath(appPath));
|
||||
});
|
||||
|
||||
appCommand
|
||||
.command('logs [appPath]')
|
||||
.option(
|
||||
'-u, --functionUniversalIdentifier <functionUniversalIdentifier>',
|
||||
'Only show logs for the function with this universal ID',
|
||||
)
|
||||
.option(
|
||||
'-n, --functionName <functionName>',
|
||||
'Only show logs for the function with this name',
|
||||
)
|
||||
.description('Watch application function logs')
|
||||
.action(
|
||||
async (
|
||||
appPath?: string,
|
||||
options?: {
|
||||
functionUniversalIdentifier?: string;
|
||||
functionName?: string;
|
||||
},
|
||||
) => {
|
||||
await this.logsCommand.execute({
|
||||
...options,
|
||||
appPath: formatPath(appPath),
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
return appCommand;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user