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
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { AUTOMOVIE_RENDER_OPTIONS } from "./AUTOMOVIE_RENDER_OPTIONS";
|
|
2
2
|
import type { AutoMovieCaptureBackend } from "./AutoMovieCaptureBackend";
|
|
3
|
+
import { readAutoMoviePageTimeout } from "./readAutoMoviePageTimeout";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
|
-
* Split the options of `automovie render` into the command's own,
|
|
6
|
+
* Split the options of `automovie render` into the command's own,
|
|
7
|
+
* `AUTOMOVIE_RENDER_OPTIONS`, and the request's, which
|
|
8
|
+
* `parseAutoMovieCapturePlanRequest` reads for the request's `subject`.
|
|
6
9
|
*
|
|
7
|
-
* | Option
|
|
8
|
-
* |
|
|
9
|
-
* | `--module <file>`
|
|
10
|
-
* | `--props <file>`
|
|
11
|
-
* | `--out <folder>`
|
|
12
|
-
* | `--backend <software\|gpu>`
|
|
10
|
+
* | Option | Meaning | Absent |
|
|
11
|
+
* | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
|
|
12
|
+
* | `--module <file>` | The subject module whose `subjects` the draw page offers | Required |
|
|
13
|
+
* | `--props <file>` | A JSON file whose value the module's `subjects` is called with | `null` |
|
|
14
|
+
* | `--out <folder>` | Where `film.mp4`, `render-report.json` and, with `--passes`, `controls/` go | `media/automovie/<subject>/videos` |
|
|
15
|
+
* | `--backend <software\|gpu>` | How the browser draws | `software` |
|
|
16
|
+
* | `--background <scene\|transparent>` | `transparent` renders a straight-alpha `film.mov` with no audio into `media/automovie/<subject>/transparent` | `scene` |
|
|
17
|
+
* | `--timeout-ms <milliseconds>` | Per-call budget for page navigation, draw-function readiness, subject creation and drawing. Integer 1 to 2147483647 | `120000` |
|
|
13
18
|
*
|
|
14
|
-
* Every other option is left for the request reader, which names the subject as
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Linear in the options.
|
|
21
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Read once per command.
|
|
22
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh record and keeps nothing.
|
|
19
|
+
* Every other option is left for the request reader, which names the subject as
|
|
20
|
+
* `capture` and the inspector do; a render draws the subject's whole clock
|
|
21
|
+
* through its own camera, so `renderAutoMovie` refuses any request key but
|
|
22
|
+
* `subject` and `passes`. It throws for an empty value of its own options, a
|
|
23
|
+
* missing `--module`, a backend that is not `software` or `gpu`, and a
|
|
24
|
+
* background that is not `scene` or `transparent`.
|
|
23
25
|
*/
|
|
24
26
|
export function readAutoMovieRenderOptions(
|
|
25
27
|
values: ReadonlyMap<string, string>,
|
|
@@ -36,6 +38,15 @@ export function readAutoMovieRenderOptions(
|
|
|
36
38
|
/** How the browser draws. */
|
|
37
39
|
backend: AutoMovieCaptureBackend;
|
|
38
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Per-call milliseconds for draw-function readiness, subject
|
|
43
|
+
* description/creation and drawing, not a total build or render deadline.
|
|
44
|
+
*/
|
|
45
|
+
timeout: number;
|
|
46
|
+
|
|
47
|
+
/** `scene` for the film, `transparent` for a straight-alpha layer. */
|
|
48
|
+
background: "scene" | "transparent";
|
|
49
|
+
|
|
39
50
|
/** The request's own options, for the request reader. */
|
|
40
51
|
request: Map<string, string>;
|
|
41
52
|
} {
|
|
@@ -57,11 +68,18 @@ export function readAutoMovieRenderOptions(
|
|
|
57
68
|
const backend: string = taken.get("backend") ?? "software";
|
|
58
69
|
if (backend !== "software" && backend !== "gpu")
|
|
59
70
|
throw new Error(`Render --backend "${backend}" is not software or gpu`);
|
|
71
|
+
const background: string = taken.get("background") ?? "scene";
|
|
72
|
+
if (background !== "scene" && background !== "transparent")
|
|
73
|
+
throw new Error(
|
|
74
|
+
`Render --background "${background}" is not scene or transparent`,
|
|
75
|
+
);
|
|
60
76
|
return {
|
|
61
77
|
module,
|
|
62
78
|
props: taken.get("props") ?? null,
|
|
63
79
|
out: taken.get("out") ?? null,
|
|
64
80
|
backend,
|
|
81
|
+
timeout: readAutoMoviePageTimeout(taken.get("timeout-ms")),
|
|
65
82
|
request,
|
|
83
|
+
background,
|
|
66
84
|
};
|
|
67
85
|
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { IAutoMovieDeliveryContentAudit } from "@automovie/interface";
|
|
2
|
+
|
|
3
|
+
import type { IAutoMovieReviewObservation } from "./IAutoMovieReviewObservation";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Admits one stored review receipt with matching requested and observed scope.
|
|
7
|
+
* A still decision covers a single decoded frame when timing is established.
|
|
8
|
+
*/
|
|
9
|
+
export function readAutoMovieReviewObservation(
|
|
10
|
+
value: unknown,
|
|
11
|
+
): IAutoMovieReviewObservation {
|
|
12
|
+
if (!record(value) || !admitted(value))
|
|
13
|
+
throw new Error("Invalid file review receipt");
|
|
14
|
+
if (
|
|
15
|
+
value.viewed === "still" &&
|
|
16
|
+
(value.observed === null
|
|
17
|
+
? value.requested.to !== null
|
|
18
|
+
: value.observed.endFrame - value.observed.firstFrame !== 1)
|
|
19
|
+
)
|
|
20
|
+
throw new Error("Invalid file review receipt: a still selects one frame");
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** A decoded JSON object. */
|
|
25
|
+
function record(value: unknown): value is Record<string, unknown> {
|
|
26
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Nonempty text remains distinguishable from an absent value. */
|
|
30
|
+
function text(value: unknown): value is string {
|
|
31
|
+
return typeof value === "string" && value.trim() !== "";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** An index in a nonnegative output frame grid. */
|
|
35
|
+
function index(value: unknown): value is number {
|
|
36
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** An explicitly requested film second. */
|
|
40
|
+
function second(value: unknown): value is number {
|
|
41
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** An exact timestamp with two positive rational clock terms. */
|
|
45
|
+
function timestamp(
|
|
46
|
+
value: unknown,
|
|
47
|
+
): value is IAutoMovieDeliveryContentAudit.ITimestamp {
|
|
48
|
+
return (
|
|
49
|
+
record(value) &&
|
|
50
|
+
Number.isSafeInteger(value.ticks) &&
|
|
51
|
+
Array.isArray(value.timeBase) &&
|
|
52
|
+
value.timeBase.length === 2 &&
|
|
53
|
+
value.timeBase.every((term: unknown): boolean => index(term) && term > 0)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Validates the receipt's selected frame bounds and consistent native clock. */
|
|
58
|
+
function observed(
|
|
59
|
+
value: unknown,
|
|
60
|
+
from: number,
|
|
61
|
+
to: number | null,
|
|
62
|
+
): value is NonNullable<IAutoMovieReviewObservation["observed"]> {
|
|
63
|
+
if (
|
|
64
|
+
!record(value) ||
|
|
65
|
+
!index(value.firstFrame) ||
|
|
66
|
+
!index(value.endFrame) ||
|
|
67
|
+
!index(value.frameCount) ||
|
|
68
|
+
value.firstFrame >= value.endFrame ||
|
|
69
|
+
value.endFrame > value.frameCount ||
|
|
70
|
+
!timestamp(value.start) ||
|
|
71
|
+
!timestamp(value.end) ||
|
|
72
|
+
value.start.timeBase[0] !== value.end.timeBase[0] ||
|
|
73
|
+
value.start.timeBase[1] !== value.end.timeBase[1] ||
|
|
74
|
+
value.start.ticks < 0 ||
|
|
75
|
+
value.end.ticks <= value.start.ticks
|
|
76
|
+
)
|
|
77
|
+
return false;
|
|
78
|
+
const ticks: number = value.end.ticks - value.start.ticks;
|
|
79
|
+
const frames: number = value.endFrame - value.firstFrame;
|
|
80
|
+
const stride: number = ticks / frames;
|
|
81
|
+
const [numerator, denominator] = value.start.timeBase;
|
|
82
|
+
const start: number = (value.start.ticks * numerator) / denominator;
|
|
83
|
+
const afterFirst: number =
|
|
84
|
+
((value.start.ticks + stride) * numerator) / denominator;
|
|
85
|
+
const beforeEnd: number =
|
|
86
|
+
((value.end.ticks - stride) * numerator) / denominator;
|
|
87
|
+
const end: number = (value.end.ticks * numerator) / denominator;
|
|
88
|
+
return (
|
|
89
|
+
Number.isSafeInteger(stride) &&
|
|
90
|
+
BigInt(value.start.ticks) === BigInt(value.firstFrame) * BigInt(stride) &&
|
|
91
|
+
start <= from &&
|
|
92
|
+
from < afterFirst &&
|
|
93
|
+
(to === null ? frames === 1 : beforeEnd < to && to <= end)
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** An assigned occurrence or an explicit limit on assignment. */
|
|
98
|
+
function cut(value: unknown): value is IAutoMovieReviewObservation["cut"] {
|
|
99
|
+
return (
|
|
100
|
+
record(value) &&
|
|
101
|
+
(value.state === "resolved"
|
|
102
|
+
? index(value.entry) && text(value.shot)
|
|
103
|
+
: (value.state === "ambiguous" || value.state === "unavailable") &&
|
|
104
|
+
text(value.reason))
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** The input shape and cross-field admission of a stored mark. */
|
|
109
|
+
function admitted(
|
|
110
|
+
value: Record<string, unknown>,
|
|
111
|
+
): value is Record<string, unknown> & IAutoMovieReviewObservation {
|
|
112
|
+
if (
|
|
113
|
+
value.version !== 1 ||
|
|
114
|
+
!text(value.subject) ||
|
|
115
|
+
!text(value.file) ||
|
|
116
|
+
typeof value.sha256 !== "string" ||
|
|
117
|
+
!/^[0-9a-f]{64}$/u.test(value.sha256) ||
|
|
118
|
+
!text(value.note) ||
|
|
119
|
+
!(value.previous === null || text(value.previous)) ||
|
|
120
|
+
!record(value.requested) ||
|
|
121
|
+
!second(value.requested.from) ||
|
|
122
|
+
!(
|
|
123
|
+
value.requested.to === null ||
|
|
124
|
+
(second(value.requested.to) && value.requested.to > value.requested.from)
|
|
125
|
+
) ||
|
|
126
|
+
!cut(value.cut)
|
|
127
|
+
)
|
|
128
|
+
return false;
|
|
129
|
+
if (
|
|
130
|
+
!(
|
|
131
|
+
(value.reviewer === null &&
|
|
132
|
+
value.decision === null &&
|
|
133
|
+
value.viewed === null) ||
|
|
134
|
+
(text(value.reviewer) &&
|
|
135
|
+
(value.decision === "accepted" || value.decision === "needs-repair") &&
|
|
136
|
+
(value.viewed === "still" ||
|
|
137
|
+
(value.requested.to !== null &&
|
|
138
|
+
(value.viewed === "playback" || value.viewed === "listening"))))
|
|
139
|
+
)
|
|
140
|
+
)
|
|
141
|
+
return false;
|
|
142
|
+
return value.observed === null
|
|
143
|
+
? text(value.unavailable) && value.cut.state === "unavailable"
|
|
144
|
+
: value.unavailable === null &&
|
|
145
|
+
observed(value.observed, value.requested.from, value.requested.to);
|
|
146
|
+
}
|
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
import { AUTOMOVIE_REVIEW_OPTIONS } from "./AUTOMOVIE_REVIEW_OPTIONS";
|
|
2
|
+
import type { IAutoMovieReviewObservation } from "./IAutoMovieReviewObservation";
|
|
2
3
|
|
|
3
|
-
/**
|
|
4
|
+
/** The longest Inspector recording in wall-clock seconds, one day. */
|
|
4
5
|
const LONGEST: number = 86_400;
|
|
5
6
|
|
|
7
|
+
/** An Inspector recording with its existing address, duration and output. */
|
|
8
|
+
interface IAutoMovieInspectorReviewOptions {
|
|
9
|
+
url: string;
|
|
10
|
+
seconds: number;
|
|
11
|
+
out: string | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
* One file mark or replay, with the selected range and any explicit reviewer
|
|
16
|
+
* decision.
|
|
17
|
+
*/
|
|
18
|
+
interface IAutoMovieFileReviewOptions {
|
|
19
|
+
file: string | null;
|
|
20
|
+
mark: string | null;
|
|
21
|
+
requested: IAutoMovieReviewObservation["requested"] | null;
|
|
22
|
+
note: string | null;
|
|
23
|
+
reviewer: IAutoMovieReviewObservation["reviewer"];
|
|
24
|
+
decision: IAutoMovieReviewObservation["decision"];
|
|
25
|
+
viewed: IAutoMovieReviewObservation["viewed"];
|
|
26
|
+
out: string | null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Admit one `automovie review` operation.
|
|
16
31
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
32
|
+
* Inspector mode takes the loopback HTTP `--url`, wall-clock `--seconds` and
|
|
33
|
+
* optional `--out`. File mode takes a published `--file` with `--at`, or with
|
|
34
|
+
* `--from` and exclusive `--to`, in film seconds. New marks need `--note`.
|
|
35
|
+
* `--mark` opens an existing receipt or, beside a file and selected time,
|
|
36
|
+
* explicitly rebinds it. A rebind can reuse the note text. `--reviewer`,
|
|
37
|
+
* `--decision` and `--viewed` belong together on a mark or rebind. Still review
|
|
38
|
+
* needs `--at`. Playback and listening need `--from` and `--to`. `--out`
|
|
39
|
+
* selects the output folder.
|
|
24
40
|
*/
|
|
25
41
|
export function readAutoMovieReviewOptions(
|
|
26
42
|
values: ReadonlyMap<string, string>,
|
|
27
|
-
): {
|
|
28
|
-
/** The page's address. */
|
|
29
|
-
url: string;
|
|
30
|
-
|
|
31
|
-
/** Seconds of playback recorded. */
|
|
32
|
-
seconds: number;
|
|
33
|
-
|
|
34
|
-
/** The output folder, or null for the default. */
|
|
35
|
-
out: string | null;
|
|
36
|
-
} {
|
|
43
|
+
): IAutoMovieInspectorReviewOptions | IAutoMovieFileReviewOptions {
|
|
37
44
|
for (const [key, value] of values) {
|
|
38
45
|
if (!AUTOMOVIE_REVIEW_OPTIONS.includes(key))
|
|
39
46
|
throw new Error(
|
|
@@ -42,10 +49,24 @@ export function readAutoMovieReviewOptions(
|
|
|
42
49
|
if (value.trim() === "")
|
|
43
50
|
throw new Error(`Review option --${key} needs a value`);
|
|
44
51
|
}
|
|
52
|
+
return values.has("file") || values.has("mark")
|
|
53
|
+
? fileOptions(values)
|
|
54
|
+
: inspectorOptions(values);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Record only a loopback HTTP Inspector for a finite wall-clock duration. */
|
|
58
|
+
function inspectorOptions(
|
|
59
|
+
values: ReadonlyMap<string, string>,
|
|
60
|
+
): IAutoMovieInspectorReviewOptions {
|
|
45
61
|
const url: string | undefined = values.get("url");
|
|
46
62
|
const text: string | undefined = values.get("seconds");
|
|
47
63
|
if (url === undefined || text === undefined)
|
|
48
|
-
throw new Error(
|
|
64
|
+
throw new Error(
|
|
65
|
+
"Review needs --url <inspector address> and --seconds <s>, or --file / --mark",
|
|
66
|
+
);
|
|
67
|
+
for (const key of values.keys())
|
|
68
|
+
if (key !== "url" && key !== "seconds" && key !== "out")
|
|
69
|
+
throw new Error(`Review option --${key} needs --file or --mark`);
|
|
49
70
|
let address: URL;
|
|
50
71
|
try {
|
|
51
72
|
address = new URL(url);
|
|
@@ -68,3 +89,87 @@ export function readAutoMovieReviewOptions(
|
|
|
68
89
|
);
|
|
69
90
|
return { url: address.href, seconds, out: values.get("out") ?? null };
|
|
70
91
|
}
|
|
92
|
+
|
|
93
|
+
/** Admits a new mark, an explicit rebind, or replay of an existing mark. */
|
|
94
|
+
function fileOptions(
|
|
95
|
+
values: ReadonlyMap<string, string>,
|
|
96
|
+
): IAutoMovieFileReviewOptions {
|
|
97
|
+
if (values.has("url") || values.has("seconds"))
|
|
98
|
+
throw new Error(
|
|
99
|
+
"Review --url and --seconds apply only to Inspector recording",
|
|
100
|
+
);
|
|
101
|
+
const file: string | null = values.get("file") ?? null;
|
|
102
|
+
const mark: string | null = values.get("mark") ?? null;
|
|
103
|
+
const note: string | null = values.get("note") ?? null;
|
|
104
|
+
const at: number | null = second(values, "at");
|
|
105
|
+
const from: number | null = second(values, "from");
|
|
106
|
+
const to: number | null = second(values, "to");
|
|
107
|
+
if (at !== null && (from !== null || to !== null))
|
|
108
|
+
throw new Error("Review --at excludes --from and --to");
|
|
109
|
+
if ((from === null) !== (to === null) || (from !== null && to! <= from))
|
|
110
|
+
throw new Error("Review needs both --from and --to with --from below --to");
|
|
111
|
+
const requested: IAutoMovieFileReviewOptions["requested"] =
|
|
112
|
+
at !== null ? { from: at, to: null } : from !== null ? { from, to } : null;
|
|
113
|
+
if (requested !== null && file === null)
|
|
114
|
+
throw new Error("Review a new position with --file");
|
|
115
|
+
if (mark === null && (requested === null || note === null))
|
|
116
|
+
throw new Error(
|
|
117
|
+
"A new review mark needs --at or --from and --to, and --note",
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
const reviewer: string | null = values.get("reviewer") ?? null;
|
|
121
|
+
const decision: string | null = values.get("decision") ?? null;
|
|
122
|
+
const viewed: string | null = values.get("viewed") ?? null;
|
|
123
|
+
if (
|
|
124
|
+
decision !== null &&
|
|
125
|
+
decision !== "accepted" &&
|
|
126
|
+
decision !== "needs-repair"
|
|
127
|
+
)
|
|
128
|
+
throw new Error("Review --decision takes accepted or needs-repair");
|
|
129
|
+
if (
|
|
130
|
+
viewed !== null &&
|
|
131
|
+
viewed !== "still" &&
|
|
132
|
+
viewed !== "playback" &&
|
|
133
|
+
viewed !== "listening"
|
|
134
|
+
)
|
|
135
|
+
throw new Error("Review --viewed takes still, playback or listening");
|
|
136
|
+
if (
|
|
137
|
+
(reviewer === null) !== (decision === null) ||
|
|
138
|
+
(decision === null) !== (viewed === null)
|
|
139
|
+
)
|
|
140
|
+
throw new Error("Give --reviewer, --decision and --viewed together");
|
|
141
|
+
if (requested === null && (note !== null || reviewer !== null))
|
|
142
|
+
throw new Error(
|
|
143
|
+
"Add a note or decision at an explicit position with --file",
|
|
144
|
+
);
|
|
145
|
+
if (viewed === "still" && at === null)
|
|
146
|
+
throw new Error("Still review needs --at to select one frame");
|
|
147
|
+
if (
|
|
148
|
+
(requested === null || requested.to === null) &&
|
|
149
|
+
(viewed === "playback" || viewed === "listening")
|
|
150
|
+
)
|
|
151
|
+
throw new Error("Playback and listening review need --from and --to");
|
|
152
|
+
return {
|
|
153
|
+
file,
|
|
154
|
+
mark,
|
|
155
|
+
requested,
|
|
156
|
+
note,
|
|
157
|
+
reviewer,
|
|
158
|
+
decision,
|
|
159
|
+
viewed,
|
|
160
|
+
out: values.get("out") ?? null,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Reads a finite nonnegative film second, or null when absent. */
|
|
165
|
+
function second(
|
|
166
|
+
values: ReadonlyMap<string, string>,
|
|
167
|
+
key: string,
|
|
168
|
+
): number | null {
|
|
169
|
+
const text: string | undefined = values.get(key);
|
|
170
|
+
if (text === undefined) return null;
|
|
171
|
+
const value: number = Number(text);
|
|
172
|
+
if (!Number.isFinite(value) || value < 0)
|
|
173
|
+
throw new Error(`Review --${key} needs a finite nonnegative second`);
|
|
174
|
+
return value;
|
|
175
|
+
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { execFileSync } from "node:child_process";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The source revision a capture records: the production's git commit, with
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @evidence contracts/development/implementation.md#principled-implementation `git rev-parse HEAD` names the commit and `git status --porcelain` is empty exactly when nothing differs from it, so the revision says whether the commit alone repeats the capture.
|
|
8
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Two git calls, one fallback.
|
|
9
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A missing revision is written as `unrecorded`, never as a guessed commit.
|
|
10
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Two short processes per capture.
|
|
11
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Read once per capture, since the tree may change between captures.
|
|
12
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Both processes end before it returns.
|
|
4
|
+
* The source revision a capture records: the production's git commit, with
|
|
5
|
+
* `+changes` when its working tree differs from that commit, or `unrecorded`
|
|
6
|
+
* when the folder is not in a git checkout or git is not installed.
|
|
13
7
|
*/
|
|
14
8
|
export function readAutoMovieRevision(root: string): string {
|
|
15
9
|
const git: (args: string[]) => string = (args: string[]): string =>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { parseArgs } from "node:util";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Admit the CLI's verification module, subjects, selected checks and one
|
|
5
|
+
* optional gate. Status is read-only without `--run`. A gate evaluates its
|
|
6
|
+
* whole stage even when `--only` limits execution to named check IDs.
|
|
7
|
+
*
|
|
8
|
+
* @param args The tokens after the command, excluding the executable name.
|
|
9
|
+
* @returns Production-relative module path, selection and output mode.
|
|
10
|
+
* @throws On malformed options, blank values or a repeated single-value option.
|
|
11
|
+
*/
|
|
12
|
+
export function readAutoMovieVerifyOptions(args: readonly string[]): {
|
|
13
|
+
module: string;
|
|
14
|
+
subjects: string[];
|
|
15
|
+
only: string[];
|
|
16
|
+
require: string | null;
|
|
17
|
+
run: boolean;
|
|
18
|
+
json: boolean;
|
|
19
|
+
} {
|
|
20
|
+
const parsed = parseArgs({
|
|
21
|
+
args: [...args],
|
|
22
|
+
options: {
|
|
23
|
+
module: { type: "string", multiple: true },
|
|
24
|
+
subject: { type: "string", multiple: true },
|
|
25
|
+
only: { type: "string", multiple: true },
|
|
26
|
+
require: { type: "string", multiple: true },
|
|
27
|
+
run: { type: "boolean" },
|
|
28
|
+
json: { type: "boolean" },
|
|
29
|
+
},
|
|
30
|
+
}).values;
|
|
31
|
+
if ((parsed.module?.length ?? 0) > 1 || (parsed.require?.length ?? 0) > 1)
|
|
32
|
+
throw new Error("verify takes at most one --module and one --require.");
|
|
33
|
+
const texts: string[] = [
|
|
34
|
+
...(parsed.module ?? []),
|
|
35
|
+
...(parsed.subject ?? []),
|
|
36
|
+
...(parsed.only ?? []),
|
|
37
|
+
...(parsed.require ?? []),
|
|
38
|
+
];
|
|
39
|
+
if (texts.some((text: string): boolean => text.trim().length === 0))
|
|
40
|
+
throw new Error("verify option values must not be blank.");
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
module: parsed.module?.[0] ?? "src/executable/verify.ts",
|
|
44
|
+
subjects: [...new Set(parsed.subject ?? [])],
|
|
45
|
+
only: [...new Set(parsed.only ?? [])],
|
|
46
|
+
require: parsed.require?.[0] ?? null,
|
|
47
|
+
run: parsed.run ?? false,
|
|
48
|
+
json: parsed.json ?? false,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Read a video file's clock and raster from the log FFmpeg writes when it opens
|
|
2
|
+
* Read a video file's clock and raster from the log FFmpeg writes when it opens
|
|
3
|
+
* the file: the `Duration:` of the input and the size and rate of its first
|
|
4
|
+
* video stream.
|
|
3
5
|
*
|
|
4
|
-
* The rate is the stream's `fps` value, or its `tbr` when FFmpeg prints no
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @evidence contracts/development/implementation.md#principled-implementation FFmpeg prints `Duration: HH:MM:SS.ss` for every input and, for a video stream, `WxH` followed by `fps` and `tbr`, its frame and base rates; reading the log FFmpeg already writes needs no `ffprobe`, which `ffmpeg-static` does not ship.
|
|
8
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One expression per value.
|
|
9
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A missing value throws instead of taking a default raster or rate.
|
|
10
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Linear in the log.
|
|
11
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure reading of one log.
|
|
12
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns four numbers.
|
|
6
|
+
* The rate is the stream's `fps` value, or its `tbr` when FFmpeg prints no
|
|
7
|
+
* `fps`. It throws naming what is missing when the log holds no duration, no
|
|
8
|
+
* video stream, or a stream without a size or a rate.
|
|
13
9
|
*/
|
|
14
10
|
export function readAutoMovieVideoProbe(log: string): {
|
|
15
11
|
/** Running time in seconds. */
|
|
@@ -37,9 +33,24 @@ export function readAutoMovieVideoProbe(log: string): {
|
|
|
37
33
|
const size: RegExpMatchArray | null = stream.match(
|
|
38
34
|
/[ ,](\d{2,5})x(\d{2,5})[ ,[]/u,
|
|
39
35
|
);
|
|
40
|
-
const
|
|
36
|
+
const exact: RegExpMatchArray | null =
|
|
37
|
+
/^\[Parsed_showinfo_\d+ @ [^\r\n]+?\] config in time_base:\s*\d+\/\d+,\s*frame_rate:\s*(\d+)\/(\d+)(?=\s|$)/mu.exec(
|
|
38
|
+
log,
|
|
39
|
+
);
|
|
40
|
+
const numerator: number = Number(exact?.[1]);
|
|
41
|
+
const denominator: number = Number(exact?.[2]);
|
|
42
|
+
const printed: RegExpMatchArray | null =
|
|
41
43
|
stream.match(/([\d.]+) fps/u) ?? stream.match(/([\d.]+) tbr/u);
|
|
42
|
-
|
|
44
|
+
const fps: number | null =
|
|
45
|
+
Number.isSafeInteger(numerator) &&
|
|
46
|
+
numerator > 0 &&
|
|
47
|
+
Number.isSafeInteger(denominator) &&
|
|
48
|
+
denominator > 0
|
|
49
|
+
? numerator / denominator
|
|
50
|
+
: printed === null
|
|
51
|
+
? null
|
|
52
|
+
: Number(printed[1]);
|
|
53
|
+
if (size === null || fps === null)
|
|
43
54
|
throw new Error(
|
|
44
55
|
`FFmpeg reported no size or rate for the video stream: ${stream.trim()}`,
|
|
45
56
|
);
|
|
@@ -48,7 +59,7 @@ export function readAutoMovieVideoProbe(log: string): {
|
|
|
48
59
|
Number(duration[1]) * 3600 +
|
|
49
60
|
Number(duration[2]) * 60 +
|
|
50
61
|
Number(duration[3]),
|
|
51
|
-
fps
|
|
62
|
+
fps,
|
|
52
63
|
width: Number(size[1]),
|
|
53
64
|
height: Number(size[2]),
|
|
54
65
|
};
|
|
@@ -2,13 +2,19 @@ import * as fs from "node:fs/promises";
|
|
|
2
2
|
|
|
3
3
|
import { planAutoMovieChromiumLaunch } from "./planAutoMovieChromiumLaunch";
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Milliseconds the page may take to load and show its controls: ten minutes,
|
|
7
|
+
* room for a film that prepares its performance before its first frame.
|
|
8
|
+
*/
|
|
6
9
|
const PREPARE: number = 600_000;
|
|
7
10
|
|
|
8
11
|
/** Longest pause between two readings of the time readout, milliseconds. */
|
|
9
12
|
const READING: number = 500;
|
|
10
13
|
|
|
11
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The time readout the inspector shows: the second and the duration, such as
|
|
16
|
+
* `1.25 / 12.00 s`.
|
|
17
|
+
*/
|
|
12
18
|
const READOUT: RegExp = /\d+\.\d+ \/ \d+\.\d+ s/u;
|
|
13
19
|
|
|
14
20
|
/** The part of `playwright-core`'s `chromium` a playback recording calls. */
|
|
@@ -60,19 +66,26 @@ interface IRecordingLocator {
|
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
/**
|
|
63
|
-
* Record real-time playback of the running inspector page: load it, press its
|
|
64
|
-
*
|
|
65
|
-
*
|
|
69
|
+
* Record real-time playback of the running inspector page: load it, press its
|
|
70
|
+
* Play button, and record the page as a video while reading its time readout,
|
|
71
|
+
* for a person to watch.
|
|
66
72
|
*
|
|
67
|
-
*
|
|
73
|
+
* The browser draws on the GPU backend, since playback is judged in real time;
|
|
74
|
+
* the recording is Playwright's own video of the page at a 1280 by 900
|
|
75
|
+
* viewport, which `npx playwright-core install ffmpeg` provides. The page's
|
|
76
|
+
* Play button is found by its role and name, and the readout as the `output`
|
|
77
|
+
* showing `<second> / <duration> s`, both as the inspector renders them. The
|
|
78
|
+
* readout is read at most every half second for `seconds` of wall time after
|
|
79
|
+
* the click, and the page's script errors are collected. The video begins at
|
|
80
|
+
* navigation, so it includes the page's preparation; a reading's elapsed
|
|
81
|
+
* seconds count from the click.
|
|
68
82
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The browser and its context are closed on every outcome; the readings grow by two per second of observation.
|
|
83
|
+
* An uncaught page error before the controls are ready rejects immediately with
|
|
84
|
+
* that error as its cause; every page error also prints its stack, so a failed
|
|
85
|
+
* preparation leaves a usable diagnostic. It rejects when the page shows no
|
|
86
|
+
* Play button or readout within ten minutes and when the browser produced no
|
|
87
|
+
* video. Errors during playback remain in the returned report. The browser is
|
|
88
|
+
* closed on every outcome.
|
|
76
89
|
*/
|
|
77
90
|
export async function recordAutoMoviePlayback(props: {
|
|
78
91
|
/** Playwright's `chromium`, loaded from the production. */
|