create-selfchecks 0.1.4 → 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,61 @@
1
+ # create-selfchecks
2
+
3
+ Create a minimal [Selfchecks](https://selfchecks.github.io/) project with one browser
4
+ check for `https://selfchecks.github.io/`.
5
+
6
+ ## Quick start
7
+
8
+ ```bash
9
+ npx create-selfchecks my-checks
10
+ cd my-checks
11
+ npx playwright install chromium
12
+ npm test
13
+ ```
14
+
15
+ Without a directory argument, the command creates `./selfchecks-project`. The target
16
+ directory must be empty.
17
+
18
+ ## Options
19
+
20
+ ```text
21
+ Usage: create-selfchecks [directory] [options]
22
+
23
+ Options:
24
+ --skip-install Create files without running npm install
25
+ -h, --help Display help
26
+ ```
27
+
28
+ Node.js 20 or newer is required.
29
+
30
+ ## Generated project
31
+
32
+ The starter includes:
33
+
34
+ - a Selfchecks configuration;
35
+ - a `BrowserCheck` definition;
36
+ - a Playwright test that opens `https://selfchecks.github.io/`;
37
+ - TypeScript and Playwright configuration;
38
+ - scripts for local tests, typechecking, and remote deployment.
39
+
40
+ To deploy the generated check, configure your Selfchecks server and use the included
41
+ CLI:
42
+
43
+ ```bash
44
+ export SELFCHECKS_URL=https://checks.example.com
45
+ export SELFCHECKS_API_TOKEN=replace-with-a-secret
46
+ npm run selfchecks -- deploy --project my-project --root .
47
+ ```
48
+
49
+ ## Programmatic API
50
+
51
+ ```ts
52
+ import { createSelfchecksProject } from "create-selfchecks";
53
+
54
+ await createSelfchecksProject({
55
+ targetDir: "./my-checks",
56
+ install: false,
57
+ });
58
+ ```
59
+
60
+ See the [Selfchecks getting started guide](https://selfchecks.github.io/getting-started.html)
61
+ for the next steps.
@@ -1,4 +1,4 @@
1
- export declare const SELFCHECKS_PACKAGE_VERSION = "0.1.4";
1
+ export declare const SELFCHECKS_PACKAGE_VERSION = "0.1.5";
2
2
  export declare const starterFiles: {
3
3
  readonly ".gitignore": "node_modules/\nplaywright-report/\ntest-results/\n.selfchecks/\n";
4
4
  readonly "README.md": "# Selfchecks starter\n\nThis project was created with `create-selfchecks` and checks that the Selfchecks\nwebsite is available.\n\n```bash\nnpx playwright install chromium\nnpm test\n\nexport SELFCHECKS_URL=https://checks.example.com\nexport SELFCHECKS_API_TOKEN=replace-with-a-secret\nnpm run selfchecks -- deploy --project starter --root .\n```\n";
package/dist/templates.js CHANGED
@@ -1,4 +1,4 @@
1
- export const SELFCHECKS_PACKAGE_VERSION = "0.1.4";
1
+ export const SELFCHECKS_PACKAGE_VERSION = "0.1.5";
2
2
  export const starterFiles = {
3
3
  ".gitignore": `node_modules/
4
4
  playwright-report/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-selfchecks",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Create a minimal Selfchecks project",
5
5
  "type": "module",
6
6
  "files": [