Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cli/checkly-env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ npx checkly env add <key> [value] [options]

If you leave out the value, the CLI asks for it with a hidden input, which keeps it out of your shell history.

<Note>`checkly env add` fails if a variable with the same key already exists. Use [`checkly env update`](#checkly-env-update) to change its value, or pass `--secret` to `env update` to turn a plain variable into a secret.</Note>

**Options:**

| Option | Required | Description |
Expand Down
4 changes: 2 additions & 2 deletions constructs/including-checks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ create checks and monitors. This approach enables you to add and remove files fr

## `checks.checkMatch`

The `checkMatch` property takes a [glob pattern](https://www.npmjs.com/package/glob) to match files inside your
project structure that contain instances of a Check, i.e. `**/__checks__/*.check.ts`.
The `checkMatch` property takes a [glob pattern](https://www.npmjs.com/package/glob), or an array of glob patterns, to match files inside your
project structure that contain check constructs, for example `**/__checks__/*.check.ts`. Use an array to match several file extensions or directories, for example `["**/*.check.ts", "**/*.check.js"]`.

The goal of this property is so you can add files to an existing repo that are automatically detected. This pattern should be very familiar to unit testing: the test runner takes
care of finding, building and running all the files.
Expand Down
11 changes: 7 additions & 4 deletions constructs/project.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default defineConfig({
|-----------|------|----------|---------|-------------|
| `activated` | `boolean` | ❌ | `true` | Whether checks are enabled by default |
| `alertChannels` | `Array<AlertChannel \| AlertChannelRef>` | ❌ | `[]` | Default alert channels for all checks |
| `checkMatch` | `string \| string[]` | ❌ | - | Glob pattern to find check construct files |
| `checkMatch` | `string \| string[]` | ❌ | - | Glob pattern or array of glob patterns to find check construct files |
| `environmentVariables` | `EnvironmentVariable[]` | ❌ | `[]` | Default environment variables for all checks |
| `frequency` | `Frequency` | ❌ | - | Default frequency for all checks |
| `ignoreDirectoriesMatch` | `string[]` | - | - | Glob patterns for directories to ignore |
Expand Down Expand Up @@ -263,17 +263,20 @@ export default defineConfig({

<ResponseField name="checks.checkMatch" type="string | string[]">

Glob pattern where the CLI looks for files containing Check constructs, i.e. all `.check.ts` files.
A glob pattern, or an array of glob patterns, where the CLI looks for files containing check constructs, for example all `.check.ts` files. Use an array to match several file extensions or directories.

**Usage:**

{/* typecheck-wrap */}
```ts highlight={5}
```ts highlight={6}
export default defineConfig({
projectName: "Website Monitoring",
logicalId: "website-monitoring-1",
checks: {
checkMatch: ["**/*.check.ts"],
// Match a single glob
checkMatch: "**/*.check.ts",
// Or match multiple globs at once
// checkMatch: ["**/*.check.ts", "**/*.check.js"],
},
})
```
Expand Down
Loading