hyperframes 0.9.6 → 0.9.8
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.
- package/dist/{add-FI2ERBMZ.js → add-KCOZUTMS.js} +12 -12
- package/dist/{agentPromptGenerator-DZTXHJV3.js → agentPromptGenerator-P75AWDLA.js} +6 -6
- package/dist/{animatedGifPrep-GXQA4KCD.js → animatedGifPrep-OBZTJQ7X.js} +6 -6
- package/dist/api.js +26 -25
- package/dist/{asset-BRSG6JNL.js → asset-N3A7GB3E.js} +2 -2
- package/dist/{assetCataloger-KVWF4SRK.js → assetCataloger-OQYRQZLW.js} +7 -7
- package/dist/{audio-BVZOX6LU.js → audio-KCKNENFH.js} +20 -20
- package/dist/{auth-HFFN7USX.js → auth-Y72WHJCW.js} +6 -6
- package/dist/{autoUpdate-JNGMUXLZ.js → autoUpdate-DLNFGTN2.js} +2 -2
- package/dist/{backgroundChecks-O4ADPXOL.js → backgroundChecks-EFVHAYNQ.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-A2HW6QW7.js → batchRender-JKOGFHLU.js} +3 -3
- package/dist/{beats-F7Q3G6VW.js → beats-RIKKG4N7.js} +9 -9
- package/dist/{benchmark-4BDMIYTW.js → benchmark-7TCK3SGH.js} +9 -9
- package/dist/{billing-35NVMZWK.js → billing-JBG45ON2.js} +15 -5
- package/dist/{browser-S6ADXSB7.js → browser-4BF7NKPF.js} +4 -4
- package/dist/{bundleWithLocalizedFonts-EE27EYEU.js → bundleWithLocalizedFonts-PAWHGZRW.js} +2 -2
- package/dist/{capture-LWWBL6SH.js → capture-5PZTT5O7.js} +3 -3
- package/dist/{capture-CXDJO524.js → capture-H7UDNHF2.js} +11 -11
- package/dist/{captureCompositionFrame-BB2ZGM6R.js → captureCompositionFrame-LR2XKVKX.js} +11 -11
- package/dist/{catalog-RQ6HIUBG.js → catalog-4W5XDIKM.js} +12 -12
- package/dist/{catch-up-PBAXR7FI.js → catch-up-H2Y2WRIA.js} +5 -5
- package/dist/{check-O4V4UWE3.js → check-NG6FULCN.js} +37 -37
- package/dist/{checkAudio-EUT3AO3L.js → checkAudio-HI5ICPRV.js} +9 -9
- package/dist/{checkBrowser-QQUBR4QI.js → checkBrowser-YPPMCXET.js} +31 -31
- package/dist/{chunk-27AVZR7K.js → chunk-2MUWGYXQ.js} +18 -18
- package/dist/{chunk-W3G7DNCR.js → chunk-2ZQ7BZOS.js} +48 -8
- package/dist/{chunk-P5GOQDA2.js → chunk-3BCLDK6O.js} +50 -15
- package/dist/{chunk-LS4CCRTK.js → chunk-3LLFF6EE.js} +2 -2
- package/dist/{chunk-6A45RKAK.js → chunk-3XJM7XZN.js} +136 -35
- package/dist/{chunk-BUDP4GF4.js → chunk-3YZ3LNXV.js} +1 -1
- package/dist/{chunk-I2OMLFBJ.js → chunk-457LNKMV.js} +1 -1
- package/dist/{chunk-JFIBO4CZ.js → chunk-4MDLXE3N.js} +2 -2
- package/dist/{chunk-GYPSZFRF.js → chunk-4WJKSTDS.js} +3 -3
- package/dist/{chunk-G4VDT5D7.js → chunk-5D23BECZ.js} +1 -1
- package/dist/{chunk-4E7G2GME.js → chunk-5SCOPSVL.js} +1 -1
- package/dist/{chunk-AB3ZXWI3.js → chunk-6A4RAHMF.js} +1 -1
- package/dist/{chunk-CUAZHDVV.js → chunk-6CEQCL6O.js} +3 -3
- package/dist/{chunk-KAWNVSAE.js → chunk-6DTXWYZA.js} +7 -7
- package/dist/{chunk-4VOK22DG.js → chunk-6RD46YOJ.js} +1 -1
- package/dist/{chunk-6JMNJYYR.js → chunk-6ZICZOMN.js} +3 -1
- package/dist/{chunk-OHWVSTNO.js → chunk-74VSOKKS.js} +6 -4
- package/dist/{chunk-47IBOMXH.js → chunk-7DQHV322.js} +3 -3
- package/dist/{chunk-WCET3OHQ.js → chunk-7HRQOEYY.js} +5 -5
- package/dist/{chunk-IVFZG3CU.js → chunk-7TAS4BNT.js} +2 -2
- package/dist/{chunk-IG3GSBHB.js → chunk-7VHS56BT.js} +2 -2
- package/dist/{chunk-YIWNZ2CI.js → chunk-AC3TSGGG.js} +13 -13
- package/dist/{chunk-5BCFV2HE.js → chunk-BCQ42FAS.js} +3 -3
- package/dist/{chunk-NASVSJQK.js → chunk-BGMMC352.js} +19 -7
- package/dist/{chunk-3SB24TVT.js → chunk-BUYV2WGV.js} +1 -1
- package/dist/{chunk-6NJVSTSY.js → chunk-BVAPHHMQ.js} +7 -3
- package/dist/{chunk-GP7OHHXR.js → chunk-CCFSUSAE.js} +1 -1
- package/dist/{chunk-TIXW6JWD.js → chunk-CUR5UYYJ.js} +1 -1
- package/dist/{chunk-2KO357TJ.js → chunk-D7THUO4V.js} +1 -1
- package/dist/{chunk-I47SIQGX.js → chunk-DHIXDUET.js} +4 -4
- package/dist/{chunk-HTTGTROQ.js → chunk-DT6NGXSS.js} +1 -1
- package/dist/{chunk-FM7VWSN3.js → chunk-E2SVAOS6.js} +1 -1
- package/dist/{chunk-YY7YI2FW.js → chunk-ECJCBLME.js} +1 -1
- package/dist/{chunk-GOPJLAMZ.js → chunk-ETYQYG6Q.js} +78 -19
- package/dist/{chunk-VG4JPJMI.js → chunk-F6GJUCIY.js} +2 -2
- package/dist/{chunk-PWYAOU4I.js → chunk-FNNNGI42.js} +1 -1
- package/dist/{chunk-CE7EQUBV.js → chunk-GSNSSFT7.js} +1 -1
- package/dist/{chunk-ZR2GMFNH.js → chunk-GSZAUB3W.js} +2 -2
- package/dist/{chunk-6UOHLXVU.js → chunk-GZZE2OJP.js} +48 -50
- package/dist/{chunk-YVUOJW4H.js → chunk-H4D2X5N3.js} +1 -1
- package/dist/{chunk-KJLZZ4MY.js → chunk-HFNB2CG3.js} +1 -1
- package/dist/{chunk-FIIFME5M.js → chunk-HVBQL3PZ.js} +1 -1
- package/dist/{chunk-E2VWKW2A.js → chunk-JCOECSLT.js} +2 -2
- package/dist/{chunk-ZDQEVQHB.js → chunk-JP2ZSFRJ.js} +2 -2
- package/dist/{chunk-YUMVQB2F.js → chunk-K6QVKO7M.js} +1 -1
- package/dist/{chunk-SWWDVPVO.js → chunk-KKPYNKZD.js} +1 -1
- package/dist/{chunk-M4WEGGF7.js → chunk-L3ZVUQGN.js} +2 -2
- package/dist/{chunk-44T2V4EW.js → chunk-MNX7CK5N.js} +1 -1
- package/dist/chunk-N3CZ437C.js +5035 -0
- package/dist/{chunk-KJDQS24S.js → chunk-NST5G3WX.js} +2 -2
- package/dist/{chunk-BIJBGCF4.js → chunk-NU5LJYAT.js} +1 -1
- package/dist/{chunk-QDB7EFLI.js → chunk-NUFOXUDF.js} +5 -3
- package/dist/{chunk-ZV5GD5LV.js → chunk-ODIGIQ4C.js} +3 -3
- package/dist/{chunk-FZM6E4S4.js → chunk-OJTXXFYO.js} +2 -2
- package/dist/{chunk-7DKGU6CY.js → chunk-OYN54RSU.js} +2 -2
- package/dist/{chunk-GR3LU4D5.js → chunk-QPTQSM3D.js} +1 -1
- package/dist/{chunk-VFOCEFRZ.js → chunk-QTEU6NL3.js} +5 -5
- package/dist/{chunk-YOZPHSYV.js → chunk-QXVW22VM.js} +1 -1
- package/dist/{chunk-APVBITVZ.js → chunk-RGYPRUQP.js} +1 -1
- package/dist/{chunk-GKVERDJ2.js → chunk-RPVL65M7.js} +1 -1
- package/dist/{chunk-VWRIARRR.js → chunk-RULCW25D.js} +13 -13
- package/dist/{chunk-FP37FSOT.js → chunk-RWQANKWK.js} +2 -2
- package/dist/{chunk-6GZB32Q5.js → chunk-SACHIPZP.js} +1 -1
- package/dist/{chunk-C47ZGVKT.js → chunk-SBA4NG7Q.js} +7 -7
- package/dist/{chunk-YFISKULK.js → chunk-TDIYINK6.js} +2 -2
- package/dist/{chunk-XC3LDNBH.js → chunk-THSTFHB7.js} +1 -1
- package/dist/{chunk-TS4HYR6I.js → chunk-TLBSOI2R.js} +1 -1
- package/dist/{chunk-DETBSOYO.js → chunk-TODLF56D.js} +1 -1
- package/dist/{chunk-QEQEKBL7.js → chunk-TSQZ3DSC.js} +20 -5
- package/dist/{chunk-FDZXVTBY.js → chunk-UPN4UMT7.js} +1 -1
- package/dist/{chunk-T57ARBNR.js → chunk-UQDO2L6F.js} +17 -10
- package/dist/{chunk-RYNMIBZM.js → chunk-UUW654GD.js} +2 -2
- package/dist/{chunk-KXAGCBVO.js → chunk-VKWAW4JW.js} +15 -10
- package/dist/{chunk-2KYY75JP.js → chunk-VLHCR3G2.js} +2 -2
- package/dist/{chunk-BQQTZET2.js → chunk-VX3JUOZ6.js} +2 -2
- package/dist/{chunk-SAWXMCHB.js → chunk-W5VDIXYL.js} +1 -1
- package/dist/{chunk-2FNUCIHD.js → chunk-WF4TXIXY.js} +1 -1
- package/dist/{chunk-JLKEXS4I.js → chunk-WVH6VWMY.js} +3 -3
- package/dist/{chunk-JLLNDU2F.js → chunk-WY4J37EZ.js} +4 -4
- package/dist/{chunk-BMRZP6X6.js → chunk-X422IJKF.js} +1 -1
- package/dist/{chunk-4III3SDC.js → chunk-XPN7SDFQ.js} +10 -10
- package/dist/{chunk-L6MNWJTL.js → chunk-Y3RERZRQ.js} +7 -8
- package/dist/{chunk-ODKXNWDL.js → chunk-YXIXTFRO.js} +2 -2
- package/dist/{chunk-ZP3LPFTA.js → chunk-ZAOQWCZM.js} +9 -9
- package/dist/{chunk-FB366S4I.js → chunk-ZAXAT2D7.js} +6 -6
- package/dist/{chunk-DUSSDJJC.js → chunk-ZJ5ZLU2I.js} +2 -2
- package/dist/{chunk-YDG5LVIK.js → chunk-ZK3GFNHM.js} +15 -10
- package/dist/{clean-2AFJGFIG.js → clean-VPOP4TU4.js} +16 -16
- package/dist/cli.js +58 -58
- package/dist/{cloud-JM5MFMVV.js → cloud-Q7ZXCZ6E.js} +4 -4
- package/dist/{cloudrun-PNVETMPA.js → cloudrun-6DVAE7GG.js} +4 -4
- package/dist/{compare-ST4DXEMX.js → compare-X5SWN5XJ.js} +28 -28
- package/dist/{compiler-UCX3MZVN.js → compiler-N4TTEEQC.js} +3 -3
- package/dist/{component-ECFJIDUD.js → component-MJXAMRKF.js} +3 -3
- package/dist/{compositions-ZCAD47PD.js → compositions-F3ZHG5F4.js} +11 -11
- package/dist/{curve-NYXZWGPO.js → curve-4TWENQO7.js} +10 -10
- package/dist/{cuts-CKUCNNOX.js → cuts-X3LE5A2K.js} +11 -11
- package/dist/{delete-MVGSOWSC.js → delete-MYHKF3MS.js} +7 -7
- package/dist/{deploy-WBKPSWPG.js → deploy-OP2BHWCQ.js} +1 -1
- package/dist/{describeProject-ZDI5B6JO.js → describeProject-ZMKVHAYX.js} +7 -7
- package/dist/{diff-3UYDXIEZ.js → diff-7ZNSFBKV.js} +26 -25
- package/dist/{dist-IHPMKRYN.js → dist-H4C7ZCFU.js} +1 -1
- package/dist/{dist-XRAW3URT.js → dist-SWPSKAAJ.js} +4 -2
- package/dist/{doctor-A4HMMBII.js → doctor-ABSXYNXY.js} +10 -10
- package/dist/{energy-RN6KTYH6.js → energy-X2OAWHME.js} +11 -11
- package/dist/{events-LSEMS2LO.js → events-26SWSHDR.js} +3 -3
- package/dist/{events-AO3FEPL3.js → events-4MDK4K7Q.js} +4 -4
- package/dist/{events-6NE2NRCQ.js → events-JFIZSYMH.js} +13 -13
- package/dist/{extract-6UO4QR77.js → extract-4O3Q3LOD.js} +11 -11
- package/dist/{face-FTKPGC2O.js → face-7J7AQJDY.js} +11 -11
- package/dist/{feedback-GSKVBGA7.js → feedback-CVTJDQIX.js} +11 -11
- package/dist/{ffmpeg-HPMQUKY4.js → ffmpeg-EE2NKQT4.js} +6 -6
- package/dist/{figma-UIWB3XSX.js → figma-55J7UDDC.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{frames-U3LLSXSV.js → frames-OZLUDUOS.js} +12 -12
- package/dist/{generate-AFCKBHGB.js → generate-CY2TRPRE.js} +18 -17
- package/dist/{get-J3TJCAZW.js → get-HJHSVKGK.js} +7 -7
- package/dist/{gpuPolicy-W2OEEW7Y.js → gpuPolicy-LZFNAIJB.js} +6 -6
- package/dist/{grade-compare-AOXNJ53Z.js → grade-compare-JVTYF2T6.js} +29 -29
- package/dist/{heifImagePrep-4RSVCLPX.js → heifImagePrep-OGFEQMQT.js} +7 -7
- package/dist/{help-5NYIBLJJ.js → help-6WDI76YU.js} +1 -1
- package/dist/{history-KAXYCLVT.js → history-FIP5NGFC.js} +7 -7
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +62 -62
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-Z6KNUMH6.js → info-WTGJE4QB.js} +8 -8
- package/dist/{init-GSMXQX3U.js → init-UYTDM56U.js} +27 -27
- package/dist/{ink-IPPBJFH3.js → ink-BTLAE3ZR.js} +11 -11
- package/dist/{inspect-MXIGEN6Z.js → inspect-KIMJNTS4.js} +29 -29
- package/dist/{installer-JXI2JC3T.js → installer-6GSD3CVW.js} +4 -4
- package/dist/{keyframes-Z53YGH5F.js → keyframes-74LK522L.js} +7 -7
- package/dist/{lambda-KD7ZRYVK.js → lambda-CJ7P5NLO.js} +10 -10
- package/dist/{layout-NLDWEPDQ.js → layout-RLIXTM56.js} +29 -29
- package/dist/{lint-MSZMGQO5.js → lint-IOJB746U.js} +8 -8
- package/dist/{lintProject-SG4KRUAV.js → lintProject-NZADSVSU.js} +1 -1
- package/dist/{list-OLNBKKB4.js → list-V3TMQEQV.js} +7 -7
- package/dist/{localPage-BQ2LKHED.js → localPage-5LUCH2RM.js} +6 -6
- package/dist/{login-TBJVG5PZ.js → login-GNVKQO3W.js} +12 -13
- package/dist/{logout-B6H5F5YP.js → logout-UMDA3HDE.js} +3 -3
- package/dist/{look-T5V6JBD5.js → look-3QZIJFNX.js} +11 -11
- package/dist/{manager-FHVSGJNR.js → manager-3QTARUMT.js} +7 -7
- package/dist/{measure-KI3XY2MJ.js → measure-7LUYTL2E.js} +11 -11
- package/dist/{media-treatment-UZI55RS3.js → media-treatment-MYDIYP5I.js} +13 -13
- package/dist/{media-use-2PIPVWX4.js → media-use-UDBHEIYA.js} +9 -5
- package/dist/{models-MV4HBZKZ.js → models-S5CT7CST.js} +10 -10
- package/dist/{motionShot-A3TWOBRE.js → motionShot-U3TSHI33.js} +14 -14
- package/dist/{normalize-audio-37WYHLP4.js → normalize-audio-ZETO53KI.js} +9 -9
- package/dist/{open-4PPPV45S.js → open-UEJMPEPN.js} +12 -12
- package/dist/{parakeetRunner-J22MMWSM.js → parakeetRunner-2KFML7ZA.js} +11 -11
- package/dist/{pipeline-GE4LBTRO.js → pipeline-2TPI5L2C.js} +9 -9
- package/dist/{play-MZSW7GIL.js → play-XH2XKNCL.js} +20 -20
- package/dist/{preflight-NXMN7P4B.js → preflight-L5P4QXXH.js} +7 -7
- package/dist/{present-TWZLASXI.js → present-XXEU7RTN.js} +16 -16
- package/dist/{preview-OEXP2RPO.js → preview-V6LNVTBH.js} +18 -18
- package/dist/{probe-HNAD6ACH.js → probe-JL4JSTSP.js} +11 -11
- package/dist/{producer-E4AN4ADM.js → producer-RLZ64COI.js} +1 -1
- package/dist/{projectConfig-HKWVTV5Q.js → projectConfig-3IK4M62D.js} +6 -6
- package/dist/{publication-DTIE7G2E.js → publication-4I6P772E.js} +2 -2
- package/dist/{publish-CUU5W6CP.js → publish-TOPACGPR.js} +15 -15
- package/dist/{refresh-T6JLFCS4.js → refresh-4FQFQ2SW.js} +3 -3
- package/dist/{remove-background-2MRQ3YH4.js → remove-background-CNXM4XJN.js} +10 -10
- package/dist/{render-JP6JUXWP.js → render-OD3XEIBG.js} +5 -5
- package/dist/{render-EEIQAOGV.js → render-WCLJ4GPZ.js} +27 -36
- package/dist/{render-QRWGJUCD.js → render-XAE2YCRZ.js} +32 -32
- package/dist/{render-batch-46SYPMYV.js → render-batch-QM4SW65U.js} +5 -5
- package/dist/renderSetupWorker.js +1 -1
- package/dist/{resolver-DPRCISSD.js → resolver-K2UZSBCZ.js} +4 -4
- package/dist/{reverse-MY6DSOXL.js → reverse-JGOZUFKK.js} +1 -1
- package/dist/{run-2VGZ3URU.js → run-2JI4VCW5.js} +6 -6
- package/dist/{sherpa-5LOEXZ46.js → sherpa-OIJBFCKZ.js} +10 -10
- package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
- package/dist/skills/media-use/SKILL.md +5 -5
- package/dist/skills/media-use/audio/references/requirements.md +7 -7
- package/dist/skills/media-use/audio/references/tts.md +7 -6
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +16 -10
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +32 -0
- package/dist/skills/media-use/references/heygen.md +1 -1
- package/dist/{skills-BBHR4SHX.js → skills-L4AWBUJJ.js} +6 -6
- package/dist/{skillsUpdateCheck-HBOVCIXG.js → skillsUpdateCheck-GSX5MLON.js} +3 -3
- package/dist/{snapshot-S264O54Z.js → snapshot-5FK3HCJ7.js} +173 -66
- package/dist/{src-GLO4X3WA.js → src-HKLKN7AE.js} +9 -5
- package/dist/{src-G2EK32ZO.js → src-JT324RDD.js} +8 -8
- package/dist/{start-6AFMEXPO.js → start-5O33EGN2.js} +32 -25
- package/dist/{staticProjectServer-KWSV5IRS.js → staticProjectServer-CWKMUI6O.js} +17 -17
- package/dist/{status-5ZRM4R4N.js → status-MPCREDMQ.js} +9 -6
- package/dist/studio/assets/{hyperframes-player-CGO8wE5a.js → hyperframes-player-D7kdypzS.js} +1 -1
- package/dist/studio/assets/{index-COtefOSM.js → index-BT1zmedz.js} +1 -1
- package/dist/studio/assets/{index-DHPJjAUV.js → index-CaOrmH_8.js} +101 -101
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-JJO6VEFD.js → studio-api-24HJ5KQX.js} +9 -9
- package/dist/{studioServer-YFZIESIH.js → studioServer-KKGBELBR.js} +48 -48
- package/dist/{sync-DBMNZ32Z.js → sync-BT4WDK3B.js} +11 -11
- package/dist/{telemetry-OPZTKPDG.js → telemetry-77PW2F7B.js} +4 -4
- package/dist/{timeline-MCJUCDME.js → timeline-RKJ63VIU.js} +18 -18
- package/dist/{tokens-3DREMPWC.js → tokens-JATS65YH.js} +2 -2
- package/dist/{transcribe-AU7TPKMU.js → transcribe-ELWJ6NYG.js} +9 -9
- package/dist/{transcribe-TMGPK6FM.js → transcribe-FYBJBBP3.js} +22 -21
- package/dist/{updateCheck-YKTRFFFV.js → updateCheck-NU374MVC.js} +2 -2
- package/dist/{upgrade-UAKM3KAT.js → upgrade-VIWR25J6.js} +2 -2
- package/dist/{urlDownloader-77YL7TXO.js → urlDownloader-MVZYN7XB.js} +5 -5
- package/dist/{validate-SR35R3QM.js → validate-3HM2XCH4.js} +23 -23
- package/dist/{video-GNMQTE4D.js → video-H4ASUN7D.js} +7 -7
- package/dist/warmCheck.js +37 -37
- package/package.json +1 -1
- package/dist/chunk-TNWWLO4T.js +0 -5030
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveClientId,
|
|
23
23
|
revokeEndpoint,
|
|
24
24
|
tokenEndpoint
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-BVAPHHMQ.js";
|
|
26
26
|
import {
|
|
27
27
|
c
|
|
28
28
|
} from "./chunk-2GICKZ3I.js";
|
|
@@ -750,7 +750,15 @@ function retryAfterSeconds(response, nowMs) {
|
|
|
750
750
|
if (!Number.isFinite(retryAt)) return void 0;
|
|
751
751
|
return Math.min(Math.max(Math.ceil((retryAt - nowMs) / 1e3), 0), MAX_DEVICE_POLL_SECONDS);
|
|
752
752
|
}
|
|
753
|
-
|
|
753
|
+
var refreshing = /* @__PURE__ */ new Map();
|
|
754
|
+
function refreshTokens(refresh_token, opts = {}) {
|
|
755
|
+
const pending = refreshing.get(refresh_token);
|
|
756
|
+
if (pending) return pending;
|
|
757
|
+
const request = refreshOnce(refresh_token, opts).finally(() => refreshing.delete(refresh_token));
|
|
758
|
+
refreshing.set(refresh_token, request);
|
|
759
|
+
return request;
|
|
760
|
+
}
|
|
761
|
+
async function refreshOnce(refresh_token, opts) {
|
|
754
762
|
const { credentials } = await readStore();
|
|
755
763
|
if (credentials.oauth?.refresh_token !== refresh_token) throw ErrLoginChanged();
|
|
756
764
|
assertOAuthIdentity(credentials.oauth);
|
|
@@ -770,7 +778,7 @@ async function refreshTokens(refresh_token, opts = {}) {
|
|
|
770
778
|
body: body.toString()
|
|
771
779
|
});
|
|
772
780
|
if (res.status === 400 || res.status === 401) {
|
|
773
|
-
throw ErrRefreshFailed(await safeText2(res));
|
|
781
|
+
throw ErrRefreshFailed(await safeText2(res), { refused: true });
|
|
774
782
|
}
|
|
775
783
|
if (!res.ok) {
|
|
776
784
|
throw ErrApi(res.status, await safeText2(res) || res.statusText);
|
|
@@ -1087,30 +1095,80 @@ var envCredentialVar = (source) => source in ENV_CREDENTIAL_VAR ? ENV_CREDENTIAL
|
|
|
1087
1095
|
var EXPIRY_SKEW_MS = 60 * 1e3;
|
|
1088
1096
|
async function resolveCredential(opts = {}) {
|
|
1089
1097
|
const now = (opts.now ?? (() => /* @__PURE__ */ new Date()))();
|
|
1090
|
-
const
|
|
1091
|
-
if (
|
|
1092
|
-
return { type: "api_key", key: heygenEnv, source: "env" };
|
|
1093
|
-
}
|
|
1094
|
-
const hfEnv = headerSafeEnv(ENV_CREDENTIAL_VAR.env_alias);
|
|
1095
|
-
if (hfEnv) {
|
|
1096
|
-
return { type: "api_key", key: hfEnv, source: "env_alias" };
|
|
1097
|
-
}
|
|
1098
|
+
const envKey = envApiKey();
|
|
1099
|
+
if (envKey && !heygenApiHost()) return envKey;
|
|
1098
1100
|
const accessToken = headerSafeEnv(ENV_CREDENTIAL_VAR.env_oauth);
|
|
1099
1101
|
if (accessToken) {
|
|
1100
1102
|
return { type: "oauth", access_token: accessToken, source: "env_oauth", refreshable: false };
|
|
1101
1103
|
}
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
+
if (envKey && loginRefreshFailed) return envKey;
|
|
1105
|
+
return await fromStore(now, envKey);
|
|
1106
|
+
}
|
|
1107
|
+
async function fromStore(now, envKey) {
|
|
1108
|
+
const store = await readStore().catch((err) => {
|
|
1109
|
+
if (envKey) return null;
|
|
1110
|
+
throw err;
|
|
1111
|
+
});
|
|
1112
|
+
if (!store || store.source === "absent") {
|
|
1113
|
+
if (envKey) return envKey;
|
|
1114
|
+
throw ErrNotConfigured();
|
|
1115
|
+
}
|
|
1116
|
+
const { credentials, source } = store;
|
|
1104
1117
|
const fileSource = source === "file_legacy" ? "file_legacy" : "file_json";
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
if (credentials.
|
|
1110
|
-
|
|
1118
|
+
const login = credentials.oauth && boundToThisClient(credentials.oauth) ? pickOAuth(credentials.oauth, now, fileSource) : null;
|
|
1119
|
+
return login ?? envKey ?? storedApiKey(credentials, fileSource);
|
|
1120
|
+
}
|
|
1121
|
+
function storedApiKey(credentials, source) {
|
|
1122
|
+
if (credentials.oauth) {
|
|
1123
|
+
assertOAuthIdentity(credentials.oauth);
|
|
1124
|
+
throw ErrLoginExpired();
|
|
1111
1125
|
}
|
|
1126
|
+
if (credentials.api_key) return { type: "api_key", key: credentials.api_key, source };
|
|
1112
1127
|
throw ErrNotConfigured();
|
|
1113
1128
|
}
|
|
1129
|
+
function envApiKey() {
|
|
1130
|
+
const heygenEnv = headerSafeEnv(ENV_CREDENTIAL_VAR.env);
|
|
1131
|
+
if (heygenEnv) return { type: "api_key", key: heygenEnv, source: "env" };
|
|
1132
|
+
const hfEnv = headerSafeEnv(ENV_CREDENTIAL_VAR.env_alias);
|
|
1133
|
+
if (hfEnv) return { type: "api_key", key: hfEnv, source: "env_alias" };
|
|
1134
|
+
return void 0;
|
|
1135
|
+
}
|
|
1136
|
+
function heygenApiHost() {
|
|
1137
|
+
const mediaBase = process.env["HEYGEN_API_BASE"]?.trim();
|
|
1138
|
+
return [apiBaseUrl(), ...mediaBase ? [mediaBase] : []].every((base) => {
|
|
1139
|
+
try {
|
|
1140
|
+
const host = new URL(base).hostname;
|
|
1141
|
+
return host === "heygen.com" || host.endsWith(".heygen.com");
|
|
1142
|
+
} catch {
|
|
1143
|
+
return false;
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
function boundToThisClient(tokens) {
|
|
1148
|
+
try {
|
|
1149
|
+
assertOAuthIdentity(tokens);
|
|
1150
|
+
return true;
|
|
1151
|
+
} catch {
|
|
1152
|
+
return false;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
var loginRefreshFailed = false;
|
|
1156
|
+
async function afterRefreshFailure(err, refreshToken) {
|
|
1157
|
+
if (!isAuthError(err)) throw err;
|
|
1158
|
+
if (err.code === "LOGIN_CHANGED" || err.code === "REFRESH_FAILED") {
|
|
1159
|
+
const stored = await readStore().catch(() => null);
|
|
1160
|
+
const current = stored?.credentials.oauth?.refresh_token;
|
|
1161
|
+
if (current && current !== refreshToken) {
|
|
1162
|
+
const next = await resolveCredential();
|
|
1163
|
+
if (next.type !== "oauth" || !next.refreshable) return next;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
if (!err.refused && err.code !== "LOGIN_EXPIRED") throw err;
|
|
1167
|
+
const key = envApiKey();
|
|
1168
|
+
if (!key) throw err;
|
|
1169
|
+
loginRefreshFailed = true;
|
|
1170
|
+
return key;
|
|
1171
|
+
}
|
|
1114
1172
|
function headerSafeEnv(name) {
|
|
1115
1173
|
const value = process.env[name];
|
|
1116
1174
|
if (value && !isHeaderSafe(value)) {
|
|
@@ -1172,6 +1230,7 @@ export {
|
|
|
1172
1230
|
ENV_CREDENTIAL_VAR,
|
|
1173
1231
|
envCredentialVar,
|
|
1174
1232
|
resolveCredential,
|
|
1233
|
+
afterRefreshFailure,
|
|
1175
1234
|
tryResolveCredential,
|
|
1176
1235
|
isTokenExpired
|
|
1177
1236
|
};
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-TSYRN646.js";
|
|
12
12
|
import {
|
|
13
13
|
fetchLocalPageUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H4D2X5N3.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-
|
|
28
|
+
} from "./chunk-NUFOXUDF.js";
|
|
29
29
|
import {
|
|
30
30
|
DOMParser,
|
|
31
31
|
parseHTML
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./chunk-XQ26I3PL.js";
|
|
14
14
|
import {
|
|
15
15
|
createProjectConfig
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RGYPRUQP.js";
|
|
17
17
|
import {
|
|
18
18
|
isHyperframesProject
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6ZICZOMN.js";
|
|
20
20
|
|
|
21
21
|
// src/utils/desktopApp.ts
|
|
22
22
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -6,23 +6,27 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
pageUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QXVW22VM.js";
|
|
10
10
|
import {
|
|
11
11
|
Fix
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-D7THUO4V.js";
|
|
13
|
+
import {
|
|
14
|
+
HyperframesApiError,
|
|
15
|
+
HyperframesCloudClient
|
|
16
|
+
} from "./chunk-3XJM7XZN.js";
|
|
13
17
|
import {
|
|
14
18
|
refreshIfNeeded,
|
|
15
19
|
resolveCloudAuthHeaders,
|
|
16
20
|
resolveCloudBaseUrl
|
|
17
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TSQZ3DSC.js";
|
|
18
22
|
import {
|
|
19
23
|
AuthClient,
|
|
20
24
|
buildAuthHeaders,
|
|
21
25
|
resolveCredential
|
|
22
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ETYQYG6Q.js";
|
|
23
27
|
import {
|
|
24
28
|
configDir
|
|
25
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-BVAPHHMQ.js";
|
|
26
30
|
|
|
27
31
|
// src/heygen/v3.ts
|
|
28
32
|
import { createHash } from "crypto";
|
|
@@ -115,39 +119,26 @@ function refusal(status, body, estimate) {
|
|
|
115
119
|
"fix the request it names, then run again"
|
|
116
120
|
);
|
|
117
121
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (body !== void 0) headers["content-type"] = "application/json";
|
|
124
|
-
if (key) headers["Idempotency-Key"] = key;
|
|
125
|
-
let res;
|
|
122
|
+
var clientFor = (auth) => new HyperframesCloudClient({ baseUrl: resolveCloudBaseUrl(), getAuthHeaders: () => auth });
|
|
123
|
+
var resume = "run the same command again: it resumes the same job";
|
|
124
|
+
async function call(route, send, timeoutMs, estimate, auth) {
|
|
125
|
+
const client = clientFor(auth ?? await resolveCloudAuthHeaders().catch(noSignIn));
|
|
126
|
+
let data;
|
|
126
127
|
try {
|
|
127
|
-
|
|
128
|
-
method,
|
|
129
|
-
headers,
|
|
130
|
-
...body !== void 0 ? { body: JSON.stringify(body) } : {},
|
|
131
|
-
signal: AbortSignal.timeout(method === "POST" ? 18e4 : 3e4)
|
|
132
|
-
});
|
|
128
|
+
data = await send(client, AbortSignal.timeout(timeoutMs));
|
|
133
129
|
} catch (err) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"run the same command again: it resumes the same job"
|
|
144
|
-
);
|
|
145
|
-
if (!res.ok) {
|
|
146
|
-
const refused = refusal(res.status, value, estimate);
|
|
147
|
-
refused.status = res.status;
|
|
130
|
+
if (!(err instanceof HyperframesApiError))
|
|
131
|
+
throw new Fix(
|
|
132
|
+
`no answer from HeyGen for ${route} (${err instanceof Error ? err.message : String(err)})`,
|
|
133
|
+
resume
|
|
134
|
+
);
|
|
135
|
+
if (err.status >= 500 || err.status < 300 || err.raw == null)
|
|
136
|
+
throw new Fix(`HeyGen ${err.status} for ${route} with no readable answer`, resume);
|
|
137
|
+
const refused = refusal(err.status, err.raw, estimate);
|
|
138
|
+
refused.status = err.status;
|
|
148
139
|
throw refused;
|
|
149
140
|
}
|
|
150
|
-
|
|
141
|
+
if (data == null) throw new Fix(`HeyGen answered ${route} with no readable answer`, resume);
|
|
151
142
|
if (!isRecord(data))
|
|
152
143
|
throw new Fix(`HeyGen answered ${route} with no job`, "run the same command again");
|
|
153
144
|
const id = data.id ?? data.job_id ?? data.video_id ?? data.generation_id;
|
|
@@ -167,19 +158,27 @@ function log(entry, record) {
|
|
|
167
158
|
`
|
|
168
159
|
);
|
|
169
160
|
}
|
|
170
|
-
async function runJob(
|
|
161
|
+
async function runJob(jobRoute, body, key, opts = {}) {
|
|
171
162
|
const started = Date.now();
|
|
163
|
+
const route = jobRoute.path;
|
|
172
164
|
const { auth, scope } = await jobSender();
|
|
173
165
|
const sent = liveKey(key, scope);
|
|
174
166
|
let job;
|
|
175
167
|
try {
|
|
176
|
-
job = await call(
|
|
168
|
+
job = await call(
|
|
169
|
+
route,
|
|
170
|
+
(client, signal) => jobRoute.start(client, body, sent, signal),
|
|
171
|
+
18e4,
|
|
172
|
+
opts.credits,
|
|
173
|
+
auth
|
|
174
|
+
);
|
|
177
175
|
} catch (err) {
|
|
178
176
|
if (err instanceof Refused && !KEEPS_KEY.has(err.status)) markFailed(sent, scope);
|
|
179
177
|
throw err;
|
|
180
178
|
}
|
|
181
179
|
if (opts.log) log(opts.log, { route, id: job.id, key: sent, status: job.status });
|
|
182
|
-
|
|
180
|
+
const status = jobRoute.status;
|
|
181
|
+
while (status && RUNNING.has(job.status.toLowerCase())) {
|
|
183
182
|
if (Date.now() - started > (opts.timeoutMs ?? 15 * 6e4))
|
|
184
183
|
throw new Fix(
|
|
185
184
|
`HeyGen job ${job.id} is still ${job.status}`,
|
|
@@ -187,7 +186,12 @@ async function runJob(route, body, key, pollRoute, opts = {}) {
|
|
|
187
186
|
);
|
|
188
187
|
opts.onWait?.(job);
|
|
189
188
|
await new Promise((r) => setTimeout(r, opts.intervalMs ?? 5e3));
|
|
190
|
-
|
|
189
|
+
const id = job.id;
|
|
190
|
+
job = await call(
|
|
191
|
+
`${route}/${encodeURIComponent(id)}`,
|
|
192
|
+
(client, signal) => status(client, id, signal),
|
|
193
|
+
3e4
|
|
194
|
+
);
|
|
191
195
|
}
|
|
192
196
|
if (opts.log) log(opts.log, { route, id: job.id, key: sent, status: job.status });
|
|
193
197
|
if (!/^(completed|succeeded|success|done)$/i.test(job.status)) {
|
|
@@ -200,23 +204,17 @@ async function runJob(route, body, key, pollRoute, opts = {}) {
|
|
|
200
204
|
}
|
|
201
205
|
var isVoice = (v) => isRecord(v) && typeof v.voice_id === "string" && typeof v.name === "string";
|
|
202
206
|
async function publicVoices(language, limit) {
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const query = new URLSearchParams({ type: "public", language, limit: String(limit) });
|
|
208
|
-
const res = await fetch(`${resolveCloudBaseUrl()}/v3/voices?${query}`, {
|
|
209
|
-
headers,
|
|
210
|
-
signal: AbortSignal.timeout(3e4)
|
|
211
|
-
}).catch((err) => {
|
|
207
|
+
const client = clientFor(await resolveCloudAuthHeaders().catch(noSignIn));
|
|
208
|
+
const value = await client.listVoicesV3({ type: "public", language, limit, signal: AbortSignal.timeout(3e4) }).catch((err) => {
|
|
209
|
+
if (err instanceof HyperframesApiError)
|
|
210
|
+
throw new Fix(`HeyGen ${err.status} listing its voices`, "run the same command again");
|
|
212
211
|
throw new Fix(
|
|
213
212
|
`no answer from HeyGen for its voices (${err instanceof Error ? err.message : String(err)})`,
|
|
214
213
|
"run the same command again"
|
|
215
214
|
);
|
|
216
215
|
});
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
throw new Fix(`HeyGen ${res.status} listing its voices`, "run the same command again");
|
|
216
|
+
if (!isRecord(value) || !Array.isArray(value.data))
|
|
217
|
+
throw new Fix("HeyGen answered its voices with no list", "run the same command again");
|
|
220
218
|
return value.data.filter(isVoice).map(({ voice_id, name, language: language2, gender }) => ({ voice_id, name, language: language2, gender }));
|
|
221
219
|
}
|
|
222
220
|
async function senderScope() {
|
|
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
|
|
|
1278
1278
|
} catch (err) {
|
|
1279
1279
|
if (err instanceof Error) {
|
|
1280
1280
|
try {
|
|
1281
|
-
const { trackCommandFailure } = await import("./events-
|
|
1281
|
+
const { trackCommandFailure } = await import("./events-4MDK4K7Q.js");
|
|
1282
1282
|
trackCommandFailure(
|
|
1283
1283
|
command,
|
|
1284
1284
|
err,
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveCaptureBrowserGpuMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7TAS4BNT.js";
|
|
10
10
|
import {
|
|
11
11
|
explainChromeLaunchFailure,
|
|
12
12
|
inAgentSandbox,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
oneProcessOverPipe,
|
|
16
16
|
pipeLaunchClosedOnMac,
|
|
17
17
|
sandboxDeniedRemediation
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NUFOXUDF.js";
|
|
19
19
|
import {
|
|
20
20
|
processIsAlive
|
|
21
21
|
} from "./chunk-KGPLIH7B.js";
|
|
@@ -7,12 +7,12 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
HyperframesApiError,
|
|
9
9
|
HyperframesCloudClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3XJM7XZN.js";
|
|
11
11
|
import {
|
|
12
12
|
forceRefreshCredentials,
|
|
13
13
|
resolveCloudAuthHeaders,
|
|
14
14
|
resolveCloudBaseUrl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TSQZ3DSC.js";
|
|
16
16
|
import {
|
|
17
17
|
errorBox
|
|
18
18
|
} from "./chunk-5LOZWO2M.js";
|
|
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
loadProducer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X422IJKF.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProjectRelativeSrc
|
|
12
12
|
} from "./chunk-WVRAFHJU.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/projectMedia.ts
|
|
15
15
|
async function collectProjectMedia(projectDir) {
|
|
16
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
16
|
+
const { bundleToSingleHtml } = await import("./compiler-N4TTEEQC.js");
|
|
17
17
|
const html = await bundleToSingleHtml(projectDir);
|
|
18
18
|
const producer = await loadProducer();
|
|
19
19
|
if (!producer.collectRenderMedia) throw new Error("Render media collector unavailable");
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
findCompositionDimensions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QPTQSM3D.js";
|
|
10
10
|
import {
|
|
11
11
|
outputResolutionForSize
|
|
12
12
|
} from "./chunk-T5ELONXY.js";
|