@selfchecks/selfchecks-cli 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 ADDED
@@ -0,0 +1,73 @@
1
+ # @selfchecks/selfchecks-cli
2
+
3
+ Command-line client for deploying and running checks against a
4
+ [Selfchecks](https://selfchecks.github.io/) server.
5
+
6
+ ## Installation
7
+
8
+ ```bash
9
+ npm install --save-dev @selfchecks/selfchecks-cli
10
+ ```
11
+
12
+ The package installs the `selfchecks` executable. Node.js 20 or newer is required.
13
+
14
+ ## Configuration
15
+
16
+ Set the URL and API token issued by your Selfchecks server:
17
+
18
+ ```bash
19
+ export SELFCHECKS_URL=https://checks.example.com
20
+ export SELFCHECKS_API_TOKEN=replace-with-a-secret
21
+ ```
22
+
23
+ Both values can also be passed with `--api-url` and `--api-token`.
24
+
25
+ ## Commands
26
+
27
+ Deploy checks from the current repository:
28
+
29
+ ```bash
30
+ npx selfchecks deploy --project my-project --root .
31
+ ```
32
+
33
+ Upload and run selected checks in an isolated test session:
34
+
35
+ ```bash
36
+ npx selfchecks test --project my-project --root . --record \
37
+ --tags smoke,browser \
38
+ --type browser \
39
+ -e ENVIRONMENT_URL=https://app.example.com
40
+ ```
41
+
42
+ Run the latest deployed checks:
43
+
44
+ ```bash
45
+ npx selfchecks trigger --project my-project --record
46
+ ```
47
+
48
+ Use `npx selfchecks <command> --help` for the complete option list. The CLI prints
49
+ JSON summaries and exits with a non-zero status when checks fail.
50
+
51
+ ## CI
52
+
53
+ Install the CLI as a development dependency and run the same commands in CI. GitLab
54
+ metadata is detected from `CI_PROJECT_PATH`, `CI_COMMIT_REF_NAME`, `CI_COMMIT_SHA`,
55
+ `CI_PIPELINE_URL`, and `CI_JOB_URL`. These values can also be supplied explicitly.
56
+
57
+ Runtime variables can be repeated with `-e NAME=value` or provided as an array of
58
+ `{ "name": "...", "value": "..." }` objects in `SELFCHECKS_ENV_JSON`.
59
+
60
+ ## Programmatic API
61
+
62
+ The package also exports the remote operations for Node.js applications:
63
+
64
+ ```ts
65
+ import {
66
+ runRemoteDeploy,
67
+ runRemoteTestSession,
68
+ runRemoteTrigger,
69
+ } from "@selfchecks/selfchecks-cli";
70
+ ```
71
+
72
+ See the [Selfchecks getting started guide](https://selfchecks.github.io/getting-started.html)
73
+ for check definitions, CI examples, and server installation.
@@ -1,2 +1,2 @@
1
- export declare const SELFCHECKS_CLI_VERSION = "0.1.3";
1
+ export declare const SELFCHECKS_CLI_VERSION = "0.1.5";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const SELFCHECKS_CLI_VERSION = "0.1.3";
1
+ export const SELFCHECKS_CLI_VERSION = "0.1.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selfchecks/selfchecks-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Remote CLI for Selfchecks",
5
5
  "type": "module",
6
6
  "files": [