@checksum-ai/runtime 4.5.0 → 4.7.0
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/.env +1 -1
- package/README.md +3 -3
- package/checksum-root/.gitignore.example +10 -6
- package/checksum-root/checksum.config.ts +16 -4
- package/checksum-root/eslint.config.mjs +31 -0
- package/checksum-root/tsconfig.json +1 -1
- package/cli.js +235 -227
- package/package.json +1 -1
- package/checksum-root/eslint.config.js +0 -54
package/.env
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
CHECKSUM_RUNTIME_BUILD_TIME=2026-
|
|
1
|
+
CHECKSUM_RUNTIME_BUILD_TIME=2026-07-01T07:45:17.033Z
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
1. Install the package using `npm install -D checksumai` or `yarn add checksumai -D`.
|
|
6
6
|
2. Navigate to the directory where you want to initialize the Checksum tests folder and run `npx checksumai init`.
|
|
7
7
|
3. In the newly created `checksum` folder:
|
|
8
|
-
1.
|
|
8
|
+
1. Define `CHECKSUM_API_KEY` and `BASE_URL` in `checksum/.env` or your shell; the starter config reads `process.env.CHECKSUM_API_KEY` and `process.env.BASE_URL!`.
|
|
9
9
|
2. Update `login.ts` with your Playwright login flow. See the Login Function section below for the current params-object API.
|
|
10
10
|
3. Review the starter examples in `checksum/tests/examples/example.checksum.spec.ts` and `checksum/tests/examples/example.checksum.md`.
|
|
11
11
|
4. Re-running `npx checksumai init` later backfills any missing starter files without overwriting files you already customized.
|
|
@@ -91,10 +91,10 @@ Alongside standard test run configurations found in `playwright.config.ts`, use
|
|
|
91
91
|
runMode: RunMode.Normal,
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* Define CHECKSUM_API_KEY in checksum/.env or your shell.
|
|
95
95
|
* You can find it in https://app.checksum.ai/#/settings/
|
|
96
96
|
*/
|
|
97
|
-
apiKey:
|
|
97
|
+
apiKey: process.env.CHECKSUM_API_KEY,
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Define your test run environments and test users within each environment.
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
node_modules/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
test-results/
|
|
3
|
+
playwright-report/
|
|
4
|
+
blob-report/
|
|
5
|
+
playwright/.cache/
|
|
6
6
|
.auth
|
|
7
|
-
|
|
7
|
+
*.eval.checksum.spec.ts
|
|
8
8
|
*.rrweb.json.jsonl
|
|
9
9
|
*.rrweb.jsonl
|
|
10
10
|
.chk/
|
|
11
|
-
test-instrumentation/
|
|
11
|
+
test-instrumentation/
|
|
12
|
+
.env
|
|
13
|
+
checksum/test-data/*
|
|
14
|
+
!checksum/test-data/bin/
|
|
15
|
+
.DS_Store
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { RunMode, getChecksumConfig } from "@checksum-ai/runtime";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import * as dotenv from "dotenv";
|
|
4
|
+
|
|
5
|
+
// Load env vars from the project-root .env first, then checksum/.env. The root
|
|
6
|
+
// is derived from this file's location (checksum/ lives at <project>/checksum),
|
|
7
|
+
// NOT from process.cwd(), so it resolves correctly no matter which directory
|
|
8
|
+
// Playwright/the CLI is launched from. dotenv does not overwrite variables that
|
|
9
|
+
// are already set, so the root .env wins on any overlapping key and
|
|
10
|
+
// checksum/.env only fills in the rest (and anything already exported in the
|
|
11
|
+
// real shell environment beats both files).
|
|
12
|
+
const projectRoot = path.join(__dirname, "..");
|
|
13
|
+
dotenv.config({ path: path.join(projectRoot, ".env") });
|
|
14
|
+
dotenv.config({ path: path.join(__dirname, ".env") });
|
|
4
15
|
|
|
5
16
|
export default getChecksumConfig({
|
|
6
17
|
/**
|
|
@@ -9,9 +20,10 @@ export default getChecksumConfig({
|
|
|
9
20
|
runMode: RunMode.Normal,
|
|
10
21
|
|
|
11
22
|
/**
|
|
12
|
-
*
|
|
23
|
+
* Define CHECKSUM_API_KEY in checksum/.env or your shell.
|
|
24
|
+
* You can find it in https://app.checksum.ai/#/settings/
|
|
13
25
|
*/
|
|
14
|
-
apiKey:
|
|
26
|
+
apiKey: process.env.CHECKSUM_API_KEY,
|
|
15
27
|
|
|
16
28
|
/**
|
|
17
29
|
* Define your test run environments and test users within each environment.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// ESLint 9+ flat config for Checksum Playwright tests.
|
|
2
|
+
//
|
|
3
|
+
// Rules come from the shared, published checksumai-eslint-config package — the
|
|
4
|
+
// same config existing customers are auto-upgraded to via the platform's
|
|
5
|
+
// dependency-upgrade flow. Keeping fresh installs on the shared package means a
|
|
6
|
+
// brand-new project lints identically to an upgraded one (single source of
|
|
7
|
+
// truth), instead of drifting on a hand-rolled copy.
|
|
8
|
+
//
|
|
9
|
+
// Install the peer toolchain with:
|
|
10
|
+
// npm i -D checksumai-eslint-config eslint typescript-eslint @eslint/js typescript
|
|
11
|
+
import { tests } from "checksumai-eslint-config";
|
|
12
|
+
|
|
13
|
+
export default [
|
|
14
|
+
...tests,
|
|
15
|
+
{
|
|
16
|
+
// Project-layout ignores live here (not in the shared package) because the
|
|
17
|
+
// report directories and scratch REPL spec name are conventions of a
|
|
18
|
+
// Checksum test repo's layout, not of the lint ruleset.
|
|
19
|
+
ignores: [
|
|
20
|
+
"test-results/",
|
|
21
|
+
"playwright-report/",
|
|
22
|
+
"blob-report/",
|
|
23
|
+
"playwright/.cache/",
|
|
24
|
+
// scratch REPL specs — both the dot-prefixed (.eval.checksum.spec.ts) and
|
|
25
|
+
// any <name>.eval.checksum.spec.ts form (ESLint's `*` doesn't match a
|
|
26
|
+
// leading dot, so both globs are needed).
|
|
27
|
+
"**/.eval.checksum.spec.ts",
|
|
28
|
+
"**/*.eval.checksum.spec.ts",
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
];
|