@selfchecks/selfchecks 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# @selfchecks/selfchecks
|
|
2
|
+
|
|
3
|
+
Checkly-compatible checks-as-code constructs supported by
|
|
4
|
+
[Selfchecks](https://selfchecks.github.io/), a self-hosted synthetic monitoring
|
|
5
|
+
service.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install --save-dev @selfchecks/selfchecks @playwright/test
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Node.js 20 or newer is required.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Create a Selfchecks configuration:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// checkly.config.ts
|
|
21
|
+
import { defineConfig } from "@selfchecks/selfchecks";
|
|
22
|
+
import { Frequency } from "@selfchecks/selfchecks/constructs";
|
|
23
|
+
|
|
24
|
+
export default defineConfig({
|
|
25
|
+
projectName: "My project",
|
|
26
|
+
logicalId: "my-project",
|
|
27
|
+
checks: {
|
|
28
|
+
activated: true,
|
|
29
|
+
frequency: Frequency.EVERY_15M,
|
|
30
|
+
checkMatch: "**/*.check.ts",
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Define a browser check:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
// checks/homepage.check.ts
|
|
39
|
+
import { BrowserCheck, Frequency } from "@selfchecks/selfchecks/constructs";
|
|
40
|
+
|
|
41
|
+
new BrowserCheck("homepage", {
|
|
42
|
+
name: "Homepage",
|
|
43
|
+
activated: true,
|
|
44
|
+
frequency: Frequency.EVERY_15M,
|
|
45
|
+
tags: ["smoke", "browser"],
|
|
46
|
+
code: {
|
|
47
|
+
entrypoint: "homepage.spec.ts",
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The entrypoint is a regular Playwright Test file.
|
|
53
|
+
|
|
54
|
+
## Checkly-compatible imports
|
|
55
|
+
|
|
56
|
+
Existing projects can keep supported imports from `checkly` by installing this
|
|
57
|
+
package through an npm alias:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"checkly": "npm:@selfchecks/selfchecks@latest"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The following imports are supported:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import { defineConfig } from "checkly";
|
|
71
|
+
import {
|
|
72
|
+
AlertEscalationBuilder,
|
|
73
|
+
ApiCheck,
|
|
74
|
+
AssertionBuilder,
|
|
75
|
+
BrowserCheck,
|
|
76
|
+
CheckGroup,
|
|
77
|
+
CheckGroupV2,
|
|
78
|
+
Frequency,
|
|
79
|
+
RetryStrategyBuilder,
|
|
80
|
+
WebhookAlertChannel,
|
|
81
|
+
} from "checkly/constructs";
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Compatibility is intentionally limited to these constructs and their exported
|
|
85
|
+
TypeScript types. Other Checkly constructs, CLI commands, cloud APIs, and runtime
|
|
86
|
+
features are not supported. Assertion and alert objects are accepted for source
|
|
87
|
+
compatibility, but Selfchecks does not currently deploy their Checkly configuration.
|
|
88
|
+
|
|
89
|
+
See the complete [migration guide](https://selfchecks.github.io/getting-started.html#migration)
|
|
90
|
+
and [Selfchecks documentation](https://selfchecks.github.io/getting-started.html).
|