@dev-blinq/bvt-playwright-js 1.0.0-dev.4.staging.108.1 → 1.0.0-dev.4.staging.117.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 +38 -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
|
*
|
|
@@ -9125,6 +9153,14 @@ type TesterOptions = {
|
|
|
9125
9153
|
provider?: ITestDataProvider;
|
|
9126
9154
|
context?: ResolutionContext;
|
|
9127
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;
|
|
9128
9164
|
getApiFetchImpl?: () => typeof fetch;
|
|
9129
9165
|
stepTraceChunkCallbacks?: StepTraceChunkCallbacks;
|
|
9130
9166
|
/**
|
|
@@ -9194,6 +9230,8 @@ declare class Tester {
|
|
|
9194
9230
|
private dataProvider?;
|
|
9195
9231
|
private dataContext?;
|
|
9196
9232
|
private readonly onTestDataChange?;
|
|
9233
|
+
private readonly decryptSecret?;
|
|
9234
|
+
private readonly decryptTotpSeed?;
|
|
9197
9235
|
private readonly getAPIClient;
|
|
9198
9236
|
private readonly obs;
|
|
9199
9237
|
private readonly getApiFetchImpl?;
|