automovie 0.3.3 → 0.4.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/README.md +40 -139
- package/lib/AUTOMOVIE_CAPTURE_OPTIONS.d.ts +5 -2
- package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js +6 -2
- package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js.map +1 -1
- package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.d.ts +3 -1
- package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.js +3 -1
- package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.js.map +1 -1
- package/lib/AUTOMOVIE_INSPECT_OPTIONS.d.ts +5 -2
- package/lib/AUTOMOVIE_INSPECT_OPTIONS.js +5 -2
- package/lib/AUTOMOVIE_INSPECT_OPTIONS.js.map +1 -1
- package/lib/AUTOMOVIE_RENDER_OPTIONS.d.ts +6 -2
- package/lib/AUTOMOVIE_RENDER_OPTIONS.js +8 -2
- package/lib/AUTOMOVIE_RENDER_OPTIONS.js.map +1 -1
- package/lib/AUTOMOVIE_REVIEW_OPTIONS.d.ts +3 -1
- package/lib/AUTOMOVIE_REVIEW_OPTIONS.js +12 -1
- package/lib/AUTOMOVIE_REVIEW_OPTIONS.js.map +1 -1
- package/lib/AutoMovieCaptureBackend.d.ts +4 -6
- package/lib/AutoMovieCaptureHost.d.ts +73 -53
- package/lib/AutoMovieCaptureHost.js +89 -56
- package/lib/AutoMovieCaptureHost.js.map +1 -1
- package/lib/AutoMovieCommand.d.ts +69 -20
- package/lib/AutoMovieFfmpegStaticPath.d.ts +6 -0
- package/lib/AutoMovieFfmpegStaticPath.js +3 -0
- package/lib/AutoMovieFfmpegStaticPath.js.map +1 -0
- package/lib/AutoMovieMp4Boxes.d.ts +78 -0
- package/lib/AutoMovieMp4Boxes.js +227 -0
- package/lib/AutoMovieMp4Boxes.js.map +1 -0
- package/lib/AutoMovieRenderOutputReservation.d.ts +18 -0
- package/lib/AutoMovieRenderOutputReservation.js +118 -0
- package/lib/AutoMovieRenderOutputReservation.js.map +1 -0
- package/lib/IAutoMovieChromium.d.ts +13 -57
- package/lib/IAutoMovieDeliveryAudioTrack.d.ts +17 -0
- package/lib/IAutoMovieDeliveryAudioTrack.js +3 -0
- package/lib/IAutoMovieDeliveryAudioTrack.js.map +1 -0
- package/lib/IAutoMovieDeliveryProfileFinding.d.ts +21 -0
- package/lib/IAutoMovieDeliveryProfileFinding.js +3 -0
- package/lib/IAutoMovieDeliveryProfileFinding.js.map +1 -0
- package/lib/IAutoMovieFfmpegSources.d.ts +11 -0
- package/lib/IAutoMovieFfmpegSources.js +3 -0
- package/lib/IAutoMovieFfmpegSources.js.map +1 -0
- package/lib/IAutoMovieReviewObservation.d.ts +66 -0
- package/lib/IAutoMovieReviewObservation.js +3 -0
- package/lib/IAutoMovieReviewObservation.js.map +1 -0
- package/lib/IAutoMovieVerification.d.ts +163 -0
- package/lib/IAutoMovieVerification.js +3 -0
- package/lib/IAutoMovieVerification.js.map +1 -0
- package/lib/auditAutoMovieAlphaSamples.d.ts +23 -0
- package/lib/auditAutoMovieAlphaSamples.js +183 -0
- package/lib/auditAutoMovieAlphaSamples.js.map +1 -0
- package/lib/auditAutoMovieDeliveryProfile.d.ts +33 -0
- package/lib/auditAutoMovieDeliveryProfile.js +93 -0
- package/lib/auditAutoMovieDeliveryProfile.js.map +1 -0
- package/lib/captureAutoMovie.d.ts +23 -11
- package/lib/captureAutoMovie.js +102 -18
- package/lib/captureAutoMovie.js.map +1 -1
- package/lib/createAutoMovieDeliveryAudioLog.d.ts +31 -0
- package/lib/createAutoMovieDeliveryAudioLog.js +110 -0
- package/lib/createAutoMovieDeliveryAudioLog.js.map +1 -0
- package/lib/createAutoMovieDeliveryAudioScan.d.ts +39 -0
- package/lib/createAutoMovieDeliveryAudioScan.js +125 -0
- package/lib/createAutoMovieDeliveryAudioScan.js.map +1 -0
- package/lib/createAutoMovieVerificationInputScope.d.ts +19 -0
- package/lib/createAutoMovieVerificationInputScope.js +147 -0
- package/lib/createAutoMovieVerificationInputScope.js.map +1 -0
- package/lib/createAutoMovieVerificationMediaHash.d.ts +5 -0
- package/lib/createAutoMovieVerificationMediaHash.js +61 -0
- package/lib/createAutoMovieVerificationMediaHash.js.map +1 -0
- package/lib/decodeAutoMovieDeliveryAudio.d.ts +24 -0
- package/lib/decodeAutoMovieDeliveryAudio.js +77 -0
- package/lib/decodeAutoMovieDeliveryAudio.js.map +1 -0
- package/lib/deriveAutoMovieProjectName.d.ts +14 -11
- package/lib/deriveAutoMovieProjectName.js +14 -11
- package/lib/deriveAutoMovieProjectName.js.map +1 -1
- package/lib/findAutoMovieFreePort.d.ts +5 -10
- package/lib/findAutoMovieFreePort.js +5 -10
- package/lib/findAutoMovieFreePort.js.map +1 -1
- package/lib/formatAutoMovieInspectUrl.d.ts +6 -10
- package/lib/formatAutoMovieInspectUrl.js +6 -10
- package/lib/formatAutoMovieInspectUrl.js.map +1 -1
- package/lib/hashAutoMovieFile.d.ts +5 -0
- package/lib/hashAutoMovieFile.js +16 -0
- package/lib/hashAutoMovieFile.js.map +1 -0
- package/lib/importAutoMovieVerificationEntry.d.mts +2 -0
- package/lib/importAutoMovieVerificationEntry.mjs +6 -0
- package/lib/importAutoMovieVerificationEntry.mjs.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -1
- package/lib/inspectAutoMovie.d.ts +15 -9
- package/lib/inspectAutoMovie.js +25 -9
- package/lib/inspectAutoMovie.js.map +1 -1
- package/lib/inspectAutoMovieVerificationCapture.d.ts +15 -0
- package/lib/inspectAutoMovieVerificationCapture.js +221 -0
- package/lib/inspectAutoMovieVerificationCapture.js.map +1 -0
- package/lib/inspectAutoMovieVerificationDelivery.d.ts +13 -0
- package/lib/inspectAutoMovieVerificationDelivery.js +247 -0
- package/lib/inspectAutoMovieVerificationDelivery.js.map +1 -0
- package/lib/inspectAutoMovieVerificationReview.d.ts +11 -0
- package/lib/inspectAutoMovieVerificationReview.js +141 -0
- package/lib/inspectAutoMovieVerificationReview.js.map +1 -0
- package/lib/launchAutoMovieChromium.d.ts +9 -11
- package/lib/launchAutoMovieChromium.js +10 -11
- package/lib/launchAutoMovieChromium.js.map +1 -1
- package/lib/listAutoMovieReleaseFindings.d.ts +9 -0
- package/lib/listAutoMovieReleaseFindings.js +58 -0
- package/lib/listAutoMovieReleaseFindings.js.map +1 -0
- package/lib/loadAutoMovieProductionModule.d.ts +11 -10
- package/lib/loadAutoMovieProductionModule.js +18 -10
- package/lib/loadAutoMovieProductionModule.js.map +1 -1
- package/lib/loadAutoMovieVerificationModule.d.ts +6 -0
- package/lib/loadAutoMovieVerificationModule.js +246 -0
- package/lib/loadAutoMovieVerificationModule.js.map +1 -0
- package/lib/planAutoMovieChromiumLaunch.d.ts +7 -13
- package/lib/planAutoMovieChromiumLaunch.js +7 -13
- package/lib/planAutoMovieChromiumLaunch.js.map +1 -1
- package/lib/planAutoMovieDeliveryAudioDecode.d.ts +10 -0
- package/lib/planAutoMovieDeliveryAudioDecode.js +29 -0
- package/lib/planAutoMovieDeliveryAudioDecode.js.map +1 -0
- package/lib/planAutoMovieDeliveryDecode.d.ts +19 -0
- package/lib/planAutoMovieDeliveryDecode.js +57 -0
- package/lib/planAutoMovieDeliveryDecode.js.map +1 -0
- package/lib/planAutoMovieDeliveryInput.d.ts +11 -0
- package/lib/planAutoMovieDeliveryInput.js +26 -0
- package/lib/planAutoMovieDeliveryInput.js.map +1 -0
- package/lib/planAutoMovieModulePageViteConfig.d.ts +13 -10
- package/lib/planAutoMovieModulePageViteConfig.js +13 -10
- package/lib/planAutoMovieModulePageViteConfig.js.map +1 -1
- package/lib/promptAutoMovieProjectName.d.ts +6 -10
- package/lib/promptAutoMovieProjectName.js +6 -10
- package/lib/promptAutoMovieProjectName.js.map +1 -1
- package/lib/publishAutoMovieRenderAttempt.d.ts +32 -0
- package/lib/publishAutoMovieRenderAttempt.js +91 -0
- package/lib/publishAutoMovieRenderAttempt.js.map +1 -0
- package/lib/readAutoMovieAddArguments.d.ts +10 -11
- package/lib/readAutoMovieAddArguments.js +10 -11
- package/lib/readAutoMovieAddArguments.js.map +1 -1
- package/lib/readAutoMovieCaptureHostOptions.d.ts +19 -17
- package/lib/readAutoMovieCaptureHostOptions.js +16 -17
- package/lib/readAutoMovieCaptureHostOptions.js.map +1 -1
- package/lib/readAutoMovieCommandArguments.d.ts +6 -9
- package/lib/readAutoMovieCommandArguments.js +9 -10
- package/lib/readAutoMovieCommandArguments.js.map +1 -1
- package/lib/readAutoMovieCreateArguments.d.ts +7 -11
- package/lib/readAutoMovieCreateArguments.js +7 -11
- package/lib/readAutoMovieCreateArguments.js.map +1 -1
- package/lib/readAutoMovieDeliveryAudioTrack.d.ts +21 -0
- package/lib/readAutoMovieDeliveryAudioTrack.js +104 -0
- package/lib/readAutoMovieDeliveryAudioTrack.js.map +1 -0
- package/lib/readAutoMovieDeliveryDecode.d.ts +19 -0
- package/lib/readAutoMovieDeliveryDecode.js +209 -0
- package/lib/readAutoMovieDeliveryDecode.js.map +1 -0
- package/lib/readAutoMovieDeliveryProbe.d.ts +35 -0
- package/lib/readAutoMovieDeliveryProbe.js +363 -0
- package/lib/readAutoMovieDeliveryProbe.js.map +1 -0
- package/lib/readAutoMovieErrorCode.d.ts +9 -0
- package/lib/readAutoMovieErrorCode.js +18 -0
- package/lib/readAutoMovieErrorCode.js.map +1 -0
- package/lib/readAutoMovieInspectHostOptions.d.ts +15 -16
- package/lib/readAutoMovieInspectHostOptions.js +11 -15
- package/lib/readAutoMovieInspectHostOptions.js.map +1 -1
- package/lib/readAutoMovieNameOption.d.ts +4 -10
- package/lib/readAutoMovieNameOption.js +4 -10
- package/lib/readAutoMovieNameOption.js.map +1 -1
- package/lib/readAutoMoviePageTimeout.d.ts +13 -0
- package/lib/readAutoMoviePageTimeout.js +21 -0
- package/lib/readAutoMoviePageTimeout.js.map +1 -0
- package/lib/readAutoMovieRenderOptions.d.ts +24 -16
- package/lib/readAutoMovieRenderOptions.js +23 -16
- package/lib/readAutoMovieRenderOptions.js.map +1 -1
- package/lib/readAutoMovieReviewObservation.d.ts +6 -0
- package/lib/readAutoMovieReviewObservation.js +108 -0
- package/lib/readAutoMovieReviewObservation.js.map +1 -0
- package/lib/readAutoMovieReviewOptions.d.ts +32 -24
- package/lib/readAutoMovieReviewOptions.js +82 -18
- package/lib/readAutoMovieReviewOptions.js.map +1 -1
- package/lib/readAutoMovieRevision.d.ts +3 -9
- package/lib/readAutoMovieRevision.js +3 -9
- package/lib/readAutoMovieRevision.js.map +1 -1
- package/lib/readAutoMovieVerifyOptions.d.ts +17 -0
- package/lib/readAutoMovieVerifyOptions.js +45 -0
- package/lib/readAutoMovieVerifyOptions.js.map +1 -0
- package/lib/readAutoMovieVideoProbe.d.ts +6 -10
- package/lib/readAutoMovieVideoProbe.js +20 -13
- package/lib/readAutoMovieVideoProbe.js.map +1 -1
- package/lib/recordAutoMoviePlayback.d.ts +18 -11
- package/lib/recordAutoMoviePlayback.js +26 -13
- package/lib/recordAutoMoviePlayback.js.map +1 -1
- package/lib/renderAutoMovie.d.ts +16 -10
- package/lib/renderAutoMovie.js +31 -14
- package/lib/renderAutoMovie.js.map +1 -1
- package/lib/renderAutoMovieScaffoldNextSteps.d.ts +10 -10
- package/lib/renderAutoMovieScaffoldNextSteps.js +10 -10
- package/lib/renderAutoMovieVideo.d.ts +53 -15
- package/lib/renderAutoMovieVideo.js +290 -45
- package/lib/renderAutoMovieVideo.js.map +1 -1
- package/lib/resolveAutoMovieFfmpeg.d.ts +12 -15
- package/lib/resolveAutoMovieFfmpeg.js +12 -17
- package/lib/resolveAutoMovieFfmpeg.js.map +1 -1
- package/lib/reviewAutoMovie.d.ts +10 -10
- package/lib/reviewAutoMovie.js +15 -10
- package/lib/reviewAutoMovie.js.map +1 -1
- package/lib/reviewAutoMovieFile.d.ts +21 -0
- package/lib/reviewAutoMovieFile.js +378 -0
- package/lib/reviewAutoMovieFile.js.map +1 -0
- package/lib/run.d.ts +32 -18
- package/lib/run.js +67 -23
- package/lib/run.js.map +1 -1
- package/lib/runAutoMovieDeliveryAudioDecode.d.ts +18 -0
- package/lib/runAutoMovieDeliveryAudioDecode.js +28 -0
- package/lib/runAutoMovieDeliveryAudioDecode.js.map +1 -0
- package/lib/runAutoMovieDeliveryDecode.d.ts +19 -0
- package/lib/runAutoMovieDeliveryDecode.js +42 -0
- package/lib/runAutoMovieDeliveryDecode.js.map +1 -0
- package/lib/runAutoMovieDeliveryReferenceDecode.d.ts +28 -0
- package/lib/runAutoMovieDeliveryReferenceDecode.js +77 -0
- package/lib/runAutoMovieDeliveryReferenceDecode.js.map +1 -0
- package/lib/runAutoMovieDeliverySourceAudioDecode.d.ts +20 -0
- package/lib/runAutoMovieDeliverySourceAudioDecode.js +56 -0
- package/lib/runAutoMovieDeliverySourceAudioDecode.js.map +1 -0
- package/lib/runAutoMovieFfmpeg.d.ts +15 -10
- package/lib/runAutoMovieFfmpeg.js +36 -13
- package/lib/runAutoMovieFfmpeg.js.map +1 -1
- package/lib/runAutoMovieVerification.d.ts +28 -0
- package/lib/runAutoMovieVerification.js +393 -0
- package/lib/runAutoMovieVerification.js.map +1 -0
- package/lib/sameAutoMovieReviewFile.d.ts +2 -0
- package/lib/sameAutoMovieReviewFile.js +57 -0
- package/lib/sameAutoMovieReviewFile.js.map +1 -0
- package/lib/selectAutoMovieProjectName.d.ts +8 -11
- package/lib/selectAutoMovieProjectName.js +8 -11
- package/lib/selectAutoMovieProjectName.js.map +1 -1
- package/lib/serveAutoMovieDrawPage.d.ts +14 -11
- package/lib/serveAutoMovieDrawPage.js +14 -11
- package/lib/serveAutoMovieDrawPage.js.map +1 -1
- package/lib/serveAutoMovieInspectorPage.d.ts +4 -8
- package/lib/serveAutoMovieInspectorPage.js +3 -9
- package/lib/serveAutoMovieInspectorPage.js.map +1 -1
- package/lib/verifyAutoMovie.d.ts +19 -0
- package/lib/verifyAutoMovie.js +44 -0
- package/lib/verifyAutoMovie.js.map +1 -0
- package/lib/writeAutoMovieModulePage.d.ts +17 -12
- package/lib/writeAutoMovieModulePage.js +13 -11
- package/lib/writeAutoMovieModulePage.js.map +1 -1
- package/lib/writeAutoMovieVerificationReceipt.d.ts +2 -0
- package/lib/writeAutoMovieVerificationReceipt.js +75 -0
- package/lib/writeAutoMovieVerificationReceipt.js.map +1 -0
- package/package.json +8 -8
- package/src/AUTOMOVIE_CAPTURE_OPTIONS.ts +6 -2
- package/src/AUTOMOVIE_DEFAULT_PROJECT_NAME.ts +3 -1
- package/src/AUTOMOVIE_INSPECT_OPTIONS.ts +5 -2
- package/src/AUTOMOVIE_RENDER_OPTIONS.ts +8 -2
- package/src/AUTOMOVIE_REVIEW_OPTIONS.ts +12 -1
- package/src/AutoMovieCaptureBackend.ts +4 -6
- package/src/AutoMovieCaptureHost.ts +122 -68
- package/src/AutoMovieCommand.ts +71 -20
- package/src/AutoMovieFfmpegStaticPath.ts +7 -0
- package/src/AutoMovieMp4Boxes.ts +263 -0
- package/src/AutoMovieRenderOutputReservation.ts +97 -0
- package/src/IAutoMovieChromium.ts +13 -57
- package/src/IAutoMovieDeliveryAudioTrack.ts +19 -0
- package/src/IAutoMovieDeliveryProfileFinding.ts +24 -0
- package/src/IAutoMovieFfmpegSources.ts +13 -0
- package/src/IAutoMovieReviewObservation.ts +59 -0
- package/src/IAutoMovieVerification.ts +207 -0
- package/src/auditAutoMovieAlphaSamples.ts +201 -0
- package/src/auditAutoMovieDeliveryProfile.ts +125 -0
- package/src/captureAutoMovie.ts +137 -28
- package/src/createAutoMovieDeliveryAudioLog.ts +141 -0
- package/src/createAutoMovieDeliveryAudioScan.ts +150 -0
- package/src/createAutoMovieVerificationInputScope.ts +156 -0
- package/src/createAutoMovieVerificationMediaHash.ts +32 -0
- package/src/decodeAutoMovieDeliveryAudio.ts +95 -0
- package/src/deriveAutoMovieProjectName.ts +14 -11
- package/src/findAutoMovieFreePort.ts +5 -10
- package/src/formatAutoMovieInspectUrl.ts +6 -10
- package/src/hashAutoMovieFile.ts +12 -0
- package/src/importAutoMovieVerificationEntry.mts +6 -0
- package/src/index.ts +9 -0
- package/src/inspectAutoMovie.ts +28 -11
- package/src/inspectAutoMovieVerificationCapture.ts +292 -0
- package/src/inspectAutoMovieVerificationDelivery.ts +301 -0
- package/src/inspectAutoMovieVerificationReview.ts +130 -0
- package/src/launchAutoMovieChromium.ts +14 -12
- package/src/listAutoMovieReleaseFindings.ts +87 -0
- package/src/loadAutoMovieProductionModule.ts +22 -15
- package/src/loadAutoMovieVerificationModule.ts +278 -0
- package/src/planAutoMovieChromiumLaunch.ts +7 -13
- package/src/planAutoMovieDeliveryAudioDecode.ts +26 -0
- package/src/planAutoMovieDeliveryDecode.ts +66 -0
- package/src/planAutoMovieDeliveryInput.ts +25 -0
- package/src/planAutoMovieModulePageViteConfig.ts +13 -10
- package/src/promptAutoMovieProjectName.ts +6 -10
- package/src/publishAutoMovieRenderAttempt.ts +89 -0
- package/src/readAutoMovieAddArguments.ts +10 -11
- package/src/readAutoMovieCaptureHostOptions.ts +22 -17
- package/src/readAutoMovieCommandArguments.ts +8 -10
- package/src/readAutoMovieCreateArguments.ts +7 -11
- package/src/readAutoMovieDeliveryAudioTrack.ts +137 -0
- package/src/readAutoMovieDeliveryDecode.ts +269 -0
- package/src/readAutoMovieDeliveryProbe.ts +499 -0
- package/src/readAutoMovieErrorCode.ts +13 -0
- package/src/readAutoMovieInspectHostOptions.ts +15 -16
- package/src/readAutoMovieNameOption.ts +4 -10
- package/src/readAutoMoviePageTimeout.ts +19 -0
- package/src/readAutoMovieRenderOptions.ts +34 -16
- package/src/readAutoMovieReviewObservation.ts +146 -0
- package/src/readAutoMovieReviewOptions.ts +133 -28
- package/src/readAutoMovieRevision.ts +3 -9
- package/src/readAutoMovieVerifyOptions.ts +50 -0
- package/src/readAutoMovieVideoProbe.ts +24 -13
- package/src/recordAutoMoviePlayback.ts +26 -13
- package/src/renderAutoMovie.ts +38 -17
- package/src/renderAutoMovieScaffoldNextSteps.ts +10 -10
- package/src/renderAutoMovieVideo.ts +474 -85
- package/src/resolveAutoMovieFfmpeg.ts +17 -24
- package/src/reviewAutoMovie.ts +21 -16
- package/src/reviewAutoMovieFile.ts +479 -0
- package/src/run.ts +75 -25
- package/src/runAutoMovieDeliveryAudioDecode.ts +45 -0
- package/src/runAutoMovieDeliveryDecode.ts +63 -0
- package/src/runAutoMovieDeliveryReferenceDecode.ts +107 -0
- package/src/runAutoMovieDeliverySourceAudioDecode.ts +71 -0
- package/src/runAutoMovieFfmpeg.ts +48 -14
- package/src/runAutoMovieVerification.ts +487 -0
- package/src/sameAutoMovieReviewFile.ts +23 -0
- package/src/selectAutoMovieProjectName.ts +8 -11
- package/src/serveAutoMovieDrawPage.ts +16 -12
- package/src/serveAutoMovieInspectorPage.ts +6 -9
- package/src/verifyAutoMovie.ts +67 -0
- package/src/writeAutoMovieModulePage.ts +17 -12
- package/src/writeAutoMovieVerificationReceipt.ts +51 -0
|
@@ -4,50 +4,75 @@ import type {
|
|
|
4
4
|
IAutoMovieCapturePlan,
|
|
5
5
|
IAutoMovieCapturePlanRequest,
|
|
6
6
|
IAutoMovieCaptureRecord,
|
|
7
|
+
IAutoMovieCaptureStorage,
|
|
7
8
|
} from "@automovie/interface";
|
|
8
9
|
import type * as Render from "@automovie/render";
|
|
9
10
|
import * as fs from "node:fs/promises";
|
|
10
11
|
import * as path from "node:path";
|
|
12
|
+
import type * as Playwright from "playwright-core";
|
|
11
13
|
|
|
12
14
|
import type { AutoMovieCaptureBackend } from "./AutoMovieCaptureBackend";
|
|
13
15
|
import type { IAutoMovieChromium } from "./IAutoMovieChromium";
|
|
14
16
|
import { launchAutoMovieChromium } from "./launchAutoMovieChromium";
|
|
15
17
|
import { loadAutoMovieProductionModule } from "./loadAutoMovieProductionModule";
|
|
18
|
+
import { readAutoMoviePageTimeout } from "./readAutoMoviePageTimeout";
|
|
16
19
|
import { readAutoMovieRevision } from "./readAutoMovieRevision";
|
|
17
20
|
import { serveAutoMovieDrawPage } from "./serveAutoMovieDrawPage";
|
|
18
21
|
|
|
19
|
-
/** Milliseconds one page call may take before its cell fails: two minutes, room for SwiftShader to draw a large raster of a heavy scene. */
|
|
20
|
-
const TIMEOUT: number = 120_000;
|
|
21
|
-
|
|
22
22
|
/**
|
|
23
|
-
* The Node host that draws a production's subjects in headless Chromium: one
|
|
23
|
+
* The Node host that draws a production's subjects in headless Chromium: one
|
|
24
|
+
* built draw page, one browser, and any number of sessions, captures and
|
|
25
|
+
* renders through them.
|
|
24
26
|
*
|
|
25
|
-
* `open` loads `@automovie/render`, `vite` and `playwright-core` from the
|
|
27
|
+
* `open` loads `@automovie/render`, `vite` and `playwright-core` from the
|
|
28
|
+
* production, builds and serves the draw page for a subject module, and
|
|
29
|
+
* launches Chromium with the asked backend. Each `capture` opens a fresh page
|
|
30
|
+
* with the subject and props injected before it loads, describes the subject,
|
|
31
|
+
* plans the request against it, and runs the capture core with
|
|
32
|
+
* `node:fs/promises` as storage and the page's draw function as the draw, so
|
|
33
|
+
* every saved picture comes from the draw function. `close` ends the browser
|
|
34
|
+
* and the server and deletes the built page. `session` opens one subject for
|
|
35
|
+
* any other host that draws through the page, such as `renderAutoMovieVideo`.
|
|
36
|
+
* The `automovie capture` and `automovie render` commands use one host for one
|
|
37
|
+
* subject; a package with many subjects, such as the motion cases, uses one
|
|
38
|
+
* host for all of them.
|
|
26
39
|
*
|
|
27
40
|
* ```ts
|
|
28
|
-
* const host = await AutoMovieCaptureHost.open({
|
|
41
|
+
* const host = await AutoMovieCaptureHost.open({
|
|
42
|
+
* root,
|
|
43
|
+
* module: "src/subjects.ts",
|
|
44
|
+
* backend: "software",
|
|
45
|
+
* env: process.env,
|
|
46
|
+
* });
|
|
29
47
|
* try {
|
|
30
48
|
* const record = await host.capture({ request, props: null });
|
|
31
49
|
* } finally {
|
|
32
50
|
* await host.close();
|
|
33
51
|
* }
|
|
34
52
|
* ```
|
|
35
|
-
*
|
|
36
|
-
* @evidence contracts/development/common.md#meaningful-documentation States what open loads, builds and launches, every step of a capture, what close releases, and both users, and shows the order.
|
|
37
|
-
* @evidence contracts/development/design.md#principled-representation A host is the three long-lived resources a capture needs and the render module they were loaded with; a capture is a request, the module's props and a folder.
|
|
38
|
-
* @evidence contracts/development/design.md#minimal-and-owned-surface `open`, `capture`, `close`, and the `backend` the command reports; planning, drawing, files and records are the render package's.
|
|
39
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts No subject kind is named; the module and its props say what is drawn.
|
|
40
53
|
*/
|
|
41
54
|
export class AutoMovieCaptureHost {
|
|
42
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* The production's `@automovie/render`, which drew the page; a host that
|
|
57
|
+
* draws through `session` uses it for the rules it applies.
|
|
58
|
+
*/
|
|
43
59
|
public readonly render: typeof Render;
|
|
44
60
|
|
|
45
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* The backend and Chromium version, such as `swiftshader; Chromium
|
|
63
|
+
* 131.0.6778.33`.
|
|
64
|
+
*/
|
|
46
65
|
public readonly backend: string;
|
|
47
66
|
|
|
48
67
|
/** The production's root folder. */
|
|
49
68
|
private readonly root: string;
|
|
50
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Per-call milliseconds for page navigation, draw-function readiness, subject
|
|
72
|
+
* creation and drawing.
|
|
73
|
+
*/
|
|
74
|
+
private readonly timeout: number;
|
|
75
|
+
|
|
51
76
|
/** The launched browser. */
|
|
52
77
|
private readonly browser: IAutoMovieChromium.IBrowser;
|
|
53
78
|
|
|
@@ -59,28 +84,26 @@ export class AutoMovieCaptureHost {
|
|
|
59
84
|
render: typeof Render;
|
|
60
85
|
backend: string;
|
|
61
86
|
root: string;
|
|
87
|
+
timeout: number;
|
|
62
88
|
browser: IAutoMovieChromium.IBrowser;
|
|
63
89
|
page: { url: string; close: () => Promise<void> };
|
|
64
90
|
}) {
|
|
65
91
|
this.render = props.render;
|
|
66
92
|
this.backend = props.backend;
|
|
67
93
|
this.root = props.root;
|
|
94
|
+
this.timeout = props.timeout;
|
|
68
95
|
this.browser = props.browser;
|
|
69
96
|
this.page = props.page;
|
|
70
97
|
}
|
|
71
98
|
|
|
72
99
|
/**
|
|
73
|
-
* Load the production's packages, build and serve the draw page for the
|
|
74
|
-
*
|
|
75
|
-
* It rejects naming a package the production lacks, a missing module, a failed build, and a missing Chromium with the command that installs it; whatever was started before the failure is stopped.
|
|
100
|
+
* Load the production's packages, build and serve the draw page for the
|
|
101
|
+
* subject module, and launch Chromium.
|
|
76
102
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms One build and one launch for every capture of the host.
|
|
82
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work The built page and the browser serve every capture until `close`.
|
|
83
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The host owns the server, its scratch folder and the browser until `close`; a failed launch stops the server first.
|
|
103
|
+
* It validates the optional draw-session budget before acquiring resources.
|
|
104
|
+
* It rejects naming a package the production lacks, a missing module, a
|
|
105
|
+
* failed build, and a missing Chromium with the command that installs it;
|
|
106
|
+
* whatever was started before the failure is stopped.
|
|
84
107
|
*/
|
|
85
108
|
public static async open(props: {
|
|
86
109
|
/** The production's root folder. */
|
|
@@ -94,16 +117,23 @@ export class AutoMovieCaptureHost {
|
|
|
94
117
|
|
|
95
118
|
/** The environment, read for `CHROME_PATH`. */
|
|
96
119
|
env: Readonly<Record<string, string | undefined>>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Per-call milliseconds for page navigation, draw-function readiness,
|
|
123
|
+
* subject creation and drawing. Defaults to 120,000. Invalid timer delays
|
|
124
|
+
* fail before resources are acquired.
|
|
125
|
+
*/
|
|
126
|
+
timeout?: number;
|
|
97
127
|
}): Promise<AutoMovieCaptureHost> {
|
|
98
|
-
const
|
|
128
|
+
const timeout: number = readAutoMoviePageTimeout(props.timeout);
|
|
129
|
+
|
|
130
|
+
const render: typeof Render = loadAutoMovieProductionModule<typeof Render>(
|
|
99
131
|
props.root,
|
|
100
132
|
"@automovie/render",
|
|
101
|
-
)
|
|
102
|
-
const chromium: IAutoMovieChromium =
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
).chromium;
|
|
133
|
+
);
|
|
134
|
+
const chromium: IAutoMovieChromium = loadAutoMovieProductionModule<
|
|
135
|
+
typeof Playwright
|
|
136
|
+
>(props.root, "playwright-core").chromium;
|
|
107
137
|
|
|
108
138
|
// Vite's CommonJS entry warns once per load; the command loads it on purpose.
|
|
109
139
|
process.env.VITE_CJS_IGNORE_WARNING = "true";
|
|
@@ -124,6 +154,7 @@ export class AutoMovieCaptureHost {
|
|
|
124
154
|
render,
|
|
125
155
|
backend: launched.backend,
|
|
126
156
|
root: props.root,
|
|
157
|
+
timeout,
|
|
127
158
|
browser: launched.browser,
|
|
128
159
|
page,
|
|
129
160
|
});
|
|
@@ -134,17 +165,14 @@ export class AutoMovieCaptureHost {
|
|
|
134
165
|
}
|
|
135
166
|
|
|
136
167
|
/**
|
|
137
|
-
* Open a fresh page of the served draw page with a subject and its props
|
|
138
|
-
*
|
|
139
|
-
* The returned session owns the page; the caller closes it. An uncaught browser error during initialization rejects immediately with the original cause and logs its stack; console errors are forwarded too. A page that installs no draw function or cannot describe its subject rejects, and the page is closed first.
|
|
168
|
+
* Open a fresh page of the served draw page with a subject and its props
|
|
169
|
+
* injected before it loads, and describe the subject through it.
|
|
140
170
|
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call is a fresh page, because props differ between subjects.
|
|
147
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The page passes to the returned session, or is closed here when opening fails.
|
|
171
|
+
* The returned session owns the page; the caller closes it. An uncaught
|
|
172
|
+
* browser error during initialization rejects immediately with the original
|
|
173
|
+
* cause and logs its stack; console errors are forwarded too. A page that
|
|
174
|
+
* installs no draw function or cannot describe its subject rejects, and the
|
|
175
|
+
* page is closed first.
|
|
148
176
|
*/
|
|
149
177
|
public async session(props: {
|
|
150
178
|
/** Name of the subject, or null for the page's only subject. */
|
|
@@ -183,7 +211,7 @@ export class AutoMovieCaptureHost {
|
|
|
183
211
|
url: this.page.url,
|
|
184
212
|
props: { subject: props.subject, props: props.props },
|
|
185
213
|
backend: this.backend,
|
|
186
|
-
timeout:
|
|
214
|
+
timeout: this.timeout,
|
|
187
215
|
}),
|
|
188
216
|
failed,
|
|
189
217
|
]);
|
|
@@ -194,17 +222,19 @@ export class AutoMovieCaptureHost {
|
|
|
194
222
|
}
|
|
195
223
|
|
|
196
224
|
/**
|
|
197
|
-
* Capture one subject: open a page with the subject and props injected, plan
|
|
198
|
-
*
|
|
199
|
-
*
|
|
225
|
+
* Capture one subject: open a page with the subject and props injected, plan
|
|
226
|
+
* the request against what it describes, and draw every cell into the folder
|
|
227
|
+
* at `out`.
|
|
200
228
|
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
229
|
+
* A subject with a sound list is first handed its dialogue mouths: its lines
|
|
230
|
+
* are read from the production root, admitted on the clock
|
|
231
|
+
* `autoMovieVideoFrameRate` gives its frame rate, and planned by
|
|
232
|
+
* `planAutoMovieDialogueMouths`, as the delivery render plans them, so a
|
|
233
|
+
* still shows the mouth the delivered frame at the same second shows. A line
|
|
234
|
+
* the admission refuses fails the capture. The revision recorded is the
|
|
235
|
+
* production's git commit. It rejects what the planner or the folder refuses
|
|
236
|
+
* before anything is drawn, and a page that installs no draw function; the
|
|
237
|
+
* page is closed on every outcome.
|
|
208
238
|
*/
|
|
209
239
|
public async capture(props: {
|
|
210
240
|
/** The request, as `parseAutoMovieCapturePlanRequest` read it. */
|
|
@@ -213,9 +243,16 @@ export class AutoMovieCaptureHost {
|
|
|
213
243
|
/** Data the subject module reads, as JSON, or null. */
|
|
214
244
|
props: unknown;
|
|
215
245
|
|
|
216
|
-
/**
|
|
246
|
+
/**
|
|
247
|
+
* The capture's root folder, relative to the production or absolute;
|
|
248
|
+
* absent, `media/capture/<subject>` of the production.
|
|
249
|
+
*/
|
|
217
250
|
out?: string;
|
|
218
251
|
|
|
252
|
+
admitFolder?: (folder: string) => void;
|
|
253
|
+
|
|
254
|
+
storage?: IAutoMovieCaptureStorage;
|
|
255
|
+
|
|
219
256
|
/** The subject owner's own section of the record, or absent. */
|
|
220
257
|
section?: Readonly<Record<string, unknown>>;
|
|
221
258
|
}): Promise<Extract<IAutoMovieCaptureRecord, { state: "complete" }>> {
|
|
@@ -225,6 +262,36 @@ export class AutoMovieCaptureHost {
|
|
|
225
262
|
props: props.props,
|
|
226
263
|
});
|
|
227
264
|
try {
|
|
265
|
+
const root: string = path.resolve(
|
|
266
|
+
this.root,
|
|
267
|
+
props.out ?? path.join("media", "capture", session.subject.name),
|
|
268
|
+
);
|
|
269
|
+
props.admitFolder?.(root);
|
|
270
|
+
|
|
271
|
+
// A film with a sound list speaks in its stills as in its delivered
|
|
272
|
+
// frames: the same lines on the same clock give the same mouths.
|
|
273
|
+
const { sound, fps, durationSeconds } = session.subject;
|
|
274
|
+
if (sound !== undefined) {
|
|
275
|
+
const [numerator, denominator]: readonly [number, number] =
|
|
276
|
+
render.autoMovieVideoFrameRate(fps);
|
|
277
|
+
const frameRate: { numerator: number; denominator: number } = {
|
|
278
|
+
numerator,
|
|
279
|
+
denominator,
|
|
280
|
+
};
|
|
281
|
+
await session.speak(
|
|
282
|
+
render.planAutoMovieDialogueMouths({
|
|
283
|
+
lines: await render.admitAutoMovieFilmDialogue({
|
|
284
|
+
sound,
|
|
285
|
+
frameRate,
|
|
286
|
+
totalFrames: Math.round(durationSeconds * fps),
|
|
287
|
+
read: (file: string): Promise<Uint8Array> =>
|
|
288
|
+
fs.readFile(path.resolve(this.root, file)),
|
|
289
|
+
}),
|
|
290
|
+
speakers: sound.speakers,
|
|
291
|
+
frameRate,
|
|
292
|
+
}),
|
|
293
|
+
);
|
|
294
|
+
}
|
|
228
295
|
const plan: IAutoMovieCapturePlan = render.planAutoMovieCapture({
|
|
229
296
|
request: props.request,
|
|
230
297
|
subject: session.subject,
|
|
@@ -232,11 +299,8 @@ export class AutoMovieCaptureHost {
|
|
|
232
299
|
});
|
|
233
300
|
const folder: Render.AutoMovieCaptureFolder =
|
|
234
301
|
await render.AutoMovieCaptureFolder.open({
|
|
235
|
-
storage: fs,
|
|
236
|
-
root
|
|
237
|
-
this.root,
|
|
238
|
-
props.out ?? path.join("media", "capture", session.subject.name),
|
|
239
|
-
),
|
|
302
|
+
storage: props.storage ?? fs,
|
|
303
|
+
root,
|
|
240
304
|
round: props.request.round,
|
|
241
305
|
compare: props.request.compare,
|
|
242
306
|
});
|
|
@@ -255,17 +319,7 @@ export class AutoMovieCaptureHost {
|
|
|
255
319
|
}
|
|
256
320
|
}
|
|
257
321
|
|
|
258
|
-
/**
|
|
259
|
-
* End the browser, stop the server and delete the built page.
|
|
260
|
-
*
|
|
261
|
-
* @evidence contracts/development/common.md#meaningful-documentation States what is released.
|
|
262
|
-
* @evidence contracts/development/implementation.md#principled-implementation The browser ends before the server it loads pages from.
|
|
263
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Two releases in order, the second attempted even when the first fails.
|
|
264
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A release failure propagates after both are attempted.
|
|
265
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Two calls.
|
|
266
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Closing happens once.
|
|
267
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The release point of the browser, the server and the scratch folder.
|
|
268
|
-
*/
|
|
322
|
+
/** End the browser, stop the server and delete the built page. */
|
|
269
323
|
public async close(): Promise<void> {
|
|
270
324
|
try {
|
|
271
325
|
await this.browser.close();
|
package/src/AutoMovieCommand.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* One admitted CLI request, discriminated by `command`.
|
|
3
3
|
*
|
|
4
|
-
* `help` and `version` carry nothing because they are standalone requests.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts No variant other than `capture`, `inspect`, `render` and `review` carries unparsed tokens, and theirs are read by the one option reader every host shares rather than a second grammar here.
|
|
9
|
-
* @evidence contracts/development/common.md#meaningful-documentation Every variant and member states its meaning and who resolves it.
|
|
4
|
+
* `help` and `version` carry nothing because they are standalone requests.
|
|
5
|
+
* `create` and `add` carry their targets exactly as typed; `run` resolves them
|
|
6
|
+
* against the working directory. An explicit `name` is carried as typed; `run`
|
|
7
|
+
* chooses the name when it is absent.
|
|
10
8
|
*/
|
|
11
9
|
export type AutoMovieCommand =
|
|
12
10
|
| {
|
|
@@ -18,62 +16,115 @@ export type AutoMovieCommand =
|
|
|
18
16
|
command: "version";
|
|
19
17
|
}
|
|
20
18
|
| {
|
|
21
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Install a single production, or with `workspace` a workspace root, into
|
|
21
|
+
* `directory`.
|
|
22
|
+
*/
|
|
22
23
|
command: "create";
|
|
23
24
|
|
|
24
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Target directory as typed, never blank; `run` resolves it against the
|
|
27
|
+
* working directory.
|
|
28
|
+
*/
|
|
25
29
|
directory: string;
|
|
26
30
|
|
|
27
31
|
/** Install a pnpm workspace root instead of a single production. */
|
|
28
32
|
workspace: boolean;
|
|
29
33
|
|
|
30
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Admit a non-empty target, writing over same-path files and keeping the
|
|
36
|
+
* rest.
|
|
37
|
+
*/
|
|
31
38
|
force: boolean;
|
|
32
39
|
|
|
33
40
|
/** Package name as typed; absent, `run` derives or asks for one. */
|
|
34
41
|
name?: string;
|
|
35
42
|
}
|
|
36
43
|
| {
|
|
37
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Add one production to the workspace whose root is the working
|
|
46
|
+
* directory.
|
|
47
|
+
*/
|
|
38
48
|
command: "add";
|
|
39
49
|
|
|
40
50
|
/** `shorts` for brief → screenplay, `series` for the whole long route. */
|
|
41
51
|
family: "shorts" | "series";
|
|
42
52
|
|
|
43
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* The production's directory under `movies/<family>`, one admitted path
|
|
55
|
+
* segment.
|
|
56
|
+
*/
|
|
44
57
|
directory: string;
|
|
45
58
|
|
|
46
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Admit a non-empty production directory, writing over same-path files
|
|
61
|
+
* and keeping the rest.
|
|
62
|
+
*/
|
|
47
63
|
force: boolean;
|
|
48
64
|
|
|
49
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Package name as typed; absent, `run` derives one from the directory
|
|
67
|
+
* segment.
|
|
68
|
+
*/
|
|
50
69
|
name?: string;
|
|
51
70
|
}
|
|
52
71
|
| {
|
|
53
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Capture stills of a subject or a video file in the production at the
|
|
74
|
+
* working directory.
|
|
75
|
+
*/
|
|
54
76
|
command: "capture";
|
|
55
77
|
|
|
56
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* The tokens after `capture`, as typed; `run` reads them through the
|
|
80
|
+
* production's request grammar, which only the production's
|
|
81
|
+
* `@automovie/render` holds.
|
|
82
|
+
*/
|
|
57
83
|
args: string[];
|
|
58
84
|
}
|
|
59
85
|
| {
|
|
60
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* Serve the inspector page over a subject module of the production or
|
|
88
|
+
* package at the working directory.
|
|
89
|
+
*/
|
|
61
90
|
command: "inspect";
|
|
62
91
|
|
|
63
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* The tokens after `inspect`, as typed; `run` reads them through the
|
|
94
|
+
* production's request grammar, as for `capture`.
|
|
95
|
+
*/
|
|
64
96
|
args: string[];
|
|
65
97
|
}
|
|
66
98
|
| {
|
|
67
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Render one subject of the production at the working directory into a
|
|
101
|
+
* video.
|
|
102
|
+
*/
|
|
68
103
|
command: "render";
|
|
69
104
|
|
|
70
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* The tokens after `render`, as typed; `run` reads them with the
|
|
107
|
+
* production's option reader.
|
|
108
|
+
*/
|
|
71
109
|
args: string[];
|
|
72
110
|
}
|
|
73
111
|
| {
|
|
74
112
|
/** Record real-time playback of the production's running inspector page. */
|
|
75
113
|
command: "review";
|
|
76
114
|
|
|
77
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* The tokens after `review`, as typed; `run` reads them with the
|
|
117
|
+
* production's option reader.
|
|
118
|
+
*/
|
|
119
|
+
args: string[];
|
|
120
|
+
}
|
|
121
|
+
| {
|
|
122
|
+
/** Verify scoped production checks and observations. */
|
|
123
|
+
command: "verify";
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The tokens after `verify`, as typed; the verification command reads
|
|
127
|
+
* them.
|
|
128
|
+
*/
|
|
78
129
|
args: string[];
|
|
79
130
|
};
|