hyperframes 0.8.173 → 0.8.175

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 (187) hide show
  1. package/dist/{add-V7VBTFNG.js → add-S4AOKSNH.js} +14 -15
  2. package/dist/{animatedGifPrep-62S72ZY6.js → animatedGifPrep-QRDM2NMV.js} +9 -11
  3. package/dist/api.js +19 -21
  4. package/dist/{asset-Z4JI2F6V.js → asset-DQ45BUBL.js} +2 -2
  5. package/dist/{assetCataloger-Q7LE7BCC.js → assetCataloger-NPDCMAYE.js} +9 -11
  6. package/dist/{audio-HIHNLQJ7.js → audio-OOAXEELO.js} +16 -18
  7. package/dist/{auth-4K6DSZCD.js → auth-33IY64LT.js} +2 -2
  8. package/dist/{autoUpdate-DXZDD5VT.js → autoUpdate-KGLJUGNZ.js} +2 -2
  9. package/dist/{backgroundChecks-ODMKKJ4S.js → backgroundChecks-DQPHYLVN.js} +3 -3
  10. package/dist/backgroundChecksWorker.js +3 -3
  11. package/dist/{batchRender-I4BFJGPA.js → batchRender-KXXTVNPB.js} +4 -4
  12. package/dist/{beats-7QCA6GDR.js → beats-WDYSCACS.js} +6 -7
  13. package/dist/{benchmark-IT4WTSMZ.js → benchmark-WOAULMYW.js} +11 -12
  14. package/dist/{browser-5VHM72PM.js → browser-2HX46R74.js} +5 -6
  15. package/dist/{bundleWithLocalizedFonts-MKTQCB2Y.js → bundleWithLocalizedFonts-32N7TVM6.js} +2 -2
  16. package/dist/{capture-B5Y45EWD.js → capture-5ASPHTMF.js} +22 -18
  17. package/dist/{capture-CMNNIMIL.js → capture-7LR5UVM2.js} +2 -2
  18. package/dist/{catalog-AKPJ65GY.js → catalog-LVW3RT4U.js} +15 -16
  19. package/dist/{catch-up-2SVYRMD3.js → catch-up-W6Z73GXL.js} +6 -7
  20. package/dist/{check-Q7AX6K7O.js → check-C23ZWACZ.js} +56 -52
  21. package/dist/{checkBrowser-CPXD5BZY.js → checkBrowser-WS6FSLBJ.js} +182 -88
  22. package/dist/{chunk-QVPOR7WE.js → chunk-32GKETR7.js} +22 -1
  23. package/dist/{chunk-4RDDUBOC.js → chunk-3Q4Y33FT.js} +11 -11
  24. package/dist/{chunk-2DWYRHJS.js → chunk-3SWMUZ4Y.js} +2 -2
  25. package/dist/{chunk-PBVUVNWP.js → chunk-3X3CELOP.js} +1 -1
  26. package/dist/{chunk-5E43335V.js → chunk-42T7OP4O.js} +1 -1
  27. package/dist/{chunk-TWZRU64W.js → chunk-4XM6VXLN.js} +7 -7
  28. package/dist/{chunk-6JQDH4O6.js → chunk-7E4YFL4U.js} +1 -1
  29. package/dist/{chunk-NOMPG5HQ.js → chunk-7GUAZGSW.js} +3 -3
  30. package/dist/{chunk-XRQBHOBT.js → chunk-B4VT6YU2.js} +2 -2
  31. package/dist/{chunk-2BL7BJ22.js → chunk-BHMWVRNS.js} +1 -1
  32. package/dist/{chunk-LN4SZS7W.js → chunk-CEYY3SOX.js} +3 -3
  33. package/dist/chunk-CIWX5UKC.js +16 -0
  34. package/dist/{chunk-CBOYQOLY.js → chunk-DQY6WTF7.js} +1 -1
  35. package/dist/{chunk-BCPJSBCS.js → chunk-DZMWNCHM.js} +7 -3
  36. package/dist/chunk-EEXE43II.js +3805 -0
  37. package/dist/{chunk-ROQBQHBK.js → chunk-EKDTCSCL.js} +1 -1
  38. package/dist/{chunk-L4SFGSSQ.js → chunk-FRNKM4MG.js} +1 -1
  39. package/dist/{chunk-6HKO6VWS.js → chunk-G7I3WZK4.js} +1 -1
  40. package/dist/{chunk-2TNPXPI5.js → chunk-GK2FIKIQ.js} +10 -8
  41. package/dist/chunk-HIP62XAW.js +36 -0
  42. package/dist/{chunk-FDWTZVA6.js → chunk-IUOPF3DL.js} +1 -1
  43. package/dist/{chunk-N7RTLKMM.js → chunk-J53AJK3Q.js} +2 -2
  44. package/dist/{chunk-OFFNB2SU.js → chunk-JNL3RMDG.js} +241 -6
  45. package/dist/{chunk-HCOL75LA.js → chunk-JT7PV3GL.js} +3 -3
  46. package/dist/{chunk-6RIH2NDU.js → chunk-KHR4IJAW.js} +178 -122
  47. package/dist/{chunk-WIAO42MD.js → chunk-KZHYAGC3.js} +5 -5
  48. package/dist/{chunk-C4QGOXO2.js → chunk-KZQGUXG5.js} +494 -136
  49. package/dist/{chunk-2QJDC4NT.js → chunk-LY2GLSOS.js} +1 -1
  50. package/dist/{chunk-CHALU2TF.js → chunk-LZT3NUTE.js} +1 -1
  51. package/dist/{chunk-BTPZ74Z3.js → chunk-MJZQ44NV.js} +1 -1
  52. package/dist/{chunk-YOOW26KG.js → chunk-NELZN7SV.js} +2 -2
  53. package/dist/{chunk-VFCKXTBB.js → chunk-NL5F3AD4.js} +27 -38
  54. package/dist/{chunk-X3SCQP2A.js → chunk-NSWIF4VH.js} +1 -1
  55. package/dist/{chunk-L3RCYYON.js → chunk-NWEER3QY.js} +2 -2
  56. package/dist/{chunk-3O45NOL7.js → chunk-NZRAS3FB.js} +1 -1
  57. package/dist/chunk-NZZYJOMJ.js +136 -0
  58. package/dist/{chunk-5JTRGGTX.js → chunk-O6FWDZYJ.js} +1 -1
  59. package/dist/{chunk-2YTOJ447.js → chunk-OUMYTLPP.js} +3 -3
  60. package/dist/{chunk-QURKHVV5.js → chunk-OYEDHVSI.js} +1 -1
  61. package/dist/{chunk-BYRHCRU3.js → chunk-PBKOURSI.js} +2 -2
  62. package/dist/{chunk-MWNSVO4P.js → chunk-QMQZXNGU.js} +8 -8
  63. package/dist/{chunk-XDPXSQJO.js → chunk-QWCXGTOH.js} +1 -1
  64. package/dist/{chunk-V2D4QZBC.js → chunk-RAZVWSU5.js} +3 -3
  65. package/dist/{chunk-O433SZAJ.js → chunk-RERXOG54.js} +35 -16
  66. package/dist/{chunk-IK3SOMZ4.js → chunk-S354WIFQ.js} +19 -22
  67. package/dist/{chunk-QWQ6GQTI.js → chunk-T6AGUTZJ.js} +2 -4
  68. package/dist/{chunk-PCLYCYBK.js → chunk-TNDNFZOK.js} +4 -4
  69. package/dist/{chunk-SOAXQ7Q7.js → chunk-UWUKJDTA.js} +2 -2
  70. package/dist/{chunk-KR5ZHRF2.js → chunk-V7T7WA2K.js} +2 -2
  71. package/dist/{chunk-U7EGMXQR.js → chunk-VEQ7DKPG.js} +4 -17
  72. package/dist/{chunk-JYVGYKXG.js → chunk-W2LGJSEN.js} +73 -1
  73. package/dist/{chunk-ETPPGNJB.js → chunk-W5USVP6Z.js} +2 -2
  74. package/dist/{chunk-H5C375DW.js → chunk-WDFLYDKN.js} +5 -5
  75. package/dist/{chunk-BYVBP3U5.js → chunk-XDK2FUAC.js} +9 -9
  76. package/dist/{chunk-TDPVEMBS.js → chunk-XFCLWWL3.js} +1 -1
  77. package/dist/{chunk-TNHRCZT3.js → chunk-XRRDVRCY.js} +42 -2
  78. package/dist/{chunk-4D2T6Y5Y.js → chunk-YCSCDQDS.js} +6 -6
  79. package/dist/{chunk-XZNKIYIG.js → chunk-YMU42UU2.js} +1 -1
  80. package/dist/{chunk-ODR7V2JL.js → chunk-Z2R7CFWH.js} +1 -1
  81. package/dist/{chunk-X2ALZSKK.js → chunk-ZD7QKZSS.js} +3 -3
  82. package/dist/{chunk-45IAFBUP.js → chunk-ZDOWJ3NS.js} +14 -14
  83. package/dist/{chunk-A2DMF2Q6.js → chunk-ZGSLXWH2.js} +2 -2
  84. package/dist/{chunk-KRWEUM4R.js → chunk-ZXHEOTYW.js} +1 -1
  85. package/dist/{clean-SBFI3ZKR.js → clean-KBNXV6DP.js} +18 -20
  86. package/dist/cli.js +53 -53
  87. package/dist/{cloud-IRE4HLEK.js → cloud-BWWKDRR6.js} +4 -4
  88. package/dist/{cloudrun-GIHWEBGM.js → cloudrun-P35BPQCO.js} +5 -5
  89. package/dist/commands/contrast-audit.browser.js +18 -50
  90. package/dist/{compare-S6NM2FSV.js → compare-UWJRKF5K.js} +28 -30
  91. package/dist/{compiler-WCWRB2LZ.js → compiler-5TFPJPQQ.js} +5 -6
  92. package/dist/{component-WDFZQ2HN.js → component-SWOGSIO2.js} +3 -3
  93. package/dist/{compositions-RMUBDPD4.js → compositions-PIPVEXE3.js} +14 -16
  94. package/dist/{delete-SDNARGJ4.js → delete-OXIDK7N3.js} +4 -4
  95. package/dist/{deploy-4MK3Y67M.js → deploy-NKWMPAMH.js} +19 -5
  96. package/dist/{destroy-GFQLTIY3.js → destroy-UKP522AE.js} +4 -2
  97. package/dist/{deterministicFonts-RWGQPEZU.js → deterministicFonts-L7YEEFGI.js} +1 -1
  98. package/dist/{dist-FAN2FFAV.js → dist-2FMTAVGL.js} +3 -3
  99. package/dist/{dist-65ELHZOF.js → dist-U2HCECNB.js} +3 -3
  100. package/dist/{doctor-YPCZILXV.js → doctor-KLQLFPCF.js} +14 -16
  101. package/dist/{events-Q2K7SNEZ.js → events-EGCYD45B.js} +5 -6
  102. package/dist/{events-INXDJ44V.js → events-EVTTGISX.js} +4 -5
  103. package/dist/{feedback-FRGRCTIX.js → feedback-G4WZLOVD.js} +10 -11
  104. package/dist/{ffmpeg-7BYARPLM.js → ffmpeg-QIYSAPHO.js} +24 -4
  105. package/dist/{figma-C262EFOC.js → figma-Q4CKDE7M.js} +3 -3
  106. package/dist/fontLocalizeCli.js +12 -14
  107. package/dist/{get-ZIUUGSVI.js → get-NPRQH64W.js} +4 -4
  108. package/dist/{gpuPolicy-FRLW63IY.js → gpuPolicy-L72BQRFR.js} +9 -11
  109. package/dist/{grade-compare-DN342HJC.js → grade-compare-H4NJEL4P.js} +29 -31
  110. package/dist/{help-XQPBPSBP.js → help-2S3XXDEA.js} +1 -1
  111. package/dist/{history-PF5FUC6M.js → history-X4CGCVEQ.js} +8 -9
  112. package/dist/hyperframe-runtime.js +59 -59
  113. package/dist/hyperframe.manifest.json +1 -1
  114. package/dist/hyperframe.runtime.iife.js +59 -59
  115. package/dist/hyperframes-player.global.js +3 -3
  116. package/dist/{info-PC7IKGVB.js → info-YYUISGL7.js} +10 -11
  117. package/dist/{init-ORZX3PSQ.js → init-BAAI4ZMR.js} +34 -34
  118. package/dist/{inspect-L5GRL6SP.js → inspect-LXJ3XJUZ.js} +29 -31
  119. package/dist/{installer-KXS557O7.js → installer-NY5E5HCO.js} +5 -5
  120. package/dist/{keyframes-EIZDSXUH.js → keyframes-NXXJSQWG.js} +8 -9
  121. package/dist/{lambda-U3N7MRD7.js → lambda-PG3JKNWS.js} +16 -12
  122. package/dist/{layout-WHAVE2H5.js → layout-CBFO36IE.js} +29 -31
  123. package/dist/{lint-I7PYIW56.js → lint-Y6NWQTKF.js} +11 -12
  124. package/dist/{lintProject-7IEOAXJY.js → lintProject-ARKJXDQF.js} +3 -3
  125. package/dist/{list-XXQM3WDO.js → list-VY6KIYTX.js} +4 -4
  126. package/dist/{login-64NUUDYU.js → login-426Q3H3P.js} +4 -4
  127. package/dist/{manager-B6MVBM2E.js → manager-3RRUFZ4H.js} +25 -3
  128. package/dist/{media-treatment-5XIM4A3F.js → media-treatment-ZVIXMJZJ.js} +23 -18
  129. package/dist/{models-WRB3S67Z.js → models-KC2QBPVK.js} +13 -15
  130. package/dist/{motionShot-BOFBL73C.js → motionShot-3ZSLQJ4D.js} +19 -21
  131. package/dist/{normalize-audio-PP4BSZSU.js → normalize-audio-DRU5LFYU.js} +6 -7
  132. package/dist/{open-F4CUWMZF.js → open-LPBZQ4DC.js} +14 -15
  133. package/dist/{parakeetRunner-O7QYJ7V7.js → parakeetRunner-IFY6NK5G.js} +16 -18
  134. package/dist/{pipeline-BCHSFFT3.js → pipeline-AGMCDT5A.js} +11 -13
  135. package/dist/{play-PPBR2GJK.js → play-WVWXNQED.js} +21 -23
  136. package/dist/{policies-DCSIM4AB.js → policies-5NTZOHJA.js} +2 -0
  137. package/dist/preflight-I5JGCCKM.js +52 -0
  138. package/dist/{present-Y7VTCZRZ.js → present-IPTWJUKY.js} +17 -19
  139. package/dist/{preview-53AD4OME.js → preview-JVLRQVD7.js} +34 -25
  140. package/dist/{producer-WBJDNLBF.js → producer-HKGHSAON.js} +1 -1
  141. package/dist/{progress-5AM2MZ7V.js → progress-I37JB7R4.js} +1 -0
  142. package/dist/{projectConfig-4KUGQ4P6.js → projectConfig-HDALEM6S.js} +7 -7
  143. package/dist/{publication-OFDIFS4R.js → publication-NX4VC7UU.js} +3 -3
  144. package/dist/{publish-RWWTY743.js → publish-AZRRQUXM.js} +11 -11
  145. package/dist/{remove-background-G7VK3VKP.js → remove-background-WY7KA77M.js} +12 -14
  146. package/dist/{render-52W63I3Y.js → render-BEDATKWV.js} +14 -15
  147. package/dist/{render-6CXZNXXZ.js → render-HGT3EGIK.js} +9 -4
  148. package/dist/{render-7PPMS4P6.js → render-P3PFNCBA.js} +40 -38
  149. package/dist/{render-batch-2EJVUVVN.js → render-batch-MUCDZ2WF.js} +4 -4
  150. package/dist/renderSetupWorker.js +3 -3
  151. package/dist/{resolver-FF5GV6IA.js → resolver-FLQ42X2Y.js} +5 -5
  152. package/dist/sam-IKPEJRRO.js +21 -0
  153. package/dist/{screenshotCapture-XAYELJK7.js → screenshotCapture-HXEZ3TNJ.js} +20 -3
  154. package/dist/{sherpa-QJPI6B5S.js → sherpa-SQGEFX3S.js} +15 -17
  155. package/dist/skills/hyperframes/SKILL.md +42 -0
  156. package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
  157. package/dist/skills/media-use/scripts/lib/recipe-store.mjs +5 -2
  158. package/dist/{skills-H6ZJNOLH.js → skills-D2FIQ2JN.js} +11 -10
  159. package/dist/{skillsUpdateCheck-4EBGMO2A.js → skillsUpdateCheck-2OLTHCBX.js} +3 -3
  160. package/dist/{snapshot-DZRUBWRH.js → snapshot-R7U73M3N.js} +32 -34
  161. package/dist/{src-WD5GOYON.js → src-4COYCAFY.js} +8 -10
  162. package/dist/{src-ZL7ACIZ3.js → src-WOD4AEI3.js} +11 -13
  163. package/dist/{staticProjectServer-72JF5PPO.js → staticProjectServer-DG4VZO4G.js} +15 -16
  164. package/dist/{status-RGHSK3DJ.js → status-BV7QAUQD.js} +2 -3
  165. package/dist/studio/assets/{hyperframes-player-B-wEZiX3.js → hyperframes-player-BByRREAU.js} +1 -1
  166. package/dist/studio/assets/{index-DPugLDRK.js → index-CULLUqJo.js} +1 -1
  167. package/dist/studio/assets/{index-Bvkb0Zxy.js → index-Wz-WEqHg.js} +97 -97
  168. package/dist/studio/index.html +1 -1
  169. package/dist/{studio-api-BL6CLOA6.js → studio-api-RGNBVLLL.js} +9 -10
  170. package/dist/{studioServer-TRWCZZXP.js → studioServer-LC5T4OXQ.js} +48 -50
  171. package/dist/{system-VRXC6S4A.js → system-7F3UEHQT.js} +2 -3
  172. package/dist/{telemetry-FDSW3ZOZ.js → telemetry-BLOE3TWY.js} +5 -6
  173. package/dist/{timeline-ZRN336EA.js → timeline-QQPPMADL.js} +124 -51
  174. package/dist/{tokens-RMLNQHIB.js → tokens-E3SHBFDU.js} +2 -2
  175. package/dist/{transcribe-AEHHCYAL.js → transcribe-D5N7SBDO.js} +22 -24
  176. package/dist/{transcribe-SOODKU6H.js → transcribe-O2AQ5E2L.js} +12 -14
  177. package/dist/{updateCheck-OSPEYRBY.js → updateCheck-ELOZ2CID.js} +2 -2
  178. package/dist/{upgrade-AK4S7DMX.js → upgrade-JDFZEPZY.js} +2 -2
  179. package/dist/{urlDownloader-FSCMLFG7.js → urlDownloader-32OGC3EW.js} +8 -10
  180. package/dist/{validate-JJTCKZIV.js → validate-LQQEABER.js} +23 -25
  181. package/dist/{video-ZDM5CFI2.js → video-HXIM27TO.js} +9 -11
  182. package/package.json +1 -1
  183. package/dist/chunk-7JDEZNBY.js +0 -3805
  184. package/dist/chunk-7KDQAD2W.js +0 -81
  185. package/dist/chunk-BXCMXMJQ.js +0 -73
  186. package/dist/chunk-KCF6GHJP.js +0 -250
  187. package/dist/preflight-G5KP7ZKA.js +0 -32
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  formatVariableValidationIssue,
21
21
  validateVariables
