Skip to content
Open
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 @@ -39,6 +39,8 @@ Create a new global environment variable.
npx checkly env add <key> <value> [options]
```

<Note>Use `checkly env add` only to create new variables. If a variable with the same key already exists, use [`checkly env update`](#checkly-env-update) to change its value. To convert an existing plain variable into a secret, first remove it with `checkly env rm <key>` and then re-add it with `--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 instances of a Check, i.e. `**/__checks__/*.check.ts`. Use an array when you need to match multiple file extensions or directories, e.g. `["**/*.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 @@ -187,7 +187,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` | ❌ | - | 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 @@ -250,9 +250,9 @@ export default defineConfig({

</ResponseField>

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

Glob pattern where the CLI looks for files containing Check constructs, i.e. all `.check.ts` files.
Glob pattern (or array of glob patterns) where the CLI looks for files containing Check constructs, i.e. all `.check.ts` files. Pass an array to match multiple file extensions or directories at once.

**Usage:**

Expand All @@ -261,7 +261,10 @@ 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