hyperframes 0.8.214 → 0.8.216

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 (213) hide show
  1. package/dist/{add-U2N4ZWNB.js → add-2RWN7JAI.js} +17 -14
  2. package/dist/{agentPromptGenerator-EK7NEFV6.js → agentPromptGenerator-RVE5RWTH.js} +7 -6
  3. package/dist/{animatedGifPrep-X3FLFGCC.js → animatedGifPrep-I32BS5HI.js} +7 -6
  4. package/dist/api.js +18 -17
  5. package/dist/{asset-3CSXQ7JI.js → asset-YLZ5UGVE.js} +2 -2
  6. package/dist/{assetCataloger-FG2VTSSR.js → assetCataloger-B4KOZO3V.js} +8 -7
  7. package/dist/{audio-US7IUDFM.js → audio-VUOJ7MOJ.js} +177 -61
  8. package/dist/{auth-IMXNGPGR.js → auth-3UL65CN7.js} +4 -4
  9. package/dist/{autoUpdate-IGZP5HIX.js → autoUpdate-FEK5AHLP.js} +4 -3
  10. package/dist/{backgroundChecks-UGU6SRCU.js → backgroundChecks-VJSQ3REH.js} +5 -4
  11. package/dist/backgroundChecksWorker.js +6 -5
  12. package/dist/{batchRender-5JS4SAGR.js → batchRender-NC6SUDYN.js} +3 -3
  13. package/dist/{beats-2F7ZW7QB.js → beats-KSUZ23LE.js} +23 -17
  14. package/dist/{benchmark-Y25FBDO7.js → benchmark-TRVQ7EPQ.js} +14 -11
  15. package/dist/{browser-43AS35ZL.js → browser-3LJ3SLQ4.js} +10 -7
  16. package/dist/{bundleWithLocalizedFonts-6VHTVRO3.js → bundleWithLocalizedFonts-Y7VGIRFK.js} +2 -2
  17. package/dist/{capture-N5AMWY4S.js → capture-NC5OO4D2.js} +3 -3
  18. package/dist/{capture-CMP4DHPY.js → capture-NT2SOO5J.js} +15 -14
  19. package/dist/{captureCompositionFrame-PQT4GNR2.js → captureCompositionFrame-PAJRNURH.js} +13 -12
  20. package/dist/{catalog-SZPWUZ75.js → catalog-BOGZ2BQD.js} +18 -15
  21. package/dist/{catch-up-OYYHR2UB.js → catch-up-FGF5SAEW.js} +10 -7
  22. package/dist/{check-MBW4AYV6.js → check-IG6NIMSC.js} +43 -40
  23. package/dist/{checkAudio-DIJNBWAF.js → checkAudio-6B2FKTIU.js} +11 -10
  24. package/dist/{checkBrowser-NYBDUAT2.js → checkBrowser-D6MZRCTH.js} +36 -33
  25. package/dist/{chunk-3AAAA3KH.js → chunk-2JV6FKNZ.js} +3 -3
  26. package/dist/{chunk-7YUYG6S6.js → chunk-3AOXAXTA.js} +1 -1
  27. package/dist/{chunk-6LDHXB4Z.js → chunk-3F2DTPBD.js} +3 -2
  28. package/dist/{chunk-HVQDDVN4.js → chunk-3S2WWGJJ.js} +2 -2
  29. package/dist/{chunk-7W4DJKZA.js → chunk-43USF7JF.js} +11 -11
  30. package/dist/{chunk-EJCCJTUH.js → chunk-4EEVTNDU.js} +3 -3
  31. package/dist/{chunk-ZMKRQ4HE.js → chunk-4MWUMT3T.js} +2 -2
  32. package/dist/chunk-4WEWHZZO.js +24 -0
  33. package/dist/{chunk-S6WDNIUG.js → chunk-4YIKQM4K.js} +1 -1
  34. package/dist/{chunk-GSYZG4E7.js → chunk-557ZJMFI.js} +2 -2
  35. package/dist/{chunk-BRTWBGFE.js → chunk-5XTOAZMR.js} +1 -1
  36. package/dist/{chunk-QL7ITOPE.js → chunk-6HJUC2VX.js} +3 -3
  37. package/dist/{chunk-6UUPTWUG.js → chunk-6LQL2BVD.js} +1 -1
  38. package/dist/{chunk-YDHXPY23.js → chunk-7P76YIVS.js} +1 -1
  39. package/dist/{chunk-URD4QIQS.js → chunk-7RPXLY6U.js} +1 -1
  40. package/dist/{chunk-DFQM3XMK.js → chunk-ACAU2AK2.js} +4 -4
  41. package/dist/{chunk-HQRI2NT3.js → chunk-BHWXSO6T.js} +1 -1
  42. package/dist/{chunk-K4WIOZFP.js → chunk-BR2JQQC5.js} +3 -5
  43. package/dist/{chunk-FQO3RV6O.js → chunk-BTYR7Y3Z.js} +2 -2
  44. package/dist/{chunk-G7CFMNRO.js → chunk-BYHG2T5X.js} +2 -2
  45. package/dist/{chunk-G6HUXX3L.js → chunk-CBCZBHGK.js} +4 -2
  46. package/dist/{chunk-ENV35BSH.js → chunk-CX4TSC7T.js} +96 -35
  47. package/dist/{chunk-WJRYQYOM.js → chunk-DFA5GTRJ.js} +1 -1
  48. package/dist/{chunk-GFA5ZCVI.js → chunk-DYHAZFK3.js} +7 -3
  49. package/dist/{chunk-VAOROEWU.js → chunk-EB44YMQO.js} +2 -2
  50. package/dist/{chunk-MP7DZH5M.js → chunk-EJTVBW42.js} +2 -2
  51. package/dist/{chunk-32NEJ553.js → chunk-FBN2M2HK.js} +28 -0
  52. package/dist/{chunk-VEWR5HXT.js → chunk-FUSUFW2L.js} +1 -1
  53. package/dist/{chunk-L72RQ45A.js → chunk-G3AG7A42.js} +1 -1
  54. package/dist/{chunk-FKFGGAXN.js → chunk-GLC5XHN5.js} +13 -0
  55. package/dist/{chunk-XM3NMXLX.js → chunk-GTKUQUZ6.js} +1 -1
  56. package/dist/{chunk-HNYTTRLR.js → chunk-I3VXWMQW.js} +4 -4
  57. package/dist/chunk-IVRKWQTX.js +5061 -0
  58. package/dist/{chunk-TNKPBI63.js → chunk-JFFQWMNE.js} +5 -5
  59. package/dist/{chunk-I5LDGNYX.js → chunk-JOZQFSOV.js} +1 -1
  60. package/dist/{chunk-JMSS47CW.js → chunk-KBTXAUCZ.js} +1 -1
  61. package/dist/{chunk-7Y4TTOLE.js → chunk-KYXBPFI7.js} +7 -5
  62. package/dist/{chunk-5766TK7Q.js → chunk-LAGZGKKN.js} +1 -1
  63. package/dist/{chunk-MGUA3DUS.js → chunk-LGZP4IR2.js} +3 -3
  64. package/dist/{chunk-VC6GEQ7P.js → chunk-MKL6JGDL.js} +34 -29
  65. package/dist/{chunk-LRYNDYAE.js → chunk-MO6DJMZP.js} +1 -1
  66. package/dist/{chunk-LBS4AS7G.js → chunk-MU66MHZB.js} +2 -2
  67. package/dist/{chunk-3ZNAP65U.js → chunk-MYHAS5U2.js} +13 -17
  68. package/dist/{chunk-6CGYINE7.js → chunk-NOH32H42.js} +25 -0
  69. package/dist/{chunk-VW57BBGU.js → chunk-NWYJZAPP.js} +1 -1
  70. package/dist/{chunk-QCCPXMKP.js → chunk-OFJTXNRS.js} +2 -2
  71. package/dist/{chunk-MZHYAXUV.js → chunk-OPLEWQHF.js} +1 -1
  72. package/dist/{chunk-53ERMOK2.js → chunk-OWU2BURB.js} +2 -2
  73. package/dist/{chunk-UR6QODTY.js → chunk-PNE2Y42T.js} +1 -1
  74. package/dist/{chunk-VVDHSRKD.js → chunk-PPMLF76Z.js} +1 -1
  75. package/dist/chunk-PXVQOMKL.js +39 -0
  76. package/dist/{chunk-4HMG5CQJ.js → chunk-Q3OKLJ34.js} +1 -1
  77. package/dist/chunk-QBXDU24O.js +20 -0
  78. package/dist/{chunk-ISTUBRV3.js → chunk-QETCWXRM.js} +5 -5
  79. package/dist/{chunk-4NJ57TSE.js → chunk-QGMRSNG5.js} +8 -4
  80. package/dist/{chunk-ZE57TSS6.js → chunk-QRIC4WOO.js} +1 -1
  81. package/dist/{chunk-FJ646TIT.js → chunk-R4EWRIDL.js} +161 -21
  82. package/dist/{chunk-YLEEVMBV.js → chunk-RH5Y75UX.js} +2 -2
  83. package/dist/{chunk-VILE6GFD.js → chunk-RIGQABEL.js} +1 -1
  84. package/dist/{chunk-245CC6JT.js → chunk-RKS7GO4O.js} +1 -1
  85. package/dist/{chunk-XESW4XN7.js → chunk-RN7RQBW3.js} +2 -2
  86. package/dist/{chunk-GVHEOOGM.js → chunk-ROUK3OL2.js} +7 -7
  87. package/dist/{chunk-GRCS7WRH.js → chunk-RXQU3QM4.js} +9 -9
  88. package/dist/{chunk-YQCDSSIK.js → chunk-SBBYMUWY.js} +1 -1
  89. package/dist/{chunk-7J6LQ3SQ.js → chunk-SGTEKMJW.js} +19 -4
  90. package/dist/{chunk-PT47MVXR.js → chunk-SPFTXNKQ.js} +20 -15
  91. package/dist/{chunk-T6SMQ4L7.js → chunk-TBEU55KU.js} +1 -1
  92. package/dist/{chunk-FI3JWR34.js → chunk-TQSKEMSL.js} +48 -9
  93. package/dist/{chunk-XWMY7FIW.js → chunk-U54ZBLTF.js} +2 -2
  94. package/dist/{chunk-Q55JNFDV.js → chunk-UGQFQDSV.js} +1 -1
  95. package/dist/{chunk-A7UJGIMA.js → chunk-UIETUYFT.js} +1 -1
  96. package/dist/{chunk-CATLCEDQ.js → chunk-UJEEURID.js} +13 -13
  97. package/dist/{chunk-TYMD647L.js → chunk-URUUGFZD.js} +2 -2
  98. package/dist/{chunk-MYDM4PQL.js → chunk-USQTLRSD.js} +2 -2
  99. package/dist/{chunk-7TWX4Y7I.js → chunk-UVXIJYZY.js} +3 -15
  100. package/dist/{chunk-FC6BAQV5.js → chunk-VDFY4FE5.js} +12 -11
  101. package/dist/{chunk-A3ZRV44X.js → chunk-VPA5YKEY.js} +2 -2
  102. package/dist/{chunk-LIOE46OG.js → chunk-VZENYSX7.js} +90 -9
  103. package/dist/{chunk-DW35FX4I.js → chunk-X5EOH44V.js} +1 -1
  104. package/dist/{chunk-KSV2PMFA.js → chunk-YT4DR2UT.js} +7 -7
  105. package/dist/{chunk-ZXQNWUDY.js → chunk-Z4W7ND2L.js} +7 -7
  106. package/dist/{chunk-LWWTOBZ6.js → chunk-ZRK7ZEWI.js} +3 -3
  107. package/dist/{clean-RDKZTFDC.js → clean-WPLBDRSW.js} +20 -19
  108. package/dist/cli.js +61 -59
  109. package/dist/{cloud-2MGM3NSJ.js → cloud-VMSG2SJB.js} +4 -4
  110. package/dist/{cloudrun-YQONSO6B.js → cloudrun-AXB4G6X2.js} +4 -4
  111. package/dist/commands/layout-audit.browser.js +37 -0
  112. package/dist/{compare-HAMCTSXR.js → compare-NVW3E74E.js} +33 -30
  113. package/dist/{compiler-YUM2ODOP.js → compiler-GHX7QLHL.js} +2 -2
  114. package/dist/{component-2MDTLX6B.js → component-ZQAP7CBI.js} +3 -3
  115. package/dist/{compositions-EEXADRKF.js → compositions-FKHNCB6H.js} +15 -12
  116. package/dist/{delete-X4I63WKN.js → delete-XYC7FN6A.js} +8 -6
  117. package/dist/{deploy-BBGSS4I3.js → deploy-DOJS666X.js} +2 -2
  118. package/dist/{dist-ZE5X6MWG.js → dist-3Q2DNDSR.js} +2 -2
  119. package/dist/{doctor-BNZ6D33R.js → doctor-7CUFMW3Y.js} +14 -13
  120. package/dist/{events-6DI3CND6.js → events-K7HUJ4DO.js} +9 -6
  121. package/dist/{events-BYOF33UK.js → events-KGXVDZV7.js} +9 -6
  122. package/dist/{feedback-Z3JOC7TX.js → feedback-F7WLYJGJ.js} +16 -13
  123. package/dist/{ffmpeg-S44OTBCI.js → ffmpeg-ZFHN4YZ2.js} +7 -6
  124. package/dist/{figma-TVX2H5B3.js → figma-7QKRKT5Q.js} +3 -3
  125. package/dist/fontLocalizeCli.js +11 -10
  126. package/dist/{get-DWKTDVP7.js → get-XKPYG6IC.js} +8 -6
  127. package/dist/{gpuPolicy-GTBFSUHB.js → gpuPolicy-A74BROG6.js} +7 -6
  128. package/dist/{grade-compare-S4P6Z265.js → grade-compare-7SR62TE5.js} +34 -31
  129. package/dist/hangReport.js +1 -1
  130. package/dist/{heifImagePrep-RKQP2Y73.js → heifImagePrep-XTCBHE3B.js} +8 -7
  131. package/dist/{help-WIC6DHOF.js → help-B7CXC4J5.js} +3 -3
  132. package/dist/{history-UBRUPAHH.js → history-3INEHHZ4.js} +12 -9
  133. package/dist/hyperframe.manifest.json +1 -1
  134. package/dist/hyperframe.runtime.iife.js +71 -71
  135. package/dist/hyperframes-player.global.js +3 -3
  136. package/dist/{info-F5LTDQ6I.js → info-J3U63EFT.js} +13 -10
  137. package/dist/{init-6L4WQKOD.js → init-2IEXXRG2.js} +33 -30
  138. package/dist/{inspect-DUIBB263.js → inspect-IRJABR66.js} +34 -31
  139. package/dist/{installer-JKZ5N47B.js → installer-6JLQM6OJ.js} +4 -4
  140. package/dist/{keyframes-5FQNFJFE.js → keyframes-G2TSKZRL.js} +12 -9
  141. package/dist/{lambda-YTO6N2QH.js → lambda-QFFFCFK3.js} +11 -10
  142. package/dist/{layout-H3F2LW62.js → layout-INRUYIDJ.js} +34 -31
  143. package/dist/{lint-WUWLVCJQ.js → lint-BHPBD7Z3.js} +13 -10
  144. package/dist/{list-3EFECRWU.js → list-BGL5PH6J.js} +8 -6
  145. package/dist/{localPage-C3267GRQ.js → localPage-MLFDX4Y6.js} +7 -6
  146. package/dist/{login-W5L64YRM.js → login-ABDL65L6.js} +19 -18
  147. package/dist/{logout-C6P6ERZ3.js → logout-CXGSSQ4Q.js} +6 -4
  148. package/dist/{manager-46MZB3HK.js → manager-DEKPCPWH.js} +9 -8
  149. package/dist/{manager-IZIK7BHN.js → manager-LXWVBDLM.js} +3 -3
  150. package/dist/{media-treatment-XBQWOU5U.js → media-treatment-BQDTCBIT.js} +27 -15
  151. package/dist/{models-ZHNV44XV.js → models-SJIA5QDV.js} +11 -10
  152. package/dist/{motionShot-DO4EQ2U3.js → motionShot-46J3W5UJ.js} +17 -16
  153. package/dist/{normalize-audio-2EXTDNBF.js → normalize-audio-UXAJSQKI.js} +14 -11
  154. package/dist/{open-7ZOY3KI6.js → open-DHRYP3N3.js} +17 -14
  155. package/dist/{parakeetRunner-H3B4QP6W.js → parakeetRunner-WKMM4TYU.js} +13 -12
  156. package/dist/{pipeline-7OKHNKGP.js → pipeline-EIVKRUX2.js} +11 -10
  157. package/dist/{play-B5NNOJN7.js → play-J5A7KHNF.js} +24 -21
  158. package/dist/{preflight-R26JZQJU.js → preflight-GKIQIXFQ.js} +10 -9
  159. package/dist/{present-Y2SEWKGO.js → present-ZDXILGQJ.js} +20 -17
  160. package/dist/{preview-7CZX4A5T.js → preview-A2MLHZFF.js} +23 -20
  161. package/dist/{producer-WTO6XYGU.js → producer-NYWYRG4X.js} +1 -1
  162. package/dist/{projectConfig-SJ5NIYUO.js → projectConfig-DY6FHC7A.js} +6 -6
  163. package/dist/{publication-47KNSXP7.js → publication-N4WHPZOW.js} +2 -2
  164. package/dist/{publish-4J4EKKQN.js → publish-26W6VDND.js} +15 -13
  165. package/dist/{refresh-IYRGLHG5.js → refresh-VJ4FQVH2.js} +3 -2
  166. package/dist/{remove-background-UKC6NKDH.js → remove-background-JYUB75RB.js} +12 -11
  167. package/dist/{render-TABKCTMF.js → render-AQH2VMHO.js} +123 -70
  168. package/dist/{render-DBELH4AC.js → render-JZWO3VX3.js} +23 -20
  169. package/dist/{render-S2FJRE3H.js → render-YPI6CDRS.js} +5 -5
  170. package/dist/{render-batch-6YJMWHZ4.js → render-batch-GR2Y3F2S.js} +5 -5
  171. package/dist/renderSetupWorker.js +4 -4
  172. package/dist/{resolver-EDI3JND5.js → resolver-LTLSX6DR.js} +4 -4
  173. package/dist/{screenshotCapture-HDRHY4NN.js → screenshotCapture-U3IYWTDB.js} +1 -1
  174. package/dist/{sherpa-R6HDRJCA.js → sherpa-2DJ33LQP.js} +12 -11
  175. package/dist/sherpaWorker.js +1 -1
  176. package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +1 -1
  177. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +9 -0
  178. package/dist/skills/hyperframes-cli/references/preview-render.md +2 -2
  179. package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +2 -2
  180. package/dist/skills/media-use/references/meta.md +6 -5
  181. package/dist/skills/media-use/scripts/lib/telemetry.mjs +49 -15
  182. package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +19 -5
  183. package/dist/{skills-2QIW3EOJ.js → skills-OF7XMPKX.js} +11 -8
  184. package/dist/{skillsUpdateCheck-XG5FPCU5.js → skillsUpdateCheck-E3HPT4PS.js} +5 -4
  185. package/dist/{snapshot-C5XBKYEF.js → snapshot-6F5XK22M.js} +57 -37
  186. package/dist/{src-E467QUBK.js → src-JUJFZ6GC.js} +10 -5
  187. package/dist/{src-CT2X45TD.js → src-UNN3TXHH.js} +9 -8
  188. package/dist/{staticProjectServer-G54Z4BH7.js → staticProjectServer-DLSH7DHS.js} +18 -17
  189. package/dist/{status-SLILCDBZ.js → status-TJFZFDGS.js} +5 -4
  190. package/dist/studio/assets/{hyperframes-player-H1DIJsJZ.js → hyperframes-player-D38lr2hR.js} +3 -3
  191. package/dist/studio/assets/{index-BftVE_0y.js → index-C-DCQ7nQ.js} +120 -120
  192. package/dist/studio/assets/{index-v_hWj6Kv.js → index-CJ28BLvq.js} +1 -1
  193. package/dist/studio/index.html +1 -1
  194. package/dist/{studio-api-O52RPXZC.js → studio-api-5YATSN7H.js} +8 -8
  195. package/dist/{studioServer-WDTS6ZDI.js → studioServer-O3FSLOUF.js} +54 -51
  196. package/dist/{synthesize-FQML2LN2.js → synthesize-IKSZPKFJ.js} +2 -2
  197. package/dist/{system-MVRF5UM2.js → system-FDPS57FU.js} +2 -2
  198. package/dist/{telemetry-NTO4FJFN.js → telemetry-CY7V7FIN.js} +6 -5
  199. package/dist/{telemetry-GEHWCV7C.js → telemetry-MMCJ2ORL.js} +9 -6
  200. package/dist/{timeline-IVQDNGWZ.js → timeline-ZBJTZK6E.js} +23 -20
  201. package/dist/{tokens-EN5PVV3Y.js → tokens-JFYRYRDK.js} +2 -2
  202. package/dist/{transcribe-HKS3PZAF.js → transcribe-QUMMQM34.js} +11 -10
  203. package/dist/{transcribe-NXMIBNLX.js → transcribe-UVQQ3OMR.js} +21 -18
  204. package/dist/{tts-K5HRN6NQ.js → tts-MQNOBHLH.js} +3 -3
  205. package/dist/{updateCheck-35TT5GRF.js → updateCheck-VMMBGLTI.js} +4 -3
  206. package/dist/{upgrade-G6EOHGUS.js → upgrade-4VYNPIFQ.js} +4 -3
  207. package/dist/{urlDownloader-X7V63HCF.js → urlDownloader-EAPV3CZL.js} +6 -5
  208. package/dist/{validate-4JUCRS64.js → validate-JJG6Q6IH.js} +28 -25
  209. package/dist/{video-SWQXDG7J.js → video-7MJZ7IYL.js} +8 -7
  210. package/dist/warmCheck.js +44 -41
  211. package/dist/warmCheckClient.js +1 -1
  212. package/package.json +2 -1
  213. package/dist/chunk-FBQVRYMD.js +0 -5061
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-X6JUUQCM.js";
11
11
  import {
12
12
  getFreeDiskMb
13
- } from "./chunk-5766TK7Q.js";
13
+ } from "./chunk-LAGZGKKN.js";
14
14
  import {
15
15
  browserPathFromEnv,
16
16
  managedChromeVersion,
@@ -6,13 +6,28 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/utils/download.ts
9
- import { randomUUID } from "crypto";
10
- import { createWriteStream, renameSync, statSync, unlinkSync } from "fs";
9
+ import {
10
+ closeSync,
11
+ createWriteStream,
12
+ existsSync,
13
+ openSync,
14
+ readdirSync,
15
+ readFileSync,
16
+ renameSync,
17
+ statSync,
18
+ unlinkSync,
19
+ writeFileSync,
20
+ writeSync
21
+ } from "fs";
11
22
  import { get as httpsGet } from "https";
12
23
  import { once } from "events";
13
24
  import { Transform } from "stream";
25
+ import { basename, dirname, join } from "path";
14
26
  import { pipeline } from "stream/promises";
27
+ import { setTimeout as sleep } from "timers/promises";
28
+ import { randomUUID } from "crypto";
15
29
  var DEFAULT_DOWNLOAD_TIMEOUT_MS = 3e4;
30
+ var LOCK_POLL_MS = 500;
16
31
  var REDIRECT_CODES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
17
32
  function redirectTarget(location, from) {
18
33
  return new URL(location, from).toString();
@@ -49,8 +64,8 @@ function measureDownload(options, startBytes, totalBytes) {
49
64
  complete: () => options.onProgress?.(receivedBytes, totalBytes)
50
65
  };
51
66
  }
52
- function getUrl(url, signal, offset, onResponse) {
53
- const headers = offset > 0 ? { Range: `bytes=${offset}-` } : void 0;
67
+ function getUrl(url, signal, offset, etag, onResponse) {
68
+ const headers = offset > 0 ? { Range: `bytes=${offset}-`, ...etag ? { "If-Range": etag } : {} } : void 0;
54
69
  if (!signal && !headers) return httpsGet(url, onResponse);
55
70
  return httpsGet(
56
71
  url,
@@ -94,6 +109,11 @@ function planResponse(res, offset) {
94
109
  async function writeBody(res, tmp, plan, state, options) {
95
110
  state.received = plan.start;
96
111
  state.total = plan.total;
112
+ if (!plan.append) {
113
+ const etag = res.headers.etag;
114
+ state.etag = typeof etag === "string" ? etag : null;
115
+ state.onFreshBody?.(state.etag);
116
+ }
97
117
  const meter = measureDownload(options, plan.start, plan.total);
98
118
  const file = createWriteStream(tmp, { flags: plan.append ? "a" : "w" });
99
119
  try {
@@ -151,7 +171,7 @@ function downloadAttempt(url, tmp, state, options) {
151
171
  };
152
172
  let request;
153
173
  try {
154
- request = getUrl(u, options.signal, offset, onResponse);
174
+ request = getUrl(u, options.signal, offset, state.etag, onResponse);
155
175
  } catch (error) {
156
176
  reject(error);
157
177
  return;
@@ -172,28 +192,148 @@ function downloadAttempt(url, tmp, state, options) {
172
192
  follow(url);
173
193
  });
174
194
  }
175
- async function downloadFile(url, dest, options = {}) {
176
- const tmp = `${dest}.${process.pid}.${randomUUID()}.tmp`;
177
- const state = { received: 0, total: null };
195
+ function processAlive(pid) {
196
+ try {
197
+ process.kill(pid, 0);
198
+ return true;
199
+ } catch (error) {
200
+ return error.code === "EPERM";
201
+ }
202
+ }
203
+ var heldLocks = /* @__PURE__ */ new Set();
204
+ function readLock(lock) {
205
+ try {
206
+ return readFileSync(lock, "utf8");
207
+ } catch {
208
+ return "";
209
+ }
210
+ }
211
+ function lockIsStale(owner) {
212
+ const pid = Number(owner.split(" ")[0]);
213
+ if (!(pid > 0)) return false;
214
+ return pid === process.pid ? !heldLocks.has(owner) : !processAlive(pid);
215
+ }
216
+ async function acquireLock(lock, signal) {
217
+ const owner = `${process.pid} ${randomUUID()}`;
218
+ let waited = false;
219
+ for (; ; ) {
220
+ try {
221
+ const fd = openSync(lock, "wx");
222
+ writeSync(fd, owner);
223
+ closeSync(fd);
224
+ heldLocks.add(owner);
225
+ return { owner, waited };
226
+ } catch (error) {
227
+ if (error.code !== "EEXIST") throw error;
228
+ }
229
+ const seen = readLock(lock);
230
+ if (lockIsStale(seen) && readLock(lock) === seen) {
231
+ removePartialFile(lock);
232
+ continue;
233
+ }
234
+ signal?.throwIfAborted();
235
+ waited = true;
236
+ await sleep(LOCK_POLL_MS);
237
+ }
238
+ }
239
+ function removeStrayPartials(dest) {
240
+ const prefix = `${basename(dest)}.`;
241
+ let names = [];
242
+ try {
243
+ names = readdirSync(dirname(dest));
244
+ } catch {
245
+ return;
246
+ }
247
+ for (const name of names) {
248
+ const pid = name.startsWith(prefix) && name.endsWith(".tmp") ? Number(name.slice(prefix.length).split(".")[0]) : 0;
249
+ if (pid > 0 && !processAlive(pid)) removePartialFile(join(dirname(dest), name));
250
+ }
251
+ }
252
+ function resumableEtag(meta, url) {
253
+ try {
254
+ const recorded = JSON.parse(readFileSync(meta, "utf8"));
255
+ return recorded.url === url && typeof recorded.etag === "string" ? recorded.etag : null;
256
+ } catch {
257
+ return null;
258
+ }
259
+ }
260
+ function afterFailure(error, attempt) {
261
+ const message = error instanceof Error ? error.message : "";
262
+ if (attempt.aborted || message.startsWith("Download exceeded")) return "discard";
263
+ if (attempt.progressed) return "continue";
264
+ if (attempt.resumed && message.startsWith("Download failed: HTTP")) return "restart";
265
+ return attempt.resumable ? "keep" : "discard";
266
+ }
267
+ function discardPart(part) {
268
+ removePartialFile(part);
269
+ removePartialFile(`${part}.json`);
270
+ }
271
+ function openPart(url, dest) {
272
+ const part = `${dest}.part`;
273
+ removeStrayPartials(dest);
274
+ const etag = resumableEtag(`${part}.json`, url);
275
+ if (!etag) removePartialFile(part);
276
+ return {
277
+ received: etag ? fileSize(part) : 0,
278
+ total: null,
279
+ etag,
280
+ onFreshBody: (fresh) => {
281
+ if (fresh) writeFileSync(`${part}.json`, JSON.stringify({ url, etag: fresh }));
282
+ else removePartialFile(`${part}.json`);
283
+ }
284
+ };
285
+ }
286
+ function assertComplete(part, state) {
287
+ const size = fileSize(part);
288
+ if (state.total !== null && size !== state.total) {
289
+ state.received = size;
290
+ throw new Error(`Download incomplete: ${size} of ${state.total} bytes`);
291
+ }
292
+ }
293
+ async function publishPart(part, dest, options) {
294
+ try {
295
+ await options.verify?.(part);
296
+ } catch (error) {
297
+ discardPart(part);
298
+ throw error;
299
+ }
300
+ renameSync(part, dest);
301
+ removePartialFile(`${part}.json`);
302
+ }
303
+ async function downloadToPart(url, dest, options) {
304
+ const part = `${dest}.part`;
305
+ const state = openPart(url, dest);
178
306
  for (; ; ) {
179
307
  const before = state.received;
180
308
  try {
181
- await downloadAttempt(url, tmp, state, options);
182
- const size = fileSize(tmp);
183
- if (state.total !== null && size !== state.total) {
184
- state.received = size;
185
- throw new Error(`Download incomplete: ${size} of ${state.total} bytes`);
186
- }
187
- renameSync(tmp, dest);
188
- return;
309
+ await downloadAttempt(url, part, state, options);
310
+ assertComplete(part, state);
311
+ break;
189
312
  } catch (error) {
190
- const overLimit = error instanceof Error && error.message.startsWith("Download exceeded");
191
- if (options.signal?.aborted || overLimit || state.received <= before) {
192
- removePartialFile(tmp);
193
- throw error;
194
- }
313
+ const step = afterFailure(error, {
314
+ aborted: options.signal?.aborted === true,
315
+ progressed: state.received > before,
316
+ resumed: before > 0,
317
+ resumable: state.etag !== null && state.received > 0
318
+ });
319
+ if (step === "continue") continue;
320
+ if (step !== "keep") discardPart(part);
321
+ if (step !== "restart") throw error;
322
+ state.received = 0;
323
+ state.etag = null;
195
324
  }
196
325
  }
326
+ await publishPart(part, dest, options);
327
+ }
328
+ async function downloadFile(url, dest, options = {}) {
329
+ const lock = `${dest}.lock`;
330
+ const { owner, waited } = await acquireLock(lock, options.signal);
331
+ try {
332
+ if (!(waited && existsSync(dest))) await downloadToPart(url, dest, options);
333
+ } finally {
334
+ heldLocks.delete(owner);
335
+ if (readLock(lock) === owner) removePartialFile(lock);
336
+ }
197
337
  }
198
338
 
199
339
  export {
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-XQ26I3PL.js";
14
14
  import {
15
15
  createProjectConfig
16
- } from "./chunk-VEWR5HXT.js";
16
+ } from "./chunk-FUSUFW2L.js";
17
17
  import {
18
18
  isHyperframesProject
19
- } from "./chunk-GFA5ZCVI.js";
19
+ } from "./chunk-DYHAZFK3.js";
20
20
 
21
21
  // src/utils/desktopApp.ts
22
22
  import { spawn, spawnSync } from "child_process";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-5ZBMHUY2.js";
10
10
  import {
11
11
  trackCommandFailure
12
- } from "./chunk-4NJ57TSE.js";
12
+ } from "./chunk-QGMRSNG5.js";
13
13
  import {
14
14
  failCommand
15
15
  } from "./chunk-DP5LF7GF.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  setHostHandlesSigint
9
- } from "./chunk-LIOE46OG.js";
9
+ } from "./chunk-VZENYSX7.js";
10
10
  import {
11
11
  processAncestorSnapshot,
12
12
  processIdentity,
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-TSYRN646.js";
12
12
  import {
13
13
  fetchLocalPageUrl
14
- } from "./chunk-7YUYG6S6.js";
14
+ } from "./chunk-3AOXAXTA.js";
15
15
  import {
16
16
  ensureCaptureDirSync,
17
17
  writeCaptureFileSync
@@ -25,7 +25,7 @@ import {
25
25
  } from "./chunk-AWDFDFI3.js";
26
26
  import {
27
27
  isBlockedNetworkHost
28
- } from "./chunk-LIOE46OG.js";
28
+ } from "./chunk-VZENYSX7.js";
29
29
  import {
30
30
  DOMParser,
31
31
  parseHTML
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType,
9
9
  injectMediaCodecMapIntoHtml
10
- } from "./chunk-GRCS7WRH.js";
10
+ } from "./chunk-RXQU3QM4.js";
11
11
  import {
12
12
  PROXY_VARIANT_CONFIG,
13
13
  ProxyCapacityError,
@@ -18,23 +18,23 @@ import {
18
18
  recordProxyRequest,
19
19
  resolveProxy,
20
20
  resolveProxyVariantRequest
21
- } from "./chunk-VAOROEWU.js";
21
+ } from "./chunk-EB44YMQO.js";
22
22
  import {
23
23
  findStageProxyBox
24
- } from "./chunk-XM3NMXLX.js";
24
+ } from "./chunk-GTKUQUZ6.js";
25
25
  import {
26
26
  resolveAutoProxy
27
- } from "./chunk-VEWR5HXT.js";
27
+ } from "./chunk-FUSUFW2L.js";
28
28
  import {
29
29
  listenOnBrowserSafePort
30
- } from "./chunk-LIOE46OG.js";
30
+ } from "./chunk-VZENYSX7.js";
31
31
  import {
32
32
  stripSdrPngColourTags
33
- } from "./chunk-4HMG5CQJ.js";
33
+ } from "./chunk-Q3OKLJ34.js";
34
34
  import {
35
35
  PREVIEW_PROXY_BOX_PARAM,
36
36
  parsePreviewProxyBox
37
- } from "./chunk-GFA5ZCVI.js";
37
+ } from "./chunk-DYHAZFK3.js";
38
38
  import {
39
39
  decodeWellFormedEscapes
40
40
  } from "./chunk-KSC4O2RY.js";