22
- } from "./chunk-U7EGMXQR.js";
22
+ } from "./chunk-VEQ7DKPG.js";
23
23
  import {
24
24
  extractCompositionMetadata
25
25
  } from "./chunk-YMS5FOMC.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-HVW7ABXD.js";
13
13
  import {
14
14
  DEFAULT_REGISTRY_URL
15
- } from "./chunk-QURKHVV5.js";
15
+ } from "./chunk-OYEDHVSI.js";
16
16
 
17
17
  // src/utils/projectConfig.ts
18
18
  import { readFileSync, writeFileSync } from "fs";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  updateNoticesSuppressed
9
- } from "./chunk-XZNKIYIG.js";
9
+ } from "./chunk-YMU42UU2.js";
10
10
  import {
11
11
  hostAnswers
12
12
  } from "./chunk-K4WIOZFP.js";
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/version.ts
9
- var VERSION = true ? "0.8.173" : "0.0.0-dev";
10
- var PRODUCER_VERSION = true ? "0.8.173" : "0.0.0-dev";
9
+ var VERSION = true ? "0.8.175" : "0.0.0-dev";
10
+ var PRODUCER_VERSION = true ? "0.8.175" : "0.0.0-dev";
11
11
 
12
12
  export {
13
13
  VERSION,
@@ -27,8 +27,8 @@ function assertAwsCliAvailable() {
27
27
  );
28
28
  }
