-
Notifications
You must be signed in to change notification settings - Fork 27
/
list.ts
25 lines (19 loc) · 1.08 KB
/
list.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { SfdxCommand } from '@salesforce/command';
import { Messages } from '@salesforce/core';
import { JsonMap } from '@salesforce/ts-types';
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-waw-plugin', 'waw');
export default class ConnectedAppCreate extends SfdxCommand {
public static description = messages.getMessage('trace.list.description');
public static examples = [];
protected static requiresUsername = true;
public async run(): Promise<JsonMap[]> {
const conn = this.org.getConnection();
const res = await conn.tooling.query<JsonMap>('SELECT Id, CreatedDate, TracedEntityId, ExpirationDate, Workflow, Validation, Callout, ApexCode, ApexProfiling, Visualforce, System, Database, DebugLevelId, LogType, Wave FROM TraceFlag');
this.ux.styledJSON(res.records);
return res.records;
}
}