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.
Files changed (331) hide show
  1. package/README.md +40 -139
  2. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.d.ts +5 -2
  3. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js +6 -2
  4. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js.map +1 -1
  5. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.d.ts +3 -1
  6. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.js +3 -1
  7. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.js.map +1 -1
  8. package/lib/AUTOMOVIE_INSPECT_OPTIONS.d.ts +5 -2
  9. package/lib/AUTOMOVIE_INSPECT_OPTIONS.js +5 -2
  10. package/lib/AUTOMOVIE_INSPECT_OPTIONS.js.map +1 -1
  11. package/lib/AUTOMOVIE_RENDER_OPTIONS.d.ts +6 -2
  12. package/lib/AUTOMOVIE_RENDER_OPTIONS.js +8 -2
  13. package/lib/AUTOMOVIE_RENDER_OPTIONS.js.map +1 -1
  14. package/lib/AUTOMOVIE_REVIEW_OPTIONS.d.ts +3 -1
  15. package/lib/AUTOMOVIE_REVIEW_OPTIONS.js +12 -1
  16. package/lib/AUTOMOVIE_REVIEW_OPTIONS.js.map +1 -1
  17. package/lib/AutoMovieCaptureBackend.d.ts +4 -6
  18. package/lib/AutoMovieCaptureHost.d.ts +73 -53
  19. package/lib/AutoMovieCaptureHost.js +89 -56
  20. package/lib/AutoMovieCaptureHost.js.map +1 -1
  21. package/lib/AutoMovieCommand.d.ts +69 -20
  22. package/lib/AutoMovieFfmpegStaticPath.d.ts +6 -0
  23. package/lib/AutoMovieFfmpegStaticPath.js +3 -0
  24. package/lib/AutoMovieFfmpegStaticPath.js.map +1 -0
  25. package/lib/AutoMovieMp4Boxes.d.ts +78 -0
  26. package/lib/AutoMovieMp4Boxes.js +227 -0
  27. package/lib/AutoMovieMp4Boxes.js.map +1 -0
  28. package/lib/AutoMovieRenderOutputReservation.d.ts +18 -0
  29. package/lib/AutoMovieRenderOutputReservation.js +118 -0
  30. package/lib/AutoMovieRenderOutputReservation.js.map +1 -0
  31. package/lib/IAutoMovieChromium.d.ts +13 -57
  32. package/lib/IAutoMovieDeliveryAudioTrack.d.ts +17 -0
  33. package/lib/IAutoMovieDeliveryAudioTrack.js +3 -0
  34. package/lib/IAutoMovieDeliveryAudioTrack.js.map +1 -0
  35. package/lib/IAutoMovieDeliveryProfileFinding.d.ts +21 -0
  36. package/lib/IAutoMovieDeliveryProfileFinding.js +3 -0
  37. package/lib/IAutoMovieDeliveryProfileFinding.js.map +1 -0
  38. package/lib/IAutoMovieFfmpegSources.d.ts +11 -0
  39. package/lib/IAutoMovieFfmpegSources.js +3 -0
  40. package/lib/IAutoMovieFfmpegSources.js.map +1 -0
  41. package/lib/IAutoMovieReviewObservation.d.ts +66 -0
  42. package/lib/IAutoMovieReviewObservation.js +3 -0
  43. package/lib/IAutoMovieReviewObservation.js.map +1 -0
  44. package/lib/IAutoMovieVerification.d.ts +163 -0
  45. package/lib/IAutoMovieVerification.js +3 -0
  46. package/lib/IAutoMovieVerification.js.map +1 -0
  47. package/lib/auditAutoMovieAlphaSamples.d.ts +23 -0
  48. package/lib/auditAutoMovieAlphaSamples.js +183 -0
  49. package/lib/auditAutoMovieAlphaSamples.js.map +1 -0
  50. package/lib/auditAutoMovieDeliveryProfile.d.ts +33 -0
  51. package/lib/auditAutoMovieDeliveryProfile.js +93 -0
  52. package/lib/auditAutoMovieDeliveryProfile.js.map +1 -0
  53. package/lib/captureAutoMovie.d.ts +23 -11
  54. package/lib/captureAutoMovie.js +102 -18
  55. package/lib/captureAutoMovie.js.map +1 -1
  56. package/lib/createAutoMovieDeliveryAudioLog.d.ts +31 -0
  57. package/lib/createAutoMovieDeliveryAudioLog.js +110 -0
  58. package/lib/createAutoMovieDeliveryAudioLog.js.map +1 -0
  59. package/lib/createAutoMovieDeliveryAudioScan.d.ts +39 -0
  60. package/lib/createAutoMovieDeliveryAudioScan.js +125 -0
  61. package/lib/createAutoMovieDeliveryAudioScan.js.map +1 -0
  62. package/lib/createAutoMovieVerificationInputScope.d.ts +19 -0
  63. package/lib/createAutoMovieVerificationInputScope.js +147 -0
  64. package/lib/createAutoMovieVerificationInputScope.js.map +1 -0
  65. package/lib/createAutoMovieVerificationMediaHash.d.ts +5 -0
  66. package/lib/createAutoMovieVerificationMediaHash.js +61 -0
  67. package/lib/createAutoMovieVerificationMediaHash.js.map +1 -0
  68. package/lib/decodeAutoMovieDeliveryAudio.d.ts +24 -0
  69. package/lib/decodeAutoMovieDeliveryAudio.js +77 -0
  70. package/lib/decodeAutoMovieDeliveryAudio.js.map +1 -0
  71. package/lib/deriveAutoMovieProjectName.d.ts +14 -11
  72. package/lib/deriveAutoMovieProjectName.js +14 -11
  73. package/lib/deriveAutoMovieProjectName.js.map +1 -1
  74. package/lib/findAutoMovieFreePort.d.ts +5 -10
  75. package/lib/findAutoMovieFreePort.js +5 -10
  76. package/lib/findAutoMovieFreePort.js.map +1 -1
  77. package/lib/formatAutoMovieInspectUrl.d.ts +6 -10
  78. package/lib/formatAutoMovieInspectUrl.js +6 -10
  79. package/lib/formatAutoMovieInspectUrl.js.map +1 -1
  80. package/lib/hashAutoMovieFile.d.ts +5 -0
  81. package/lib/hashAutoMovieFile.js +16 -0
  82. package/lib/hashAutoMovieFile.js.map +1 -0
  83. package/lib/importAutoMovieVerificationEntry.d.mts +2 -0
  84. package/lib/importAutoMovieVerificationEntry.mjs +6 -0
  85. package/lib/importAutoMovieVerificationEntry.mjs.map +1 -0
  86. package/lib/index.d.ts +9 -0
  87. package/lib/index.js +9 -0
  88. package/lib/index.js.map +1 -1
  89. package/lib/inspectAutoMovie.d.ts +15 -9
  90. package/lib/inspectAutoMovie.js +25 -9
  91. package/lib/inspectAutoMovie.js.map +1 -1
  92. package/lib/inspectAutoMovieVerificationCapture.d.ts +15 -0
  93. package/lib/inspectAutoMovieVerificationCapture.js +221 -0
  94. package/lib/inspectAutoMovieVerificationCapture.js.map +1 -0
  95. package/lib/inspectAutoMovieVerificationDelivery.d.ts +13 -0
  96. package/lib/inspectAutoMovieVerificationDelivery.js +247 -0
  97. package/lib/inspectAutoMovieVerificationDelivery.js.map +1 -0
  98. package/lib/inspectAutoMovieVerificationReview.d.ts +11 -0
  99. package/lib/inspectAutoMovieVerificationReview.js +141 -0
  100. package/lib/inspectAutoMovieVerificationReview.js.map +1 -0
  101. package/lib/launchAutoMovieChromium.d.ts +9 -11
  102. package/lib/launchAutoMovieChromium.js +10 -11
  103. package/lib/launchAutoMovieChromium.js.map +1 -1
  104. package/lib/listAutoMovieReleaseFindings.d.ts +9 -0
  105. package/lib/listAutoMovieReleaseFindings.js +58 -0
  106. package/lib/listAutoMovieReleaseFindings.js.map +1 -0
  107. package/lib/loadAutoMovieProductionModule.d.ts +11 -10
  108. package/lib/loadAutoMovieProductionModule.js +18 -10
  109. package/lib/loadAutoMovieProductionModule.js.map +1 -1
  110. package/lib/loadAutoMovieVerificationModule.d.ts +6 -0
  111. package/lib/loadAutoMovieVerificationModule.js +246 -0
  112. package/lib/loadAutoMovieVerificationModule.js.map +1 -0
  113. package/lib/planAutoMovieChromiumLaunch.d.ts +7 -13
  114. package/lib/planAutoMovieChromiumLaunch.js +7 -13
  115. package/lib/planAutoMovieChromiumLaunch.js.map +1 -1
  116. package/lib/planAutoMovieDeliveryAudioDecode.d.ts +10 -0
  117. package/lib/planAutoMovieDeliveryAudioDecode.js +29 -0
  118. package/lib/planAutoMovieDeliveryAudioDecode.js.map +1 -0
  119. package/lib/planAutoMovieDeliveryDecode.d.ts +19 -0
  120. package/lib/planAutoMovieDeliveryDecode.js +57 -0
  121. package/lib/planAutoMovieDeliveryDecode.js.map +1 -0
  122. package/lib/planAutoMovieDeliveryInput.d.ts +11 -0
  123. package/lib/planAutoMovieDeliveryInput.js +26 -0
  124. package/lib/planAutoMovieDeliveryInput.js.map +1 -0
  125. package/lib/planAutoMovieModulePageViteConfig.d.ts +13 -10
  126. package/lib/planAutoMovieModulePageViteConfig.js +13 -10
  127. package/lib/planAutoMovieModulePageViteConfig.js.map +1 -1
  128. package/lib/promptAutoMovieProjectName.d.ts +6 -10
  129. package/lib/promptAutoMovieProjectName.js +6 -10
  130. package/lib/promptAutoMovieProjectName.js.map +1 -1
  131. package/lib/publishAutoMovieRenderAttempt.d.ts +32 -0
  132. package/lib/publishAutoMovieRenderAttempt.js +91 -0
  133. package/lib/publishAutoMovieRenderAttempt.js.map +1 -0
  134. package/lib/readAutoMovieAddArguments.d.ts +10 -11
  135. package/lib/readAutoMovieAddArguments.js +10 -11
  136. package/lib/readAutoMovieAddArguments.js.map +1 -1
  137. package/lib/readAutoMovieCaptureHostOptions.d.ts +19 -17
  138. package/lib/readAutoMovieCaptureHostOptions.js +16 -17
  139. package/lib/readAutoMovieCaptureHostOptions.js.map +1 -1
  140. package/lib/readAutoMovieCommandArguments.d.ts +6 -9
  141. package/lib/readAutoMovieCommandArguments.js +9 -10
  142. package/lib/readAutoMovieCommandArguments.js.map +1 -1
  143. package/lib/readAutoMovieCreateArguments.d.ts +7 -11
  144. package/lib/readAutoMovieCreateArguments.js +7 -11
  145. package/lib/readAutoMovieCreateArguments.js.map +1 -1
  146. package/lib/readAutoMovieDeliveryAudioTrack.d.ts +21 -0
  147. package/lib/readAutoMovieDeliveryAudioTrack.js +104 -0
  148. package/lib/readAutoMovieDeliveryAudioTrack.js.map +1 -0
  149. package/lib/readAutoMovieDeliveryDecode.d.ts +19 -0
  150. package/lib/readAutoMovieDeliveryDecode.js +209 -0
  151. package/lib/readAutoMovieDeliveryDecode.js.map +1 -0
  152. package/lib/readAutoMovieDeliveryProbe.d.ts +35 -0
  153. package/lib/readAutoMovieDeliveryProbe.js +363 -0
  154. package/lib/readAutoMovieDeliveryProbe.js.map +1 -0
  155. package/lib/readAutoMovieErrorCode.d.ts +9 -0
  156. package/lib/readAutoMovieErrorCode.js +18 -0
  157. package/lib/readAutoMovieErrorCode.js.map +1 -0
  158. package/lib/readAutoMovieInspectHostOptions.d.ts +15 -16
  159. package/lib/readAutoMovieInspectHostOptions.js +11 -15
  160. package/lib/readAutoMovieInspectHostOptions.js.map +1 -1
  161. package/lib/readAutoMovieNameOption.d.ts +4 -10
  162. package/lib/readAutoMovieNameOption.js +4 -10
  163. package/lib/readAutoMovieNameOption.js.map +1 -1
  164. package/lib/readAutoMoviePageTimeout.d.ts +13 -0
  165. package/lib/readAutoMoviePageTimeout.js +21 -0
  166. package/lib/readAutoMoviePageTimeout.js.map +1 -0
  167. package/lib/readAutoMovieRenderOptions.d.ts +24 -16
  168. package/lib/readAutoMovieRenderOptions.js +23 -16
  169. package/lib/readAutoMovieRenderOptions.js.map +1 -1
  170. package/lib/readAutoMovieReviewObservation.d.ts +6 -0
  171. package/lib/readAutoMovieReviewObservation.js +108 -0
  172. package/lib/readAutoMovieReviewObservation.js.map +1 -0
  173. package/lib/readAutoMovieReviewOptions.d.ts +32 -24
  174. package/lib/readAutoMovieReviewOptions.js +82 -18
  175. package/lib/readAutoMovieReviewOptions.js.map +1 -1
  176. package/lib/readAutoMovieRevision.d.ts +3 -9
  177. package/lib/readAutoMovieRevision.js +3 -9
  178. package/lib/readAutoMovieRevision.js.map +1 -1
  179. package/lib/readAutoMovieVerifyOptions.d.ts +17 -0
  180. package/lib/readAutoMovieVerifyOptions.js +45 -0
  181. package/lib/readAutoMovieVerifyOptions.js.map +1 -0
  182. package/lib/readAutoMovieVideoProbe.d.ts +6 -10
  183. package/lib/readAutoMovieVideoProbe.js +20 -13
  184. package/lib/readAutoMovieVideoProbe.js.map +1 -1
  185. package/lib/recordAutoMoviePlayback.d.ts +18 -11
  186. package/lib/recordAutoMoviePlayback.js +26 -13
  187. package/lib/recordAutoMoviePlayback.js.map +1 -1
  188. package/lib/renderAutoMovie.d.ts +16 -10
  189. package/lib/renderAutoMovie.js +31 -14
  190. package/lib/renderAutoMovie.js.map +1 -1
  191. package/lib/renderAutoMovieScaffoldNextSteps.d.ts +10 -10
  192. package/lib/renderAutoMovieScaffoldNextSteps.js +10 -10
  193. package/lib/renderAutoMovieVideo.d.ts +53 -15
  194. package/lib/renderAutoMovieVideo.js +290 -45
  195. package/lib/renderAutoMovieVideo.js.map +1 -1
  196. package/lib/resolveAutoMovieFfmpeg.d.ts +12 -15
  197. package/lib/resolveAutoMovieFfmpeg.js +12 -17
  198. package/lib/resolveAutoMovieFfmpeg.js.map +1 -1
  199. package/lib/reviewAutoMovie.d.ts +10 -10
  200. package/lib/reviewAutoMovie.js +15 -10
  201. package/lib/reviewAutoMovie.js.map +1 -1
  202. package/lib/reviewAutoMovieFile.d.ts +21 -0
  203. package/lib/reviewAutoMovieFile.js +378 -0
  204. package/lib/reviewAutoMovieFile.js.map +1 -0
  205. package/lib/run.d.ts +32 -18
  206. package/lib/run.js +67 -23
  207. package/lib/run.js.map +1 -1
  208. package/lib/runAutoMovieDeliveryAudioDecode.d.ts +18 -0
  209. package/lib/runAutoMovieDeliveryAudioDecode.js +28 -0
  210. package/lib/runAutoMovieDeliveryAudioDecode.js.map +1 -0
  211. package/lib/runAutoMovieDeliveryDecode.d.ts +19 -0
  212. package/lib/runAutoMovieDeliveryDecode.js +42 -0
  213. package/lib/runAutoMovieDeliveryDecode.js.map +1 -0
  214. package/lib/runAutoMovieDeliveryReferenceDecode.d.ts +28 -0
  215. package/lib/runAutoMovieDeliveryReferenceDecode.js +77 -0
  216. package/lib/runAutoMovieDeliveryReferenceDecode.js.map +1 -0
  217. package/lib/runAutoMovieDeliverySourceAudioDecode.d.ts +20 -0
  218. package/lib/runAutoMovieDeliverySourceAudioDecode.js +56 -0
  219. package/lib/runAutoMovieDeliverySourceAudioDecode.js.map +1 -0
  220. package/lib/runAutoMovieFfmpeg.d.ts +15 -10
  221. package/lib/runAutoMovieFfmpeg.js +36 -13
  222. package/lib/runAutoMovieFfmpeg.js.map +1 -1
  223. package/lib/runAutoMovieVerification.d.ts +28 -0
  224. package/lib/runAutoMovieVerification.js +393 -0
  225. package/lib/runAutoMovieVerification.js.map +1 -0
  226. package/lib/sameAutoMovieReviewFile.d.ts +2 -0
  227. package/lib/sameAutoMovieReviewFile.js +57 -0
  228. package/lib/sameAutoMovieReviewFile.js.map +1 -0
  229. package/lib/selectAutoMovieProjectName.d.ts +8 -11
  230. package/lib/selectAutoMovieProjectName.js +8 -11
  231. package/lib/selectAutoMovieProjectName.js.map +1 -1
  232. package/lib/serveAutoMovieDrawPage.d.ts +14 -11
  233. package/lib/serveAutoMovieDrawPage.js +14 -11
  234. package/lib/serveAutoMovieDrawPage.js.map +1 -1
  235. package/lib/serveAutoMovieInspectorPage.d.ts +4 -8
  236. package/lib/serveAutoMovieInspectorPage.js +3 -9
  237. package/lib/serveAutoMovieInspectorPage.js.map +1 -1
  238. package/lib/verifyAutoMovie.d.ts +19 -0
  239. package/lib/verifyAutoMovie.js +44 -0
  240. package/lib/verifyAutoMovie.js.map +1 -0
  241. package/lib/writeAutoMovieModulePage.d.ts +17 -12
  242. package/lib/writeAutoMovieModulePage.js +13 -11
  243. package/lib/writeAutoMovieModulePage.js.map +1 -1
  244. package/lib/writeAutoMovieVerificationReceipt.d.ts +2 -0
  245. package/lib/writeAutoMovieVerificationReceipt.js +75 -0
  246. package/lib/writeAutoMovieVerificationReceipt.js.map +1 -0
  247. package/package.json +8 -8
  248. package/src/AUTOMOVIE_CAPTURE_OPTIONS.ts +6 -2
  249. package/src/AUTOMOVIE_DEFAULT_PROJECT_NAME.ts +3 -1
  250. package/src/AUTOMOVIE_INSPECT_OPTIONS.ts +5 -2
  251. package/src/AUTOMOVIE_RENDER_OPTIONS.ts +8 -2
  252. package/src/AUTOMOVIE_REVIEW_OPTIONS.ts +12 -1
  253. package/src/AutoMovieCaptureBackend.ts +4 -6
  254. package/src/AutoMovieCaptureHost.ts +122 -68
  255. package/src/AutoMovieCommand.ts +71 -20
  256. package/src/AutoMovieFfmpegStaticPath.ts +7 -0
  257. package/src/AutoMovieMp4Boxes.ts +263 -0
  258. package/src/AutoMovieRenderOutputReservation.ts +97 -0
  259. package/src/IAutoMovieChromium.ts +13 -57
  260. package/src/IAutoMovieDeliveryAudioTrack.ts +19 -0
  261. package/src/IAutoMovieDeliveryProfileFinding.ts +24 -0
  262. package/src/IAutoMovieFfmpegSources.ts +13 -0
  263. package/src/IAutoMovieReviewObservation.ts +59 -0
  264. package/src/IAutoMovieVerification.ts +207 -0
  265. package/src/auditAutoMovieAlphaSamples.ts +201 -0
  266. package/src/auditAutoMovieDeliveryProfile.ts +125 -0
  267. package/src/captureAutoMovie.ts +137 -28
  268. package/src/createAutoMovieDeliveryAudioLog.ts +141 -0
  269. package/src/createAutoMovieDeliveryAudioScan.ts +150 -0
  270. package/src/createAutoMovieVerificationInputScope.ts +156 -0
  271. package/src/createAutoMovieVerificationMediaHash.ts +32 -0
  272. package/src/decodeAutoMovieDeliveryAudio.ts +95 -0
  273. package/src/deriveAutoMovieProjectName.ts +14 -11
  274. package/src/findAutoMovieFreePort.ts +5 -10
  275. package/src/formatAutoMovieInspectUrl.ts +6 -10
  276. package/src/hashAutoMovieFile.ts +12 -0
  277. package/src/importAutoMovieVerificationEntry.mts +6 -0
  278. package/src/index.ts +9 -0
  279. package/src/inspectAutoMovie.ts +28 -11
  280. package/src/inspectAutoMovieVerificationCapture.ts +292 -0
  281. package/src/inspectAutoMovieVerificationDelivery.ts +301 -0
  282. package/src/inspectAutoMovieVerificationReview.ts +130 -0
  283. package/src/launchAutoMovieChromium.ts +14 -12
  284. package/src/listAutoMovieReleaseFindings.ts +87 -0
  285. package/src/loadAutoMovieProductionModule.ts +22 -15
  286. package/src/loadAutoMovieVerificationModule.ts +278 -0
  287. package/src/planAutoMovieChromiumLaunch.ts +7 -13
  288. package/src/planAutoMovieDeliveryAudioDecode.ts +26 -0
  289. package/src/planAutoMovieDeliveryDecode.ts +66 -0
  290. package/src/planAutoMovieDeliveryInput.ts +25 -0
  291. package/src/planAutoMovieModulePageViteConfig.ts +13 -10
  292. package/src/promptAutoMovieProjectName.ts +6 -10
  293. package/src/publishAutoMovieRenderAttempt.ts +89 -0
  294. package/src/readAutoMovieAddArguments.ts +10 -11
  295. package/src/readAutoMovieCaptureHostOptions.ts +22 -17
  296. package/src/readAutoMovieCommandArguments.ts +8 -10
  297. package/src/readAutoMovieCreateArguments.ts +7 -11
  298. package/src/readAutoMovieDeliveryAudioTrack.ts +137 -0
  299. package/src/readAutoMovieDeliveryDecode.ts +269 -0
  300. package/src/readAutoMovieDeliveryProbe.ts +499 -0
  301. package/src/readAutoMovieErrorCode.ts +13 -0
  302. package/src/readAutoMovieInspectHostOptions.ts +15 -16
  303. package/src/readAutoMovieNameOption.ts +4 -10
  304. package/src/readAutoMoviePageTimeout.ts +19 -0
  305. package/src/readAutoMovieRenderOptions.ts +34 -16
  306. package/src/readAutoMovieReviewObservation.ts +146 -0
  307. package/src/readAutoMovieReviewOptions.ts +133 -28
  308. package/src/readAutoMovieRevision.ts +3 -9
  309. package/src/readAutoMovieVerifyOptions.ts +50 -0
  310. package/src/readAutoMovieVideoProbe.ts +24 -13
  311. package/src/recordAutoMoviePlayback.ts +26 -13
  312. package/src/renderAutoMovie.ts +38 -17
  313. package/src/renderAutoMovieScaffoldNextSteps.ts +10 -10
  314. package/src/renderAutoMovieVideo.ts +474 -85
  315. package/src/resolveAutoMovieFfmpeg.ts +17 -24
  316. package/src/reviewAutoMovie.ts +21 -16
  317. package/src/reviewAutoMovieFile.ts +479 -0
  318. package/src/run.ts +75 -25
  319. package/src/runAutoMovieDeliveryAudioDecode.ts +45 -0
  320. package/src/runAutoMovieDeliveryDecode.ts +63 -0
  321. package/src/runAutoMovieDeliveryReferenceDecode.ts +107 -0
  322. package/src/runAutoMovieDeliverySourceAudioDecode.ts +71 -0
  323. package/src/runAutoMovieFfmpeg.ts +48 -14
  324. package/src/runAutoMovieVerification.ts +487 -0
  325. package/src/sameAutoMovieReviewFile.ts +23 -0
  326. package/src/selectAutoMovieProjectName.ts +8 -11
  327. package/src/serveAutoMovieDrawPage.ts +16 -12
  328. package/src/serveAutoMovieInspectorPage.ts +6 -9
  329. package/src/verifyAutoMovie.ts +67 -0
  330. package/src/writeAutoMovieModulePage.ts +17 -12
  331. package/src/writeAutoMovieVerificationReceipt.ts +51 -0
