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,147 @@
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.createAutoMovieVerificationInputScope = createAutoMovieVerificationInputScope;
37
+ const node_child_process_1 = require("node:child_process");
38
+ const node_crypto_1 = require("node:crypto");
39
+ const fs = __importStar(require("node:fs/promises"));
40
+ const path = __importStar(require("node:path"));
41
+ const hashAutoMovieFile_1 = require("./hashAutoMovieFile");
42
+ /**
43
+ * Resolve explicitly named verification inputs to files in the production or
44
+ * its Git checkout. Check the named path and the actual destination so a link
45
+ * cannot redirect the verifier beyond those boundaries. Discover the checkout
46
+ * only when a declared file or a legacy capture needs it.
47
+ *
48
+ * @param root The production directory.
49
+ * @returns Lazy production and checkout directories and an input resolver.
50
+ */
51
+ function createAutoMovieVerificationInputScope(root) {
52
+ let projectDirectory;
53
+ let checkoutDirectory;
54
+ const project = () => (projectDirectory ??= fs.realpath(root));
55
+ const checkout = () => (checkoutDirectory ??= project().then(findCheckout));
56
+ const admits = async (directory, file) => {
57
+ if (contains(directory, file))
58
+ return true;
59
+ const worktree = await checkout();
60
+ return worktree !== null && contains(worktree, file);
61
+ };
62
+ const resolve = async (name) => {
63
+ if (path.isAbsolute(name) || path.win32.parse(name).root !== "")
64
+ throw new Error(`Verification input must be project-relative: ${name}.`);
65
+ const directory = await project();
66
+ const file = path.resolve(directory, name);
67
+ if (!(await admits(directory, file)))
68
+ throw new Error(`Verification input is outside the project and its Git checkout: ${name}.`);
69
+ const actual = await fs.realpath(file);
70
+ if (!(await admits(directory, actual)))
71
+ throw new Error(`Verification input resolves outside the project and its Git checkout: ${name}.`);
72
+ return [path.relative(directory, file), actual];
73
+ };
74
+ return {
75
+ project,
76
+ checkout,
77
+ verifySources: async (sources) => {
78
+ for (const [name, loaded] of sources) {
79
+ const [relative, actual] = await resolve(name);
80
+ const current = await (0, hashAutoMovieFile_1.hashAutoMovieFile)(actual);
81
+ if (current !== loaded)
82
+ throw changedSource(relative);
83
+ }
84
+ },
85
+ /**
86
+ * Hash a check definition and the exact named inputs without walking the
87
+ * project.
88
+ */
89
+ identify: async (check, sources) => {
90
+ const names = check.inputs ?? [];
91
+ const source = check.kind === "measure" ? check.source : undefined;
92
+ const graph = check.kind === "measure" && sources !== undefined
93
+ ? sources(source === undefined ? undefined : (await resolve(source))[1])
94
+ : undefined;
95
+ if (!Array.isArray(names) ||
96
+ (names.length === 0 && source === undefined && graph === undefined))
97
+ throw new Error("Declare the scoped input files to establish result currentness.");
98
+ const inputs = [];
99
+ for (const name of new Set([
100
+ ...names,
101
+ ...(graph?.keys() ?? (source === undefined ? [] : [source])),
102
+ ])) {
103
+ const [relative, actual] = await resolve(name);
104
+ const hash = await (0, hashAutoMovieFile_1.hashAutoMovieFile)(actual);
105
+ const loaded = graph?.get(relative);
106
+ if (loaded !== undefined && hash !== loaded)
107
+ throw changedSource(relative);
108
+ inputs.push([relative, hash]);
109
+ }
110
+ return (0, node_crypto_1.createHash)("sha256")
111
+ .update(JSON.stringify([
112
+ { ...check, enabled: undefined },
113
+ check.kind === "measure" ? String(check.measure) : null,
114
+ inputs,
115
+ ]))
116
+ .digest("hex");
117
+ },
118
+ };
119
+ }
120
+ function changedSource(relative) {
121
+ return new Error(`Verification source changed after it loaded: ${relative}. Run verify again.`);
122
+ }
123
+ /** Locate the owning Git worktree without scanning its working files. */
124
+ async function findCheckout(project) {
125
+ try {
126
+ const top = (0, node_child_process_1.execFileSync)("git", ["-C", project, "rev-parse", "--show-toplevel"], {
127
+ encoding: "utf8",
128
+ stdio: ["ignore", "pipe", "ignore"],
129
+ windowsHide: true,
130
+ }).replace(/\r?\n$/u, "");
131
+ if (!path.isAbsolute(top))
132
+ return null;
133
+ const directory = await fs.realpath(top);
134
+ return contains(directory, project) ? directory : null;
135
+ }
136
+ catch {
137
+ return null;
138
+ }
139
+ }
140
+ /** Resolve native case, separator and drive semantics through relative paths. */
141
+ function contains(directory, candidate) {
142
+ const relative = path.relative(directory, candidate);
143
+ return (!path.isAbsolute(relative) &&
144
+ relative !== ".." &&
145
+ !relative.startsWith(`..${path.sep}`));
146
+ }
147
+ //# sourceMappingURL=createAutoMovieVerificationInputScope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAutoMovieVerificationInputScope.js","sourceRoot":"","sources":["../src/createAutoMovieVerificationInputScope.ts"],"names":[],"m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use a media digest within one verification while the file identity is
3
+ * unchanged.
4
+ */
5
+ export declare function createAutoMovieVerificationMediaHash(): (file: string) => Promise<string>;
@@ -0,0 +1,61 @@
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.createAutoMovieVerificationMediaHash = createAutoMovieVerificationMediaHash;
37
+ const fs = __importStar(require("node:fs/promises"));
38
+ const hashAutoMovieFile_1 = require("./hashAutoMovieFile");
39
+ /**
40
+ * Reuse a media digest within one verification while the file identity is
41
+ * unchanged.
42
+ */
43
+ function createAutoMovieVerificationMediaHash() {
44
+ const cache = new Map();
45
+ return async (file) => {
46
+ const before = await fingerprint(file);
47
+ const retained = cache.get(file);
48
+ if (retained?.stamp === before)
49
+ return retained.digest;
50
+ const digest = await (0, hashAutoMovieFile_1.hashAutoMovieFile)(file);
51
+ if ((await fingerprint(file)) !== before)
52
+ throw new Error(`The media file changed while verifying its bytes: ${file}. Run verify again.`);
53
+ cache.set(file, { stamp: before, digest });
54
+ return digest;
55
+ };
56
+ }
57
+ async function fingerprint(file) {
58
+ const info = await fs.stat(file, { bigint: true });
59
+ return `${info.dev}:${info.ino}:${info.size}:${info.mtimeNs}:${info.ctimeNs}`;
60
+ }
61
+ //# sourceMappingURL=createAutoMovieVerificationMediaHash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAutoMovieVerificationMediaHash.js","sourceRoot":"","sources":["../src/createAutoMovieVerificationMediaHash.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,EAAE,6CAAyB;AAEvC,2DAAwD;AAExD;;;GAGG;AACH;IAGE,MAAM,KAAK,GAAmD,IAAI,GAAG,EAAE,CAAC;IACxE,OAAO,KAAK,EAAE,IAAY,EAAmB,EAAE;QAC7C,MAAM,MAAM,GAAW,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,QAAQ,GACZ,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,IAAI,QAAQ,EAAE,KAAK,KAAK,MAAM;YAAE,OAAO,QAAQ,CAAC,MAAM,CAAC;QACvD,MAAM,MAAM,GAAW,MAAM,IAAA,qCAAiB,EAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,MAAM;YACtC,MAAM,IAAI,KAAK,CACb,qDAAqD,IAAI,qBAAqB,CAC/E,CAAC;QACJ,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC3C,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,IAAY;IACrC,MAAM,IAAI,GAAgB,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,OAAO,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;AAChF,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { IAutoMovieDeliveryContentAudit, IAutoMovieLoudnessMeter } from "@automovie/interface";
2
+ import { runAutoMovieFfmpeg } from "./runAutoMovieFfmpeg";
3
+ /**
4
+ * Runs one FFmpeg audio decode that writes f32le PCM to stdout and an
5
+ * `ashowinfo` frame log to stderr, and feeds both to the frame log and the
6
+ * silence scan, which also feeds the presented PCM to the loudness meter.
7
+ *
8
+ * @param binary The FFmpeg executable already resolved by the delivery host.
9
+ * @param args Decode arguments whose PCM and frame log describe the same
10
+ * samples.
11
+ * @param streamIndex The stream index reported with the evidence.
12
+ * @param thresholds The audio silence threshold and minimum duration.
13
+ * @param run The established FFmpeg process owner with separate output
14
+ * consumers.
15
+ * @param presented The container's presented span, or undefined when every
16
+ * decoded sample is presented.
17
+ * @param meter Creates the render's loudness meter, when the presented PCM's
18
+ * loudness and true peak are measured.
19
+ * @returns Audio evidence or a reason decoded content is uncovered.
20
+ */
21
+ export declare function decodeAutoMovieDeliveryAudio(binary: string, args: string[], streamIndex: number, thresholds: IAutoMovieDeliveryContentAudit.IThresholds["silence"], run: typeof runAutoMovieFfmpeg, presented: {
22
+ timescale: number;
23
+ duration: number;
24
+ } | undefined, meter?: (channels: 1 | 2) => IAutoMovieLoudnessMeter): Promise<IAutoMovieDeliveryContentAudit.Stream>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeAutoMovieDeliveryAudio = decodeAutoMovieDeliveryAudio;
4
+ const createAutoMovieDeliveryAudioLog_1 = require("./createAutoMovieDeliveryAudioLog");
5
+ const createAutoMovieDeliveryAudioScan_1 = require("./createAutoMovieDeliveryAudioScan");
6
+ /** Caps PCM received before the first matching frame log reaches the other pipe. */
7
+ const MAXIMUM_PENDING_PCM = 1024 * 1024;
8
+ /**
9
+ * Runs one FFmpeg audio decode that writes f32le PCM to stdout and an
10
+ * `ashowinfo` frame log to stderr, and feeds both to the frame log and the
11
+ * silence scan, which also feeds the presented PCM to the loudness meter.
12
+ *
13
+ * @param binary The FFmpeg executable already resolved by the delivery host.
14
+ * @param args Decode arguments whose PCM and frame log describe the same
15
+ * samples.
16
+ * @param streamIndex The stream index reported with the evidence.
17
+ * @param thresholds The audio silence threshold and minimum duration.
18
+ * @param run The established FFmpeg process owner with separate output
19
+ * consumers.
20
+ * @param presented The container's presented span, or undefined when every
21
+ * decoded sample is presented.
22
+ * @param meter Creates the render's loudness meter, when the presented PCM's
23
+ * loudness and true peak are measured.
24
+ * @returns Audio evidence or a reason decoded content is uncovered.
25
+ */
26
+ async function decodeAutoMovieDeliveryAudio(binary, args, streamIndex, thresholds, run, presented, meter) {
27
+ const audioLog = (0, createAutoMovieDeliveryAudioLog_1.createAutoMovieDeliveryAudioLog)();
28
+ let partialLine = "";
29
+ let pendingBytes = 0;
30
+ const pending = [];
31
+ const state = {};
32
+ const consumeLine = (line) => {
33
+ audioLog.push(line);
34
+ const format = audioLog.format();
35
+ if (state.scan !== undefined || format === undefined)
36
+ return;
37
+ state.scan = (0, createAutoMovieDeliveryAudioScan_1.createAutoMovieDeliveryAudioScan)(format, thresholds, presented?.duration ?? Number.MAX_SAFE_INTEGER, meter);
38
+ for (const chunk of pending)
39
+ state.scan.push(chunk);
40
+ pending.length = 0;
41
+ };
42
+ try {
43
+ await run(binary, args, undefined, {
44
+ stdout(chunk) {
45
+ if (state.scan !== undefined) {
46
+ state.scan.push(chunk);
47
+ return;
48
+ }
49
+ pendingBytes += chunk.length;
50
+ if (pendingBytes > MAXIMUM_PENDING_PCM)
51
+ throw new Error("The decoded audio sample format was not established");
52
+ pending.push(chunk);
53
+ },
54
+ stderr(chunk) {
55
+ const lines = (partialLine + chunk).split(/\r?\n/u);
56
+ partialLine = lines.pop() ?? "";
57
+ for (const line of lines)
58
+ consumeLine(line);
59
+ },
60
+ });
61
+ if (partialLine.length > 0)
62
+ consumeLine(partialLine);
63
+ }
64
+ catch (error) {
65
+ return {
66
+ status: "uncovered",
67
+ reason: error instanceof Error ? error.message : String(error),
68
+ };
69
+ }
70
+ if (state.scan === undefined)
71
+ return {
72
+ status: "uncovered",
73
+ reason: "No decoded audio sample format was established",
74
+ };
75
+ return audioLog.finish(streamIndex, state.scan.finish(), presented);
76
+ }
77
+ //# sourceMappingURL=decodeAutoMovieDeliveryAudio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeAutoMovieDeliveryAudio.js","sourceRoot":"","sources":["../src/decodeAutoMovieDeliveryAudio.ts"],"names":[],"mappings":";;;AAKA,uFAAoF;AACpF,yFAAsF;AAGtF,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;GAiBG;AACI,KAAK,uCACV,MAAc,EACd,IAAc,EACd,WAAmB,EACnB,UAAiE,EACjE,GAA8B,EAC9B,SAA8D,EAC9D,KAAoD;IAEpD,MAAM,QAAQ,GAAG,IAAA,iEAA+B,GAAE,CAAC;IACnD,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,KAAK,GACT,EAAE,CAAC;IAEL,MAAM,WAAW,GAAG,CAAC,IAAY,EAAQ,EAAE;QACzC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,E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ACL,MAAM,EAAE,WAAW;YACnB,MAAM,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC/D,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QAC1B,OAAO;YACL,MAAM,EAAE,WAAW;YACnB,MAAM,EAAE,gDAAgD;SACzD,CAAC;IACJ,OAAO,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC;AACtE,CAAC"}
@@ -1,16 +1,19 @@
1
1
  /**
2
- * Derive a lowercase project-name candidate from the target directory's basename.
2
+ * Derive a lowercase project-name candidate from the target directory's
3
+ * basename.
3
4
  *
4
- * The basename is lowercased, each run of characters other than `a-z`, `0-9`, `.`, `_` and `-` becomes one `-`, the result is cut to npm's 214-character limit, and leading `-`, `.` or `_` and trailing `-` or `.` are removed. A basename with nothing left, such as a filesystem root, yields `AUTOMOVIE_DEFAULT_PROJECT_NAME`. `selectAutoMovieProjectName` passes a `create` request's absolute target, `run` passes an `add` request's directory segment, and `run` hands the result to the template renderer as the project name.
5
+ * The basename is lowercased, each run of characters other than `a-z`, `0-9`,
6
+ * `.`, `_` and `-` becomes one `-`, the result is cut to npm's 214-character
7
+ * limit, and leading `-`, `.` or `_` and trailing `-` or `.` are removed. A
8
+ * basename with nothing left, such as a filesystem root, yields
9
+ * `AUTOMOVIE_DEFAULT_PROJECT_NAME`. `selectAutoMovieProjectName` passes a
10
+ * `create` request's absolute target, `run` passes an `add` request's directory
11
+ * segment, and `run` hands the result to the template renderer as the project
12
+ * name.
5
13
  *
6
- * This transformation does not validate npm's reserved names; `node_modules` and `favicon.ico` remain unchanged. Windows device names such as `con` also remain unchanged and are refused by `createAutoMovieScaffold` before any file is written.
7
- *
8
- * @evidence contracts/development/implementation.md#principled-implementation Lowercasing and character replacement produce an unscoped-name candidate from the basename in the host's path syntax, then the 214-character cut precedes trimming so the result stays within that limit. This is normalization rather than complete npm admission: reserved names remain unchanged, while the downstream scaffold renderer separately refuses Windows device names.
9
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One pure function owns the directory-to-name rule, so `run` keeps only dispatch and the rule is checked without publishing a scaffold.
10
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No directory name is special-cased; the fallback applies whenever normalization leaves an empty candidate, including an all-underscore basename whose characters are removed by leading trim.
11
- * @evidence contracts/development/common.md#meaningful-documentation The comment states each transformation in order, the limit, the fallback, the caller and consumer, and the difference between an unchanged npm reserved name and a device name refused by the renderer.
12
- * @evidence contracts/development/implementation.md#efficient-algorithms Time and space are linear in the basename's length: one lowercase pass, one replacement and one slice; the final trim's trailing alternative can rescan a run of `-` and `.` that does not end the string, which is quadratic only within that run and bounded by the 214-character cut.
13
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work `run` derives one name per scaffold request, so no equivalent derivation is requested twice.
14
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function returns a new string and keeps no state, handle, or task.
14
+ * This transformation does not validate npm's reserved names; `node_modules`
15
+ * and `favicon.ico` remain unchanged. Windows device names such as `con` also
16
+ * remain unchanged and are refused by `createAutoMovieScaffold` before any file
17
+ * is written.
15
18
  */
