bug: locations is required on interface CheckGroupProps
Node.js version
16.17.0
NPM version
8.15.0
@checkly/cli version
4.6.1
Steps to reproduce
When creating a new CheckGroup(), if the CheckGroupProps argument is using privateLocations and omits locations there is a TypeScript Error:
Property 'locations' is missing in type '{ alertChannels: AlertChannelWrapper[]; name: string; activated: true; muted: false; concurrency: number; frequency: Frequency; tags: string[]; privateLocations: string[]; browserChecks: { ...; }; retryStrategy: RetryStrategy; }' but required in type 'CheckGroupProps'.ts(2345)
Is it ok for locations to be an Optional parameter in the interface CheckGroupProps?
https://github.com/checkly/checkly-cli/blob/bfc68daeeacc92cfe427e20305a2a36dc0fac043/packages/cli/src/constructs/check-group.ts#L70
This would match with interface CheckProps which is used by ApiCheck and BrowserCheck.
https://github.com/checkly/checkly-cli/blob/bfc68daeeacc92cfe427e20305a2a36dc0fac043/packages/cli/src/constructs/check.ts#L51
Thanks!
What is expected?
No TypeScript error
What is actually happening?
TypeScript Error
Any additional comments?
For context, we're running one Group of checks using privateLocations and a separate Group of checks using locations.
thanks @slmoore for reporting this.
@slmoore this was just fixed in v4.8.1 which was just published on NPM https://www.npmjs.com/package/checkly