screenci 0.0.76 → 0.0.79
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/cli.d.ts +58 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +584 -200
- package/dist/cli.js.map +1 -1
- package/dist/docs/manifest.d.ts +253 -98
- package/dist/docs/manifest.d.ts.map +1 -1
- package/dist/docs/manifest.js +92 -32
- package/dist/docs/manifest.js.map +1 -1
- package/dist/docs/video-sources/camera-and-zooming.screenci.d.ts +2 -0
- package/dist/docs/video-sources/camera-and-zooming.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/camera-and-zooming.screenci.js +57 -0
- package/dist/docs/video-sources/camera-and-zooming.screenci.js.map +1 -0
- package/dist/docs/video-sources/installation.screenci.js +9 -6
- package/dist/docs/video-sources/installation.screenci.js.map +1 -1
- package/dist/docs/video-sources/languages.screenci.d.ts +2 -0
- package/dist/docs/video-sources/languages.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/languages.screenci.js +68 -0
- package/dist/docs/video-sources/languages.screenci.js.map +1 -0
- package/dist/docs/video-sources/locator-highlight-animated.screenci.js +1 -1
- package/dist/docs/video-sources/locator-highlight-animated.screenci.js.map +1 -1
- package/dist/docs/video-sources/narration.screenci.d.ts +2 -0
- package/dist/docs/video-sources/narration.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/narration.screenci.js +71 -0
- package/dist/docs/video-sources/narration.screenci.js.map +1 -0
- package/dist/docs/video-sources/public-urls-and-embeds.screenci.d.ts +2 -0
- package/dist/docs/video-sources/public-urls-and-embeds.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/public-urls-and-embeds.screenci.js +60 -0
- package/dist/docs/video-sources/public-urls-and-embeds.screenci.js.map +1 -0
- package/dist/docs/video-sources/speaking-style.screenci.d.ts +2 -0
- package/dist/docs/video-sources/speaking-style.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/speaking-style.screenci.js +76 -0
- package/dist/docs/video-sources/speaking-style.screenci.js.map +1 -0
- package/dist/docs/video-sources/vertical-video.screenci.d.ts +2 -0
- package/dist/docs/video-sources/vertical-video.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/vertical-video.screenci.js +58 -0
- package/dist/docs/video-sources/vertical-video.screenci.js.map +1 -0
- package/dist/docs/videos.d.ts +20 -0
- package/dist/docs/videos.d.ts.map +1 -1
- package/dist/docs/videos.js +25 -0
- package/dist/docs/videos.js.map +1 -1
- package/dist/e2e/instrument.e2e.js +8 -0
- package/dist/e2e/instrument.e2e.js.map +1 -1
- package/dist/e2e/redact.e2e.d.ts +2 -0
- package/dist/e2e/redact.e2e.d.ts.map +1 -0
- package/dist/e2e/redact.e2e.js +161 -0
- package/dist/e2e/redact.e2e.js.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/src/asset.d.ts +154 -13
- package/dist/src/asset.d.ts.map +1 -1
- package/dist/src/asset.js +262 -32
- package/dist/src/asset.js.map +1 -1
- package/dist/src/assetHash.d.ts +27 -0
- package/dist/src/assetHash.d.ts.map +1 -0
- package/dist/src/assetHash.js +0 -0
- package/dist/src/assetHash.js.map +1 -0
- package/dist/src/audio.d.ts +8 -5
- package/dist/src/audio.d.ts.map +1 -1
- package/dist/src/audio.js +56 -31
- package/dist/src/audio.js.map +1 -1
- package/dist/src/builder.d.ts +132 -32
- package/dist/src/builder.d.ts.map +1 -1
- package/dist/src/builder.js +66 -20
- package/dist/src/builder.js.map +1 -1
- package/dist/src/changeFocus.d.ts.map +1 -1
- package/dist/src/changeFocus.js +103 -34
- package/dist/src/changeFocus.js.map +1 -1
- package/dist/src/cue.d.ts +29 -17
- package/dist/src/cue.d.ts.map +1 -1
- package/dist/src/cue.js +138 -61
- package/dist/src/cue.js.map +1 -1
- package/dist/src/declare.d.ts +8 -4
- package/dist/src/declare.d.ts.map +1 -1
- package/dist/src/declare.js +28 -10
- package/dist/src/declare.js.map +1 -1
- package/dist/src/defaults.d.ts +23 -0
- package/dist/src/defaults.d.ts.map +1 -1
- package/dist/src/defaults.js +23 -0
- package/dist/src/defaults.js.map +1 -1
- package/dist/src/events.d.ts +289 -25
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +145 -13
- package/dist/src/events.js.map +1 -1
- package/dist/src/htmlRasterizer.d.ts +10 -0
- package/dist/src/htmlRasterizer.d.ts.map +1 -1
- package/dist/src/htmlRasterizer.js +12 -2
- package/dist/src/htmlRasterizer.js.map +1 -1
- package/dist/src/init.d.ts +2 -0
- package/dist/src/init.d.ts.map +1 -1
- package/dist/src/init.js +60 -28
- package/dist/src/init.js.map +1 -1
- package/dist/src/instrument.d.ts.map +1 -1
- package/dist/src/instrument.js +25 -7
- package/dist/src/instrument.js.map +1 -1
- package/dist/src/locales.d.ts.map +1 -1
- package/dist/src/locales.js +1 -0
- package/dist/src/locales.js.map +1 -1
- package/dist/src/localize.d.ts +25 -17
- package/dist/src/localize.d.ts.map +1 -1
- package/dist/src/localize.js +18 -10
- package/dist/src/localize.js.map +1 -1
- package/dist/src/localizeRuntime.d.ts +18 -13
- package/dist/src/localizeRuntime.d.ts.map +1 -1
- package/dist/src/localizeRuntime.js +28 -18
- package/dist/src/localizeRuntime.js.map +1 -1
- package/dist/src/logger.d.ts +5 -0
- package/dist/src/logger.d.ts.map +1 -1
- package/dist/src/logger.js +7 -0
- package/dist/src/logger.js.map +1 -1
- package/dist/src/narrationVisibility.d.ts +19 -0
- package/dist/src/narrationVisibility.d.ts.map +1 -0
- package/dist/src/narrationVisibility.js +26 -0
- package/dist/src/narrationVisibility.js.map +1 -0
- package/dist/src/recordingData.d.ts +7 -0
- package/dist/src/recordingData.d.ts.map +1 -1
- package/dist/src/recordingSize.d.ts +32 -0
- package/dist/src/recordingSize.d.ts.map +1 -0
- package/dist/src/recordingSize.js +54 -0
- package/dist/src/recordingSize.js.map +1 -0
- package/dist/src/redact.d.ts +68 -0
- package/dist/src/redact.d.ts.map +1 -0
- package/dist/src/redact.js +138 -0
- package/dist/src/redact.js.map +1 -0
- package/dist/src/redactController.d.ts +61 -0
- package/dist/src/redactController.d.ts.map +1 -0
- package/dist/src/redactController.js +232 -0
- package/dist/src/redactController.js.map +1 -0
- package/dist/src/runtimeContext.d.ts +32 -0
- package/dist/src/runtimeContext.d.ts.map +1 -1
- package/dist/src/runtimeContext.js +21 -0
- package/dist/src/runtimeContext.js.map +1 -1
- package/dist/src/runtimeMode.d.ts +15 -7
- package/dist/src/runtimeMode.d.ts.map +1 -1
- package/dist/src/runtimeMode.js +17 -6
- package/dist/src/runtimeMode.js.map +1 -1
- package/dist/src/screenAudio.d.ts +34 -4
- package/dist/src/screenAudio.d.ts.map +1 -1
- package/dist/src/screenAudio.js +0 -0
- package/dist/src/screenAudio.js.map +1 -1
- package/dist/src/screenAudioSink.d.ts +12 -0
- package/dist/src/screenAudioSink.d.ts.map +1 -1
- package/dist/src/screenAudioSink.js +30 -0
- package/dist/src/screenAudioSink.js.map +1 -1
- package/dist/src/screenshot.d.ts +16 -14
- package/dist/src/screenshot.d.ts.map +1 -1
- package/dist/src/screenshot.js +11 -11
- package/dist/src/screenshot.js.map +1 -1
- package/dist/src/sourceTrim.d.ts +29 -0
- package/dist/src/sourceTrim.d.ts.map +1 -0
- package/dist/src/sourceTrim.js +76 -0
- package/dist/src/sourceTrim.js.map +1 -0
- package/dist/src/studio.d.ts +71 -3
- package/dist/src/studio.d.ts.map +1 -1
- package/dist/src/studio.js +19 -1
- package/dist/src/studio.js.map +1 -1
- package/dist/src/timelineOffset.d.ts +46 -0
- package/dist/src/timelineOffset.d.ts.map +1 -0
- package/dist/src/timelineOffset.js +66 -0
- package/dist/src/timelineOffset.js.map +1 -0
- package/dist/src/titleValidation.d.ts +38 -0
- package/dist/src/titleValidation.d.ts.map +1 -1
- package/dist/src/titleValidation.js +42 -0
- package/dist/src/titleValidation.js.map +1 -1
- package/dist/src/types.d.ts +85 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/video.d.ts +37 -34
- package/dist/src/video.d.ts.map +1 -1
- package/dist/src/video.js +99 -48
- package/dist/src/video.js.map +1 -1
- package/dist/src/voiceSampleAudio.d.ts +34 -0
- package/dist/src/voiceSampleAudio.d.ts.map +1 -0
- package/dist/src/voiceSampleAudio.js +105 -0
- package/dist/src/voiceSampleAudio.js.map +1 -0
- package/dist/src/voices.d.ts +2 -2
- package/dist/src/voices.d.ts.map +1 -1
- package/dist/src/voices.js +8 -3
- package/dist/src/voices.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/templates/recordings/assets/logo.png +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Candidate paths for an asset, in resolution order: the path as authored, then
|
|
3
|
+
* resolved relative to the anchor file (the `.screenci` script). Mirrors the
|
|
4
|
+
* resolution used when validating asset paths so a pre-warm keys the same entry
|
|
5
|
+
* the marker's `start()` later looks up.
|
|
6
|
+
*/
|
|
7
|
+
export declare function assetCandidatePaths(assetPath: string, anchorFile: string | null): string[];
|
|
8
|
+
/**
|
|
9
|
+
* Returns the SHA-256 hash of the first readable candidate, computing it once
|
|
10
|
+
* and caching the in-flight promise so concurrent and later callers share the
|
|
11
|
+
* single read. Resolves to undefined when no candidate is readable.
|
|
12
|
+
*/
|
|
13
|
+
export declare function hashAssetFile(candidates: string[]): Promise<string | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* Kicks off hashing for a declared asset without awaiting it, so the read/hash
|
|
16
|
+
* runs (and caches) ahead of the marker's `start()`. Fire-and-forget: the
|
|
17
|
+
* underlying promise never rejects (a missing file resolves to undefined), so a
|
|
18
|
+
* pre-warm for an absent asset is harmless.
|
|
19
|
+
*/
|
|
20
|
+
export declare function prewarmAssetFile(assetPath: string, anchorFile: string | null): void;
|
|
21
|
+
/**
|
|
22
|
+
* Clears the hash cache. Exposed for test isolation; the recording path keeps
|
|
23
|
+
* the cache for the lifetime of the worker process (hashes are content-derived
|
|
24
|
+
* and keyed by path, so reuse across videos in a worker is correct).
|
|
25
|
+
*/
|
|
26
|
+
export declare function resetAssetHashCache(): void;
|
|
27
|
+
//# sourceMappingURL=assetHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assetHash.d.ts","sourceRoot":"","sources":["../../src/assetHash.ts"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,IAAI,GACxB,MAAM,EAAE,CAGV;AAgBD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAQ7B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,IAAI,GACxB,IAAI,CAEN;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assetHash.js","sourceRoot":"","sources":["../../src/assetHash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEvC;;;;;;;;;;;;;GAaG;AACH,MAAM,SAAS,GAAG,IAAI,GAAG,EAAuC,CAAA;AAEhE;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAAiB,EACjB,UAAyB;IAEzB,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO,CAAC,SAAS,CAAC,CAAA;IAC3C,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,CAAC,CAAA;AAC7D,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,UAAoB;IAC7C,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,CAAA;YACxC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC1D,CAAC;QAAC,MAAM,CAAC;YACP,yEAAyE;YACzE,uEAAuE;YACvE,0EAA0E;QAC5E,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,UAAoB;IAEpB,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAChC,IAAI,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAChC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,WAAW,CAAC,UAAU,CAAC,CAAA;QACjC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAC7B,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAiB,EACjB,UAAyB;IAEzB,KAAK,aAAa,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAA;AAChE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB;IACjC,SAAS,CAAC,KAAK,EAAE,CAAA;AACnB,CAAC"}
|
package/dist/src/audio.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ import type { IEventRecorder } from './events.js';
|
|
|
8
8
|
* point it is started until it is ended (or until the end of the video).
|
|
9
9
|
*/
|
|
10
10
|
export type AudioConfig = {
|
|
11
|
-
/** File path: `.mp3`, `.wav`, `.m4a`, `.aac`,
|
|
11
|
+
/** File path to an audio file: `.mp3`, `.wav`, `.m4a`, `.aac`, `.ogg`,
|
|
12
|
+
* `.flac`, `.opus`, or an audio-only `.mp4`. */
|
|
12
13
|
path: string;
|
|
13
14
|
/**
|
|
14
15
|
* Linear gain. `1` (the default) plays the source at its natural level, `0`
|
|
@@ -71,12 +72,14 @@ export type AudioTracks<T extends Record<string, AudioInput>> = {
|
|
|
71
72
|
[K in keyof T]: AudioController;
|
|
72
73
|
};
|
|
73
74
|
export declare function resetRegisteredAudioPaths(): void;
|
|
75
|
+
export declare function resetMissingAudioWarnings(): void;
|
|
74
76
|
/**
|
|
75
77
|
* Validates the audio files declared by the `.screenci` script at
|
|
76
78
|
* {@link testFilePath} (plus any unattributed registrations), resolving each
|
|
77
|
-
* as-is and relative to that file.
|
|
78
|
-
*
|
|
79
|
-
*
|
|
79
|
+
* as-is and relative to that file. A missing file is not fatal: it is reused
|
|
80
|
+
* from a previous upload of this video (matched by path) at upload time, so a
|
|
81
|
+
* gitignored audio file does not have to be committed. Tracks attributed to a
|
|
82
|
+
* different test file are skipped.
|
|
80
83
|
*/
|
|
81
84
|
export declare function validateRegisteredAudioPaths(testFilePath: string | null): Promise<void>;
|
|
82
85
|
export declare function setActiveAudioRecorder(recorder: IEventRecorder | null): void;
|
|
@@ -121,5 +124,5 @@ export declare function buildStudioAudioTracks(names: readonly string[]): Record
|
|
|
121
124
|
* names become Studio-managed controllers; code (object) names resolve their
|
|
122
125
|
* input for the active language (`byLang[language] ?? shared`).
|
|
123
126
|
*/
|
|
124
|
-
export declare function buildAudio(feature: NormalizedFeature<AudioInput> | null | undefined, language: string | undefined): Record<string, AudioController>;
|
|
127
|
+
export declare function buildAudio(feature: NormalizedFeature<AudioInput> | null | undefined, language: string | undefined, anchorFile?: string): Record<string, AudioController>;
|
|
125
128
|
//# sourceMappingURL=audio.d.ts.map
|
package/dist/src/audio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/audio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/audio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,aAAa,CAAA;AAoBpE;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;qDACiD;IACjD,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,CAAA;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACjB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACrB,CAAA;AAED,gFAAgF;AAChF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI;KAC7D,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe;CAChC,CAAA;AAoCD,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAYD,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAED;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,YAAY,EAAE,MAAM,GAAG,IAAI,GAC1B,OAAO,CAAC,IAAI,CAAC,CAOf;AAyBD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAG5E;AAED,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AA0DD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,WAAW,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACpE,MAAM,EAAE,CAAC,GACR,WAAW,CAAC,CAAC,CAAC,CAMhB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAMjC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,EACzD,QAAQ,EAAE,MAAM,GAAG,SAAS,EAK5B,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAoBjC"}
|
package/dist/src/audio.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import { access
|
|
2
|
-
import { createHash } from 'crypto';
|
|
1
|
+
import { access } from 'fs/promises';
|
|
3
2
|
import { dirname, resolve } from 'path';
|
|
4
3
|
import { captureCallerFile } from './callerFile.js';
|
|
4
|
+
import { assetCandidatePaths, hashAssetFile, prewarmAssetFile, } from './assetHash.js';
|
|
5
5
|
import { isInsideHide } from './hide.js';
|
|
6
|
+
import { logger } from './logger.js';
|
|
6
7
|
import { MAX_AUDIO_LEVEL, validateSpeedTime } from './asset.js';
|
|
7
8
|
import { getScreenCIRuntimeContext, getRuntimeAudioRecorder, setRuntimeAudioRecorder, resetAudioRuntimeState, } from './runtimeContext.js';
|
|
8
|
-
const AUDIO_EXTENSIONS = [
|
|
9
|
+
const AUDIO_EXTENSIONS = [
|
|
10
|
+
'.mp3',
|
|
11
|
+
'.wav',
|
|
12
|
+
'.m4a',
|
|
13
|
+
'.aac',
|
|
14
|
+
'.ogg',
|
|
15
|
+
'.flac',
|
|
16
|
+
'.opus',
|
|
17
|
+
'.mp4',
|
|
18
|
+
];
|
|
9
19
|
/**
|
|
10
20
|
* Audio file paths registered by `createAudio` at module load, each attributed
|
|
11
21
|
* to the `.screenci` script that declared it (or `null` when the caller could
|
|
@@ -26,23 +36,36 @@ function registerAudioPath(path) {
|
|
|
26
36
|
export function resetRegisteredAudioPaths() {
|
|
27
37
|
registeredAudio.length = 0;
|
|
28
38
|
}
|
|
39
|
+
const warnedMissingAudioPaths = new Set();
|
|
40
|
+
function warnMissingAudio(path) {
|
|
41
|
+
if (warnedMissingAudioPaths.has(path))
|
|
42
|
+
return;
|
|
43
|
+
warnedMissingAudioPaths.add(path);
|
|
44
|
+
logger.warn(`Locally missing audio: ${path}. It will be reused from a previous upload of this video if available, otherwise the upload fails.`);
|
|
45
|
+
}
|
|
46
|
+
export function resetMissingAudioWarnings() {
|
|
47
|
+
warnedMissingAudioPaths.clear();
|
|
48
|
+
}
|
|
29
49
|
/**
|
|
30
50
|
* Validates the audio files declared by the `.screenci` script at
|
|
31
51
|
* {@link testFilePath} (plus any unattributed registrations), resolving each
|
|
32
|
-
* as-is and relative to that file.
|
|
33
|
-
*
|
|
34
|
-
*
|
|
52
|
+
* as-is and relative to that file. A missing file is not fatal: it is reused
|
|
53
|
+
* from a previous upload of this video (matched by path) at upload time, so a
|
|
54
|
+
* gitignored audio file does not have to be committed. Tracks attributed to a
|
|
55
|
+
* different test file are skipped.
|
|
35
56
|
*/
|
|
36
57
|
export async function validateRegisteredAudioPaths(testFilePath) {
|
|
37
58
|
for (const { ownerFile, path } of registeredAudio) {
|
|
38
59
|
if (ownerFile !== null && ownerFile !== testFilePath)
|
|
39
60
|
continue;
|
|
40
|
-
await resolveExistingAudioPath(path, testFilePath)
|
|
61
|
+
if ((await resolveExistingAudioPath(path, testFilePath)) === null) {
|
|
62
|
+
warnMissingAudio(path);
|
|
63
|
+
}
|
|
41
64
|
}
|
|
42
65
|
}
|
|
43
66
|
/**
|
|
44
67
|
* Resolves an audio file path to an existing path, trying it as-is and relative
|
|
45
|
-
* to the test file.
|
|
68
|
+
* to the test file. Returns null when no candidate exists.
|
|
46
69
|
*/
|
|
47
70
|
async function resolveExistingAudioPath(path, testFilePath) {
|
|
48
71
|
const candidates = [path];
|
|
@@ -58,7 +81,7 @@ async function resolveExistingAudioPath(path, testFilePath) {
|
|
|
58
81
|
// try next candidate
|
|
59
82
|
}
|
|
60
83
|
}
|
|
61
|
-
|
|
84
|
+
return null;
|
|
62
85
|
}
|
|
63
86
|
export function setActiveAudioRecorder(recorder) {
|
|
64
87
|
setRuntimeAudioRecorder(recorder);
|
|
@@ -76,27 +99,21 @@ function hasAudioExtension(path) {
|
|
|
76
99
|
}
|
|
77
100
|
/**
|
|
78
101
|
* Resolves an audio file path (as-is or relative to the test file) and returns
|
|
79
|
-
* its
|
|
80
|
-
*
|
|
102
|
+
* its path plus a SHA-256 hash for upload/caching. When the file is absent the
|
|
103
|
+
* hash is undefined: the track is recovered from a previous upload of this video
|
|
104
|
+
* (matched by path) at upload time, so a gitignored audio file need not be
|
|
105
|
+
* committed.
|
|
81
106
|
*/
|
|
82
|
-
async function resolveAudioFile(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
107
|
+
async function resolveAudioFile(path, testFilePath) {
|
|
108
|
+
// Cached + pre-warmable (see assetHash.ts): when the track was pre-warmed
|
|
109
|
+
// before the recording clock started, the hash is returned without a disk read
|
|
110
|
+
// so the audio start() does not pay the read on the timeline.
|
|
111
|
+
const fileHash = await hashAssetFile(assetCandidatePaths(path, testFilePath));
|
|
112
|
+
if (fileHash === undefined) {
|
|
113
|
+
warnMissingAudio(path);
|
|
114
|
+
return { path };
|
|
86
115
|
}
|
|
87
|
-
|
|
88
|
-
try {
|
|
89
|
-
const fileBuffer = await readFile(candidate);
|
|
90
|
-
return {
|
|
91
|
-
path,
|
|
92
|
-
fileHash: createHash('sha256').update(fileBuffer).digest('hex'),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
96
|
-
// try next candidate
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
throw new Error(`[screenci] Audio file not found for "${name}": ${path}`);
|
|
116
|
+
return { path, fileHash };
|
|
100
117
|
}
|
|
101
118
|
function normalizeAudioConfig(name, input) {
|
|
102
119
|
const config = typeof input === 'string' ? { path: input } : input;
|
|
@@ -165,7 +182,12 @@ export function buildStudioAudioTracks(names) {
|
|
|
165
182
|
* names become Studio-managed controllers; code (object) names resolve their
|
|
166
183
|
* input for the active language (`byLang[language] ?? shared`).
|
|
167
184
|
*/
|
|
168
|
-
export function buildAudio(feature, language
|
|
185
|
+
export function buildAudio(feature, language,
|
|
186
|
+
// The `.screenci` script audio paths resolve against. When provided, each code
|
|
187
|
+
// track's file is pre-warmed (hashed) up front so its start() reuses the cached
|
|
188
|
+
// hash instead of reading the file on the recording timeline. Omitted (no
|
|
189
|
+
// pre-warm) outside the recording fixture.
|
|
190
|
+
anchorFile) {
|
|
169
191
|
const result = {};
|
|
170
192
|
if (!feature)
|
|
171
193
|
return result;
|
|
@@ -177,6 +199,9 @@ export function buildAudio(feature, language) {
|
|
|
177
199
|
feature.shared[name];
|
|
178
200
|
if (input === undefined)
|
|
179
201
|
continue;
|
|
202
|
+
if (anchorFile !== undefined) {
|
|
203
|
+
prewarmAssetFile(typeof input === 'string' ? input : input.path, anchorFile);
|
|
204
|
+
}
|
|
180
205
|
result[name] = buildAudioController(name, input);
|
|
181
206
|
}
|
|
182
207
|
return result;
|
|
@@ -235,10 +260,10 @@ function buildAudioController(name, input) {
|
|
|
235
260
|
const config = normalizeAudioConfig(name, input);
|
|
236
261
|
const buildPayload = async () => {
|
|
237
262
|
const testFilePath = getScreenCIRuntimeContext().testFilePath;
|
|
238
|
-
const resolved = await resolveAudioFile(
|
|
263
|
+
const resolved = await resolveAudioFile(config.path, testFilePath);
|
|
239
264
|
return {
|
|
240
265
|
path: resolved.path,
|
|
241
|
-
fileHash: resolved.fileHash,
|
|
266
|
+
...(resolved.fileHash !== undefined && { fileHash: resolved.fileHash }),
|
|
242
267
|
volume: config.volume ?? 1,
|
|
243
268
|
repeat: config.repeat ?? false,
|
|
244
269
|
...(config.speed !== undefined && { speed: config.speed }),
|
package/dist/src/audio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/audio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/audio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,gBAAgB,GACjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC/D,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,GAEvB,MAAM,qBAAqB,CAAA;AA6E5B,MAAM,gBAAgB,GAAG;IACvB,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,MAAM;CACE,CAAA;AAEV;;;;;;;;GAQG;AAC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AAM,IAAI,KAAK;YAC9B,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1D,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;SACxD,CAAA;IACH,CAAC,CAAA;IAED,OAAO,yBAAyB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;QACxD,MAAM,OAAO,GAAG,MAAM,YAAY,EAAE,CAAA;QACpC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAY;IAC9C,OAAO,yBAAyB,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE;QAClD,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAA;QAClC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/src/builder.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { AudioController, AudioInput } from './audio.js';
|
|
|
6
6
|
import type { LocalizeNarrationValue, VoiceConfig } from './localize.js';
|
|
7
7
|
import type { Lang } from './voices.js';
|
|
8
8
|
import { type FeatureArg, type NormalizedFeature } from './declare.js';
|
|
9
|
+
import { STUDIO, type StudioNames, type StudioPending, type StudioSeeded } from './studio.js';
|
|
9
10
|
/**
|
|
10
11
|
* One variant in a generic `video.each(...)` fan-out. Each variant produces a
|
|
11
12
|
* separate video (its own identity and stored history), differing only in its
|
|
@@ -26,19 +27,46 @@ export type LocalizeMode = 'shared' | 'per-language';
|
|
|
26
27
|
* drives the registration-time fan-out (one Playwright test per language), so it
|
|
27
28
|
* lives on a builder method rather than in `recordOptions` (a run-time option).
|
|
28
29
|
*
|
|
29
|
-
* `languages` may be `'studio'
|
|
30
|
-
* and injected at record time through the same
|
|
31
|
-
* web has selected none yet
|
|
32
|
-
*
|
|
30
|
+
* `languages` may be `'studio'` (set via `video.languages(studio())`), meaning the
|
|
31
|
+
* set is owned by the ScreenCI web app and injected at record time through the same
|
|
32
|
+
* channel as `--languages`. When the web has selected none yet and there is no
|
|
33
|
+
* `studioSeed`, the set is empty and the render stays pending (the recording still
|
|
34
|
+
* runs so its declared schema reaches the backend to be filled). A `studioSeed`
|
|
35
|
+
* (from `video.languages(studio(['en', 'fi']))`) supplies the initial set the web
|
|
36
|
+
* app starts from but may change.
|
|
33
37
|
*/
|
|
34
38
|
export type RecordingLocalize = {
|
|
35
39
|
languages: readonly Lang[] | 'studio';
|
|
36
40
|
mode?: LocalizeMode;
|
|
37
41
|
locales?: Partial<Record<Lang, string>>;
|
|
38
42
|
browserLocale?: boolean;
|
|
43
|
+
/** Initial web-owned set when `languages === 'studio'` (`studio(['en', ...])`). */
|
|
44
|
+
studioSeed?: readonly Lang[];
|
|
39
45
|
};
|
|
40
|
-
/**
|
|
41
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The capture config for `video.languages(...)`. Code-owns the set when passed
|
|
48
|
+
* directly; the web app owns it (and may edit these fields later) when wrapped in
|
|
49
|
+
* `studio({ ... })`. `languages` may be omitted to infer the set from the
|
|
50
|
+
* per-feature keys (e.g. `narration({ en, fi })`), the usual pairing with
|
|
51
|
+
* `mode: 'shared'`.
|
|
52
|
+
*/
|
|
53
|
+
export type LanguagesConfig = {
|
|
54
|
+
languages?: readonly Lang[];
|
|
55
|
+
mode?: LocalizeMode;
|
|
56
|
+
locales?: Partial<Record<Lang, string>>;
|
|
57
|
+
browserLocale?: boolean;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The argument accepted by `video.languages(...)`:
|
|
61
|
+
*
|
|
62
|
+
* - `['en', 'fi']` or `{ languages, mode, ... }`: code owns the config.
|
|
63
|
+
* - `studio()`: the web app owns the set (nothing seeded, render pending).
|
|
64
|
+
* - `studio(['en', 'fi'])`: the web app owns the set, seeded with these languages.
|
|
65
|
+
* - `studio({ languages, mode, ... })`: the web app owns the whole config, seeded
|
|
66
|
+
* with these values (it can edit the set, and later the mode/locales, from the
|
|
67
|
+
* web).
|
|
68
|
+
*/
|
|
69
|
+
export type LanguagesArg = StudioPending | StudioNames | StudioSeeded<LanguagesConfig> | readonly Lang[] | LanguagesConfig;
|
|
42
70
|
/** A single Playwright test to register, fully resolved from the fan-out specs. */
|
|
43
71
|
export type Registration = {
|
|
44
72
|
/** Label for the wrapping `describe` block (scopes per-test `use` options). */
|
|
@@ -57,7 +85,7 @@ export type Registration = {
|
|
|
57
85
|
use: Record<string, unknown> | null;
|
|
58
86
|
/** Per-feature declarations carried into the fixtures. */
|
|
59
87
|
narration: NormalizedFeature<LocalizeNarrationValue> | null;
|
|
60
|
-
|
|
88
|
+
values: NormalizedFeature<string> | null;
|
|
61
89
|
overlays: NormalizedFeature<OverlayInputOrFactory> | null;
|
|
62
90
|
audio: NormalizedFeature<AudioInput> | null;
|
|
63
91
|
/** Resolved recording-level localize config (languages/mode/locales). */
|
|
@@ -67,10 +95,19 @@ export type Registration = {
|
|
|
67
95
|
export type ResolvedRecordingLocalize = {
|
|
68
96
|
/** Every language this video records (the resolved set). */
|
|
69
97
|
languages: string[];
|
|
98
|
+
/**
|
|
99
|
+
* Every language this video *defines* (the full code-defined / web-owned set),
|
|
100
|
+
* independent of the `--languages` render filter. `languages` is the subset
|
|
101
|
+
* actually rendered this run; `availableLanguages` is the complete set so the
|
|
102
|
+
* app knows which languages exist even when only some were rendered. A render
|
|
103
|
+
* restricted to `--languages fr` still reports `de`, `en`, ... here, so the app
|
|
104
|
+
* does not treat them as removed-from-code.
|
|
105
|
+
*/
|
|
106
|
+
availableLanguages: string[];
|
|
70
107
|
mode: LocalizeMode;
|
|
71
108
|
browserLocale: boolean;
|
|
72
109
|
locales?: Partial<Record<Lang, string>>;
|
|
73
|
-
/** Whether the set is owned by the web app (`video.languages(
|
|
110
|
+
/** Whether the set is owned by the web app (`video.languages(studio())`). */
|
|
74
111
|
studioOwned: boolean;
|
|
75
112
|
/** Studio-owned set with nothing selected yet: record for metadata, do not render. */
|
|
76
113
|
pending: boolean;
|
|
@@ -83,12 +120,15 @@ export type ResolvedRecordingLocalize = {
|
|
|
83
120
|
};
|
|
84
121
|
/**
|
|
85
122
|
* Resolve the recorded language set at registration time. Priority:
|
|
86
|
-
* 1. `video.languages(
|
|
87
|
-
*
|
|
123
|
+
* 1. `video.languages(studio())` -> web-owned: the UNION of the web's current
|
|
124
|
+
* selection (`requestedLanguages`, injected at record time), the `studioSeed`
|
|
125
|
+
* (`studio(['en', ...])`), and the per-feature language keys defined in code.
|
|
126
|
+
* Empty (none anywhere) => pending.
|
|
88
127
|
* 2. explicit `video.languages([...])`.
|
|
89
128
|
* 3. union of per-feature language keys (e.g. `narration({ fr })` -> French).
|
|
90
129
|
* 4. default `['en']`.
|
|
91
|
-
* The `requestedLanguages` filter (CLI / studio injection) intersects 2-4
|
|
130
|
+
* The `requestedLanguages` filter (CLI / studio injection) intersects 2-4; for the
|
|
131
|
+
* web-owned set (1) it is unioned in instead, since the web only adds languages.
|
|
92
132
|
*/
|
|
93
133
|
export declare function resolveRecordingLocalize(state: BuilderState, requestedLanguages: string[] | null): ResolvedRecordingLocalize;
|
|
94
134
|
/**
|
|
@@ -121,31 +161,91 @@ type RegistrarTest = TestCall & {
|
|
|
121
161
|
fixme: TestCall;
|
|
122
162
|
fail: TestCall;
|
|
123
163
|
};
|
|
164
|
+
/** Converts a union type to an intersection: `A | B` -> `A & B`. */
|
|
165
|
+
type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
124
166
|
/**
|
|
125
|
-
* The content names declared by a {@link FeatureArg}.
|
|
126
|
-
* studio
|
|
127
|
-
*
|
|
167
|
+
* The content names declared by a {@link FeatureArg}. For a Studio marker
|
|
168
|
+
* (`studio([...])`/`studio({...})`) the declared names (or the seed's names); for
|
|
169
|
+
* objects, the union of content-major top-level keys (those that are not language
|
|
170
|
+
* codes or `default`) and the language-major inner keys.
|
|
128
171
|
*/
|
|
129
172
|
type LangKey = Lang | 'default';
|
|
130
173
|
type LangMajorNamesOf<A> = NonNullable<{
|
|
131
174
|
[K in keyof A & LangKey]: A[K] extends Record<string, unknown> ? Extract<keyof A[K], string> : never;
|
|
132
175
|
}[keyof A & LangKey]>;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
176
|
+
/** Names declared by a Studio marker's `names` tuple. */
|
|
177
|
+
type StudioNamesOf<A> = A extends {
|
|
178
|
+
readonly names: infer N;
|
|
179
|
+
} ? N extends readonly string[] ? N[number] : never : never;
|
|
180
|
+
export type FeatureNamesOf<A> = A extends {
|
|
181
|
+
readonly [STUDIO]: true;
|
|
182
|
+
} ? A extends {
|
|
183
|
+
readonly seed: infer S;
|
|
184
|
+
} ? FeatureNamesOf<S> : StudioNamesOf<A> : A extends object ? Extract<Exclude<keyof A, LangKey>, string> | LangMajorNamesOf<A> : never;
|
|
185
|
+
/**
|
|
186
|
+
* Builds a feature's fixture controller map so each declared name is a *real*
|
|
187
|
+
* property mapped homomorphically from the object that declared it, rather than
|
|
188
|
+
* a synthesized `Record<Union, V>` entry.
|
|
189
|
+
*
|
|
190
|
+
* Why this matters: `Record<FeatureNamesOf<A>, V>` collapses the names into a
|
|
191
|
+
* string-literal union and then re-synthesizes fresh properties, which severs
|
|
192
|
+
* the link back to the literal that declared each name. An editor then has no
|
|
193
|
+
* source location to jump to, so control-clicking `narration.intro` cannot land
|
|
194
|
+
* on the `intro:` line. A homomorphic map (`[K in keyof Src]`) keeps each
|
|
195
|
+
* property's declaration symbol, which is exactly what "Go to Definition"
|
|
196
|
+
* follows. The `-readonly`/`-?` modifiers drop the modifiers that `const`
|
|
197
|
+
* inference adds to the source literal, so the resolved value type stays
|
|
198
|
+
* identical to the old `Record` form (only navigability is gained).
|
|
199
|
+
*
|
|
200
|
+
* The blank Studio form (`studio([...])`) has no declaring object in code (its
|
|
201
|
+
* content lives in the web app), so it keeps the plain `Record` mapping and is not
|
|
202
|
+
* navigable. A seeded Studio form (`studio({...})`) recurses into its seed object,
|
|
203
|
+
* so it stays navigable like the content-major form.
|
|
204
|
+
*/
|
|
205
|
+
type ContentMajorControllers<A, V> = {
|
|
206
|
+
-readonly [K in keyof A as K extends LangKey ? never : Extract<K, string>]-?: V;
|
|
207
|
+
};
|
|
208
|
+
type LangMajorControllers<A, V> = UnionToIntersection<{
|
|
209
|
+
[L in Extract<keyof A, LangKey>]: A[L] extends Record<string, unknown> ? {
|
|
210
|
+
-readonly [K in keyof A[L] as Extract<K, string>]-?: V;
|
|
211
|
+
} : never;
|
|
212
|
+
}[Extract<keyof A, LangKey>]>;
|
|
213
|
+
type FeatureControllers<A, V> = A extends {
|
|
214
|
+
readonly [STUDIO]: true;
|
|
215
|
+
} ? A extends {
|
|
216
|
+
readonly seed: infer S;
|
|
217
|
+
} ? FeatureControllers<S, V> : Record<StudioNamesOf<A>, V> : [Extract<Exclude<keyof A, LangKey>, string>] extends [never] ? LangMajorControllers<A, V> : ContentMajorControllers<A, V>;
|
|
218
|
+
/**
|
|
219
|
+
* Overlays mirror {@link FeatureControllers} but resolve each name's controller
|
|
220
|
+
* type from its declared input (`OverlayControllerFor<A[K]>`), so the precise
|
|
221
|
+
* controller variant is preserved alongside navigability. Language-major and
|
|
222
|
+
* Studio names fall back to the broad {@link OverlayController}, matching the
|
|
223
|
+
* prior behavior.
|
|
224
|
+
*/
|
|
225
|
+
type OverlayContentMajorControllers<A> = {
|
|
226
|
+
-readonly [K in keyof A as K extends LangKey ? never : Extract<K, string>]-?: OverlayControllerFor<A[K]>;
|
|
227
|
+
};
|
|
228
|
+
type OverlayLangMajorControllers<A> = UnionToIntersection<{
|
|
229
|
+
[L in Extract<keyof A, LangKey>]: A[L] extends Record<string, unknown> ? {
|
|
230
|
+
-readonly [K in keyof A[L] as Extract<K, string>]-?: OverlayController;
|
|
231
|
+
} : never;
|
|
232
|
+
}[Extract<keyof A, LangKey>]>;
|
|
233
|
+
type OverlayControllers<A> = A extends {
|
|
234
|
+
readonly [STUDIO]: true;
|
|
235
|
+
} ? A extends {
|
|
236
|
+
readonly seed: infer S;
|
|
237
|
+
} ? OverlayControllers<S> : Record<StudioNamesOf<A>, OverlayController> : [Extract<Exclude<keyof A, LangKey>, string>] extends [never] ? OverlayLangMajorControllers<A> : OverlayContentMajorControllers<A>;
|
|
136
238
|
type NarrationOverrideFor<Args, A> = 'narration' extends keyof Args ? [FeatureNamesOf<A>] extends [never] ? object : {
|
|
137
|
-
narration:
|
|
239
|
+
narration: FeatureControllers<A, NarrationCue>;
|
|
138
240
|
} : object;
|
|
139
|
-
type
|
|
140
|
-
|
|
241
|
+
type ValuesOverrideFor<Args, A> = 'values' extends keyof Args ? [FeatureNamesOf<A>] extends [never] ? object : {
|
|
242
|
+
values: FeatureControllers<A, string>;
|
|
141
243
|
} : object;
|
|
142
244
|
type OverlayOverrideFor<Args, A> = 'overlays' extends keyof Args ? [FeatureNamesOf<A>] extends [never] ? object : {
|
|
143
|
-
overlays:
|
|
144
|
-
[K in FeatureNamesOf<A>]: OverlayControllerForName<A, K>;
|
|
145
|
-
};
|
|
245
|
+
overlays: OverlayControllers<A>;
|
|
146
246
|
} : object;
|
|
147
247
|
type AudioOverrideFor<Args, A> = 'audio' extends keyof Args ? [FeatureNamesOf<A>] extends [never] ? object : {
|
|
148
|
-
audio:
|
|
248
|
+
audio: FeatureControllers<A, AudioController>;
|
|
149
249
|
} : object;
|
|
150
250
|
type MergeArgs<Args, O> = {
|
|
151
251
|
[K in keyof Args | keyof O]: K extends keyof O ? O[K] : K extends keyof Args ? Args[K] : never;
|
|
@@ -155,19 +255,19 @@ type BodyFn<Args> = (args: Args, testInfo: TestInfo) => void | Promise<void>;
|
|
|
155
255
|
* A chainable fan-out builder. Callable to register the test(s), and exposes the
|
|
156
256
|
* per-feature declaration methods plus `.languages()` / `.each()` to refine the
|
|
157
257
|
* fan-out. `O` accumulates the typed fixture overrides so the body sees
|
|
158
|
-
* `narration`/`
|
|
258
|
+
* `narration`/`values`/`overlays`/`audio` typed to the declared names.
|
|
159
259
|
*/
|
|
160
260
|
type BuilderTerminal<Args, O> = {
|
|
161
261
|
(title: string, body: BodyFn<MergeArgs<Args, O>>): void;
|
|
162
262
|
(title: string, details: TestDetails, body: BodyFn<MergeArgs<Args, O>>): void;
|
|
163
263
|
};
|
|
164
|
-
/** The fixture keys a medium supports (videos: all; screenshots:
|
|
165
|
-
export type FeatureKey = 'narration' | '
|
|
264
|
+
/** The fixture keys a medium supports (videos: all; screenshots: values+overlays). */
|
|
265
|
+
export type FeatureKey = 'narration' | 'values' | 'overlays' | 'audio';
|
|
166
266
|
export interface MediaBuilder<Args, O = object> extends BuilderTerminal<Args, O> {
|
|
167
|
-
/** Declare narration cues: Studio-owned (
|
|
267
|
+
/** Declare narration cues: Studio-owned (`studio([...])`) or code values (object). */
|
|
168
268
|
narration<const A extends FeatureArg<LocalizeNarrationValue>>(arg: A): MediaBuilder<Args, O & NarrationOverrideFor<Args, A>>;
|
|
169
|
-
/** Declare on-screen
|
|
170
|
-
|
|
269
|
+
/** Declare on-screen values fields. */
|
|
270
|
+
values<const A extends FeatureArg<string>>(arg: A): MediaBuilder<Args, O & ValuesOverrideFor<Args, A>>;
|
|
171
271
|
/** Declare overlays. */
|
|
172
272
|
overlays<const A extends FeatureArg<OverlayInputOrFactory>>(arg: A): MediaBuilder<Args, O & OverlayOverrideFor<Args, A>>;
|
|
173
273
|
/** Declare background-audio tracks. */
|
|
@@ -185,7 +285,7 @@ export interface MediaBuilder<Args, O = object> extends BuilderTerminal<Args, O>
|
|
|
185
285
|
export type VideoBuilder<Args, O = object> = MediaBuilder<Args, O>;
|
|
186
286
|
export type BuilderState = {
|
|
187
287
|
narration: NormalizedFeature<LocalizeNarrationValue> | null;
|
|
188
|
-
|
|
288
|
+
values: NormalizedFeature<string> | null;
|
|
189
289
|
overlays: NormalizedFeature<OverlayInputOrFactory> | null;
|
|
190
290
|
audio: NormalizedFeature<AudioInput> | null;
|
|
191
291
|
recordingLocalize: RecordingLocalize | null;
|
|
@@ -195,7 +295,7 @@ export type BuilderState = {
|
|
|
195
295
|
};
|
|
196
296
|
/** The full set of feature fixtures for videos. */
|
|
197
297
|
export declare const VIDEO_FEATURES: ReadonlySet<FeatureKey>;
|
|
198
|
-
/** Stills are silent: only
|
|
298
|
+
/** Stills are silent: only values + overlays. */
|
|
199
299
|
export declare const SCREENSHOT_FEATURES: ReadonlySet<FeatureKey>;
|
|
200
300
|
/**
|
|
201
301
|
* Create a fan-out builder bound to a registrar test instance. `Args` is the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAI7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,KAAK,EAAE,a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