@@ -19,7 +19,7 @@ import {
19
19
  splitElementInHtml,
20
20
  unwrapElementsFromHtml,
21
21
  wrapElementsInHtml
22
- } from "./chunk-QCCPXMKP.js";
22
+ } from "./chunk-OFJTXNRS.js";
23
23
  import {
24
24
  MEDIA_LINK_ATTR,
25
25
  relinkSplitHalves
@@ -32,7 +32,7 @@ import {
32
32
  requestedProjectPath,
33
33
  requiredFfmpeg,
34
34
  resolveLocalAudioPath
35
- } from "./chunk-TYMD647L.js";
35
+ } from "./chunk-URUUGFZD.js";
36
36
  import {
37
37
  HistoryBusyError,
38
38
  MAX_WINDOW_IDLE_MS,
@@ -70,11 +70,11 @@ import {
70
70
  scanProjectMedia,
71
71
  shouldPrewarmProxy,
72
72
  waitForProxy
73
- } from "./chunk-VAOROEWU.js";
73
+ } from "./chunk-EB44YMQO.js";
74
74
  import {
75
75
  probeAudioTrack,
76
76
  probeMediaMetadata
77
- } from "./chunk-LRYNDYAE.js";
77
+ } from "./chunk-MO6DJMZP.js";
78
78
  import {
79
79
  STUDIO_MOTION_PATH,
80
80
  createStudioMotionRenderBodyScript,
@@ -115,7 +115,7 @@ import {
115
115
  ensureHfIds,
116
116
  stampHfIdsInPlace,
117
117
  stripSdrPngColourTags
118
- } from "./chunk-4HMG5CQJ.js";
118
+ } from "./chunk-Q3OKLJ34.js";
119
119
  import {
120
120
  GSAP_BASE_URL_META,
121
121
  PREVIEW_PROXY_BOX_PARAM,
@@ -132,7 +132,7 @@ import {
132
132
  normalizeGsapLocalRoot,
133
133
  parseFps,
134
134
  parsePreviewProxyBox
135
- } from "./chunk-GFA5ZCVI.js";
135
+ } from "./chunk-DYHAZFK3.js";
136
136
  import {
137
137
  AFTER_FONTS_SCRIPT_TYPE,
138
138
  RUNTIME_BOOTSTRAP_ATTR,
@@ -147,7 +147,7 @@ import {
147
147
  resolveRateSpec,
148
148
  sourceTimeAt,
149
149
  stripEmbeddedRuntimeScripts
150
- } from "./chunk-FBQVRYMD.js";
150
+ } from "./chunk-IVRKWQTX.js";
151
151
  import {
152
152
  ProjectRootMissingError,
153
153
  folderGone,
@@ -5592,7 +5592,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
5592
5592
  let block = extractGsapScriptBlock(html);
5593
5593
  if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
5594
5594
  const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
5595
- const { GSAP_CDN } = await import("./dist-ZE5X6MWG.js");
5595
+ const { GSAP_CDN } = await import("./dist-3Q2DNDSR.js");
5596
5596
  const bootstrap = [
5597
5597
  `<script src="${GSAP_CDN}"></script>`,
5598
5598
  "<script>",
@@ -8914,7 +8914,7 @@ function growRootToFit(document2) {
8914
8914
  }
8915
8915
  if (end > rootDuration + EPSILON) root.setAttribute("data-duration", String(round3(end)));
8916
8916
  }
8917
- var COPIED_PICTURE_ATTRS = ["class", "style", "data-color-grading"];
8917
+ var COPIED_PICTURE_ATTRS = ["class", "style", "data-color-grading", "data-color-group"];
8918
8918
  function buildStill(document2, video, input) {
8919
8919
  const img = document2.createElement("img");
8920
8920
  img.setAttribute("id", input.id);
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  withOwner
9
- } from "./chunk-YDHXPY23.js";
9
+ } from "./chunk-7P76YIVS.js";
10
10
  import {
11
11
  HistoryBusyError,
12
12
  beginArtifactCapture
@@ -12,6 +12,22 @@ import {
12
12
 
13
13
  // src/capture/navigateForCapture.ts
14
14
  var NETWORK_IDLE_ATTEMPT_MS = 3e4;
15
+ var PROXY_FAILURES = {
16
+ "net::ERR_TUNNEL_CONNECTION_FAILED": (host) => `Your network's proxy refused the connection to ${host}. Ask whoever runs it to allow ${host}.`,
17
+ "net::ERR_PROXY_CONNECTION_FAILED": () => "Could not reach your network's proxy. Check the proxy address and that the proxy is running, or ask whoever runs it."
18
+ };
19
+ var PROXY_FAILURE = new RegExp(Object.keys(PROXY_FAILURES).join("|"));
20
+ function explainProxyRefusal(err, url) {
21
+ const said = err instanceof Error ? err.message : String(err);
22
+ const code = PROXY_FAILURE.exec(said)?.[0];
23
+ if (!code) return err;
24
+ let host = "the site";
25
+ try {
26
+ host = new URL(url).host;
27
+ } catch {
28
+ }
29
+ return new Error(`${PROXY_FAILURES[code](host)} (${code})`, { cause: err });
30
+ }
15
31
  function networkIdleAttemptTimeoutMs(totalTimeoutMs) {
16
32
  return Math.min(NETWORK_IDLE_ATTEMPT_MS, Math.max(0, totalTimeoutMs));
17
33
  }
@@ -30,13 +46,12 @@ async function navigateForCapture(page, url, totalTimeoutMs) {
30
46
  };
31
47
  } catch (err) {
32
48
  if (!isNavigationTimeoutError(err) || networkIdleTimeoutMs >= totalTimeoutMs) {
33
- throw err;
49
+ throw explainProxyRefusal(err, url);
34
50
  }
35
51
  }
36
52
  const fallbackTimeoutMs = totalTimeoutMs - networkIdleTimeoutMs;
37
- const response = await page.goto(url, {
38
- waitUntil: "domcontentloaded",
39
- timeout: fallbackTimeoutMs
53
+ const response = await page.goto(url, { waitUntil: "domcontentloaded", timeout: fallbackTimeoutMs }).catch((err) => {
54
+ throw explainProxyRefusal(err, url);
40
55
  });
41
56
  return {
42
57
  response,
@@ -7,19 +7,19 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  ambiguousIssue,
9
9
  loadBrowserScript
10
- } from "./chunk-7W4DJKZA.js";
10
+ } from "./chunk-43USF7JF.js";
11
11
  import {
12
12
  auditClipDurations,
13
13
  shouldIgnoreHttpError,
14
14
  shouldIgnoreRequestFailure
15
- } from "./chunk-CATLCEDQ.js";
15
+ } from "./chunk-UJEEURID.js";
16
16
  import {
17
17
  serveStaticProjectHtml
18
- } from "./chunk-GVHEOOGM.js";
18
+ } from "./chunk-ROUK3OL2.js";
19
19
  import {
20
20
  STUDIO_PREVIEW_CAPTURE_MODE,
21
21
  STUDIO_PREVIEW_MARK_META
22
- } from "./chunk-GRCS7WRH.js";
22
+ } from "./chunk-RXQU3QM4.js";
23
23
  import {
24
24
  artifactDirectory,
25
25
  finishSnapshotRun
@@ -31,7 +31,7 @@ import {
31
31
  proxyVariantFor,
32
32
  resolveProxies,
33
33
  scanProjectMediaCodecMap
34
- } from "./chunk-VAOROEWU.js";
34
+ } from "./chunk-EB44YMQO.js";
35
35
  import {
36
36
  AUDIT_SEEK_OPTIONS,
37
37
  DEFAULT_ZOOM_PADDING_PX,
@@ -45,21 +45,21 @@ import {
45
45
  seekCompositionTimeline,
46
46
  seekInPage,
47
47
  waitForPreferredSeekTarget
48
- } from "./chunk-FC6BAQV5.js";
48
+ } from "./chunk-VDFY4FE5.js";
49
49
  import {
50
50
  findStageProxyBox
51
- } from "./chunk-XM3NMXLX.js";
51
+ } from "./chunk-GTKUQUZ6.js";
52
52
  import {
53
53
  resolveAutoProxy
54
- } from "./chunk-VEWR5HXT.js";
54
+ } from "./chunk-FUSUFW2L.js";
55
55
  import {
56
56
  BrowserCleanupError,
57
57
  closeManagedBrowser,
58
58
  onStopSignal
59
- } from "./chunk-53ERMOK2.js";
59
+ } from "./chunk-OWU2BURB.js";
60
60
  import {
61
61
  injectTagsAtHeadStart
62
- } from "./chunk-FBQVRYMD.js";
62
+ } from "./chunk-IVRKWQTX.js";
63
63
  import {
64
64
  normalizeErrorMessage
65
65
  } from "./chunk-E63BDV4Z.js";
