@unotest/web 0.30.0 → 0.32.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/.claude/skills/write-e2e-test/SKILL.md +12 -0
- package/.claude/skills/write-e2e-test-ground/SKILL.md +12 -0
- package/CHANGELOG.md +383 -0
- package/README.md +66 -2
- package/bin/unotest-web.js +3 -1
- package/dist/config/schema.d.ts +15 -15
- package/dist/config/schema.js +1 -1
- package/dist/driver/index.d.ts +11 -3
- package/dist/driver/index.js +1 -1
- package/dist/dsl/index.d.ts +54 -4
- package/dist/dsl/index.js +1 -1
- package/dist/dsl/web-dsl-language-service.d.ts +22 -2
- package/dist/dsl/web-dsl-language-service.js +1 -1
- package/dist/inspection/page-inject.d.ts +1 -1
- package/dist/{interfaces-BluheUKs.d.ts → interfaces-B34N4rfI.d.ts} +8 -0
- package/dist/legacy-layout-By62PkbP.d.ts +8 -0
- package/dist/linter-Yf4gPe5J.d.ts +36 -0
- package/dist/mcp/server.js +1 -1
- package/dist/runner/cli.d.ts +14 -8
- package/dist/runner/cli.js +1 -1
- package/dist/runner/init/chrome-probe.js +1 -1
- package/dist/runner/init.js +1 -1
- package/dist/runner/install-chromium.js +1 -1
- package/dist/runner/prepare-fix.js +1 -1
- package/dist/runner/scaffold-workspace.js +1 -1
- package/dist/runner/serve-fixture.js +1 -1
- package/dist/runner/web-runner-adapter.js +1 -1
- package/guides/agent-integration.md +190 -14
- package/guides/dsl-reference.md +156 -9
- package/package.json +8 -8
- package/src/mcp/prompts/agent-test-author.md +11 -1
- package/types/unotest-dsl.d.ts +29 -5
- package/dist/linter-CM2CpIyW.d.ts +0 -21
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IDslLanguageService } from '@unotest/protocol';
|
|
2
|
-
import { a as LintSeverity } from '../linter-
|
|
2
|
+
import { a as LintSeverity, E as ExternalVariableLookup } from '../linter-Yf4gPe5J.js';
|
|
3
|
+
import { L as LegacyLayout } from '../legacy-layout-By62PkbP.js';
|
|
3
4
|
import '@unotest/dsl';
|
|
4
5
|
|
|
5
6
|
interface LinterSeverity {
|
|
@@ -30,15 +31,34 @@ interface LintProjectContext {
|
|
|
30
31
|
helpers: HelperDiscovery;
|
|
31
32
|
/** External variable NAMES from unotest/.env / .secrets (never values). */
|
|
32
33
|
envVarNames: readonly string[];
|
|
34
|
+
/** The same names as the predicate `validateSource` takes for
|
|
35
|
+
* `lint:external-variable-undeclared`, with the layer files it
|
|
36
|
+
* searched (active `UNOTEST_ENV` / `--env` overlay included). */
|
|
37
|
+
externalVariables: ExternalVariableLookup;
|
|
33
38
|
/** Raw `linter.rules` map — JSON-serializable severity source for
|
|
34
39
|
* consumers that cannot hold a `Set` (ESLint rule options). */
|
|
35
40
|
linterRules: Readonly<Record<string, string>>;
|
|
41
|
+
/** The pre-0.28 layout this context was built IN SPITE OF (config still
|
|
42
|
+
* at the project root, so everything above came from the schema
|
|
43
|
+
* defaults). Null when the config loaded normally. Only ever set under
|
|
44
|
+
* `onLegacyLayout: "warn"` — the caller owns reporting it. */
|
|
45
|
+
legacyLayout: LegacyLayout | null;
|
|
46
|
+
}
|
|
47
|
+
interface LintProjectContextOptions {
|
|
48
|
+
/** What to do with a project still on the pre-0.28 layout.
|
|
49
|
+
* `refuse` (default) lets the loader's error through — right for
|
|
50
|
+
* anything that would otherwise RUN on defaults. `warn` builds the
|
|
51
|
+
* context on the schema defaults and hands the layout back in
|
|
52
|
+
* `legacyLayout`: lint uses the config only for rule severity and the
|
|
53
|
+
* helpers dir, and a suite that cannot be linted until it is migrated
|
|
54
|
+
* is a suite nobody lints during the migration. */
|
|
55
|
+
onLegacyLayout?: "refuse" | "warn";
|
|
36
56
|
}
|
|
37
57
|
/** Load everything a lint frontend needs about the project at `cwd`.
|
|
38
58
|
* Async because unotest.config.{js,mjs,ts} loads via dynamic import;
|
|
39
59
|
* everything else is plain fs. A project without a config file gets
|
|
40
60
|
* the schema defaults — same as `unotest-web lint`. */
|
|
41
|
-
declare function loadLintProjectContext(cwd?: string): Promise<LintProjectContext>;
|
|
61
|
+
declare function loadLintProjectContext(cwd?: string, opts?: LintProjectContextOptions): Promise<LintProjectContext>;
|
|
42
62
|
|
|
43
63
|
/** Build the service. `severity` carries the project's `linter.rules`
|
|
44
64
|
* overrides (computed from config by the launcher) so the editor's
|