29
29
  }
30
- function locateSamTemplate(repoRoot2) {
31
- const candidate = join(repoRoot2, "examples", "aws-lambda", "template.yaml");
30
+ function locateSamTemplate(repoRoot) {
31
+ const candidate = join(repoRoot, "examples", "aws-lambda", "template.yaml");
32
32
  if (!existsSync(candidate)) {
33
33
  throw new Error(
34
34
  `[lambda] SAM template not found at ${candidate}. \`hyperframes lambda deploy\` needs a HyperFrames repo checkout: run it from one, or set HYPERFRAMES_REPO_ROOT to point at one.`
@@ -36,12 +36,23 @@ function locateSamTemplate(repoRoot2) {
36
36
  }
37
37
  return candidate;
38
38
  }
39
+ function parseReservedConcurrency(raw) {
40
+ if (raw === void 0 || raw === null || raw === "") return void 0;
41
+ if (raw === "none") return -1;
42
+ const n = Number(raw);
43
+ if (!Number.isInteger(n) || n < 1) {
44
+ throw new Error(
45
+ `[lambda] --concurrency must be a positive integer or "none"; got ${String(raw)}`
46
+ );
47
+ }
48
+ return n;
49
+ }
39
50
  function samDeploy(opts) {
40
51
  assertSamAvailable();
41
- const paramOverrides = [
42
- `ChromeSource=${opts.chromeSource ?? "sparticuz"}`,
43
- `ReservedConcurrency=${opts.reservedConcurrency ?? -1}`
44
- ];
52
+ const paramOverrides = [`ChromeSource=${opts.chromeSource ?? "sparticuz"}`];
53
+ if (opts.reservedConcurrency !== void 0) {
54
+ paramOverrides.push(`ReservedConcurrency=${opts.reservedConcurrency}`);
55
+ }
45
56
  if (opts.lambdaMemoryMb !== void 0) {
46
57
  paramOverrides.push(`LambdaMemoryMb=${opts.lambdaMemoryMb}`);
47
58
  }
@@ -96,7 +107,7 @@ function fetchStackOutputs(opts) {
96
107
  "--region",
97
108
  opts.region,
98
109
  "--query",
99
- "Stacks[0].Outputs",
110
+ "Stacks[0]",
100
111
  "--output",
101
112
  "json"
102
113
  ];
@@ -104,8 +115,11 @@ function fetchStackOutputs(opts) {
104
115
  args.unshift("--profile", opts.awsProfile);
105
116
  }
106
117
  const out = execFileSync("aws", args, { encoding: "utf-8" });
107
- const parsed = JSON.parse(out);
108
- const byKey = new Map(parsed.map((o) => [o.OutputKey, o.OutputValue]));
118
+ const stack = JSON.parse(out);
119
+ const byKey = new Map((stack.Outputs ?? []).map((o) => [o.OutputKey, o.OutputValue]));
120
+ const reserved = Number(
121
+ stack.Parameters?.find((p) => p.ParameterKey === "ReservedConcurrency")?.ParameterValue
122
+ );
109
123
  const bucketName = byKey.get("RenderBucketName");
110
124
  const functionName = byKey.get("RenderFunctionArn");
111
125
  const stateMachineArn = byKey.get("RenderStateMachineArn");
@@ -120,40 +134,15 @@ function fetchStackOutputs(opts) {
120
134
  // last colon-segment, which downstream `getRenderProgress` calls use
121
135
  // for cost math + CloudWatch lookups.
122
136
  functionName: functionName.split(":").pop() ?? functionName,
123
- stateMachineArn
137
+ stateMachineArn,
138
+ reservedConcurrency: reserved > 0 ? reserved : void 0
124
139
  };
125
140
  }
126
141
 
127
- // src/commands/lambda/repoRoot.ts
128
- import { existsSync as existsSync2 } from "fs";
129
- import { dirname, resolve } from "path";
130
- import { fileURLToPath } from "url";
131
- function repoRoot() {
132
- const override = process.env.HYPERFRAMES_REPO_ROOT;
133
- if (override) {
134
- if (existsSync2(resolve(override, "packages", "aws-lambda", "package.json"))) return override;
135
- throw new Error(
136
- "[hyperframes lambda] HYPERFRAMES_REPO_ROOT is not a hyperframes checkout (no packages/aws-lambda/package.json there). Point it at the repo root, or unset it."
137
- );
138
- }
139
- let dir = dirname(fileURLToPath(import.meta.url));
140
- for (let depth = 0; depth < 12; depth++) {
141
- if (existsSync2(resolve(dir, "packages", "aws-lambda", "package.json"))) {
142
- return dir;
143
- }
144
- const parent = dirname(dir);
145
- if (parent === dir) break;
146
- dir = parent;
147
- }
148
- throw new Error(
149
- "[hyperframes lambda] could not find the repo root (no packages/aws-lambda/ above this CLI's source). Run `hyperframes lambda` from within a hyperframes checkout, or set HYPERFRAMES_REPO_ROOT explicitly."
150
- );
151
- }
152
-
153
142
  export {
154
143
  locateSamTemplate,
144
+ parseReservedConcurrency,
155
145
  samDeploy,
156
146
  samDelete,
157
- fetchStackOutputs,
158
- repoRoot
147
+ fetchStackOutputs
159
148
  };
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-PO2SDVQA.js";
10
10
  import {
11
11
  findFFmpeg
12
- } from "./chunk-IK3SOMZ4.js";
12
+ } from "./chunk-S354WIFQ.js";
13
13
  import {
14
14
  stoppableExecFile
15
15
  } from "./chunk-HU2SPFNG.js";
@@ -8,14 +8,14 @@ import {
8
8
  DEFAULT_REGISTRY_URL,
9
9
  fetchItemFile,
10
10
  validRegistryItem
11
- } from "./chunk-QURKHVV5.js";
11
+ } from "./chunk-OYEDHVSI.js";
12
12
  import {
13
13
  publishRegistryFile,
14
14
  registryTargetPath
15
15
  } from "./chunk-GMECXFAN.js";
16
16
  import {
17
17
  validateVariables
18
- } from "./chunk-U7EGMXQR.js";
18
+ } from "./chunk-VEQ7DKPG.js";
19
19
  import {
20
20
  realProjectRoot
21
21
  } from "./chunk-OFQWTKPW.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-YOOW26KG.js";