@@ -463,19 +463,24 @@ function elapsedText(ms) {
463
463
  function startCopyHeartbeat(sources, cached) {
464
464
  const startedAt = Date.now();
465
465
  const latest = /* @__PURE__ */ new Map();
466
+ const total = cached.filter((isCached) => !isCached).length;
467
+ let finished = 0;
466
468
  const timer = setInterval(() => {
467
469
  for (const [index, { doneSeconds, totalSeconds }] of latest) {
468
470
  if (cached[index]) continue;
469
471
  const done = totalSeconds ? `${Math.min(100, Math.floor(doneSeconds / totalSeconds * 100))}%` : "";
470
472
  console.error(
471
- `[hyperframes] browser-playable copy of ${sources[index].file}: ${done || `${Math.floor(doneSeconds)}s done`} (${elapsedText(Date.now() - startedAt)} so far)`
473
+ `[hyperframes] making browser-playable copies: ${finished} of ${total} done. ${sources[index].file}: ${done || `${Math.floor(doneSeconds)}s done`} (${elapsedText(Date.now() - startedAt)} so far)`
472
474
  );
473
475
  }
474
476
  }, COPY_HEARTBEAT_MS);
475
477
  timer.unref();
476
478
  return {
477
479
  progress: (index, progress) => void latest.set(index, progress),
478
- settled: (index) => void latest.delete(index),
480
+ settled: (index) => {
481
+ latest.delete(index);
482
+ if (!cached[index]) finished += 1;
483
+ },
479
484
  stop: () => clearInterval(timer)
480
485
  };
481
486
  }
@@ -573,7 +578,7 @@ function proxyFailedDraft(message) {
573
578
  return { code: "media_proxy_failed", severity: "warning", message, time: 0 };
574
579
  }
575
580
  async function loadCheckHtmlWithDeferredMedia(dir) {
576
- const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-6VHTVRO3.js");
581
+ const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-Y7VGIRFK.js");
577
582
  return withCapturePreviewMark(await bundleWithLocalizedFonts(dir));
578
583
  }
579
584
  function withCapturePreviewMark(html) {
@@ -635,7 +640,7 @@ async function runBrowserCheck(project, options, motion, runGrid, deadline, prel
635
640
  ).map((draft) => runtimeFinding(draft, rootAnchor))
636
641
  }));
