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,78 @@
1
+ /**
2
+ * Reading ISO/IEC 14496-12 (ISO base media) boxes from an MP4 file: the
3
+ * top-level file-type and movie boxes, then child boxes and their fields inside
4
+ * the movie box's bytes.
5
+ *
6
+ * Every reader refuses, by throwing an `Error` that names the box, a header
7
+ * that overruns its parent, a field past its box's end and, where one box is
8
+ * required, its absence or repetition. Offsets are bytes within the buffer the
9
+ * caller holds; nothing reads the media data.
10
+ */
11
+ export declare namespace AutoMovieMp4Boxes {
12
+ /** One box's type and payload range in its buffer. */
13
+ interface IBox {
14
+ /** The four-character box type. */
15
+ type: string;
16
+ /** First payload byte, after the header. */
17
+ start: number;
18
+ /** One past the last payload byte. */
19
+ end: number;
20
+ }
21
+ /** The two top-level boxes a delivery probe reads, as their payload bytes. */
22
+ interface IFile {
23
+ /** The `ftyp` payload, or `undefined` when the file has none. */
24
+ fileType: Buffer | undefined;
25
+ /** The `moov` payload, or `undefined` when the file has none. */
26
+ movie: Buffer | undefined;
27
+ }
28
+ /**
29
+ * Read the payloads of the top-level `ftyp` and `moov` boxes by walking the
30
+ * box headers, never the media data.
31
+ *
32
+ * @param path The MP4 file.
33
+ * @returns Each payload, or `undefined` when that box is absent.
34
+ */
35
+ function read(path: string): Promise<IFile>;
36
+ /** List the child boxes inside a payload range. */
37
+ function children(buffer: Buffer, start: number, end: number): IBox[];
38
+ /**
39
+ * Select the one optional child of a type, refusing repetition; `undefined`
40
+ * when it is absent.
41
+ */
42
+ function only(buffer: Buffer, parent: IBox, type: string, optional: true): IBox | undefined;
43
+ /** Select the one required child of a type, refusing absence and repetition. */
44
+ function only(buffer: Buffer, parent: IBox, type: string): IBox;
45
+ /** The absolute offset of a field, refusing one past the end of its box. */
46
+ function field(box: IBox, offset: number, bytes: number): number;
47
+ /**
48
+ * The timescale and duration of a movie, track or media header, version 0
49
+ * (32-bit times) or 1 (64-bit times). `mvhd` and `mdhd` store the timescale
50
+ * before the duration; `tkhd` stores a track id and a reserved word there and
51
+ * no timescale, so its timescale is reported as 0.
52
+ */
53
+ function clock(buffer: Buffer, box: IBox): {
54
+ timescale: number;
55
+ duration: bigint;
56
+ };
57
+ /**
58
+ * One `elst` entry: a presentation segment in movie ticks from a media time
59
+ * in media ticks, at a 16.16 rate.
60
+ */
61
+ interface IEdit {
62
+ /** Segment length in movie ticks. */
63
+ segmentDuration: bigint;
64
+ /** Media start in media ticks; minus one is an empty edit. */
65
+ mediaTime: bigint;
66
+ /** Integer part of the rate. */
67
+ mediaRateInteger: number;
68
+ /** Fractional part of the rate. */
69
+ mediaRateFraction: number;
70
+ }
71
+ /**
72
+ * A track's edit list in resident order, empty when the track has no `edts`
73
+ * box.
74
+ */
75
+ function edits(buffer: Buffer, track: IBox): IEdit[];
76
+ /** The handler type of a track (`vide`, `soun`, ...). */
77
+ function handler(buffer: Buffer, track: IBox): string;
78
+ }
@@ -0,0 +1,227 @@
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.AutoMovieMp4Boxes = void 0;
37
+ const fs = __importStar(require("node:fs/promises"));
38
+ /**
39
+ * Reading ISO/IEC 14496-12 (ISO base media) boxes from an MP4 file: the
40
+ * top-level file-type and movie boxes, then child boxes and their fields inside
41
+ * the movie box's bytes.
42
+ *
43
+ * Every reader refuses, by throwing an `Error` that names the box, a header
44
+ * that overruns its parent, a field past its box's end and, where one box is
45
+ * required, its absence or repetition. Offsets are bytes within the buffer the
46
+ * caller holds; nothing reads the media data.
47
+ */
48
+ var AutoMovieMp4Boxes;
49
+ (function (AutoMovieMp4Boxes) {
50
+ /**
51
+ * Largest top-level box read into memory; a sample table beyond it is
52
+ * refused.
53
+ */
54
+ const MAXIMUM_BOX = 64 * 1024 * 1024;
55
+ /**
56
+ * Read the payloads of the top-level `ftyp` and `moov` boxes by walking the
57
+ * box headers, never the media data.
58
+ *
59
+ * @param path The MP4 file.
60
+ * @returns Each payload, or `undefined` when that box is absent.
61
+ */
62
+ async function read(path) {
63
+ const handle = await fs.open(path, "r");
64
+ try {
65
+ const { size } = await handle.stat();
66
+ const header = Buffer.alloc(16);
67
+ const found = { fileType: undefined, movie: undefined };
68
+ for (let offset = 0; offset + 8 <= size;) {
69
+ const available = Math.min(16, size - offset);
70
+ await readExactly(handle, header, available, offset);
71
+ const box = boxHeader(header.subarray(0, available), size - offset);
72
+ if (box.type === "ftyp" || box.type === "moov") {
73
+ const length = box.end - box.start;
74
+ if (length > MAXIMUM_BOX)
75
+ throw new Error("the " + box.type + " box exceeds 64 MiB");
76
+ const payload = Buffer.alloc(length);
77
+ await readExactly(handle, payload, length, offset + box.start);
78
+ if (box.type === "ftyp")
79
+ found.fileType = payload;
80
+ else
81
+ found.movie = payload;
82
+ }
83
+ offset += box.end;
84
+ }
85
+ return found;
86
+ }
87
+ finally {
88
+ await handle.close();
89
+ }
90
+ }
91
+ AutoMovieMp4Boxes.read = read;
92
+ /**
93
+ * Decode one box header given the bytes available after its first byte: a
94
+ * 32-bit size, a 64-bit size when the 32-bit one is 1, or the rest of the
95
+ * parent when it is 0.
96
+ */
97
+ function boxHeader(bytes, available) {
98
+ if (bytes.length < 8)
99
+ throw new Error("a box header is truncated");
100
+ const type = bytes.toString("latin1", 4, 8);
101
+ let length = bytes.readUInt32BE(0);
102
+ let start = 8;
103
+ if (length === 1) {
104
+ if (bytes.length < 16)
105
+ throw new Error("a large box header is truncated");
106
+ const large = bytes.readBigUInt64BE(8);
107
+ if (large > BigInt(Number.MAX_SAFE_INTEGER))
108
+ throw new Error("a box is too large");
109
+ length = Number(large);
110
+ start = 16;
111
+ }
112
+ else if (length === 0)
113
+ length = available;
114
+ if (length < start || length > available)
115
+ throw new Error("the " + type + " box overruns its parent");
116
+ return { type, start, end: length };
117
+ }
118
+ /** List the child boxes inside a payload range. */
119
+ function children(buffer, start, end) {
120
+ const boxes = [];
121
+ for (let offset = start; offset < end;) {
122
+ const box = boxHeader(buffer.subarray(offset, Math.min(end, offset + 16)), end - offset);
123
+ boxes.push({
124
+ type: box.type,
125
+ start: offset + box.start,
126
+ end: offset + box.end,
127
+ });
128
+ offset += box.end;
129
+ }
130
+ return boxes;
131
+ }
132
+ AutoMovieMp4Boxes.children = children;
133
+ /**
134
+ * Select the one child of a type, refusing repetition, and absence unless
135
+ * optional.
136
+ */
137
+ function only(buffer, parent, type, optional) {
138
+ const found = children(buffer, parent.start, parent.end).filter((box) => box.type === type);
139
+ if (found.length > 1)
140
+ throw new Error("repeated " + type + " box");
141
+ if (found[0] === undefined && optional !== true)
142
+ throw new Error("missing " + type + " box");
143
+ return found[0];
144
+ }
145
+ AutoMovieMp4Boxes.only = only;
146
+ /** The absolute offset of a field, refusing one past the end of its box. */
147
+ function field(box, offset, bytes) {
148
+ const at = box.start + offset;
149
+ if (at + bytes > box.end)
150
+ throw new Error("the " + box.type + " box is short");
151
+ return at;
152
+ }
153
+ AutoMovieMp4Boxes.field = field;
154
+ /**
155
+ * The timescale and duration of a movie, track or media header, version 0
156
+ * (32-bit times) or 1 (64-bit times). `mvhd` and `mdhd` store the timescale
157
+ * before the duration; `tkhd` stores a track id and a reserved word there and
158
+ * no timescale, so its timescale is reported as 0.
159
+ */
160
+ function clock(buffer, box) {
161
+ const version = buffer[field(box, 0, 1)];
162
+ const wide = version === 1;
163
+ if (box.type === "tkhd")
164
+ return {
165
+ timescale: 0,
166
+ duration: wide
167
+ ? buffer.readBigUInt64BE(field(box, 28, 8))
168
+ : BigInt(buffer.readUInt32BE(field(box, 20, 4))),
169
+ };
170
+ const timescale = buffer.readUInt32BE(field(box, wide ? 20 : 12, 4));
171
+ if (timescale === 0)
172
+ throw new Error("a zero " + box.type + " timescale");
173
+ return {
174
+ timescale,
175
+ duration: wide
176
+ ? buffer.readBigUInt64BE(field(box, 24, 8))
177
+ : BigInt(buffer.readUInt32BE(field(box, 16, 4))),
178
+ };
179
+ }
180
+ AutoMovieMp4Boxes.clock = clock;
181
+ /**
182
+ * A track's edit list in resident order, empty when the track has no `edts`
183
+ * box.
184
+ */
185
+ function edits(buffer, track) {
186
+ const container = only(buffer, track, "edts", true);
187
+ if (container === undefined)
188
+ return [];
189
+ const list = only(buffer, container, "elst");
190
+ const wide = buffer[field(list, 0, 1)] === 1;
191
+ const count = buffer.readUInt32BE(field(list, 4, 4));
192
+ const size = wide ? 20 : 12;
193
+ const entries = [];
194
+ for (let entry = 0; entry < count; ++entry) {
195
+ const at = field(list, 8 + entry * size, size);
196
+ const rate = at + (wide ? 16 : 8);
197
+ entries.push({
198
+ segmentDuration: wide
199
+ ? buffer.readBigUInt64BE(at)
200
+ : BigInt(buffer.readUInt32BE(at)),
201
+ mediaTime: wide
202
+ ? buffer.readBigInt64BE(at + 8)
203
+ : BigInt(buffer.readInt32BE(at + 4)),
204
+ mediaRateInteger: buffer.readInt16BE(rate),
205
+ mediaRateFraction: buffer.readInt16BE(rate + 2),
206
+ });
207
+ }
208
+ return entries;
209
+ }
210
+ AutoMovieMp4Boxes.edits = edits;
211
+ /** The handler type of a track (`vide`, `soun`, ...). */
212
+ function handler(buffer, track) {
213
+ const box = only(buffer, only(buffer, track, "mdia"), "hdlr");
214
+ return buffer.toString("latin1", field(box, 8, 4), box.start + 12);
215
+ }
216
+ AutoMovieMp4Boxes.handler = handler;
217
+ /** Fill the buffer from a file position, refusing a short file. */
218
+ async function readExactly(handle, buffer, length, position) {
219
+ for (let filled = 0; filled < length;) {
220
+ const { bytesRead } = await handle.read(buffer, filled, length - filled, position + filled);
221
+ if (bytesRead === 0)
222
+ throw new Error("the file ended inside a box");
223
+ filled += bytesRead;
224
+ }
225
+ }
226
+ })(AutoMovieMp4Boxes || (exports.AutoMovieMp4Boxes = AutoMovieMp4Boxes = {}));
227
+ //# sourceMappingURL=AutoMovieMp4Boxes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoMovieMp4Boxes.js","sourceRoot":"","sources":["../src/AutoMovieMp4Boxes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,EAAE,6CAAyB;AAEvC;;;;;;;;;GASG;AACH,IAAiB,iBAAiB,CAyPjC;AAzPD,WAAiB,iBAAiB;IAsBhC;;;OAGG;IACH,MAAM,WAAW,GAAW,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;IAE7C;;;;;;OAMG;IACI,KAAK,UAAU,IAAI,CAAC,IAAY;QACrC,MAA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,MAAM,GAAG,MAAM,EACf,QAAQ,GAAG,MAAM,CAClB,CAAC;YACF,IAAI,SAAS,KAAK,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;YACpE,MAAM,IAAI,SAAS,CAAC;QACtB,CAAC;IACH,CAAC;AACH,CAAC,EAzPgB,iBAAiB,aAAjB,iBAAiB,GAAjB,iBAAiB,QAyPjC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The publish lock of one render output folder: a `.render-publish` directory
3
+ * holding exactly one process ticket, installed by an atomic rename, so two
4
+ * renders never publish into one folder at once.
5
+ *
6
+ * A reservation left by a process the operating system confirms is gone is
7
+ * reclaimed; a live or unreadable owner refuses the second render.
8
+ */
9
+ export declare class AutoMovieRenderOutputReservation {
10
+ /** Claims a destination with an atomically installed process ticket. */
11
+ static reserve(staging: string, reservation: string, out: string): Promise<string>;
12
+ /** Removes the exact process ticket and only an empty reservation directory. */
13
+ static release(reservation: string, ticket: string): Promise<void>;
14
+ /** Treats a process as gone only when the operating system confirms it. */
15
+ private static processAlive;
16
+ /** A later invocation may already have installed its own ticket. */
17
+ private static removeEmpty;
18
+ }
@@ -0,0 +1,118 @@
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.AutoMovieRenderOutputReservation = void 0;
37
+ const fs = __importStar(require("node:fs/promises"));
38
+ const path = __importStar(require("node:path"));
39
+ const readAutoMovieErrorCode_1 = require("./readAutoMovieErrorCode");
40
+ /**
41
+ * The publish lock of one render output folder: a `.render-publish` directory
42
+ * holding exactly one process ticket, installed by an atomic rename, so two
43
+ * renders never publish into one folder at once.
44
+ *
45
+ * A reservation left by a process the operating system confirms is gone is
46
+ * reclaimed; a live or unreadable owner refuses the second render.
47
+ */
48
+ class AutoMovieRenderOutputReservation {
49
+ /** Claims a destination with an atomically installed process ticket. */
50
+ static async reserve(staging, reservation, out) {
51
+ const pending = path.join(staging, "reservation");
52
+ const ticket = "owner-" + process.pid + "-" + path.basename(staging);
53
+ await fs.mkdir(pending);
54
+ await fs.writeFile(path.join(pending, ticket), "");
55
+ // Bound the number of races with another failed or completing reservation.
56
+ for (let pass = 0; pass < 4; pass++) {
57
+ try {
58
+ await fs.rename(pending, reservation);
59
+ return ticket;
60
+ }
61
+ catch (cause) {
62
+ const entries = await fs
63
+ .readdir(reservation)
64
+ .catch((error) => {
65
+ if ((0, readAutoMovieErrorCode_1.readAutoMovieErrorCode)(error) !== "ENOENT")
66
+ throw cause;
67
+ return [];
68
+ });
69
+ const owner = entries.length === 1 ? entries[0] : undefined;
70
+ const pid = Number(/^owner-(\d+)-\.render-[a-z0-9]+$/iu.exec(owner ?? "")?.[1]);
71
+ if (entries.length !== 0 &&
72
+ (!Number.isSafeInteger(pid) ||
73
+ pid < 1 ||
74
+ AutoMovieRenderOutputReservation.processAlive(pid)))
75
+ throw new Error("Another render has reserved " + out, { cause });
76
+ if (owner !== undefined)
77
+ await AutoMovieRenderOutputReservation.release(reservation, owner);
78
+ else
79
+ await AutoMovieRenderOutputReservation.removeEmpty(reservation);
80
+ }
81
+ }
82
+ throw new Error("Could not reserve " +
83
+ out +
84
+ " while another render changed its reservation");
85
+ }
86
+ /** Removes the exact process ticket and only an empty reservation directory. */
87
+ static async release(reservation, ticket) {
88
+ await fs
89
+ .unlink(path.join(reservation, ticket))
90
+ .catch((error) => {
91
+ if ((0, readAutoMovieErrorCode_1.readAutoMovieErrorCode)(error) !== "ENOENT")
92
+ throw error;
93
+ });
94
+ await AutoMovieRenderOutputReservation.removeEmpty(reservation);
95
+ }
96
+ /** Treats a process as gone only when the operating system confirms it. */
97
+ static processAlive(pid) {
98
+ try {
99
+ process.kill(pid, 0);
100
+ return true;
101
+ }
102
+ catch (cause) {
103
+ return !(cause instanceof Error &&
104
+ "code" in cause &&
105
+ cause.code === "ESRCH");
106
+ }
107
+ }
108
+ /** A later invocation may already have installed its own ticket. */
109
+ static async removeEmpty(reservation) {
110
+ await fs.rmdir(reservation).catch((error) => {
111
+ const code = (0, readAutoMovieErrorCode_1.readAutoMovieErrorCode)(error);
112
+ if (code !== "ENOENT" && code !== "ENOTEMPTY" && code !== "EEXIST")
113
+ throw error;
114
+ });
115
+ }
116
+ }
117
+ exports.AutoMovieRenderOutputReservation = AutoMovieRenderOutputReservation;
118
+ //# sourceMappingURL=AutoMovieRenderOutputReservation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoMovieRenderOutputReservation.js","sourceRoot":"","sources":["../src/AutoMovieRenderOutputReservation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,EAAE,6CAAyB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OAAO,CACvB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,oEAAoE;IAC5D,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,WAAmB;QAClD,MAAM,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAQ,EAAE;YACzD,MAAM,IAAI,GAAY,IAAA,+CAAsB,EAAC,KAAK,CAAC,CAAC;YACpD,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,QAAQ;gBAChE,MAAM,KAAK,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,23 +1,13 @@
1
1
  import type { IAutoMovieDrawPage } from "@automovie/render";
