From 97da09cdf0112866f767c4a6f55985fd4c64a561 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 13:08:57 +0000 Subject: [PATCH] docs: clarify checkMatch array support and env add for existing keys --- cli/checkly-env.mdx | 2 ++ constructs/including-checks.mdx | 4 ++-- constructs/project.mdx | 11 +++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cli/checkly-env.mdx b/cli/checkly-env.mdx index 7dcd2599..926f561e 100644 --- a/cli/checkly-env.mdx +++ b/cli/checkly-env.mdx @@ -39,6 +39,8 @@ Create a new global environment variable. npx checkly env add [options] ``` +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 ` and then re-add it with `--secret`. + **Options:** | Option | Required | Description | diff --git a/constructs/including-checks.mdx b/constructs/including-checks.mdx index 3acfd16c..d8cba182 100644 --- a/constructs/including-checks.mdx +++ b/constructs/including-checks.mdx @@ -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. diff --git a/constructs/project.mdx b/constructs/project.mdx index 6a62faf1..b334c34e 100644 --- a/constructs/project.mdx +++ b/constructs/project.mdx @@ -187,7 +187,7 @@ export default defineConfig({ |-----------|------|----------|---------|-------------| | `activated` | `boolean` | ❌ | `true` | Whether checks are enabled by default | | `alertChannels` | `Array` | ❌ | `[]` | 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 | @@ -250,9 +250,9 @@ export default defineConfig({ - + -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:** @@ -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"], }, }) ```