9
+ } from "./chunk-NELZN7SV.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";
@@ -0,0 +1,136 @@
1
+ import { createRequire as __hf_createRequire } from "node:module";
2
+ import { fileURLToPath as __hf_fileURLToPath } from "node:url";
3
+ import { dirname as __hf_dirname } from "node:path";
4
+ var require = __hf_createRequire(import.meta.url);
5
+ var __filename = __hf_fileURLToPath(import.meta.url);
6
+ var __dirname = __hf_dirname(__filename);
7
+ import {
8
+ resolveWritePath
9
+ } from "./chunk-EOVYQ3IG.js";
10
+
11
+ // src/cloud/download.ts
12
+ import { chmodSync, mkdirSync, mkdtempSync, renameSync, rmSync, statSync } from "fs";
13
+ import { open } from "fs/promises";
14
+ import { dirname, join } from "path";
15
+ import { setTimeout as sleep } from "timers/promises";
16
+ var PART_BYTES = 8 * 1024 * 1024;
17
+ var CONNECTIONS = 8;
18
+ var RETRIES = 3;
19
+ async function downloadToFile(url, destPath, options = {}) {
20
+ const fetchImpl = options.fetchImpl ?? fetch;
21
+ const failFast = new AbortController();
22
+ const signal = options.signal ? AbortSignal.any([options.signal, failFast.signal]) : failFast.signal;
23
+ const get = async (range) => fetchImpl(url, { signal, headers: range ? { range } : {} });
24
+ let first = await get(`bytes=0-${PART_BYTES - 1}`);
25
+ if (first.status === 416 || first.status === 206 && contentRangeTotal(first) === void 0) {
26
+ await first.body?.cancel();
27
+ first = await get();
28
+ }
29
+ assertOk(first, url);
30
+ const ranged = first.status === 206;
31
+ const total = ranged ? contentRangeTotal(first) : contentLength(first);
32
+ mkdirSync(dirname(destPath), { recursive: true });
33
+ const destination = resolveWritePath(destPath);
34
+ const previous = statSync(destination, { throwIfNoEntry: false });
35
+ const stage = mkdtempSync(join(dirname(destination), ".hf-download-"));
36
+ const stagedFile = join(stage, "download");
37
+ let bytes = 0;
38
+ let firstError;
39
+ try {
40
+ const file = await open(stagedFile, "wx");
41
+ const pump = async (res, part) => {
42
+ for await (const chunk of res.body) {
43
+ await file.write(chunk, 0, chunk.byteLength, part.at);
44
+ part.at += chunk.byteLength;
45
+ bytes += chunk.byteLength;
46
+ signal.throwIfAborted();
47
+ options.onProgress?.(bytes, total);
48
+ }
49
+ };
50
+ const fetchRange = async (start, end, res) => {
51
+ const part = { at: start };
52
+ for (let attempt = 0; ; attempt++) {
53
+ try {
54
+ res ??= await get(`bytes=${part.at}-${end}`);
55
+ assertOk(res, url);
56
+ if (res.status !== 206) throw new Error(`Failed to download ${url}: range ignored`);
57
+ await pump(res, part);
58
+ if (part.at > end) return;
59
+ throw new Error(`connection closed at byte ${part.at}`);
60
+ } catch (error) {
61
+ if (signal.aborted) throw error;
62
+ if (attempt === RETRIES) {
63
+ throw new Error(
64
+ `Failed to download ${url}: bytes ${start}-${end} dropped ${RETRIES + 1} times`,
65
+ { cause: error }
66
+ );
67
+ }
68
+ res?.body?.cancel().catch(() => {
69
+ });
70
+ res = void 0;
71
+ await sleep(250 * 2 ** attempt, void 0, { signal });
72
+ }
73
+ }
74
+ };
75
+ const parts = [];
76
+ if (ranged && total !== void 0) {
77
+ parts.push(fetchRange(0, Math.min(PART_BYTES, total) - 1, first));
78
+ const rest = total - PART_BYTES;
79
+ const size = Math.ceil(rest / Math.min(CONNECTIONS - 1, Math.ceil(rest / PART_BYTES)));
80
+ for (let start = PART_BYTES; start < total; start += size) {
81
+ parts.push(fetchRange(start, Math.min(start + size, total) - 1));
82
+ }
83
+ } else {
84
+ const part = { at: 0 };
85
+ parts.push(
86
+ pump(first, part).then(() => {
87
+ if (total !== void 0 && part.at !== total) {
88
+ throw new Error(
89
+ `Truncated download: got ${part.at} bytes, expected ${total} (content-length). The presigned URL may have expired mid-transfer \u2014 refetch via \`hyperframes cloud get\`.`
90
+ );
91
+ }
92
+ })
93
+ );
94
+ }
95
+ await Promise.all(
96
+ parts.map(
97
+ (part) => part.catch((error) => {
98
+ firstError ??= error;
99
+ failFast.abort(error);
100
+ })
101
+ )
102
+ );
103
+ await file.close();
104
+ if (firstError !== void 0) throw firstError;
105
+ options.signal?.throwIfAborted();
106
+ if (previous?.isFile()) chmodSync(stagedFile, previous.mode & 511);
107
+ renameSync(stagedFile, destination);
108
+ } catch (error) {
109
+ const reason = options.signal?.reason;
110
+ if (options.signal?.aborted && reason instanceof Error) throw reason;
111
+ throw error;
112
+ } finally {
113
+ rmSync(stage, { recursive: true, force: true });
114
+ }
115
+ return { path: destPath, bytes };
116
+ }
117
+ function assertOk(res, url) {
118
+ if (!res.ok) {
119
+ throw new Error(`Failed to download ${url}: HTTP ${res.status} ${res.statusText}`);
120
+ }
121
+ if (!res.body) {
122
+ throw new Error(`Failed to download ${url}: empty response body`);
123
+ }
124
+ }
125
+ function contentLength(res) {
126
+ const total = Number.parseInt(res.headers.get("content-length") ?? "", 10);
127
+ return Number.isFinite(total) ? total : void 0;
128
+ }
129
+ function contentRangeTotal(res) {
130
+ const match = /^bytes \d+-\d+\/(\d+)$/.exec(res.headers.get("content-range") ?? "");
131
+ return match ? Number(match[1]) : void 0;
132
+ }
133
+
134
+ export {
135
+ downloadToFile
136
+ };
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-AWDFDFI3.js";
15
15
  import {
16
16
  isBlockedNetworkHost
17
- } from "./chunk-O433SZAJ.js";
17
+ } from "./chunk-RERXOG54.js";
18
18
  import {
19
19
  DOMParser,
20
20
  parseHTML
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType,
9
9
  injectMediaCodecMapIntoHtml
10
- } from "./chunk-4RDDUBOC.js";
10
+ } from "./chunk-3Q4Y33FT.js";
11
11
  import {
12
12
  PROXY_VARIANT_CONFIG,
13
13
  ProxyCapacityError,
@@ -18,10 +18,10 @@ import {
18
18
  recordProxyRequest,
19
19
  resolveProxy,
20
20
  resolveProxyVariantRequest
21
- } from "./chunk-XDPXSQJO.js";
21
+ } from "./chunk-QWCXGTOH.js";
22
22
  import {
23
23
  resolveAutoProxy
24
- } from "./chunk-CHALU2TF.js";
24
+ } from "./chunk-LZT3NUTE.js";
25
25
  import {
26
26
  decodeWellFormedEscapes
27
27
  } from "./chunk-BSQ7XANM.js";
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-GMECXFAN.js";
28
28
  import {
29
29
  ITEM_TYPE_DIRS
30
- } from "./chunk-U7EGMXQR.js";
30
+ } from "./chunk-VEQ7DKPG.js";
31
31
  import {
32
32
  realProjectRoot
33
33
  } from "./chunk-OFQWTKPW.js";