2
2
  /**
3
- * The part of `playwright-core`'s `chromium` the capture host calls, declared structurally so the command loads the production's own Playwright at run time and a test passes a double.
4
- *
5
- * @evidence contracts/development/design.md#principled-representation Playwright's own call shapes: launch with switches, then pages and a version from the browser.
6
- * @evidence contracts/development/design.md#minimal-and-owned-surface Exactly what `launchAutoMovieChromium` and the capture host call; the page is the draw session's structural page.
7
- * @evidence contracts/development/design.md#prohibited-design-shortcuts No Playwright type is imported, so the command compiles and installs without Playwright, which is an optional peer.
8
- * @evidence contracts/development/common.md#meaningful-documentation States who satisfies it and why it is structural.
3
+ * The part of `playwright-core`'s `chromium` the capture host calls, declared
4
+ * structurally so the command loads the production's own Playwright at run time
5
+ * and a test passes a double.
9
6
  */
10
7
  export interface IAutoMovieChromium {
11
8
  /**
12
- * Start a headless browser with the given switches, from `executablePath` when given.
13
- *
14
- * @evidence contracts/development/common.md#meaningful-documentation States what is started and from where.
15
- * @evidenceExclude contracts/development/implementation.md#principled-implementation A signature has no body; Playwright answers.
16
- * @evidenceExclude contracts/development/implementation.md#clear-and-simple-structure A signature has no body; Playwright answers.
17
- * @evidenceExclude contracts/development/implementation.md#prohibited-implementation-shortcuts A signature has no body; Playwright answers.
18
- * @evidenceExclude contracts/development/implementation.md#efficient-algorithms A signature has no body; Playwright answers.
19
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A signature has no body; Playwright answers.
20
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources A signature has no body; Playwright answers.
9
+ * Start a headless browser with the given switches, from `executablePath`
10
+ * when given.
21
11
  */
22
12
  launch(options: {
23
13
  headless: true;
@@ -26,40 +16,16 @@ export interface IAutoMovieChromium {
26
16
  }): Promise<IAutoMovieChromium.IBrowser>;
27
17
  }
28
18
  export declare namespace IAutoMovieChromium {
29
- /**
30
- * A launched browser: its version, its pages, and its end.
31
- *
32
- * @evidence contracts/development/design.md#principled-representation Playwright's `Browser` call shapes.
33
- * @evidence contracts/development/design.md#minimal-and-owned-surface The three calls the host makes.
34
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Structural, as its parent.
35
- * @evidence contracts/development/common.md#meaningful-documentation States what it is.
36
- */
19
+ /** A launched browser: its version, its pages, and its end. */
37
20
  interface IBrowser {
38
- /**
39
- * The browser's version, such as `131.0.6778.33`.
40
- *
41
- * @evidence contracts/development/common.md#meaningful-documentation States what is returned.
42
- * @evidenceExclude contracts/development/implementation.md#principled-implementation A signature has no body; Playwright answers.
43
- * @evidenceExclude contracts/development/implementation.md#clear-and-simple-structure A signature has no body; Playwright answers.
44
- * @evidenceExclude contracts/development/implementation.md#prohibited-implementation-shortcuts A signature has no body; Playwright answers.
45
- * @evidenceExclude contracts/development/implementation.md#efficient-algorithms A signature has no body; Playwright answers.
46
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A signature has no body; Playwright answers.
47
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources A signature has no body; Playwright answers.
48
- */
21
+ /** The browser's version, such as `131.0.6778.33`. */
49
22
  version(): string;
50
- /**
51
- * Open a fresh page.
52
- *
53
- * @evidence contracts/development/common.md#meaningful-documentation States the effect.
54
- * @evidenceExclude contracts/development/implementation.md#principled-implementation A signature has no body; Playwright answers.
55
- * @evidenceExclude contracts/development/implementation.md#clear-and-simple-structure A signature has no body; Playwright answers.
56
- * @evidenceExclude contracts/development/implementation.md#prohibited-implementation-shortcuts A signature has no body; Playwright answers.
57
- * @evidenceExclude contracts/development/implementation.md#efficient-algorithms A signature has no body; Playwright answers.
58
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A signature has no body; Playwright answers.
59
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources A signature has no body; Playwright answers.
60
- */
23
+ /** Open a fresh page. */
61
24
  newPage(): Promise<IAutoMovieDrawPage & {
62
- /** Optional browser diagnostics; portable draw-only drivers need not emit browser events. */
25
+ /**
26
+ * Optional browser diagnostics; portable draw-only drivers need not
27
+ * emit browser events.
28
+ */
63
29
  on?: {
64
30
  (event: "pageerror", listener: (error: Error) => void): unknown;
65
31
  (event: "console", listener: (message: {
@@ -68,17 +34,7 @@ export declare namespace IAutoMovieChromium {
68
34
  }) => void): unknown;
69
35
  };
70
36
  }>;
71
- /**
72
- * End the browser and every page it holds.
73
- *
74
- * @evidence contracts/development/common.md#meaningful-documentation States the effect.
75
- * @evidenceExclude contracts/development/implementation.md#principled-implementation A signature has no body; Playwright answers.
76
- * @evidenceExclude contracts/development/implementation.md#clear-and-simple-structure A signature has no body; Playwright answers.
77
- * @evidenceExclude contracts/development/implementation.md#prohibited-implementation-shortcuts A signature has no body; Playwright answers.
78
- * @evidenceExclude contracts/development/implementation.md#efficient-algorithms A signature has no body; Playwright answers.
79
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A signature has no body; Playwright answers.
80
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources A signature has no body; Playwright answers.
81
- */
37
+ /** End the browser and every page it holds. */
82
38
  close(): Promise<void>;
83
39
  }
84
40
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The presented span of one MP4 audio track in its own media clock, or why the
3
+ * container does not establish it.
4
+ */
5
+ export type IAutoMovieDeliveryAudioTrack = {
6
+ /** The container establishes the presented span. */
7
+ status: "read";
8
+ /** Media ticks per second, which for audio is the sample rate. */
9
+ timescale: number;
10
+ /** Presented media ticks after the edit list and sample table are applied. */
11
+ duration: number;
12
+ } | {
13
+ /** The container does not establish the presented span. */
14
+ status: "uncovered";
15
+ /** What was missing, unsupported or unreadable. */
16
+ reason: string;
17
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoMovieDeliveryAudioTrack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAutoMovieDeliveryAudioTrack.js","sourceRoot":"","sources":["../src/IAutoMovieDeliveryAudioTrack.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * One way an encoded delivery file differs from the profile it must carry, as
3
+ * `auditAutoMovieDeliveryProfile` records it in the render report.
4
+ *
5
+ * `field` is the profile field the asserter names after
6
+ * `unsupported-video-profile.` or `unsupported-audio-profile.`, such as
7
+ * `color.resolved.kind` or `sampleRate`; `track` when a film without a
8
+ * soundtrack holds an audio track; or `probe` when the file's boxes could not
9
+ * be read. `expected` and `observed` are the values as the asserter spells
10
+ * them.
11
+ */
12
+ export interface IAutoMovieDeliveryProfileFinding {
13
+ /** The track the finding concerns. */
14
+ media: "video" | "audio";
15
+ /** The profile field that differs. */
16
+ field: string;
17
+ /** The value the profile requires. */
18
+ expected: string;
19
+ /** The value the file holds. */
20
+ observed: string;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoMovieDeliveryProfileFinding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAutoMovieDeliveryProfileFinding.js","sourceRoot":"","sources":["../src/IAutoMovieDeliveryProfileFinding.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { AutoMovieFfmpegStaticPath } from "./AutoMovieFfmpegStaticPath";
2
+ /** What finding FFmpeg reads. */
3
+ export interface IAutoMovieFfmpegSources {
4
+ /** The environment, read for `FFMPEG_PATH`. */
5
+ env: Readonly<Record<string, string | undefined>>;
6
+ /**
7
+ * Loads `ffmpeg-static` from the production, throwing when it is not
8
+ * installed there.
9
+ */
10
+ load: (id: "ffmpeg-static") => AutoMovieFfmpegStaticPath;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoMovieFfmpegSources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAutoMovieFfmpegSources.js","sourceRoot":"","sources":["../src/IAutoMovieFfmpegSources.ts"],"names":[],"mappings":""}