You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every resource you create using the [Checkly CLI](/cli/overview/) is represented by a "construct": it's a class you import from `checkly/constructs`,
11
12
for instance an `ApiCheck` or `EmailAlertChannel`. A construct is the "as-code" representation of the eventual resource
12
13
created / deleted / updated on the Checkly cloud once you run `npx checkly deploy`.
13
14
15
+
<Tip>
16
+
You must install the [Checkly CLI](/cli/overview) before you can use constructs.
17
+
</Tip>
18
+
19
+
Constructs are JavaScript/TypeScript classes that represent your all monitoring resources. Import them from `checkly/constructs` to create checks, alert channels, and other resources in code.
Use the [Checkly CLI](/cli/) to turn your Playwright tests into globally distributed monitors. Checkly uses your existing `package.json` dependencies and Playwright configuration.
8
8
9
+
<Info>
10
+
**Runtime Environment**: Playwright Check Suites run in a Node.js runtime containing your custom dependencies. See the [runtime specification](/platform/runtimes/runtime-specification) for further details.
11
+
</Info>
12
+
9
13
## Using JavaScript/Node.js dependencies
10
14
11
15
Checkly installs dependencies from your `package.json` and lock files. It works with [npm](https://www.npmjs.com/), [yarn](https://yarnpkg.com/), and [pnpm](https://pnpm.io/).
12
16
13
17
By default, Checkly installs all dependencies (both `dependencies` and `devDependencies`). You can change this setting to install only `devDependencies` in your [account settings](https://app.checklyhq.com/accounts/settings/account/playwright).
Checkly caches installed packages between check runs to speed up execution and reduce installation time. Dependencies are installed once and reused for subsequent runs until your lock files (`package-lock.json`, `pnpm-lock.yaml`, or `yarn.lock`) change.
142
+
143
+
### How caching works
144
+
145
+
When dependency caching is enabled:
146
+
147
+
1. On the first run, Checkly installs all packages from your lock file and stores them in cache
148
+
2. On subsequent runs, Checkly checks if your lock file has changed
149
+
3. If unchanged, Checkly uses the cached packages, skipping the installation step
150
+
4. If changed, Checkly installs packages again and updates the cache
151
+
152
+
This significantly reduces check execution time, especially for projects with many or large dependencies.
153
+
154
+
### Cache behavior by location type
155
+
156
+
**Public Locations**: Dependency caching is **Always ON**.
157
+
158
+
**Private Locations**: Dependency caching is **OFF by default**. To enable caching and speed up check runs, set `DEPENDENCY_CACHE=CHECKLY_S3` in your [agent configuration](/platform/private-locations/agent-configuration).
0 commit comments