@dev-blinq/bvt-playwright-js 1.0.0-dev.4.latest.105.1 → 1.0.0-dev.4.latest.120.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/index.d.mts +41 -0
- package/index.mjs +27260 -27208
- package/index.mjs.map +1 -1
- package/package.json +1 -1
package/index.d.mts
CHANGED
|
@@ -8122,6 +8122,7 @@ type AgentObservabilityInput = AgentObservability | {
|
|
|
8122
8122
|
metrics?: AgentMetrics | ObservabilityMetricsLike;
|
|
8123
8123
|
events?: AgentEvents | ObservabilityEventsLike;
|
|
8124
8124
|
} | AgentLoggerInput;
|
|
8125
|
+
type DecryptSecret = (value: string, context?: ResolutionContext) => Promise<string>;
|
|
8125
8126
|
interface TestDataApiOptions {
|
|
8126
8127
|
/**
|
|
8127
8128
|
* Called after every successful write. Used by WorkerRuntime to fan out
|
|
@@ -8134,13 +8135,40 @@ interface TestDataApiOptions {
|
|
|
8134
8135
|
* grepping for `provider.upsert`.
|
|
8135
8136
|
*/
|
|
8136
8137
|
logger?: AgentLoggerInput;
|
|
8138
|
+
/**
|
|
8139
|
+
* Decrypt the stored value of `dataType: "secret"` entries. Mirrors the
|
|
8140
|
+
* resolver's `decryptSecret` so that `getScoped("apiToken")` from custom
|
|
8141
|
+
* code returns the same plaintext that `{{apiToken}}` would. If omitted, the
|
|
8142
|
+
* raw stored value is returned and the caller sees ciphertext for entries
|
|
8143
|
+
* persisted by services that encrypt at rest (server, execution-planner).
|
|
8144
|
+
*/
|
|
8145
|
+
decryptSecret?: DecryptSecret;
|
|
8146
|
+
/**
|
|
8147
|
+
* Decrypt the stored TOTP seed. The accessor then runs `generateTOTP` so
|
|
8148
|
+
* callers get the current 6-digit code — matching `{{key}}` semantics.
|
|
8149
|
+
*/
|
|
8150
|
+
decryptTotpSeed?: DecryptSecret;
|
|
8137
8151
|
}
|
|
8138
8152
|
declare class TestDataApi {
|
|
8139
8153
|
private readonly provider;
|
|
8140
8154
|
private readonly context;
|
|
8141
8155
|
private readonly options;
|
|
8142
8156
|
private readonly logger?;
|
|
8157
|
+
private readonly decryptSecret?;
|
|
8158
|
+
private readonly decryptTotpSeed?;
|
|
8143
8159
|
constructor(provider: ITestDataProvider, context: ResolutionContext, options?: TestDataApiOptions);
|
|
8160
|
+
/**
|
|
8161
|
+
* Post-process the raw stored value into the plaintext a caller expects:
|
|
8162
|
+
* - "secret": decrypt with the configured callback (returns ciphertext as
|
|
8163
|
+
* a fallback when no callback is wired, matching legacy behavior).
|
|
8164
|
+
* - "totp": decrypt the seed and generate the current 6-digit code, so
|
|
8165
|
+
* callers see the same value `{{key}}` would resolve to.
|
|
8166
|
+
* - other types are returned verbatim (sessionState is plaintext in
|
|
8167
|
+
* memory by convention, JSON/string/boolean/number need no transform).
|
|
8168
|
+
* Decryption errors are logged and the raw value is returned — surfacing a
|
|
8169
|
+
* useless ciphertext is better than throwing from inside user custom code.
|
|
8170
|
+
*/
|
|
8171
|
+
private postProcessValue;
|
|
8144
8172
|
/**
|
|
8145
8173
|
* Save a value to runtime test data.
|
|
8146
8174
|
*
|
|
@@ -8768,6 +8796,7 @@ type PWSelectorDetails = {
|
|
|
8768
8796
|
declare class SelectorGenerator {
|
|
8769
8797
|
private injectedScript;
|
|
8770
8798
|
private _pw;
|
|
8799
|
+
private contextElement;
|
|
8771
8800
|
constructor(injectedScript: InjectedScript);
|
|
8772
8801
|
private getDocumentElement;
|
|
8773
8802
|
private getDocumentBody;
|
|
@@ -8779,6 +8808,7 @@ declare class SelectorGenerator {
|
|
|
8779
8808
|
root?: Element;
|
|
8780
8809
|
prefix?: string;
|
|
8781
8810
|
}): Element[];
|
|
8811
|
+
private addNearestTextToSelectors;
|
|
8782
8812
|
buildPWTextCandidates(element: Element, isTargetNode: boolean): PWSelectorDetails[];
|
|
8783
8813
|
buildPWNoTextCandidates(element: Element, options?: InternalOptions): PWSelectorDetails[];
|
|
8784
8814
|
computeUnique(element: Element, locatorGenerator: (element: Element, options?: InternalOptions & {
|
|
@@ -8793,6 +8823,7 @@ declare class SelectorGenerator {
|
|
|
8793
8823
|
}): string;
|
|
8794
8824
|
getUniqueSelectors(element: Element, options?: InternalOptions & {
|
|
8795
8825
|
timeout?: number;
|
|
8826
|
+
context?: Element;
|
|
8796
8827
|
}): UniqueSelector[];
|
|
8797
8828
|
private getAncestorPath;
|
|
8798
8829
|
private getLandmarkPath;
|
|
@@ -9122,6 +9153,14 @@ type TesterOptions = {
|
|
|
9122
9153
|
provider?: ITestDataProvider;
|
|
9123
9154
|
context?: ResolutionContext;
|
|
9124
9155
|
onTestDataChange?: () => void;
|
|
9156
|
+
/**
|
|
9157
|
+
* Forwarded to the {@link TestDataApi} that `tester.testDataApi` returns so
|
|
9158
|
+
* `context.testData.getScoped("apiToken")` from user custom code yields the
|
|
9159
|
+
* decrypted plaintext (mirroring the resolver's `{{apiToken}}` semantics).
|
|
9160
|
+
* Optional — leaving them unset keeps the legacy "return raw value" behavior.
|
|
9161
|
+
*/
|
|
9162
|
+
decryptSecret?: DecryptSecret;
|
|
9163
|
+
decryptTotpSeed?: DecryptSecret;
|
|
9125
9164
|
getApiFetchImpl?: () => typeof fetch;
|
|
9126
9165
|
stepTraceChunkCallbacks?: StepTraceChunkCallbacks;
|
|
9127
9166
|
/**
|
|
@@ -9191,6 +9230,8 @@ declare class Tester {
|
|
|
9191
9230
|
private dataProvider?;
|
|
9192
9231
|
private dataContext?;
|
|
9193
9232
|
private readonly onTestDataChange?;
|
|
9233
|
+
private readonly decryptSecret?;
|
|
9234
|
+
private readonly decryptTotpSeed?;
|
|
9194
9235
|
private readonly getAPIClient;
|
|
9195
9236
|
private readonly obs;
|
|
9196
9237
|
private readonly getApiFetchImpl?;
|