Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (flags['end-date']) {
options.endDate = flags['end-date'];
}
if (flags['polling-interval']) {
options.pollingInterval = flags['polling-interval'];
}
await this.output('Polling started...');
if (flags.enterprise) {
stream = await this.client.events.getEnterpriseEventStream(options);
} else {
stream = await this.client.events.getEventStream(options);
}
let events = pEvent.iterator(stream, 'data');
for await (let event of events) {
await this.output(event);
await this.output('**************************');
}
}
}