16
19
  export declare function deriveAutoMovieProjectName(targetDir: string): string;
@@ -39,19 +39,22 @@ const AUTOMOVIE_DEFAULT_PROJECT_NAME_1 = require("./AUTOMOVIE_DEFAULT_PROJECT_NA
39
39
  /** Longest package name npm accepts. */
40
40
  const NPM_NAME_LIMIT = 214;
41
41
  /**
42
- * Derive a lowercase project-name candidate from the target directory's basename.
42
+ * Derive a lowercase project-name candidate from the target directory's
43
+ * basename.
43
44
  *
44
- * The basename is lowercased, each run of characters other than `a-z`, `0-9`, `.`, `_` and `-` becomes one `-`, the result is cut to npm's 214-character limit, and leading `-`, `.` or `_` and trailing `-` or `.` are removed. A basename with nothing left, such as a filesystem root, yields `AUTOMOVIE_DEFAULT_PROJECT_NAME`. `selectAutoMovieProjectName` passes a `create` request's absolute target, `run` passes an `add` request's directory segment, and `run` hands the result to the template renderer as the project name.
45
+ * The basename is lowercased, each run of characters other than `a-z`, `0-9`,
46
+ * `.`, `_` and `-` becomes one `-`, the result is cut to npm's 214-character
47
+ * limit, and leading `-`, `.` or `_` and trailing `-` or `.` are removed. A
48
+ * basename with nothing left, such as a filesystem root, yields
49
+ * `AUTOMOVIE_DEFAULT_PROJECT_NAME`. `selectAutoMovieProjectName` passes a
50
+ * `create` request's absolute target, `run` passes an `add` request's directory
51
+ * segment, and `run` hands the result to the template renderer as the project
52
+ * name.
45
53
  *
46
- * This transformation does not validate npm's reserved names; `node_modules` and `favicon.ico` remain unchanged. Windows device names such as `con` also remain unchanged and are refused by `createAutoMovieScaffold` before any file is written.
47
- *
48
- * @evidence contracts/development/implementation.md#principled-implementation Lowercasing and character replacement produce an unscoped-name candidate from the basename in the host's path syntax, then the 214-character cut precedes trimming so the result stays within that limit. This is normalization rather than complete npm admission: reserved names remain unchanged, while the downstream scaffold renderer separately refuses Windows device names.
49
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One pure function owns the directory-to-name rule, so `run` keeps only dispatch and the rule is checked without publishing a scaffold.
50
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No directory name is special-cased; the fallback applies whenever normalization leaves an empty candidate, including an all-underscore basename whose characters are removed by leading trim.
51
- * @evidence contracts/development/common.md#meaningful-documentation The comment states each transformation in order, the limit, the fallback, the caller and consumer, and the difference between an unchanged npm reserved name and a device name refused by the renderer.
52
- * @evidence contracts/development/implementation.md#efficient-algorithms Time and space are linear in the basename's length: one lowercase pass, one replacement and one slice; the final trim's trailing alternative can rescan a run of `-` and `.` that does not end the string, which is quadratic only within that run and bounded by the 214-character cut.
53
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work `run` derives one name per scaffold request, so no equivalent derivation is requested twice.
54
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function returns a new string and keeps no state, handle, or task.
54
+ * This transformation does not validate npm's reserved names; `node_modules`
55
+ * and `favicon.ico` remain unchanged. Windows device names such as `con` also
56
+ * remain unchanged and are refused by `createAutoMovieScaffold` before any file
57
+ * is written.
55
58
  */
56
59
  function deriveAutoMovieProjectName(targetDir) {
57
60
  const name = path
@@ -1 +1 @@
1
- {"version":3,"file":"deriveAutoMovieProjectName.js","sourceRoot":"","sources":["../src/deriveAutoMovieProjectName.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,IAAI,sCAAkB;AAElC,qFAAkF;AAElF,wCAAwC;AACxC,MAAM,cAAc,GAAW,GAAG,CAAC;AAEnC;;;;;;;;;;;;;;GAcG;AACH,oCAA2C,SAAiB;IAC1D,MAAM,IAAI,GAAW,IAAI;SACtB,QAAQ,CAAC,SAAS,CAAC;SACnB,WAAW,EAAE;SACb,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC;SAC9B,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC;SACxB,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,+DAA8B,CAAC,CAAC,CAAC,IAAI,CAAC;AACnE,CAAC"}
1
+ {"version":3,"file":"deriveAutoMovieProjectName.js","sourceRoot":"","sources":["../src/deriveAutoMovieProjectName.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,IAAI,sCAAkB;AAElC,qFAAkF;AAElF,wCAAwC;AACxC,MAAM,cAAc,GAAW,GAAG,CAAC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,oCAA2C,SAAiB;IAC1D,MAAM,IAAI,GAAW,IAAI;SACtB,QAAQ,CAAC,SAAS,CAAC;SACnB,WAAW,EAAE;SACb,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC;SAC9B,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC;SACxB,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,+DAA8B,CAAC,CAAC,CAAC,IAAI,CAAC;AACnE,CAAC"}
@@ -1,14 +1,9 @@
1
1
  /**
2
- * A TCP port the operating system reports free on 127.0.0.1 at the moment of asking, for a page server that must not take another server's port.
2
+ * A TCP port the operating system reports free on 127.0.0.1 at the moment of
3
+ * asking, for a page server that must not take another server's port.
3
4
  *
4
- * The port is free only at that moment; the server that takes it listens with `strictPort`, so a port taken meanwhile fails the start instead of moving elsewhere.
5
- *
6
- * @evidence contracts/development/common.md#meaningful-documentation States what is returned, the race it leaves and how a caller closes it.
7
- * @evidence contracts/development/implementation.md#principled-implementation Listening on port 0 asks the operating system for an unused ephemeral port, which the address then reports.
8
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Listen, read the address, close.
9
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No fixed port is guessed.
10
- * @evidence contracts/development/implementation.md#efficient-algorithms One listen and one close.
11
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each server asks once.
12
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The probing server is closed before the promise resolves.
5
+ * The port is free only at that moment; the server that takes it listens with
6
+ * `strictPort`, so a port taken meanwhile fails the start instead of moving
7
+ * elsewhere.
13
8
  */
14
9
  export declare function findAutoMovieFreePort(): Promise<number>;
@@ -36,17 +36,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.findAutoMovieFreePort = findAutoMovieFreePort;
37
37
  const net = __importStar(require("node:net"));
38
38
  /**
39
- * A TCP port the operating system reports free on 127.0.0.1 at the moment of asking, for a page server that must not take another server's port.
39
+ * A TCP port the operating system reports free on 127.0.0.1 at the moment of
40
+ * asking, for a page server that must not take another server's port.
40
41
  *
41
- * The port is free only at that moment; the server that takes it listens with `strictPort`, so a port taken meanwhile fails the start instead of moving elsewhere.
42
- *
43
- * @evidence contracts/development/common.md#meaningful-documentation States what is returned, the race it leaves and how a caller closes it.
44
- * @evidence contracts/development/implementation.md#principled-implementation Listening on port 0 asks the operating system for an unused ephemeral port, which the address then reports.
45
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Listen, read the address, close.
46
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No fixed port is guessed.
47
- * @evidence contracts/development/implementation.md#efficient-algorithms One listen and one close.
48
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each server asks once.
49
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The probing server is closed before the promise resolves.
42
+ * The port is free only at that moment; the server that takes it listens with
43
+ * `strictPort`, so a port taken meanwhile fails the start instead of moving
44
+ * elsewhere.
50
45
  */
51
46
  function findAutoMovieFreePort() {
52
47
  return new Promise((resolve, reject) => {
@@ -1 +1 @@
1
- {"version":3,"file":"findAutoMovieFreePort.js","sourceRoot":"","sources":["../src/findAutoMovieFreePort.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,GAAG,qCAAiB;AAEhC;;;;;;;;;;;;GAYG;AACH;IACE,OAAO,IAAI,OAAO,CAChB,CAAC,OAA+B,EAAE,MAA8B,EAAQ,EAAE;QACxE,MAAM,MAAM,GAAe,GAAG,CAAC,YAAY,EAAE,CAAC;QAC9C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,GAAS,EAAE;YACvC,MAAM,OAAO,GAAoB,MAAM,CAAC,OAAO,EAAqB,CAAC;YACrE,MAAM,CAAC,KAAK,CAAC,GAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"findAutoMovieFreePort.js","sourceRoot":"","sources":["../src/findAutoMovieFreePort.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,GAAG,qCAAiB;AAEhC;;;;;;;GAOG;AACH;IACE,OAAO,IAAI,OAAO,CAChB,CAAC,OAA+B,EAAE,MAA8B,EAAQ,EAAE;QACxE,MAAM,MAAM,GAAe,GAAG,CAAC,YAAY,EAAE,CAAC;QAC9C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,GAAS,EAAE;YACvC,MAAM,OAAO,GAAoB,MAAM,CAAC,OAAO,EAAqB,CAAC;YACrE,MAAM,CAAC,KAAK,CAAC,GAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1,14 +1,10 @@
1
1
  /**
2
- * The address of a served inspector page that opens on a request: the page's base address with the request's named text values as its query.
2
+ * The address of a served inspector page that opens on a request: the page's
3
+ * base address with the request's named text values as its query.
3
4
  *
4
- * `values` are the pairs `formatAutoMovieCapturePlanRequest` writes, in its order; they are joined by `URLSearchParams`, which the page reads back with the same decoder. The request that asks for nothing is the base address alone.
5
- *
6
- * @evidence contracts/development/common.md#meaningful-documentation States what the address holds, where the pairs come from, how they are encoded and the empty case.
7
- * @evidence contracts/development/implementation.md#principled-implementation `URLSearchParams` writes `application/x-www-form-urlencoded`, which the page's `URLSearchParams` decodes to the same pairs, so the page reads the request the command was given.
8
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One encoding and one join.
9
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No key is written here; the grammar's writer chose them.
10
- * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the pairs' length.
11
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion.
12
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh string and keeps nothing.
5
+ * `values` are the pairs `formatAutoMovieCapturePlanRequest` writes, in its
6
+ * order; they are joined by `URLSearchParams`, which the page reads back with
7
+ * the same decoder. The request that asks for nothing is the base address
8
+ * alone.
13
9
  */
14
10
  export declare function formatAutoMovieInspectUrl(base: string, values: readonly (readonly [key: string, value: string])[]): string;
@@ -2,17 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.formatAutoMovieInspectUrl = formatAutoMovieInspectUrl;
4
4
  /**
5
- * The address of a served inspector page that opens on a request: the page's base address with the request's named text values as its query.
5
+ * The address of a served inspector page that opens on a request: the page's
6
+ * base address with the request's named text values as its query.
6
7
  *
7
- * `values` are the pairs `formatAutoMovieCapturePlanRequest` writes, in its order; they are joined by `URLSearchParams`, which the page reads back with the same decoder. The request that asks for nothing is the base address alone.
8
- *
9
- * @evidence contracts/development/common.md#meaningful-documentation States what the address holds, where the pairs come from, how they are encoded and the empty case.
10
- * @evidence contracts/development/implementation.md#principled-implementation `URLSearchParams` writes `application/x-www-form-urlencoded`, which the page's `URLSearchParams` decodes to the same pairs, so the page reads the request the command was given.
11
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One encoding and one join.
12
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No key is written here; the grammar's writer chose them.
13
- * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the pairs' length.
14
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion.
15
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh string and keeps nothing.
8
+ * `values` are the pairs `formatAutoMovieCapturePlanRequest` writes, in its
9
+ * order; they are joined by `URLSearchParams`, which the page reads back with
10
+ * the same decoder. The request that asks for nothing is the base address
11
+ * alone.
16
12
  */
17
13
  function formatAutoMovieInspectUrl(base, values) {
18
14
  const query = new URLSearchParams(values.map(([key, value]) => [
@@ -1 +1 @@
1
- {"version":3,"file":"formatAutoMovieInspectUrl.js","sourceRoot":"","sources":["../src/formatAutoMovieInspectUrl.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACH,mCACE,IAAY,EACZ,MAA0D;IAE1D,MAAM,KAAK,GAAW,IAAI,eAAe,CACvC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAA4B,EAAoB,EAAE,CAAC;QACxE,GAAG;QACH,KAAK;KACN,CAAC,CACH,CAAC,QAAQ,EAAE,CAAC;IACb,OAAO,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC;AAClD,CAAC"}
1
+ {"version":3,"file":"formatAutoMovieInspectUrl.js","sourceRoot":"","sources":["../src/formatAutoMovieInspectUrl.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,mCACE,IAAY,EACZ,MAA0D;IAE1D,MAAM,KAAK,GAAW,IAAI,eAAe,CACvC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAA4B,EAAoB,EAAE,CAAC;QACxE,GAAG;QACH,KAAK;KACN,CAAC,CACH,CAAC,QAAQ,EAAE,CAAC;IACb,OAAO,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC;AAClD,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Streams the file's bytes into a lowercase SHA-256 digest and rejects a failed
3
+ * read.
4
+ */
5
+ export declare function hashAutoMovieFile(file: string): Promise<string>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hashAutoMovieFile = hashAutoMovieFile;
4
+ const node_crypto_1 = require("node:crypto");
5
+ const node_fs_1 = require("node:fs");
6
+ /**
7
+ * Streams the file's bytes into a lowercase SHA-256 digest and rejects a failed
8
+ * read.
9
+ */
10
+ async function hashAutoMovieFile(file) {
11
+ const hash = (0, node_crypto_1.createHash)("sha256");
12
+ for await (const chunk of (0, node_fs_1.createReadStream)(file))
13
+ hash.update(chunk);
14
+ return hash.digest("hex");
15
+ }
16
+ //# sourceMappingURL=hashAutoMovieFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hashAutoMovieFile.js","sourceRoot":"","sources":["../src/hashAutoMovieFile.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,qCAA2C;AAE3C;;;GAGG;AACI,KAAK,4BAA4B,IAAY;IAClD,MAAM,IAAI,GAAG,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAA,0BAAgB,EAAC,IAAI,CAAC;QAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Import through Node's native module loader. */
2
+ export declare function importAutoMovieVerificationEntry(url: string): Promise<unknown>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /** Import through Node's native module loader. */
3
+ export async function importAutoMovieVerificationEntry(url) {
4
+ return import(url);
5
+ }
6
+ //# sourceMappingURL=importAutoMovieVerificationEntry.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importAutoMovieVerificationEntry.mjs","sourceRoot":"","sources":["../src/importAutoMovieVerificationEntry.mts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,GAAW;IAEX,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from "./AutoMovieCommand";
2
+ export * from "./IAutoMovieVerification";
3
+ export * from "./runAutoMovieVerification";
2
4
  export * from "./readAutoMovieCommandArguments";
3
5
  export * from "./deriveAutoMovieProjectName";
4
6
  export * from "./AUTOMOVIE_DEFAULT_PROJECT_NAME";
@@ -17,9 +19,12 @@ export * from "./launchAutoMovieChromium";
17
19
  export * from "./loadAutoMovieProductionModule";
18
20
  export * from "./planAutoMovieChromiumLaunch";
19
21
  export * from "./readAutoMovieCaptureHostOptions";
22
+ export * from "./readAutoMovieDeliveryProbe";
20
23
  export * from "./readAutoMovieRevision";
21
24
  export * from "./readAutoMovieVideoProbe";
22
25
  export * from "./resolveAutoMovieFfmpeg";
26
+ export * from "./runAutoMovieDeliveryDecode";
27
+ export * from "./runAutoMovieDeliveryReferenceDecode";
23
28
  export * from "./runAutoMovieFfmpeg";
24
29
  export * from "./serveAutoMovieDrawPage";
25
30
  export * from "./AUTOMOVIE_INSPECT_OPTIONS";
@@ -39,3 +44,7 @@ export * from "./recordAutoMoviePlayback";
39
44
  export * from "./renderAutoMovie";
40
45
  export * from "./renderAutoMovieVideo";
41
46
  export * from "./reviewAutoMovie";
47
+ export * from "./IAutoMovieReviewObservation";
48
+ export * from "./hashAutoMovieFile";
49
+ export * from "./readAutoMovieReviewObservation";
50
+ export * from "./reviewAutoMovieFile";