@@ -8,10 +8,10 @@ import {
8
8
  flush,
9
9
  shouldTrack,
10
10
  trackEvent
11
- } from "./chunk-ETPPGNJB.js";
11
+ } from "./chunk-W5USVP6Z.js";
12
12
  import {
13
13
  getPowerState
14
- } from "./chunk-QWQ6GQTI.js";
14
+ } from "./chunk-T6AGUTZJ.js";
15
15
  import {
16
16
  CliRuntimeError
17
17
  } from "./chunk-PBN6GBJE.js";
@@ -6,31 +6,31 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parakeetRunner
9
- } from "./chunk-KRWEUM4R.js";
9
+ } from "./chunk-ZXHEOTYW.js";
10
10
  import {
11
11
  DecodeCancelled,
12
12
  prepareSherpaWav,
13
13
  sherpaUnsupportedReason,
14
14
  transcribeWithSherpa
15
- } from "./chunk-HCOL75LA.js";
15
+ } from "./chunk-JT7PV3GL.js";
16
16
  import {
17
17
  initialModelForLanguage,
18
18
  transcribe
19
- } from "./chunk-LN4SZS7W.js";
19
+ } from "./chunk-CEYY3SOX.js";
20
20
  import {
21
21
  createRenderCancellationScope,
22
22
  stoppedByCancelSignal
23
- } from "./chunk-L4SFGSSQ.js";
23
+ } from "./chunk-FRNKM4MG.js";
24
+ import {
25
+ DEFAULT_MODEL,
26
+ isWhisperUnavailable
27
+ } from "./chunk-NSWIF4VH.js";
24
28
  import {
25
29
  formatSrt,
26
30
  formatVtt,
27
31
  loadTranscript,
28
32
  patchCaptionHtml
29
33
  } from "./chunk-VHZ6DL3M.js";
