message: Sync with new base-connector version
diff: import { BaseConnector, EventConfiguration } from 'reshuffle-base-connector'
  -import Timeout = NodeJS.Timeout
  +import Timer = NodeJS.Timer
  import Reshuffle from '../Reshuffle'
  const DEFAULT_CRON_OPTIONS = { interval: 5000 }
  @@ -9,7 +9,7 @@ export interface CronConnectorOptions {
  }
  export default class CronConnector extends BaseConnector<CronConnectorOptions> {
  - intervalsByEventId: { [eventId: string]: Timeout }
  + intervalsByEventId: { [eventId: string]: Timer }
  constructor(options: CronConnectorOptions = DEFAULT_CRON_OPTIONS, id: string) {
  super(options, id)
  @@ -25,9 +25,9 @@ export default class CronConnector extends BaseConnector<CronConnectorOptions> {
  this.eventConfigurations[event.id] = event
  // lazy run if already running
  - if (this.started) {
  + if (this.started && this.app) {
  const intervalId = this.app.setInterval(() => {
  - this.app.handleEvent(event.id)
  + this.app?.handleEvent(event.id, event)
  }, event.options.interval)
  this.intervalsByEventId[event.id] = intervalId
  }
  @@ -35,19 +35,21 @@ export default class CronConnector extends BaseConnector<CronConnectorOptions> {
  }
  onRemoveEvent(event: EventConfiguration) {
  - clearInterval(this.intervalsByEventId[event.id])
  + this.app?.clearInterval(this.intervalsByEventId[event.id])
  }
  onStart(app: Reshuffle) {
  Object.values(this.eventConfigurations).forEach((eventConfiguration) => {
  - const intervalId = this.app.setInterval(() => {
  - this.app.handleEvent(eventConfiguration.id, {})
  + const intervalId = this.app?.setInterval(() => {
  + this.app?.handleEvent(eventConfiguration.id, {})
  }, eventConfiguration.options.interval)
  + if (intervalId) {
  this.intervalsByEventId[eventConfiguration.id] = intervalId
  + }
  })
  }
  onStop() {
  - Object.values((intervalId: Timeout) => clearInterval(intervalId))
  + Object.values((intervalId: Timer) => clearInterval(intervalId))
  }
  }
  