637
642
  const launchSettleMs = Date.now() - launchSettleStart;
638
- const { analyzeClipMediaFit } = await import("./src-E467QUBK.js");
643
+ const { analyzeClipMediaFit } = await import("./src-JUJFZ6GC.js");
639
644
  for (const entry of await auditClipDurations(page, analyzeClipMediaFit, options.timeout)) {
640
645
  drafts.push({ code: "clip_media_fit", severity: entry.level, message: entry.text, time: 0 });
641
646
  }
@@ -772,7 +777,7 @@ async function captureFindingCrops(project, options, requests, deadline) {
772
777
  async function captureFindingFrames(project, options, requests, deadline) {
773
778
  if (requests.length === 0) return { written: [], inspected: [] };
774
779
  const inspector = requests.some((request) => request.inspect?.length) ? await prepareFindingInspector(project.dir, async (bundleOptions) => {
775
- const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-6VHTVRO3.js");
780
+ const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-Y7VGIRFK.js");
776
781
  return withCapturePreviewMark(
777
782
  await bundleWithLocalizedFonts(project.dir, void 0, bundleOptions)
778
783
  );
@@ -10,7 +10,7 @@ import {
10
10
  isDevice,
11
11
  isQuality,
12
12
  render
13
- } from "./chunk-ISTUBRV3.js";
13
+ } from "./chunk-QETCWXRM.js";
14
14
 
15
15
  // src/api/removeBackground.ts
16
16
  import { resolve } from "path";