doc-detective 4.32.0 → 4.34.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/dist/common/src/schemas/schemas.json +2688 -126
- package/dist/common/src/types/generated/record_v3.d.ts +48 -2
- package/dist/common/src/types/generated/record_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/step_v3.d.ts +48 -2
- package/dist/common/src/types/generated/step_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/test_v3.d.ts +96 -4
- package/dist/common/src/types/generated/test_v3.d.ts.map +1 -1
- package/dist/core/tests/ffmpegRecorder.d.ts +12 -1
- package/dist/core/tests/ffmpegRecorder.d.ts.map +1 -1
- package/dist/core/tests/ffmpegRecorder.js +141 -3
- package/dist/core/tests/ffmpegRecorder.js.map +1 -1
- package/dist/core/tests/recordingCheckpoints.d.ts +76 -0
- package/dist/core/tests/recordingCheckpoints.d.ts.map +1 -0
- package/dist/core/tests/recordingCheckpoints.js +335 -0
- package/dist/core/tests/recordingCheckpoints.js.map +1 -0
- package/dist/core/tests/saveScreenshot.d.ts +5 -1
- package/dist/core/tests/saveScreenshot.d.ts.map +1 -1
- package/dist/core/tests/saveScreenshot.js +46 -12
- package/dist/core/tests/saveScreenshot.js.map +1 -1
- package/dist/core/tests/startRecording.d.ts.map +1 -1
- package/dist/core/tests/startRecording.js +26 -10
- package/dist/core/tests/startRecording.js.map +1 -1
- package/dist/core/tests/stopRecording.d.ts.map +1 -1
- package/dist/core/tests/stopRecording.js +381 -15
- package/dist/core/tests/stopRecording.js.map +1 -1
- package/dist/core/tests.d.ts.map +1 -1
- package/dist/core/tests.js +54 -37
- package/dist/core/tests.js.map +1 -1
- package/dist/hints/context.d.ts +1 -0
- package/dist/hints/context.d.ts.map +1 -1
- package/dist/hints/context.js +9 -0
- package/dist/hints/context.js.map +1 -1
- package/dist/hints/hints.d.ts.map +1 -1
- package/dist/hints/hints.js +15 -0
- package/dist/hints/hints.js.map +1 -1
- package/dist/hints/types.d.ts +8 -0
- package/dist/hints/types.d.ts.map +1 -1
- package/dist/index.cjs +3464 -325
- package/package.json +1 -1
|
@@ -1393,6 +1393,15 @@ export type RecordingEngine = RecordingEngineSimple | RecordingEngineDetailed;
|
|
|
1393
1393
|
* `browser` records the Chrome viewport (concurrency-safe); `ffmpeg` records the screen and supports any application.
|
|
1394
1394
|
*/
|
|
1395
1395
|
export type RecordingEngineSimple = "browser" | "ffmpeg";
|
|
1396
|
+
export type VerifyResolutionBoolean = boolean;
|
|
1397
|
+
/**
|
|
1398
|
+
* Capture a checkpoint screenshot after every step while this recording is active and compare each against a persistent baseline stored beside the recording (`<path>.checkpoints/` by default). Baselines seed on the first run; on later runs, per-checkpoint variation is reported in the `stopRecord` step's outputs, and variation beyond `maxVariation` surfaces as a WARNING. If `false` or unset, no checkpoints are captured.
|
|
1399
|
+
*/
|
|
1400
|
+
export type RecordingCheckpoints = RecordingCheckpointsBoolean | RecordingCheckpointsDetailed;
|
|
1401
|
+
/**
|
|
1402
|
+
* If `true`, enables checkpoints with default settings.
|
|
1403
|
+
*/
|
|
1404
|
+
export type RecordingCheckpointsBoolean = boolean;
|
|
1396
1405
|
/**
|
|
1397
1406
|
* If `true`, starts recording — auto-selecting the `browser` engine for a visible Chrome context, the device screen on Android/iOS contexts, and the `ffmpeg` engine otherwise. If `false`, doesn't record.
|
|
1398
1407
|
*/
|
|
@@ -3544,6 +3553,15 @@ export type RecordingEngine1 = RecordingEngineSimple1 | RecordingEngineDetailed1
|
|
|
3544
3553
|
* `browser` records the Chrome viewport (concurrency-safe); `ffmpeg` records the screen and supports any application.
|
|
3545
3554
|
*/
|
|
3546
3555
|
export type RecordingEngineSimple1 = "browser" | "ffmpeg";
|
|
3556
|
+
export type VerifyResolutionBoolean1 = boolean;
|
|
3557
|
+
/**
|
|
3558
|
+
* Capture a checkpoint screenshot after every step while this recording is active and compare each against a persistent baseline stored beside the recording (`<path>.checkpoints/` by default). Baselines seed on the first run; on later runs, per-checkpoint variation is reported in the `stopRecord` step's outputs, and variation beyond `maxVariation` surfaces as a WARNING. If `false` or unset, no checkpoints are captured.
|
|
3559
|
+
*/
|
|
3560
|
+
export type RecordingCheckpoints1 = RecordingCheckpointsBoolean1 | RecordingCheckpointsDetailed1;
|
|
3561
|
+
/**
|
|
3562
|
+
* If `true`, enables checkpoints with default settings.
|
|
3563
|
+
*/
|
|
3564
|
+
export type RecordingCheckpointsBoolean1 = boolean;
|
|
3547
3565
|
/**
|
|
3548
3566
|
* If `true`, starts recording — auto-selecting the `browser` engine for a visible Chrome context, the device screen on Android/iOS contexts, and the `ffmpeg` engine otherwise. If `false`, doesn't record.
|
|
3549
3567
|
*/
|
|
@@ -6825,14 +6843,16 @@ export interface RecordDetailed {
|
|
|
6825
6843
|
*/
|
|
6826
6844
|
directory?: string;
|
|
6827
6845
|
/**
|
|
6828
|
-
* If `true`, overwrites the existing recording at `path` if it exists.
|
|
6846
|
+
* If `true`, overwrites the existing recording at `path` if it exists. If `false`, skips the recording when the file already exists. If `aboveVariation`, always records, but replaces the existing file (and its checkpoint baselines) only when the span's checkpoint screenshots show it meaningfully changed — requires `checkpoints`, so it turns them on with defaults when `checkpoints` is omitted or `false`; set `checkpoints` to an object to tune `maxVariation` or `directory`.
|
|
6829
6847
|
*/
|
|
6830
|
-
overwrite?: "true" | "false";
|
|
6848
|
+
overwrite?: "true" | "false" | "aboveVariation";
|
|
6831
6849
|
/**
|
|
6832
6850
|
* Identifier for this recording. A later `stopRecord` step can target it by name (`stopRecord: "<name>"`), which is how you stop a specific recording when several overlap. Names must be unique among recordings that are active at the same time. If omitted, the recording is anonymous and is stopped LIFO by an untargeted `stopRecord`.
|
|
6833
6851
|
*/
|
|
6834
6852
|
name?: string;
|
|
6835
6853
|
engine?: RecordingEngine;
|
|
6854
|
+
verify?: RecordingVerifyGuards;
|
|
6855
|
+
checkpoints?: RecordingCheckpoints;
|
|
6836
6856
|
[k: string]: unknown;
|
|
6837
6857
|
}
|
|
6838
6858
|
export interface BrowserSurface4 {
|
|
@@ -6918,6 +6938,41 @@ export interface RecordingEngineDetailed {
|
|
|
6918
6938
|
*/
|
|
6919
6939
|
fps?: number;
|
|
6920
6940
|
}
|
|
6941
|
+
/**
|
|
6942
|
+
* Structural assertions on the produced video file, evaluated when the recording stops. Unlike checkpoint drift (a WARNING), a violated guard FAILs the stopRecord step — these are properties you explicitly demand of the artifact.
|
|
6943
|
+
*/
|
|
6944
|
+
export interface RecordingVerifyGuards {
|
|
6945
|
+
/**
|
|
6946
|
+
* Fail if the video is shorter than this many seconds.
|
|
6947
|
+
*/
|
|
6948
|
+
minDuration?: number;
|
|
6949
|
+
/**
|
|
6950
|
+
* Fail if the video is longer than this many seconds.
|
|
6951
|
+
*/
|
|
6952
|
+
maxDuration?: number;
|
|
6953
|
+
/**
|
|
6954
|
+
* Verify the video's dimensions (±2 pixels — encoders round to even dimensions). `true` compares against the capture plan's resolved expectation (the crop rectangle when a window/viewport crop applied, else the capture frame size; skipped when no expectation exists for the engine). An object compares literal dimensions.
|
|
6955
|
+
*/
|
|
6956
|
+
resolution?: VerifyResolutionBoolean | VerifyResolutionDetailed;
|
|
6957
|
+
/**
|
|
6958
|
+
* Fail if the video is essentially all black (black frames cover 95% or more of its duration) — the classic symptom of a broken screen capture.
|
|
6959
|
+
*/
|
|
6960
|
+
notBlack?: boolean;
|
|
6961
|
+
}
|
|
6962
|
+
export interface VerifyResolutionDetailed {
|
|
6963
|
+
width: number;
|
|
6964
|
+
height: number;
|
|
6965
|
+
}
|
|
6966
|
+
export interface RecordingCheckpointsDetailed {
|
|
6967
|
+
/**
|
|
6968
|
+
* Maximum fractional pixel difference tolerated between a checkpoint and its baseline before the drift surfaces as a WARNING.
|
|
6969
|
+
*/
|
|
6970
|
+
maxVariation?: number;
|
|
6971
|
+
/**
|
|
6972
|
+
* Directory for the checkpoint baselines. If unset, defaults to a `.checkpoints` directory beside the recording (for example, `demo.mp4.checkpoints/`).
|
|
6973
|
+
*/
|
|
6974
|
+
directory?: string;
|
|
6975
|
+
}
|
|
6921
6976
|
export interface Common12 {
|
|
6922
6977
|
/**
|
|
6923
6978
|
* JSON Schema for this object.
|
|
@@ -11112,14 +11167,16 @@ export interface RecordDetailed1 {
|
|
|
11112
11167
|
*/
|
|
11113
11168
|
directory?: string;
|
|
11114
11169
|
/**
|
|
11115
|
-
* If `true`, overwrites the existing recording at `path` if it exists.
|
|
11170
|
+
* If `true`, overwrites the existing recording at `path` if it exists. If `false`, skips the recording when the file already exists. If `aboveVariation`, always records, but replaces the existing file (and its checkpoint baselines) only when the span's checkpoint screenshots show it meaningfully changed — requires `checkpoints`, so it turns them on with defaults when `checkpoints` is omitted or `false`; set `checkpoints` to an object to tune `maxVariation` or `directory`.
|
|
11116
11171
|
*/
|
|
11117
|
-
overwrite?: "true" | "false";
|
|
11172
|
+
overwrite?: "true" | "false" | "aboveVariation";
|
|
11118
11173
|
/**
|
|
11119
11174
|
* Identifier for this recording. A later `stopRecord` step can target it by name (`stopRecord: "<name>"`), which is how you stop a specific recording when several overlap. Names must be unique among recordings that are active at the same time. If omitted, the recording is anonymous and is stopped LIFO by an untargeted `stopRecord`.
|
|
11120
11175
|
*/
|
|
11121
11176
|
name?: string;
|
|
11122
11177
|
engine?: RecordingEngine1;
|
|
11178
|
+
verify?: RecordingVerifyGuards1;
|
|
11179
|
+
checkpoints?: RecordingCheckpoints1;
|
|
11123
11180
|
[k: string]: unknown;
|
|
11124
11181
|
}
|
|
11125
11182
|
export interface BrowserSurface14 {
|
|
@@ -11205,6 +11262,41 @@ export interface RecordingEngineDetailed1 {
|
|
|
11205
11262
|
*/
|
|
11206
11263
|
fps?: number;
|
|
11207
11264
|
}
|
|
11265
|
+
/**
|
|
11266
|
+
* Structural assertions on the produced video file, evaluated when the recording stops. Unlike checkpoint drift (a WARNING), a violated guard FAILs the stopRecord step — these are properties you explicitly demand of the artifact.
|
|
11267
|
+
*/
|
|
11268
|
+
export interface RecordingVerifyGuards1 {
|
|
11269
|
+
/**
|
|
11270
|
+
* Fail if the video is shorter than this many seconds.
|
|
11271
|
+
*/
|
|
11272
|
+
minDuration?: number;
|
|
11273
|
+
/**
|
|
11274
|
+
* Fail if the video is longer than this many seconds.
|
|
11275
|
+
*/
|
|
11276
|
+
maxDuration?: number;
|
|
11277
|
+
/**
|
|
11278
|
+
* Verify the video's dimensions (±2 pixels — encoders round to even dimensions). `true` compares against the capture plan's resolved expectation (the crop rectangle when a window/viewport crop applied, else the capture frame size; skipped when no expectation exists for the engine). An object compares literal dimensions.
|
|
11279
|
+
*/
|
|
11280
|
+
resolution?: VerifyResolutionBoolean1 | VerifyResolutionDetailed1;
|
|
11281
|
+
/**
|
|
11282
|
+
* Fail if the video is essentially all black (black frames cover 95% or more of its duration) — the classic symptom of a broken screen capture.
|
|
11283
|
+
*/
|
|
11284
|
+
notBlack?: boolean;
|
|
11285
|
+
}
|
|
11286
|
+
export interface VerifyResolutionDetailed1 {
|
|
11287
|
+
width: number;
|
|
11288
|
+
height: number;
|
|
11289
|
+
}
|
|
11290
|
+
export interface RecordingCheckpointsDetailed1 {
|
|
11291
|
+
/**
|
|
11292
|
+
* Maximum fractional pixel difference tolerated between a checkpoint and its baseline before the drift surfaces as a WARNING.
|
|
11293
|
+
*/
|
|
11294
|
+
maxVariation?: number;
|
|
11295
|
+
/**
|
|
11296
|
+
* Directory for the checkpoint baselines. If unset, defaults to a `.checkpoints` directory beside the recording (for example, `demo.mp4.checkpoints/`).
|
|
11297
|
+
*/
|
|
11298
|
+
directory?: string;
|
|
11299
|
+
}
|
|
11208
11300
|
export interface Common32 {
|
|
11209
11301
|
/**
|
|
11210
11302
|
* JSON Schema for this object.
|