@@ -0,0 +1,66 @@
1
+ import type { IAutoMovieDeliveryContentAudit } from "@automovie/interface";
2
+ /**
3
+ * A review mark bound to the published file and the inspection its reviewer
4
+ * explicitly reports.
5
+ */
6
+ export interface IAutoMovieReviewObservation {
7
+ /** The receipt format. */
8
+ version: 1;
9
+ /** The delivered subject named by its published render report. */
10
+ subject: string;
11
+ /** The video path, production-relative when possible, with forward slashes. */
12
+ file: string;
13
+ /** Lowercase SHA-256 of the complete file, including its soundtrack. */
14
+ sha256: string;
15
+ /** The reviewer's original description of the issue or observation. */
16
+ note: string;
17
+ /** The explicitly named reviewer, or null for a navigation mark. */
18
+ reviewer: string | null;
19
+ /**
20
+ * The reviewer's decision on the requested scope, or null for a navigation
21
+ * mark.
22
+ */
23
+ decision: "accepted" | "needs-repair" | null;
24
+ /**
25
+ * What the reviewer explicitly inspected, or null for a navigation mark. A
26
+ * still decision is scoped to a single decoded frame.
27
+ */
28
+ viewed: "still" | "playback" | "listening" | null;
29
+ /**
30
+ * The selected film time in seconds, or half-open interval when to is
31
+ * present.
32
+ */
33
+ requested: {
34
+ from: number;
35
+ to: number | null;
36
+ };
37
+ /**
38
+ * Native decoded coverage proven by the published report, or null when
39
+ * unavailable.
40
+ */
41
+ observed: {
42
+ /** First frame intersecting the request, counted from zero. */
43
+ firstFrame: number;
44
+ /** Frame index just after the final frame intersecting the request. */
45
+ endFrame: number;
46
+ /** Total verified output frames, to clip adjacent context at EOF. */
47
+ frameCount: number;
48
+ /** Native inclusive presentation timestamp of the first frame. */
49
+ start: IAutoMovieDeliveryContentAudit.ITimestamp;
50
+ /** Native exclusive end of the final frame. */
51
+ end: IAutoMovieDeliveryContentAudit.ITimestamp;
52
+ } | null;
53
+ /** A reason when native coverage could not be established. */
54
+ unavailable: string | null;
55
+ /** The single source occurrence or why it could not be assigned. */
56
+ cut: {
57
+ state: "resolved";
58
+ entry: number;
59
+ shot: string;
60
+ } | {
61
+ state: "ambiguous" | "unavailable";
62
+ reason: string;
63
+ };
64
+ /** Production-relative receipt of the earlier mark when explicitly rebound. */
65
+ previous: string | null;
66
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoMovieReviewObservation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAutoMovieReviewObservation.js","sourceRoot":"","sources":["../src/IAutoMovieReviewObservation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * An editable, named subject and the verification criteria used on it. Subject
3
+ * and check identifiers are local to a production, including when the subject
4
+ * is a single model or motion case. The author places the expected behavior and
5
+ * any valid exception in a comment beside each check.
6
+ */
7
+ export interface IAutoMovieVerification {
8
+ /** Stable subject address chosen by the production. */
9
+ readonly id: string;
10
+ /** Checks owned by the subject. Their IDs are unique within it. */
11
+ readonly checks: readonly IAutoMovieVerification.Check[];
12
+ /**
13
+ * The checks the production adopted for each named stage. A required ID stays
14
+ * required when its definition is disabled or removed.
15
+ */
16
+ readonly required?: Readonly<Record<string, readonly string[]>>;
17
+ }
18
+ /** Check inputs and the results derived from current observations. */
19
+ export declare namespace IAutoMovieVerification {
20
+ /** Metadata shared by the supported kinds of observation. */
21
+ interface IBase {
22
+ /** Stable check ID within this subject. */
23
+ readonly id: string;
24
+ /** The expectation shown to the director. */
25
+ readonly title: string;
26
+ /** The inspection scope described to the director. */
27
+ readonly scope: string;
28
+ /** False keeps this definition visible while withholding execution. */
29
+ readonly enabled?: boolean;
30
+ }
31
+ /** A deterministic measurement from the explicitly named input files. */
32
+ export interface IMeasurement extends IBase {
33
+ /** Evaluate through the supplied project code on an explicit run. */
34
+ readonly kind: "measure";
35
+ /** Verify the loaded source graph rooted at this defining module. */
36
+ readonly source?: string;
37
+ /**
38
+ * Project-relative files the computation depends on, including its
39
+ * implementation or data imports and the actual model or motion inputs. Use
40
+ * the smallest complete set for this check. A nested production can name
41
+ * paths to shared files within its Git checkout.
42
+ */
43
+ readonly inputs: readonly string[];
44
+ /** Unit shared by the measurement and its inclusive bounds. */
45
+ readonly unit: string;
46
+ /** Inclusive lower limit, when specified. */
47
+ readonly minimum?: number;
48
+ /** Inclusive upper limit, when specified. */
49
+ readonly maximum?: number;
50
+ /**
51
+ * Read the named inputs and return the observed finite quantity. The
52
+ * callback may read the project directory and must leave its inputs
53
+ * intact.
54
+ */
55
+ readonly measure: (root: string) => number | Promise<number>;
56
+ }
57
+ /** One check on a capture source's settled, drawn observations. */
58
+ export interface ICapture extends IBase {
59
+ /** Read an existing capture or refresh it through the capture command. */
60
+ readonly kind: "capture";
61
+ /** The capture's project-relative record.json, including its round path. */
62
+ readonly record: string;
63
+ /** Capture subject whose declared timeline and evaluated rows apply. */
64
+ readonly subject: string;
65
+ /**
66
+ * Optional capture argv tokens after the subcommand. An explicit run uses
67
+ * them to refresh this record in the normal host.
68
+ */
69
+ readonly capture?: readonly string[];
70
+ /**
71
+ * Project-relative scope inputs whose bytes an explicit refresh seals.
72
+ * Include the module and relevant configuration, assets and dependencies.
73
+ * In a nested production, include shared inputs within the Git checkout and
74
+ * refresh the capture to establish its input identity.
75
+ */
76
+ readonly inputs?: readonly string[];
77
+ /** The capture view requested by the check. */
78
+ readonly view: string;
79
+ /** The capture pass requested by the check. */
80
+ readonly pass: string;
81
+ /** Inspection continuity occurrence the checker reported on. */
82
+ readonly occurrence: string;
83
+ /** Existing diagnostic name and its checker-owned subject identity. */
84
+ readonly diagnostic: {
85
+ readonly check: string;
86
+ readonly key: string;
87
+ };
88
+ /**
89
+ * One sample in subject seconds, or consecutive output frame indices with
90
+ * the end exclusive. A still cannot satisfy a multi-frame range.
91
+ */
92
+ readonly at: {
93
+ readonly second: number;
94
+ } | {
95
+ readonly fromFrame: number;
96
+ readonly endFrame: number;
97
+ };
98
+ }
99
+ /** The published movie and, when required, its control record. */
100
+ export interface IDelivery extends IBase {
101
+ /** Validate the actual movie hash against its latest render report. */
102
+ readonly kind: "delivery";
103
+ /** Render subject recorded in the attempt. */
104
+ readonly subject: string;
105
+ /** Project-relative path of the latest render report. */
106
+ readonly report: string;
107
+ /** Required pass names in the control record beside that report. */
108
+ readonly controls?: readonly string[];
109
+ }
110
+ /** A named person's observation of a specific delivered artifact and range. */
111
+ export interface IReview extends IBase {
112
+ /** Read the existing review observation. */
113
+ readonly kind: "review";
114
+ /** Project-relative path of the review observation. */
115
+ readonly observation: string;
116
+ /** Project-relative path of the exact movie the observation must describe. */
117
+ readonly file: string;
118
+ /** The render subject whose frame clock applies. */
119
+ readonly subject: string;
120
+ /** The activity the reviewer actually reported. */
121
+ readonly viewed: "still" | "playback" | "listening";
122
+ /** Zero-based output frame interval with exclusive end. */
123
+ readonly frames: readonly [from: number, end: number];
124
+ /** A specific source occurrence, when the criterion is tied to one shot. */
125
+ readonly occurrence?: {
126
+ readonly entry: number;
127
+ readonly shot: string;
128
+ };
129
+ }
130
+ /** Facts used to evaluate one authored criterion. */
131
+ export type Check = IMeasurement | ICapture | IDelivery | IReview;
132
+ /** Outcome derived from the current evidence and selection. */
133
+ export interface IResult {
134
+ /** Subject as named in the production definition. */
135
+ readonly target: string;
136
+ /** Check ID within the subject. */
137
+ readonly id: string;
138
+ /** The current director-facing expectation. */
139
+ readonly title: string;
140
+ /** The stated part, view or time scope. */
141
+ readonly scope: string;
142
+ /** The current outcome and why it applies. */
143
+ readonly state: "passed" | "failed" | "not-run" | "unobserved" | "stale" | "disabled" | "awaiting-review";
144
+ /** Observed value or the next action that can establish the result. */
145
+ readonly message: string;
146
+ /** The owning record, clip or receipt, when available. */
147
+ readonly evidence?: string;
148
+ /** Whether the requested stage requires this check. */
149
+ readonly required: boolean;
150
+ }
151
+ /** A scope-specific readout and verdict for a deliberately requested stage. */
152
+ export interface IReport {
153
+ /** The selected subject IDs, in request order. */
154
+ readonly targets: readonly string[];
155
+ /** The requested stage, or null for status alone. */
156
+ readonly requiredStage: string | null;
157
+ /** Every selected check plus any required row omitted from the edit list. */
158
+ readonly items: readonly IResult[];
159
+ /** True only when the requested stage is blocked. */
160
+ readonly blocked: boolean;
161
+ }
162
+ export {};
163
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoMovieVerification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAutoMovieVerification.js","sourceRoot":"","sources":["../src/IAutoMovieVerification.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import type { IAutoMovieDeliveryProfileFinding } from "./IAutoMovieDeliveryProfileFinding";
2
+ /**
3
+ * Check that a transparent render's `.mov` holds the drawn frame files
4
+ * themselves: one video sample per frame, each sample's bytes hashing to its
5
+ * frame file's SHA-256, and no audio track.
6
+ *
7
+ * The samples are located through the video track's sample table (ISO/IEC
8
+ * 14496-12, 8.7): `stsz` gives each size, `stsc` how many samples each chunk
9
+ * holds, and `stco` or `co64` where each chunk starts, samples lying back to
10
+ * back within a chunk. Each sample is read from the file and hashed with
11
+ * SHA-256, then compared with the hash of the frame file at the same index.
12
+ *
13
+ * It returns the findings in the profile-finding form the render report keeps,
14
+ * empty when the file conforms: `track` for an audio track, `sampleCount` for a
15
+ * count other than the frames', `sample[<i>].sha256` for the first sample whose
16
+ * bytes differ, or `probe` when the boxes cannot be read.
17
+ */
18
+ export declare function auditAutoMovieAlphaSamples(props: {
19
+ /** The wrapped `.mov` file. */
20
+ path: string;
21
+ /** The drawn frame files, in frame order. */
22
+ frames: readonly string[];
23
+ }): Promise<IAutoMovieDeliveryProfileFinding[]>;
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.auditAutoMovieAlphaSamples = auditAutoMovieAlphaSamples;
37
+ const node_crypto_1 = require("node:crypto");
38
+ const fs = __importStar(require("node:fs/promises"));
39
+ const AutoMovieMp4Boxes_1 = require("./AutoMovieMp4Boxes");
40
+ /** The box readers the audit walks the movie box with. */
41
+ const { children, field, handler, only } = AutoMovieMp4Boxes_1.AutoMovieMp4Boxes;
42
+ /**
43
+ * Check that a transparent render's `.mov` holds the drawn frame files
44
+ * themselves: one video sample per frame, each sample's bytes hashing to its
45
+ * frame file's SHA-256, and no audio track.
46
+ *
47
+ * The samples are located through the video track's sample table (ISO/IEC
48
+ * 14496-12, 8.7): `stsz` gives each size, `stsc` how many samples each chunk
49
+ * holds, and `stco` or `co64` where each chunk starts, samples lying back to
50
+ * back within a chunk. Each sample is read from the file and hashed with
51
+ * SHA-256, then compared with the hash of the frame file at the same index.
52
+ *
53
+ * It returns the findings in the profile-finding form the render report keeps,
54
+ * empty when the file conforms: `track` for an audio track, `sampleCount` for a
55
+ * count other than the frames', `sample[<i>].sha256` for the first sample whose
56
+ * bytes differ, or `probe` when the boxes cannot be read.
57
+ */
58
+ async function auditAutoMovieAlphaSamples(props) {
59
+ let samples;
60
+ let audio;
61
+ try {
62
+ const file = await AutoMovieMp4Boxes_1.AutoMovieMp4Boxes.read(props.path);
63
+ if (file.movie === undefined)
64
+ throw new Error("missing moov box");
65
+ const movie = file.movie;
66
+ const tracks = children(movie, 0, movie.length).filter((box) => box.type === "trak");
67
+ audio = tracks.some((track) => handler(movie, track) === "soun");
68
+ const videos = tracks.filter((track) => handler(movie, track) === "vide");
69
+ if (videos.length !== 1)
70
+ throw new Error(`${videos.length} video tracks where one is required`);
71
+ samples = sampleTable(movie, videos[0]);
72
+ }
73
+ catch (error) {
74
+ return [
75
+ {
76
+ media: "video",
77
+ field: "probe",
78
+ expected: "a readable sample table",
79
+ observed: error instanceof Error ? error.message : String(error),
80
+ },
81
+ ];
82
+ }
83
+ const findings = [];
84
+ if (audio)
85
+ findings.push({
86
+ media: "audio",
87
+ field: "track",
88
+ expected: "absent",
89
+ observed: "present",
90
+ });
91
+ if (samples.length !== props.frames.length) {
92
+ findings.push({
93
+ media: "video",
94
+ field: "sampleCount",
95
+ expected: String(props.frames.length),
96
+ observed: String(samples.length),
97
+ });
98
+ return findings;
99
+ }
100
+ // Each sample against its frame file, stopping at the first difference.
101
+ const handle = await fs.open(props.path, "r");
102
+ try {
103
+ for (const [index, sample] of samples.entries()) {
104
+ const bytes = Buffer.alloc(sample.size);
105
+ const { bytesRead } = await handle.read(bytes, 0, sample.size, sample.offset);
106
+ const observed = sha256(bytes.subarray(0, bytesRead));
107
+ const expected = sha256(await fs.readFile(props.frames[index]));
108
+ if (observed !== expected) {
109
+ findings.push({
110
+ media: "video",
111
+ field: `sample[${index}].sha256`,
112
+ expected,
113
+ observed,
114
+ });
115
+ break;
116
+ }
117
+ }
118
+ }
119
+ finally {
120
+ await handle.close();
121
+ }
122
+ return findings;
123
+ }
124
+ /**
125
+ * Every sample's file offset and size from a track's `stsz`, `stsc` and `stco`
126
+ * or `co64`.
127
+ */
128
+ function sampleTable(movie, track) {
129
+ const table = only(movie, only(movie, only(movie, track, "mdia"), "minf"), "stbl");
130
+ // Sizes: one shared size, or one per sample.
131
+ const stsz = only(movie, table, "stsz");
132
+ const shared = movie.readUInt32BE(field(stsz, 4, 4));
133
+ const count = movie.readUInt32BE(field(stsz, 8, 4));
134
+ const sizes = Array.from({ length: count }, (_, index) => shared !== 0
135
+ ? shared
136
+ : movie.readUInt32BE(field(stsz, 12 + index * 4, 4)));
137
+ // Chunk offsets, 32- or 64-bit.
138
+ const stco = only(movie, table, "stco", true);
139
+ const co64 = only(movie, table, "co64", true);
140
+ const chunks = [];
141
+ if (stco !== undefined) {
142
+ const entries = movie.readUInt32BE(field(stco, 4, 4));
143
+ for (let index = 0; index < entries; index++)
144
+ chunks.push(movie.readUInt32BE(field(stco, 8 + index * 4, 4)));
145
+ }
146
+ else if (co64 !== undefined) {
147
+ const entries = movie.readUInt32BE(field(co64, 4, 4));
148
+ for (let index = 0; index < entries; index++)
149
+ chunks.push(Number(movie.readBigUInt64BE(field(co64, 8 + index * 8, 8))));
150
+ }
151
+ else
152
+ throw new Error("missing stco or co64 box");
153
+ // Samples per chunk: each `stsc` run applies from its first chunk (1-based)
154
+ // until the next run's.
155
+ const stsc = only(movie, table, "stsc");
156
+ const runs = movie.readUInt32BE(field(stsc, 4, 4));
157
+ const firsts = [];
158
+ const perChunk = [];
159
+ for (let index = 0; index < runs; index++) {
160
+ firsts.push(movie.readUInt32BE(field(stsc, 8 + index * 12, 4)));
161
+ perChunk.push(movie.readUInt32BE(field(stsc, 12 + index * 12, 4)));
162
+ }
163
+ const samples = [];
164
+ let run = 0;
165
+ for (const [chunk, start] of chunks.entries()) {
166
+ while (run + 1 < runs && firsts[run + 1] <= chunk + 1)
167
+ run++;
168
+ let offset = start;
169
+ for (let k = 0; k < (perChunk[run] ?? 0) && samples.length < count; k++) {
170
+ const size = sizes[samples.length];
171
+ samples.push({ offset, size });
172
+ offset += size;
173
+ }
174
+ }
175
+ if (samples.length !== count)
176
+ throw new Error(`the sample table places ${samples.length} of ${count} samples`);
177
+ return samples;
178
+ }
179
+ /** SHA-256 of bytes as 64 lowercase hexadecimal digits. */
180
+ function sha256(bytes) {
181
+ return (0, node_crypto_1.createHash)("sha256").update(bytes).digest("hex");
182
+ }
183
+ //# sourceMappingURL=auditAutoMovieAlphaSamples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auditAutoMovieAlphaSamples.js","sourceRoot":"","sources":["../src/auditAutoMovieAlphaSamples.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AACzC,MAAY,EAAE,6CAAyB;AAEvC,2DAAwD;AAGxD,0DAA0D;AAC1D,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GACtC,qCAAiB,CAAC;AAEpB;;;;;;;;;;;;;;;GAeG;AACI,KAAK,qCAAqC,KAMhD;IACC,IAAI,OAA2C,CAAC;IAChD,IAAI,KAAc,CAAC;IACnB,IAAI,CAAC;QACH,MAAM,IAAI,GAA4B,MAAM,qCAAiB,CAAC,IAAI,CAChE,KAAK,CAAC,IAAI,CACX,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAClE,MAAM,KAAK,GAAW,IAAI,CAAC,KAAK,CAAC;QACjC,MAAM,MAAM,GAA6B,QAAQ,CAC/C,KAAK,EACL,CAAC,EACD,KAAK,CAAC,MAAM,CACb,CAAC,MA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IACrE,CAAC;IACD,MAAM,OAAO,GAAuC,EAAE,CAAC;IACvD,IAAI,GAAG,GAAW,CAAC,CAAC;IACpB,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;QAC9C,OAAO,GAAG,GAAG,CAAC,GAAG,IAAI,IAAI,MAAM,CAAC,GAAG,GAAG,CAAC,CAAE,IAAI,KAAK,GAAG,CAAC;YAAE,GAAG,EAAE,CAAC;QAC9D,IAAI,MAAM,GAAW,KAAK,CAAC;QAC3B,KACE,IAAI,CAAC,GAAW,CAAC,EACjB,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,KAAK,EAClD,CAAC,EAAE,EACH,CAAC;YACD,MAAM,IAAI,GAAW,KAAK,CAAC,OAAO,CAAC,MAAM,CAAE,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/B,MAAM,IAAI,IAAI,CAAC;QACjB,CAAC;IACH,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK;QAC1B,MAAM,IAAI,KAAK,CACb,2BAA2B,OAAO,CAAC,MAAM,OAAO,KAAK,UAAU,CAChE,CAAC;IACJ,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,2DAA2D;AAC3D,SAAS,MAAM,CAAC,KAAiB;IAC/B,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type * as Render from "@automovie/render";
2
+ import type { IAutoMovieDeliveryProfileFinding } from "./IAutoMovieDeliveryProfileFinding";
3
+ /**
4
+ * Check an encoded delivery file against the profiles it must carry, before it
5
+ * is published.
6
+ *
7
+ * The file's boxes are read with `readAutoMovieDeliveryProbe`. The video track
8
+ * is asserted against `resolveProductionVideoProfile` of the subject's raster
9
+ * and the planned exact frame rate. With a soundtrack, the audio track is
10
+ * asserted against the AAC profile; without one, the file must hold no audio
11
+ * track, as the encoder's `-an` intends. Each asserter stops at its first
12
+ * difference, so the result holds at most one finding per track; a file whose
13
+ * boxes cannot be read gives one `probe` finding. The asserters and the sRGB
14
+ * code points come from the production's own `render`, so the check is the one
15
+ * the production's package defines.
16
+ *
17
+ * @param props.render The production's render package.
18
+ * @param props.path The encoded candidate.
19
+ * @param props.width The subject's raster width, pixels.
20
+ * @param props.height The subject's raster height, pixels.
21
+ * @param props.frameRate The planned exact frame rate, `[numerator,
22
+ * denominator]` frames per second.
23
+ * @param props.audio Whether the encoder muxed a soundtrack.
24
+ * @returns The findings, empty when the file conforms.
25
+ */
26
+ export declare function auditAutoMovieDeliveryProfile(props: {
27
+ render: Pick<typeof Render, "AUTOMOVIE_MP4_SRGB_COLOUR" | "assertProductionAacProfile" | "assertProductionVideoProfile" | "resolveProductionVideoProfile">;
28
+ path: string;
29
+ width: number;
30
+ height: number;
31
+ frameRate: readonly [number, number];
32
+ audio: boolean;
33
+ }): Promise<IAutoMovieDeliveryProfileFinding[]>;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.auditAutoMovieDeliveryProfile = auditAutoMovieDeliveryProfile;
4
+ const readAutoMovieDeliveryProbe_1 = require("./readAutoMovieDeliveryProbe");
5
+ /** The documented refusal form of both profile asserters. */
6
+ const REFUSAL = /^unsupported-(video|audio)-profile\.([^:]+): expected ([\s\S]*), observed ([\s\S]*)\.$/u;
7
+ /**
8
+ * Check an encoded delivery file against the profiles it must carry, before it
9
+ * is published.
10
+ *
11
+ * The file's boxes are read with `readAutoMovieDeliveryProbe`. The video track
12
+ * is asserted against `resolveProductionVideoProfile` of the subject's raster
13
+ * and the planned exact frame rate. With a soundtrack, the audio track is
14
+ * asserted against the AAC profile; without one, the file must hold no audio
15
+ * track, as the encoder's `-an` intends. Each asserter stops at its first
16
+ * difference, so the result holds at most one finding per track; a file whose
17
+ * boxes cannot be read gives one `probe` finding. The asserters and the sRGB
18
+ * code points come from the production's own `render`, so the check is the one
19
+ * the production's package defines.
20
+ *
21
+ * @param props.render The production's render package.
22
+ * @param props.path The encoded candidate.
23
+ * @param props.width The subject's raster width, pixels.
24
+ * @param props.height The subject's raster height, pixels.
25
+ * @param props.frameRate The planned exact frame rate, `[numerator,
26
+ * denominator]` frames per second.
27
+ * @param props.audio Whether the encoder muxed a soundtrack.
28
+ * @returns The findings, empty when the file conforms.
29
+ */
30
+ async function auditAutoMovieDeliveryProfile(props) {
31
+ let probe;
32
+ try {
33
+ probe = await (0, readAutoMovieDeliveryProbe_1.readAutoMovieDeliveryProbe)(props.path, props.render.AUTOMOVIE_MP4_SRGB_COLOUR);
34
+ }
35
+ catch (error) {
36
+ return [
37
+ {
38
+ media: "video",
39
+ field: "probe",
40
+ expected: "a readable MP4 file",
41
+ observed: error instanceof Error ? error.message : String(error),
42
+ },
43
+ ];
44
+ }
45
+ const findings = [];
46
+ const check = (media, task) => {
47
+ try {
48
+ task();
49
+ }
50
+ catch (error) {
51
+ const message = error instanceof Error ? error.message : String(error);
52
+ const parts = REFUSAL.exec(message);
53
+ findings.push(parts === null
54
+ ? { media, field: "probe", expected: "a check", observed: message }
55
+ : {
56
+ media,
57
+ field: parts[2],
58
+ expected: parts[3],
59
+ observed: parts[4],
60
+ });
61
+ }
62
+ };
63
+ check("video", () => props.render.assertProductionVideoProfile({
64
+ expected: props.render.resolveProductionVideoProfile({
65
+ width: props.width,
66
+ height: props.height,
67
+ frameRate: {
68
+ numerator: props.frameRate[0],
69
+ denominator: props.frameRate[1],
70
+ },
71
+ }),
72
+ actual: probe.video,
73
+ }));
74
+ const audio = probe.audio;
75
+ if (props.audio && audio === null)
76
+ findings.push({
77
+ media: "audio",
78
+ field: "track",
79
+ expected: "one audio track",
80
+ observed: "none",
81
+ });
82
+ else if (!props.audio && audio !== null)
83
+ findings.push({
84
+ media: "audio",
85
+ field: "track",
86
+ expected: "no audio track",
87
+ observed: audio.codec,
88
+ });
89
+ else if (audio !== null)
90
+ check("audio", () => props.render.assertProductionAacProfile(audio));
91
+ return findings;
92
+ }
93
+ //# sourceMappingURL=auditAutoMovieDeliveryProfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auditAutoMovieDeliveryProfile.js","sourceRoot":"","sources":["../src/auditAutoMovieDeliveryProfile.ts"],"names":[],"mappings":";;;AAOA,6EAA0E;AAE1E,6DAA6D;AAC7D,MAAM,OAAO,GACX,yFAAyF,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACI,KAAK,wCAAwC,KAanD;IACC,IAAI,KAGH,CAAC;IACF,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,IAAA,uDAA0B,EACtC,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,MAAM,CAAC,yBAAyB,CACvC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL;gBACE,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,qBAAqB;gBAC/B,QAAQ,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aACjE;SACF,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAuC,EAAE,CAAC;IACxD,MAAM,KAAK,GAAyD,CAClE,KAAwB,EACxB,IAAgB,EACV,EAAE;QACR,IAAI,CAAC;YACH,IAAI,EAAE,CAAC;QACT,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GACX,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACzD,MAAM,KAAK,GAA2B,OA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AAE,gBAAgB;YAC1B,QAAQ,EAAE,KAAK,CAAC,KAAK;SACtB,CAAC,CAAC;SACA,IAAI,KAAK,KAAK,IAAI;QACrB,KAAK,CAAC,OAAO,EAAE,GAAS,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,17 +1,23 @@
1
1
  /**
2
- * Run `automovie capture` in a production: read the options through the request grammar, capture a subject drawn by the draw page or a video file's own frames, print what was written, and resolve to the exit status.
2
+ * Run `automovie capture` in a production: read the options through the request
3
+ * grammar, capture a subject drawn by the draw page or a video file's own
4
+ * frames, print what was written, and resolve to the exit status.
3
5
  *
4
- * Options are read by `readAutoMovieCaptureArguments` and split by `readAutoMovieCaptureHostOptions`; the rest is the request `parseAutoMovieCapturePlanRequest` reads, so the command takes exactly the keys of a page's address. With `--module` the subject is drawn through `AutoMovieCaptureHost`, its module called with the JSON of `--props` when given; with `--file` the file is probed by FFmpeg and captured by `runAutoMovieVideoCapture`, its subject named by `subject` or the file's name. Both write into `--out`, or `media/capture/<subject>`.
6
+ * Options are read by `readAutoMovieCaptureArguments` and split by
7
+ * `readAutoMovieCaptureHostOptions`; the rest is the request
8
+ * `parseAutoMovieCapturePlanRequest` reads, so the command takes exactly the
9
+ * keys of a page's address. With `--module` the subject is drawn through
10
+ * `AutoMovieCaptureHost`, its module called with the JSON of `--props` when
11
+ * given; with `--file` the file is probed by FFmpeg and captured by
12
+ * `runAutoMovieVideoCapture`, its subject named by `subject` or the file's
13
+ * name. Both write into `--out`, or `media/capture/<subject>`.
5
14
  *
6
- * It prints the folder and how many cells were drawn, the backend, every sheet, every cell not drawn with its cause, and each unmatched or changed comparison entry. The status is 1 when any cell was not drawn, because an undrawn cell is unverified evidence, and 0 otherwise; a refusal throws to `run`, which prints it.
7
- *
8
- * @evidence contracts/development/common.md#meaningful-documentation States how options are read and split, both sources, where they write, what is printed, and the exit status with its reason.
9
- * @evidence contracts/development/implementation.md#principled-implementation Every rule of a capture is the render package's; the command loads that package from the production, supplies the browser or FFmpeg, and reports.
10
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Read, then one branch per source, then one report.
11
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An unknown option is refused by the request reader instead of ignored, and FFmpeg is resolved only for a video so a drawn capture never needs it.
12
- * @evidence contracts/development/implementation.md#efficient-algorithms One host or two FFmpeg runs plus the probe; printing is linear in the record.
13
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work One capture per command.
14
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The host is closed on every outcome.
15
+ * It prints the folder and how many cells were drawn, the backend, every sheet,
16
+ * every cell not drawn with its cause, each unmatched or changed comparison
17
+ * entry, and the comparison's finding outcome with each fixed, new, worse or
18
+ * unmatched finding. The finding outcome does not change the status: the status
19
+ * is 1 when any cell was not drawn, because an undrawn cell is unverified
20
+ * evidence, and 0 otherwise; a refusal throws to `run`, which prints it.
15
21
  */
16
22
  export declare function captureAutoMovie(props: {
17
23
  /** The tokens after `capture`. */
@@ -20,4 +26,10 @@ export declare function captureAutoMovie(props: {
20
26
  root: string;
21
27
  /** The environment, read for `CHROME_PATH` and `FFMPEG_PATH`. */
22
28
  env: Readonly<Record<string, string | undefined>>;
29
+ /** The caller's output sink, default standard output. */
30
+ write?: (text: string) => void;
31
+ /** The absolute record path verification expects this capture to write. */
32
+ expectedRecord?: string;
33
+ /** Receives the absolute path of this attempt's completed capture record. */
34
+ recorded?: (file: string, text: string) => void;
23
35
  }): Promise<number>;