30
- import {
31
- DEFAULT_MODEL,
32
- isWhisperUnavailable
33
- } from "./chunk-X3SCQP2A.js";
34
34
  import {
35
35
  normalizeErrorMessage
36
36
  } from "./chunk-KNU5COPB.js";
@@ -9,7 +9,7 @@ import {
9
9
  formatPreviewProxyBox,
10
10
  hdrToSdrToneMapFilter,
11
11
  parseFirstFrameColour
12
- } from "./chunk-U7EGMXQR.js";
12
+ } from "./chunk-VEQ7DKPG.js";
13
13
  import {
14
14
  decodeAuthoredAttribute,
15
15
  scanHtmlOpeningTags
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  readCompositionFps
9
- } from "./chunk-CBOYQOLY.js";
9
+ } from "./chunk-DQY6WTF7.js";
10
10
  import {
11
11
  errorBox
12
12
  } from "./chunk-K2FLNJVB.js";
@@ -16,10 +16,10 @@ import {
16
16
  import {
17
17
  DEFAULT_CONFIG,
18
18
  resolvePageNavigationTimeout
19
- } from "./chunk-O433SZAJ.js";
19
+ } from "./chunk-RERXOG54.js";
20
20
  import {
21
21
  parseFps
22
- } from "./chunk-U7EGMXQR.js";
22
+ } from "./chunk-VEQ7DKPG.js";
23
23
 
