diff --git a/cli/checkly-env.mdx b/cli/checkly-env.mdx index b3d2478a..6e4b429f 100644 --- a/cli/checkly-env.mdx +++ b/cli/checkly-env.mdx @@ -41,6 +41,8 @@ npx checkly env add [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. +`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. + **Options:** | Option | Required | Description | diff --git a/constructs/including-checks.mdx b/constructs/including-checks.mdx index 1d56ca57..ea115b28 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 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. diff --git a/constructs/project.mdx b/constructs/project.mdx index 22da49fc..522cc5d2 100644 --- a/constructs/project.mdx +++ b/constructs/project.mdx @@ -195,7 +195,7 @@ export default defineConfig({ |-----------|------|----------|---------|-------------| | `activated` | `boolean` | ❌ | `true` | Whether checks are enabled by default | | `alertChannels` | `Array` | ❌ | `[]` | 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 | @@ -263,17 +263,20 @@ export default defineConfig({ -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"], }, }) ```