@vijaypjavvadi/bdd2pw 4.3.2 → 4.4.1
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/CHANGELOG.md +223 -0
- package/README.md +66 -10
- package/dist/cli.js +83 -0
- package/dist/cli.js.map +1 -1
- package/dist/emitters/facade.d.ts +11 -0
- package/dist/emitters/facade.js +72 -0
- package/dist/emitters/facade.js.map +1 -1
- package/dist/http/schemas.d.ts +4 -4
- package/dist/index.js +30 -1
- package/dist/index.js.map +1 -1
- package/dist/llm/anthropicClient.d.ts +7 -0
- package/dist/llm/anthropicClient.js +11 -0
- package/dist/llm/anthropicClient.js.map +1 -1
- package/dist/llm/geminiClient.d.ts +2 -0
- package/dist/llm/geminiClient.js +6 -0
- package/dist/llm/geminiClient.js.map +1 -1
- package/dist/llm/llmStepMatcher.js +43 -4
- package/dist/llm/llmStepMatcher.js.map +1 -1
- package/dist/llm/openaiClient.d.ts +2 -0
- package/dist/llm/openaiClient.js +6 -0
- package/dist/llm/openaiClient.js.map +1 -1
- package/dist/llm/types.d.ts +14 -0
- package/dist/reports/coverage.d.ts +132 -0
- package/dist/reports/coverage.js +360 -0
- package/dist/reports/coverage.js.map +1 -0
- package/dist/reports/metaSidecar.d.ts +21 -0
- package/dist/reports/metaSidecar.js +20 -0
- package/dist/reports/metaSidecar.js.map +1 -1
- package/dist/reports/quarantineStats.d.ts +102 -0
- package/dist/reports/quarantineStats.js +319 -0
- package/dist/reports/quarantineStats.js.map +1 -0
- package/dist/transformers/stepMatcher.d.ts +10 -0
- package/dist/transformers/stepMatcher.js +59 -5
- package/dist/transformers/stepMatcher.js.map +1 -1
- package/dist/types.d.ts +60 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -101,6 +101,45 @@ export interface StepBinding {
|
|
|
101
101
|
* flag is per-binding, the emitter aggregates per-scenario.
|
|
102
102
|
*/
|
|
103
103
|
apiContext?: true;
|
|
104
|
+
/**
|
|
105
|
+
* v4.4.0 — provenance. Records whether this binding was produced by
|
|
106
|
+
* the deterministic rule table or by the LLM fallback. Set by the
|
|
107
|
+
* step-match orchestrator (llmStepMatcher). The emitter uses the
|
|
108
|
+
* presence of any `provenance.source === "llm"` binding in a
|
|
109
|
+
* scenario to add the `@llm-generated` tag; the meta-sidecar
|
|
110
|
+
* writer copies the full record into `step.llm`.
|
|
111
|
+
*
|
|
112
|
+
* When absent, the binding is treated as rule-produced — the
|
|
113
|
+
* default for every step emitted without --llm.
|
|
114
|
+
*/
|
|
115
|
+
provenance?: {
|
|
116
|
+
source: "rule" | "llm";
|
|
117
|
+
/**
|
|
118
|
+
* v4.4.0 Slice 2 — rule attribution. Populated when
|
|
119
|
+
* `source === "rule"`. `ruleId` matches `ruleIdFor(rule, idx)`
|
|
120
|
+
* in `stepMatcher.ts` (e.g. `"rule-14"`, `"domain-03"`, etc.).
|
|
121
|
+
* `pack` names the domain rule pack when the rule is domain-scoped;
|
|
122
|
+
* `undefined` for the built-in registry.
|
|
123
|
+
*/
|
|
124
|
+
ruleId?: string;
|
|
125
|
+
pack?: "banking" | "healthcare" | "insurance" | "retail" | "gov" | "education" | "telecom";
|
|
126
|
+
/** Populated when `source === "llm"`. */
|
|
127
|
+
llm?: {
|
|
128
|
+
provider: "anthropic" | "openai" | "gemini";
|
|
129
|
+
model: string;
|
|
130
|
+
/** sha256 hash of the prompt actually sent to the provider. */
|
|
131
|
+
promptHash?: string;
|
|
132
|
+
/** True when the binding came from the LLM cache instead of a live provider call. */
|
|
133
|
+
cached: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Whether the governance sidecar sanitised the prompt.
|
|
136
|
+
* `"skipped"` when --llm-skip-governance was passed for this run.
|
|
137
|
+
*/
|
|
138
|
+
governance: "sanitised" | "skipped";
|
|
139
|
+
/** ISO timestamp of when the binding was recorded. */
|
|
140
|
+
at: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
104
143
|
}
|
|
105
144
|
export interface ReviewItem {
|
|
106
145
|
severity: "info" | "warn" | "error";
|
|
@@ -123,6 +162,27 @@ export interface ScaffoldOptions {
|
|
|
123
162
|
page: string;
|
|
124
163
|
repo: string;
|
|
125
164
|
pages?: string[];
|
|
165
|
+
/**
|
|
166
|
+
* v4.4.0 — override the emitted spec filename stem. When omitted,
|
|
167
|
+
* bdd2pw derives the stem from the Page Object name
|
|
168
|
+
* (`LoginPage` → `tests/login.spec.ts`). When set, the spec file
|
|
169
|
+
* is written to `tests/<specName>.spec.ts` instead. The POM
|
|
170
|
+
* filename, class name, and import path are unaffected.
|
|
171
|
+
*
|
|
172
|
+
* Added for upstream consumers (attestqa, custom orchestrators)
|
|
173
|
+
* that keep one feature file per epic and expect
|
|
174
|
+
* `tests/<feature-stem>.spec.ts` regardless of which POM the
|
|
175
|
+
* feature targets. Passing `--spec-name` from the CLI sets this.
|
|
176
|
+
*/
|
|
177
|
+
specName?: string;
|
|
178
|
+
/**
|
|
179
|
+
* v4.4.1 — emit a `// @bdd2pw lane=... [...]` provenance comment
|
|
180
|
+
* above every binding statement inside each `test.step` body. The
|
|
181
|
+
* grammar is documented in `docs/PROVENANCE_CONTRACT.md` and
|
|
182
|
+
* SemVer-covered. Default: true. Opt-out by passing false here or
|
|
183
|
+
* `--no-provenance-comments` at the CLI.
|
|
184
|
+
*/
|
|
185
|
+
provenanceComments?: boolean;
|
|
126
186
|
storageState?: string;
|
|
127
187
|
headed?: boolean;
|
|
128
188
|
llm?: "anthropic" | "openai" | "gemini";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vijaypjavvadi/bdd2pw",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "Scaffold runnable Playwright TypeScript tests from Gherkin .feature files. Detects existing Page Objects, scans live pages via Microsoft Playwright MCP, emits POMs + specs, ready for execution. CLI + HTTP service. Optional governed LLM fallback (Anthropic / OpenAI / Gemini).",
|
|
5
5
|
"bin": {
|
|
6
6
|
"bdd2pw": "dist/cli.js"
|