automovie 0.3.4 → 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
|
@@ -1,32 +1,56 @@
|
|
|
1
|
-
import type { IAutoMovieCapturePlanRequest, IAutoMovieCaptureRecord } from "@automovie/interface";
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest, IAutoMovieCaptureRecord, IAutoMovieCaptureStorage } from "@automovie/interface";
|
|
2
2
|
import type * as Render from "@automovie/render";
|
|
3
3
|
import type { AutoMovieCaptureBackend } from "./AutoMovieCaptureBackend";
|
|
4
4
|
/**
|
|
5
|
-
* The Node host that draws a production's subjects in headless Chromium: one
|
|
5
|
+
* The Node host that draws a production's subjects in headless Chromium: one
|
|
6
|
+
* built draw page, one browser, and any number of sessions, captures and
|
|
7
|
+
* renders through them.
|
|
6
8
|
*
|
|
7
|
-
* `open` loads `@automovie/render`, `vite` and `playwright-core` from the
|
|
9
|
+
* `open` loads `@automovie/render`, `vite` and `playwright-core` from the
|
|
10
|
+
* production, builds and serves the draw page for a subject module, and
|
|
11
|
+
* launches Chromium with the asked backend. Each `capture` opens a fresh page
|
|
12
|
+
* with the subject and props injected before it loads, describes the subject,
|
|
13
|
+
* plans the request against it, and runs the capture core with
|
|
14
|
+
* `node:fs/promises` as storage and the page's draw function as the draw, so
|
|
15
|
+
* every saved picture comes from the draw function. `close` ends the browser
|
|
16
|
+
* and the server and deletes the built page. `session` opens one subject for
|
|
17
|
+
* any other host that draws through the page, such as `renderAutoMovieVideo`.
|
|
18
|
+
* The `automovie capture` and `automovie render` commands use one host for one
|
|
19
|
+
* subject; a package with many subjects, such as the motion cases, uses one
|
|
20
|
+
* host for all of them.
|
|
8
21
|
*
|
|
9
22
|
* ```ts
|
|
10
|
-
* const host = await AutoMovieCaptureHost.open({
|
|
23
|
+
* const host = await AutoMovieCaptureHost.open({
|
|
24
|
+
* root,
|
|
25
|
+
* module: "src/subjects.ts",
|
|
26
|
+
* backend: "software",
|
|
27
|
+
* env: process.env,
|
|
28
|
+
* });
|
|
11
29
|
* try {
|
|
12
30
|
* const record = await host.capture({ request, props: null });
|
|
13
31
|
* } finally {
|
|
14
32
|
* await host.close();
|
|
15
33
|
* }
|
|
16
34
|
* ```
|
|
17
|
-
*
|
|
18
|
-
* @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.
|
|
19
|
-
* @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.
|
|
20
|
-
* @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.
|
|
21
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts No subject kind is named; the module and its props say what is drawn.
|
|
22
35
|
*/
|
|
23
36
|
export declare class AutoMovieCaptureHost {
|
|
24
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The production's `@automovie/render`, which drew the page; a host that
|
|
39
|
+
* draws through `session` uses it for the rules it applies.
|
|
40
|
+
*/
|
|
25
41
|
readonly render: typeof Render;
|
|
26
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The backend and Chromium version, such as `swiftshader; Chromium
|
|
44
|
+
* 131.0.6778.33`.
|
|
45
|
+
*/
|
|
27
46
|
readonly backend: string;
|
|
28
47
|
/** The production's root folder. */
|
|
29
48
|
private readonly root;
|
|
49
|
+
/**
|
|
50
|
+
* Per-call milliseconds for page navigation, draw-function readiness, subject
|
|
51
|
+
* creation and drawing.
|
|
52
|
+
*/
|
|
53
|
+
private readonly timeout;
|
|
30
54
|
/** The launched browser. */
|
|
31
55
|
private readonly browser;
|
|
32
56
|
/** The served draw page. */
|
|
@@ -34,17 +58,13 @@ export declare class AutoMovieCaptureHost {
|
|
|
34
58
|
/** Hold opened resources; `open` acquires them. */
|
|
35
59
|
private constructor();
|
|
36
60
|
/**
|
|
37
|
-
* Load the production's packages, build and serve the draw page for the
|
|
61
|
+
* Load the production's packages, build and serve the draw page for the
|
|
62
|
+
* subject module, and launch Chromium.
|
|
38
63
|
*
|
|
39
|
-
* It
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Load, serve, launch; building and launching belong to their own functions.
|
|
44
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A failure is reported, never answered by another backend or a development server.
|
|
45
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms One build and one launch for every capture of the host.
|
|
46
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work The built page and the browser serve every capture until `close`.
|
|
47
|
-
* @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.
|
|
64
|
+
* It validates the optional draw-session budget before acquiring resources.
|
|
65
|
+
* It rejects naming a package the production lacks, a missing module, a
|
|
66
|
+
* failed build, and a missing Chromium with the command that installs it;
|
|
67
|
+
* whatever was started before the failure is stopped.
|
|
48
68
|
*/
|
|
49
69
|
static open(props: {
|
|
50
70
|
/** The production's root folder. */
|
|
@@ -55,19 +75,22 @@ export declare class AutoMovieCaptureHost {
|
|
|
55
75
|
backend: AutoMovieCaptureBackend;
|
|
56
76
|
/** The environment, read for `CHROME_PATH`. */
|
|
57
77
|
env: Readonly<Record<string, string | undefined>>;
|
|
78
|
+
/**
|
|
79
|
+
* Per-call milliseconds for page navigation, draw-function readiness,
|
|
80
|
+
* subject creation and drawing. Defaults to 120,000. Invalid timer delays
|
|
81
|
+
* fail before resources are acquired.
|
|
82
|
+
*/
|
|
83
|
+
timeout?: number;
|
|
58
84
|
}): Promise<AutoMovieCaptureHost>;
|
|
59
85
|
/**
|
|
60
|
-
* Open a fresh page of the served draw page with a subject and its props
|
|
61
|
-
*
|
|
62
|
-
* 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.
|
|
86
|
+
* Open a fresh page of the served draw page with a subject and its props
|
|
87
|
+
* injected before it loads, and describe the subject through it.
|
|
63
88
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call is a fresh page, because props differ between subjects.
|
|
70
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The page passes to the returned session, or is closed here when opening fails.
|
|
89
|
+
* The returned session owns the page; the caller closes it. An uncaught
|
|
90
|
+
* browser error during initialization rejects immediately with the original
|
|
91
|
+
* cause and logs its stack; console errors are forwarded too. A page that
|
|
92
|
+
* installs no draw function or cannot describe its subject rejects, and the
|
|
93
|
+
* page is closed first.
|
|
71
94
|
*/
|
|
72
95
|
session(props: {
|
|
73
96
|
/** Name of the subject, or null for the page's only subject. */
|
|
@@ -76,40 +99,37 @@ export declare class AutoMovieCaptureHost {
|
|
|
76
99
|
props: unknown;
|
|
77
100
|
}): Promise<Render.AutoMovieDrawSession>;
|
|
78
101
|
/**
|
|
79
|
-
* Capture one subject: open a page with the subject and props injected, plan
|
|
80
|
-
*
|
|
81
|
-
*
|
|
102
|
+
* Capture one subject: open a page with the subject and props injected, plan
|
|
103
|
+
* the request against what it describes, and draw every cell into the folder
|
|
104
|
+
* at `out`.
|
|
82
105
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
106
|
+
* A subject with a sound list is first handed its dialogue mouths: its lines
|
|
107
|
+
* are read from the production root, admitted on the clock
|
|
108
|
+
* `autoMovieVideoFrameRate` gives its frame rate, and planned by
|
|
109
|
+
* `planAutoMovieDialogueMouths`, as the delivery render plans them, so a
|
|
110
|
+
* still shows the mouth the delivered frame at the same second shows. A line
|
|
111
|
+
* the admission refuses fails the capture. The revision recorded is the
|
|
112
|
+
* production's git commit. It rejects what the planner or the folder refuses
|
|
113
|
+
* before anything is drawn, and a page that installs no draw function; the
|
|
114
|
+
* page is closed on every outcome.
|
|
90
115
|
*/
|
|
91
116
|
capture(props: {
|
|
92
117
|
/** The request, as `parseAutoMovieCapturePlanRequest` read it. */
|
|
93
118
|
request: IAutoMovieCapturePlanRequest;
|
|
94
119
|
/** Data the subject module reads, as JSON, or null. */
|
|
95
120
|
props: unknown;
|
|
96
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* The capture's root folder, relative to the production or absolute;
|
|
123
|
+
* absent, `media/capture/<subject>` of the production.
|
|
124
|
+
*/
|
|
97
125
|
out?: string;
|
|
126
|
+
admitFolder?: (folder: string) => void;
|
|
127
|
+
storage?: IAutoMovieCaptureStorage;
|
|
98
128
|
/** The subject owner's own section of the record, or absent. */
|
|
99
129
|
section?: Readonly<Record<string, unknown>>;
|
|
100
130
|
}): Promise<Extract<IAutoMovieCaptureRecord, {
|
|
101
131
|
state: "complete";
|
|
102
132
|
}>>;
|
|
103
|
-
/**
|
|
104
|
-
* End the browser, stop the server and delete the built page.
|
|
105
|
-
*
|
|
106
|
-
* @evidence contracts/development/common.md#meaningful-documentation States what is released.
|
|
107
|
-
* @evidence contracts/development/implementation.md#principled-implementation The browser ends before the server it loads pages from.
|
|
108
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Two releases in order, the second attempted even when the first fails.
|
|
109
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A release failure propagates after both are attempted.
|
|
110
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Two calls.
|
|
111
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Closing happens once.
|
|
112
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The release point of the browser, the server and the scratch folder.
|
|
113
|
-
*/
|
|
133
|
+
/** End the browser, stop the server and delete the built page. */
|
|
114
134
|
close(): Promise<void>;
|
|
115
135
|
}
|
|
@@ -38,36 +38,59 @@ const fs = __importStar(require("node:fs/promises"));
|
|
|
38
38
|
const path = __importStar(require("node:path"));
|
|
39
39
|
const launchAutoMovieChromium_1 = require("./launchAutoMovieChromium");
|
|
40
40
|
const loadAutoMovieProductionModule_1 = require("./loadAutoMovieProductionModule");
|
|
41
|
+
const readAutoMoviePageTimeout_1 = require("./readAutoMoviePageTimeout");
|
|
41
42
|
const readAutoMovieRevision_1 = require("./readAutoMovieRevision");
|
|
42
43
|
const serveAutoMovieDrawPage_1 = require("./serveAutoMovieDrawPage");
|
|
43
|
-
/** Milliseconds one page call may take before its cell fails: two minutes, room for SwiftShader to draw a large raster of a heavy scene. */
|
|
44
|
-
const TIMEOUT = 120_000;
|
|
45
44
|
/**
|
|
46
|
-
* The Node host that draws a production's subjects in headless Chromium: one
|
|
45
|
+
* The Node host that draws a production's subjects in headless Chromium: one
|
|
46
|
+
* built draw page, one browser, and any number of sessions, captures and
|
|
47
|
+
* renders through them.
|
|
47
48
|
*
|
|
48
|
-
* `open` loads `@automovie/render`, `vite` and `playwright-core` from the
|
|
49
|
+
* `open` loads `@automovie/render`, `vite` and `playwright-core` from the
|
|
50
|
+
* production, builds and serves the draw page for a subject module, and
|
|
51
|
+
* launches Chromium with the asked backend. Each `capture` opens a fresh page
|
|
52
|
+
* with the subject and props injected before it loads, describes the subject,
|
|
53
|
+
* plans the request against it, and runs the capture core with
|
|
54
|
+
* `node:fs/promises` as storage and the page's draw function as the draw, so
|
|
55
|
+
* every saved picture comes from the draw function. `close` ends the browser
|
|
56
|
+
* and the server and deletes the built page. `session` opens one subject for
|
|
57
|
+
* any other host that draws through the page, such as `renderAutoMovieVideo`.
|
|
58
|
+
* The `automovie capture` and `automovie render` commands use one host for one
|
|
59
|
+
* subject; a package with many subjects, such as the motion cases, uses one
|
|
60
|
+
* host for all of them.
|
|
49
61
|
*
|
|
50
62
|
* ```ts
|
|
51
|
-
* const host = await AutoMovieCaptureHost.open({
|
|
63
|
+
* const host = await AutoMovieCaptureHost.open({
|
|
64
|
+
* root,
|
|
65
|
+
* module: "src/subjects.ts",
|
|
66
|
+
* backend: "software",
|
|
67
|
+
* env: process.env,
|
|
68
|
+
* });
|
|
52
69
|
* try {
|
|
53
70
|
* const record = await host.capture({ request, props: null });
|
|
54
71
|
* } finally {
|
|
55
72
|
* await host.close();
|
|
56
73
|
* }
|
|
57
74
|
* ```
|
|
58
|
-
*
|
|
59
|
-
* @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.
|
|
60
|
-
* @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.
|
|
61
|
-
* @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.
|
|
62
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts No subject kind is named; the module and its props say what is drawn.
|
|
63
75
|
*/
|
|
64
76
|
class AutoMovieCaptureHost {
|
|
65
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* The production's `@automovie/render`, which drew the page; a host that
|
|
79
|
+
* draws through `session` uses it for the rules it applies.
|
|
80
|
+
*/
|
|
66
81
|
render;
|
|
67
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* The backend and Chromium version, such as `swiftshader; Chromium
|
|
84
|
+
* 131.0.6778.33`.
|
|
85
|
+
*/
|
|
68
86
|
backend;
|
|
69
87
|
/** The production's root folder. */
|
|
70
88
|
root;
|
|
89
|
+
/**
|
|
90
|
+
* Per-call milliseconds for page navigation, draw-function readiness, subject
|
|
91
|
+
* creation and drawing.
|
|
92
|
+
*/
|
|
93
|
+
timeout;
|
|
71
94
|
/** The launched browser. */
|
|
72
95
|
browser;
|
|
73
96
|
/** The served draw page. */
|
|
@@ -77,23 +100,21 @@ class AutoMovieCaptureHost {
|
|
|
77
100
|
this.render = props.render;
|
|
78
101
|
this.backend = props.backend;
|
|
79
102
|
this.root = props.root;
|
|
103
|
+
this.timeout = props.timeout;
|
|
80
104
|
this.browser = props.browser;
|
|
81
105
|
this.page = props.page;
|
|
82
106
|
}
|
|
83
107
|
/**
|
|
84
|
-
* Load the production's packages, build and serve the draw page for the
|
|
108
|
+
* Load the production's packages, build and serve the draw page for the
|
|
109
|
+
* subject module, and launch Chromium.
|
|
85
110
|
*
|
|
86
|
-
* It
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Load, serve, launch; building and launching belong to their own functions.
|
|
91
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A failure is reported, never answered by another backend or a development server.
|
|
92
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms One build and one launch for every capture of the host.
|
|
93
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work The built page and the browser serve every capture until `close`.
|
|
94
|
-
* @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.
|
|
111
|
+
* It validates the optional draw-session budget before acquiring resources.
|
|
112
|
+
* It rejects naming a package the production lacks, a missing module, a
|
|
113
|
+
* failed build, and a missing Chromium with the command that installs it;
|
|
114
|
+
* whatever was started before the failure is stopped.
|
|
95
115
|
*/
|
|
96
116
|
static async open(props) {
|
|
117
|
+
const timeout = (0, readAutoMoviePageTimeout_1.readAutoMoviePageTimeout)(props.timeout);
|
|
97
118
|
const render = (0, loadAutoMovieProductionModule_1.loadAutoMovieProductionModule)(props.root, "@automovie/render");
|
|
98
119
|
const chromium = (0, loadAutoMovieProductionModule_1.loadAutoMovieProductionModule)(props.root, "playwright-core").chromium;
|
|
99
120
|
// Vite's CommonJS entry warns once per load; the command loads it on purpose.
|
|
@@ -113,6 +134,7 @@ class AutoMovieCaptureHost {
|
|
|
113
134
|
render,
|
|
114
135
|
backend: launched.backend,
|
|
115
136
|
root: props.root,
|
|
137
|
+
timeout,
|
|
116
138
|
browser: launched.browser,
|
|
117
139
|
page,
|
|
118
140
|
});
|
|
@@ -123,17 +145,14 @@ class AutoMovieCaptureHost {
|
|
|
123
145
|
}
|
|
124
146
|
}
|
|
125
147
|
/**
|
|
126
|
-
* Open a fresh page of the served draw page with a subject and its props
|
|
127
|
-
*
|
|
128
|
-
* 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.
|
|
148
|
+
* Open a fresh page of the served draw page with a subject and its props
|
|
149
|
+
* injected before it loads, and describe the subject through it.
|
|
129
150
|
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call is a fresh page, because props differ between subjects.
|
|
136
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The page passes to the returned session, or is closed here when opening fails.
|
|
151
|
+
* The returned session owns the page; the caller closes it. An uncaught
|
|
152
|
+
* browser error during initialization rejects immediately with the original
|
|
153
|
+
* cause and logs its stack; console errors are forwarded too. A page that
|
|
154
|
+
* installs no draw function or cannot describe its subject rejects, and the
|
|
155
|
+
* page is closed first.
|
|
137
156
|
*/
|
|
138
157
|
async session(props) {
|
|
139
158
|
const page = await this.browser.newPage();
|
|
@@ -156,7 +175,7 @@ class AutoMovieCaptureHost {
|
|
|
156
175
|
url: this.page.url,
|
|
157
176
|
props: { subject: props.subject, props: props.props },
|
|
158
177
|
backend: this.backend,
|
|
159
|
-
timeout:
|
|
178
|
+
timeout: this.timeout,
|
|
160
179
|
}),
|
|
161
180
|
failed,
|
|
162
181
|
]);
|
|
@@ -167,17 +186,19 @@ class AutoMovieCaptureHost {
|
|
|
167
186
|
}
|
|
168
187
|
}
|
|
169
188
|
/**
|
|
170
|
-
* Capture one subject: open a page with the subject and props injected, plan
|
|
171
|
-
*
|
|
172
|
-
*
|
|
189
|
+
* Capture one subject: open a page with the subject and props injected, plan
|
|
190
|
+
* the request against what it describes, and draw every cell into the folder
|
|
191
|
+
* at `out`.
|
|
173
192
|
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
193
|
+
* A subject with a sound list is first handed its dialogue mouths: its lines
|
|
194
|
+
* are read from the production root, admitted on the clock
|
|
195
|
+
* `autoMovieVideoFrameRate` gives its frame rate, and planned by
|
|
196
|
+
* `planAutoMovieDialogueMouths`, as the delivery render plans them, so a
|
|
197
|
+
* still shows the mouth the delivered frame at the same second shows. A line
|
|
198
|
+
* the admission refuses fails the capture. The revision recorded is the
|
|
199
|
+
* production's git commit. It rejects what the planner or the folder refuses
|
|
200
|
+
* before anything is drawn, and a page that installs no draw function; the
|
|
201
|
+
* page is closed on every outcome.
|
|
181
202
|
*/
|
|
182
203
|
async capture(props) {
|
|
183
204
|
const { render } = this;
|
|
@@ -186,14 +207,36 @@ class AutoMovieCaptureHost {
|
|
|
186
207
|
props: props.props,
|
|
187
208
|
});
|
|
188
209
|
try {
|
|
210
|
+
const root = path.resolve(this.root, props.out ?? path.join("media", "capture", session.subject.name));
|
|
211
|
+
props.admitFolder?.(root);
|
|
212
|
+
// A film with a sound list speaks in its stills as in its delivered
|
|
213
|
+
// frames: the same lines on the same clock give the same mouths.
|
|
214
|
+
const { sound, fps, durationSeconds } = session.subject;
|
|
215
|
+
if (sound !== undefined) {
|
|
216
|
+
const [numerator, denominator] = render.autoMovieVideoFrameRate(fps);
|
|
217
|
+
const frameRate = {
|
|
218
|
+
numerator,
|
|
219
|
+
denominator,
|
|
220
|
+
};
|
|
221
|
+
await session.speak(render.planAutoMovieDialogueMouths({
|
|
222
|
+
lines: await render.admitAutoMovieFilmDialogue({
|
|
223
|
+
sound,
|
|
224
|
+
frameRate,
|
|
225
|
+
totalFrames: Math.round(durationSeconds * fps),
|
|
226
|
+
read: (file) => fs.readFile(path.resolve(this.root, file)),
|
|
227
|
+
}),
|
|
228
|
+
speakers: sound.speakers,
|
|
229
|
+
frameRate,
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
189
232
|
const plan = render.planAutoMovieCapture({
|
|
190
233
|
request: props.request,
|
|
191
234
|
subject: session.subject,
|
|
192
235
|
cuts: [],
|
|
193
236
|
});
|
|
194
237
|
const folder = await render.AutoMovieCaptureFolder.open({
|
|
195
|
-
storage: fs,
|
|
196
|
-
root
|
|
238
|
+
storage: props.storage ?? fs,
|
|
239
|
+
root,
|
|
197
240
|
round: props.request.round,
|
|
198
241
|
compare: props.request.compare,
|
|
199
242
|
});
|
|
@@ -210,17 +253,7 @@ class AutoMovieCaptureHost {
|
|
|
210
253
|
await session.close();
|
|
211
254
|
}
|
|
212
255
|
}
|
|
213
|
-
/**
|
|
214
|
-
* End the browser, stop the server and delete the built page.
|
|
215
|
-
*
|
|
216
|
-
* @evidence contracts/development/common.md#meaningful-documentation States what is released.
|
|
217
|
-
* @evidence contracts/development/implementation.md#principled-implementation The browser ends before the server it loads pages from.
|
|
218
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Two releases in order, the second attempted even when the first fails.
|
|
219
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A release failure propagates after both are attempted.
|
|
220
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Two calls.
|
|
221
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Closing happens once.
|
|
222
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The release point of the browser, the server and the scratch folder.
|
|
223
|
-
*/
|
|
256
|
+
/** End the browser, stop the server and delete the built page. */
|
|
224
257
|
async close() {
|
|
225
258
|
try {
|
|
226
259
|
await this.browser.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoMovieCaptureHost.js","sourceRoot":"","sources":["../src/AutoMovieCaptureHost.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AutoMovieCaptureHost.js","sourceRoot":"","sources":["../src/AutoMovieCaptureHost.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAY,EAAE,6CAAyB;AACvC,MAAY,IAAI,sCAAkB;AAKlC,uEAAoE;AACpE,mFAAgF;AAChF,yEAAsE;AACtE,mEAAgE;AAChE,qEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IACE;;;OAGG;IACa,MAAM,CAAgB;IAEtC;;;OAGG;IACa,OAAO,CAAS;IAEhC,oCAAoC;IACnB,IAAI,CAAS;IAE9B;;;OAGG;IACc,OAAO,CAAS;IAEjC,4BAA4B;IACX,OAAO,CAA8B;IAEtD,4BAA4B;IACX,IAAI,CAA8C;IAEnE,mDAAmD;IACnD,YAAoB,KAOnB;QACC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,KAA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QAChB,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC7B,CAAC;gBAAS,CAAC;YACT,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -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
|
/** Print the usage text. */
|
|
@@ -15,45 +13,96 @@ export type AutoMovieCommand = {
|
|
|
15
13
|
/** Print this package's version. */
|
|
16
14
|
command: "version";
|
|
17
15
|
} | {
|
|
18
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Install a single production, or with `workspace` a workspace root, into
|
|
18
|
+
* `directory`.
|
|
19
|
+
*/
|
|
19
20
|
command: "create";
|
|
20
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Target directory as typed, never blank; `run` resolves it against the
|
|
23
|
+
* working directory.
|
|
24
|
+
*/
|
|
21
25
|
directory: string;
|
|
22
26
|
/** Install a pnpm workspace root instead of a single production. */
|
|
23
27
|
workspace: boolean;
|
|
24
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Admit a non-empty target, writing over same-path files and keeping the
|
|
30
|
+
* rest.
|
|
31
|
+
*/
|
|
25
32
|
force: boolean;
|
|
26
33
|
/** Package name as typed; absent, `run` derives or asks for one. */
|
|
27
34
|
name?: string;
|
|
28
35
|
} | {
|
|
29
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Add one production to the workspace whose root is the working
|
|
38
|
+
* directory.
|
|
39
|
+
*/
|
|
30
40
|
command: "add";
|
|
31
41
|
/** `shorts` for brief → screenplay, `series` for the whole long route. */
|
|
32
42
|
family: "shorts" | "series";
|
|
33
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* The production's directory under `movies/<family>`, one admitted path
|
|
45
|
+
* segment.
|
|
46
|
+
*/
|
|
34
47
|
directory: string;
|
|
35
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Admit a non-empty production directory, writing over same-path files
|
|
50
|
+
* and keeping the rest.
|
|
51
|
+
*/
|
|
36
52
|
force: boolean;
|
|
37
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Package name as typed; absent, `run` derives one from the directory
|
|
55
|
+
* segment.
|
|
56
|
+
*/
|
|
38
57
|
name?: string;
|
|
39
58
|
} | {
|
|
40
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Capture stills of a subject or a video file in the production at the
|
|
61
|
+
* working directory.
|
|
62
|
+
*/
|
|
41
63
|
command: "capture";
|
|
42
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* The tokens after `capture`, as typed; `run` reads them through the
|
|
66
|
+
* production's request grammar, which only the production's
|
|
67
|
+
* `@automovie/render` holds.
|
|
68
|
+
*/
|
|
43
69
|
args: string[];
|
|
44
70
|
} | {
|
|
45
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Serve the inspector page over a subject module of the production or
|
|
73
|
+
* package at the working directory.
|
|
74
|
+
*/
|
|
46
75
|
command: "inspect";
|
|
47
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* The tokens after `inspect`, as typed; `run` reads them through the
|
|
78
|
+
* production's request grammar, as for `capture`.
|
|
79
|
+
*/
|
|
48
80
|
args: string[];
|
|
49
81
|
} | {
|
|
50
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Render one subject of the production at the working directory into a
|
|
84
|
+
* video.
|
|
85
|
+
*/
|
|
51
86
|
command: "render";
|
|
52
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* The tokens after `render`, as typed; `run` reads them with the
|
|
89
|
+
* production's option reader.
|
|
90
|
+
*/
|
|
53
91
|
args: string[];
|
|
54
92
|
} | {
|
|
55
93
|
/** Record real-time playback of the production's running inspector page. */
|
|
56
94
|
command: "review";
|
|
57
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* The tokens after `review`, as typed; `run` reads them with the
|
|
97
|
+
* production's option reader.
|
|
98
|
+
*/
|
|
99
|
+
args: string[];
|
|
100
|
+
} | {
|
|
101
|
+
/** Verify scoped production checks and observations. */
|
|
102
|
+
command: "verify";
|
|
103
|
+
/**
|
|
104
|
+
* The tokens after `verify`, as typed; the verification command reads
|
|
105
|
+
* them.
|
|
106
|
+
*/
|
|
58
107
|
args: string[];
|
|
59
108
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoMovieFfmpegStaticPath.js","sourceRoot":"","sources":["../src/AutoMovieFfmpegStaticPath.ts"],"names":[],"mappings":""}
|