24
24
  // src/browser/windowsCrash.ts
25
25
  var STATUS_STACK_BUFFER_OVERRUN_DEC = "3221225595";
@@ -6,13 +6,11 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  LOW_MEMORY_TOTAL_MB_THRESHOLD,
9
+ describeWslGpuAccess,
10
+ detectWsl,
9
11
  getSystemTotalMb,
10
12
  isLowMemorySystem
11
- } from "./chunk-JYVGYKXG.js";
12
- import {
13
- describeWslGpuAccess,
14
- detectWsl
15
- } from "./chunk-7KDQAD2W.js";
13
+ } from "./chunk-W2LGJSEN.js";
16
14
  import {
17
15
  DISTRIBUTED_FPS,
18
16
  MEDIA_VISUAL_STYLE_PROPERTIES,
@@ -31,7 +29,7 @@ import {
31
29
  renderFrameIdForRenderId,
32
30
  resolveAuthoredTimingWindow,
33
31
  toFps
34
- } from "./chunk-U7EGMXQR.js";
32
+ } from "./chunk-VEQ7DKPG.js";
35
33
  import {
36
34
  AUDIO_GROUP_RENDER_ID_ATTR,
37
35
  COLOR_GRADING_SOURCE_HIDDEN_ATTR,
@@ -60,7 +58,7 @@ import {
60
58
  shiftRateLane,
61
59
  sourceTimeAt,
62
60
  timeAtSourceTime
63
- } from "./chunk-7JDEZNBY.js";
61
+ } from "./chunk-EEXE43II.js";
64
62
  import {
65
63
  clampAudioGain,
66
64
  isAudibleVideoElement
@@ -84,7 +82,7 @@ import {
84
82
  import {
85
83
  parseNumeric,
86
84
  parseStartExpression
87
- } from "./chunk-QVPOR7WE.js";
85
+ } from "./chunk-32GKETR7.js";
88
86
  import {
89
87
  isPathInside
90
88
  } from "./chunk-BSQ7XANM.js";
@@ -565,8 +563,8 @@ function applyConcreteGpuScreenshotClamp(currentForceScreenshot, resolvedGpuMode
565
563
 
566
564
  // ../engine/src/utils/sdrCaptureColor.ts
567
565
  var SDR_RGB_TO_BT709_FILTER = "scale=out_color_matrix=bt709:out_range=tv:flags=neighbor";
568
- var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor+accurate_rnd,format=gbrp,${SDR_RGB_TO_BT709_FILTER}`;
569
566
  var SDR_RGB_TO_TAGGED_BT709_FILTER = `${SDR_RGB_TO_BT709_FILTER},setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709:range=tv`;
567
+ var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor+accurate_rnd,format=gbrp,${SDR_RGB_TO_TAGGED_BT709_FILTER}`;
570
568
 
571
569
  // ../parsers/dist/htmlAttributeSpans.js
572
570
  function readAttributeValue(html, at) {
@@ -6971,6 +6969,15 @@ async function captureFrameSurface(session, frameIndex, time, seekOptions, heldV
6971
6969
  let screenshotBuffer;
6972
6970
  if (session.captureMode === "beginframe") {
6973
6971
  const frameTimeTicks = session.beginFrameTimeTicks + frameIndex * session.beginFrameIntervalMs;
6972
+ if (!session.beginFrameSeekPresented) {
6973
+ const client = await getCdpSession(page);
6974
+ await client.send("HeadlessExperimental.beginFrame", {
6975
+ frameTimeTicks: frameTimeTicks - session.beginFrameIntervalMs / 2,
6976
+ interval: session.beginFrameIntervalMs,
6977
+ noDisplayUpdates: false
6978
+ });
6979
+ session.beginFrameSeekPresented = true;
6980
+ }
6974
6981
  const result = await beginFrameCapture(
6975
6982
  page,
6976
6983
  options,
@@ -7984,6 +7991,10 @@ function getHdrEncoderColorParams(transfer, mastering = DEFAULT_HDR10_MASTERING)
7984
7991
  mastering
7985
7992
  };
7986
7993
  }
7994
+ function hdrFrameTagsFilter(transfer) {
7995
+ const { colorPrimaries, colorTrc, colorspace } = getHdrEncoderColorParams(transfer);
7996
+ return `setparams=color_primaries=${colorPrimaries}:color_trc=${colorTrc}:colorspace=${colorspace}:range=tv`;
7997
+ }
7987
7998
  var HDR_AUTO_PROMOTION_PIPELINE = {
7988
7999
  colorSpace: "BT.2020",
7989
8000
  codec: "HEVC Main10"
@@ -9110,15 +9121,21 @@ function buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder = null) {
9110
9121
  "tv"
9111
9122
  );
9112
9123
  }
9124
+ const hdrTags = options.hdr ? hdrFrameTagsFilter(options.hdr.transfer) : void 0;
9113
9125
  const sdrFilter = options.hdr ? void 0 : SDR_CAPTURE_TO_BT709_FILTER;
9114
- const captureFilter = sdrFilter ?? "scale=in_range=pc:out_range=tv";
9126
+ const captureFilter = sdrFilter ?? `scale=in_range=pc:out_range=tv,${hdrTags}`;
9115
9127
  if (gpuEncoder === "vaapi") {
9116
9128
  const vfIdx = args.indexOf("-vf");
9117
9129
  if (vfIdx !== -1) {
9118
9130
  args[vfIdx + 1] = `${captureFilter},${args[vfIdx + 1]}`;
9119
9131
  }
9120
9132
  } else if (shouldUseGpu) {
9121
- const vf = withEvenDimensionPad(sdrFilter ?? "", pixelFormat, options.width, options.height);
9133
+ const vf = withEvenDimensionPad(
9134
+ sdrFilter ?? hdrTags ?? "",
9135
+ pixelFormat,
9136
+ options.width,
9137
+ options.height
9138
+ );
9122
9139
  if (vf) args.push("-vf", vf);
9123
9140
  } else {
9124
9141
  args.push(
@@ -9771,15 +9788,17 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
9771
9788
  "tv"
9772
9789
  );
9773
9790
  }
9774
- const sdrFilter = options.rawInputFormat ? SDR_RGB_TO_BT709_FILTER : SDR_CAPTURE_TO_BT709_FILTER;
9775
- if (options.rawInputFormat && options.hdr) {
9776
- } else if (gpuEncoder === "vaapi") {
9791
+ const frameFilter = options.rawInputFormat && options.hdr ? hdrFrameTagsFilter(options.hdr.transfer) : options.rawInputFormat ? SDR_RGB_TO_TAGGED_BT709_FILTER : SDR_CAPTURE_TO_BT709_FILTER;
9792
+ if (gpuEncoder === "vaapi") {
9777
9793
  const vfIdx = args.indexOf("-vf");
9778
9794
  if (vfIdx !== -1) {
9779
- args[vfIdx + 1] = `${sdrFilter},${args[vfIdx + 1]}`;
9795
+ args[vfIdx + 1] = `${frameFilter},${args[vfIdx + 1]}`;
9780
9796
  }
9781
9797
  } else {
9782
- args.push("-vf", withEvenDimensionPad(sdrFilter, pixelFormat, options.width, options.height));
9798
+ args.push(
9799
+ "-vf",
9800
+ withEvenDimensionPad(frameFilter, pixelFormat, options.width, options.height)
9801
+ );
9783
9802
  }
9784
9803
  args.push("-video_track_timescale", "90000");
9785
9804
  }
@@ -4,9 +4,12 @@ import { dirname as __hf_dirname } from "node:path";
4
4
  var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
+ import {
8
+ detectGpuEncoder
9
+ } from "./chunk-RERXOG54.js";
7
10
  import {
8
11
  detectWsl
9
- } from "./chunk-7KDQAD2W.js";
12
+ } from "./chunk-W2LGJSEN.js";
10
13
  import {
11
14
  runCancellableProcess
12
15
  } from "./chunk-D3ZWBHZP.js";
@@ -14,9 +17,6 @@ import {
14
17
  findFfBinary
15
18
  } from "./chunk-VAS6HQX3.js";
16
19
 
17
- // src/browser/ffmpeg.ts
18
- import { execFileSync as execFileSync2 } from "child_process";
19
-
20
20
  // src/browser/linuxDeps.ts
21
21
  import { execFileSync } from "child_process";
22
22
  import { existsSync, readFileSync } from "fs";
@@ -187,32 +187,30 @@ function chromeLaunchRemediation(errorMessage) {
187
187
 
188
188
  // src/browser/ffmpeg.ts
189
189
  var H264EncoderUnavailableError = class extends Error {
190
- constructor() {
191
- super("This FFmpeg build has neither libx264 nor VideoToolbox H.264 encoding.");
190
+ constructor(hevcEncoderAvailable = false) {
191
+ super("This FFmpeg build has no libx264 and no GPU H.264 encoder that works on this machine.");
192
+ this.hevcEncoderAvailable = hevcEncoderAvailable;
192
193
  this.name = "H264EncoderUnavailableError";
193
194
  }
195
+ hevcEncoderAvailable;
194
196
  };
195
- function resolveH264EncoderMode(ffmpegEncodersOutput, gpuRequested) {
196
- if (gpuRequested) return "gpu";
197
- if (/\blibx264\b/.test(ffmpegEncodersOutput)) return "software";
198
- if (/\bh264_videotoolbox\b/.test(ffmpegEncodersOutput)) return "gpu";
199
- throw new H264EncoderUnavailableError();
197
+ function resolveH264EncoderMode(ffmpegEncodersOutput, gpuRequested, usableGpu) {
198
+ if (gpuRequested && usableGpu) return "gpu";
199
+ if (hasLibx264(ffmpegEncodersOutput)) return "software";
200
+ if (usableGpu) return "gpu";
201
+ throw new H264EncoderUnavailableError(/\blibx265\b/.test(ffmpegEncodersOutput));
200
202
  }
201
- function detectH264EncoderMode(ffmpegPath, gpuRequested) {
202
- const encoders = execFileSync2(ffmpegPath, ["-hide_banner", "-encoders"], {
203
- encoding: "utf-8",
204
- stdio: ["ignore", "pipe", "pipe"],
205
- timeout: FIRST_LAUNCH_TIMEOUT_MS,
206
- windowsHide: true
207
- });
208
- return resolveH264EncoderMode(encoders, gpuRequested);
203
+ function hasLibx264(ffmpegEncodersOutput) {
204
+ return /\blibx264\b/.test(ffmpegEncodersOutput);
209
205
  }
210
- async function detectH264EncoderModeForRender(ffmpegPath, gpuRequested, signal) {
206
+ async function detectH264EncoderModeForRender(ffmpegPath, gpuRequested, signal, probeGpu = detectGpuEncoder) {
211
207
  const result = await runCancellableProcess(ffmpegPath, ["-hide_banner", "-encoders"], {
212
208
  signal,
213
209
  timeoutMs: FIRST_LAUNCH_TIMEOUT_MS
214
210
  });
215
- return resolveH264EncoderMode(result.stdout, gpuRequested);
211
+ const needsGpu = gpuRequested || !hasLibx264(result.stdout);
212
+ const usableGpu = needsGpu && await probeGpu() !== null;
213
+ return resolveH264EncoderMode(result.stdout, gpuRequested, usableGpu);
216
214
  }
217
215
  function findFFmpeg() {
218
216
  return findFfBinary("ffmpeg", { configuredMustExist: true });
@@ -257,7 +255,6 @@ export {
257
255
  chromeLaunchRemediation,
258
256
  H264EncoderUnavailableError,
259
257
  resolveH264EncoderMode,
260
- detectH264EncoderMode,
261
258
  detectH264EncoderModeForRender,
262
259
  findFFmpeg,
263
260
  findFFprobe,
@@ -5,11 +5,9 @@ var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
+ detectWsl,
8
9
  getSystemTotalMb
9
- } from "./chunk-JYVGYKXG.js";
10
- import {
11
- detectWsl
12
- } from "./chunk-7KDQAD2W.js";
10
+ } from "./chunk-W2LGJSEN.js";
13
11
 
14
12
  // src/telemetry/system.ts
15
13
  import { cpus, freemem, platform as platform2, release as release2 } from "os";