hyperframes 0.9.46 → 0.9.48
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-3FQLHIZ6.js → add-3H4DG4RA.js} +13 -13
- package/dist/{agentPromptGenerator-Y4WVIS7O.js → agentPromptGenerator-PIHKWDAW.js} +6 -5
- package/dist/{animatedGifPrep-6IFABDM3.js → animatedGifPrep-SXYSHW6I.js} +5 -4
- package/dist/api.js +29 -28
- package/dist/{appHistory-LZCGD54D.js → appHistory-DK2XI4EZ.js} +2 -2
- package/dist/{asset-KPQAHAZ7.js → asset-43VALPNF.js} +2 -2
- package/dist/{assetCataloger-3FGGZTTX.js → assetCataloger-MUOL6FRF.js} +8 -7
- package/dist/{audio-7RADC3X7.js → audio-ZHGSDLJR.js} +13 -12
- package/dist/{auth-CHHUN4IL.js → auth-UXRKOJQB.js} +2 -2
- package/dist/{autoUpdate-H72HIWTL.js → autoUpdate-PMEPQG65.js} +2 -2
- package/dist/{avatars-XLQOPLVQ.js → avatars-QFBWZAIE.js} +9 -8
- package/dist/{backgroundChecks-ACOSRT3C.js → backgroundChecks-OK6SI7BE.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-JG5MSARZ.js → batchRender-XYL2E7IX.js} +2 -2
- package/dist/{beats-RZQQEVK3.js → beats-O23QKE6J.js} +5 -5
- package/dist/{benchmark-PJ6P5PI7.js → benchmark-DKBSDIX5.js} +7 -7
- package/dist/{billing-4DCA7C7L.js → billing-ZZCU3K3Q.js} +12 -12
- package/dist/{browser-CEAT5YF3.js → browser-4X6WZ6UD.js} +4 -4
- package/dist/{bundleWithLocalizedFonts-U6PRV3XO.js → bundleWithLocalizedFonts-M64DWYM5.js} +1 -1
- package/dist/{capture-JRITMVAO.js → capture-JJARZBDS.js} +88 -269
- package/dist/{capture-KJIHJTDP.js → capture-O3W6P6DB.js} +5 -5
- package/dist/{captureCompositionFrame-TURWWCHG.js → captureCompositionFrame-JLTAV6VN.js} +12 -11
- package/dist/{captureFile-JFNQEK4R.js → captureFile-R5JZ7WRA.js} +2 -2
- package/dist/{catalog-W7436LYB.js → catalog-4A4CPKPT.js} +13 -13
- package/dist/{catch-up-TXDSUZZF.js → catch-up-EUQFPFMU.js} +7 -7
- package/dist/{check-RF4BU4YS.js → check-IZ6SFIGR.js} +41 -40
- package/dist/{checkAudio-355J7YK4.js → checkAudio-5IRYPK3A.js} +8 -7
- package/dist/{checkBrowser-K3EFUVEG.js → checkBrowser-HUCHMJV4.js} +33 -32
- package/dist/{chunk-BN7UITKY.js → chunk-22EEGJLH.js} +12 -9
- package/dist/{chunk-HC5D2SDF.js → chunk-2GS3N3TZ.js} +1 -1
- package/dist/{chunk-UGT4SXWS.js → chunk-3JWNN5PN.js} +71 -175
- package/dist/{chunk-4IU2UP4A.js → chunk-3LH7DND6.js} +2 -2
- package/dist/{chunk-THKMCTAA.js → chunk-44EG3TMN.js} +1 -1
- package/dist/{chunk-WWMPS3LM.js → chunk-47MEWWCO.js} +2 -2
- package/dist/{chunk-QPI4PPHA.js → chunk-4BJYQXFF.js} +3 -3
- package/dist/{chunk-Y7V4GGFQ.js → chunk-4HP2MTKM.js} +1 -1
- package/dist/{chunk-JL45V2DZ.js → chunk-4WDBYCUK.js} +1 -1
- package/dist/{chunk-HGLLFTCP.js → chunk-4XETQ5LC.js} +1 -1
- package/dist/{chunk-7HDLRWT6.js → chunk-4Y5IDZOJ.js} +1 -1
- package/dist/{chunk-GUVBME3S.js → chunk-5AJNQMML.js} +2 -2
- package/dist/{chunk-BVSG3ZQQ.js → chunk-5DW2DEHX.js} +1 -1
- package/dist/{chunk-C44GJVPH.js → chunk-5IE7DN6I.js} +2 -2
- package/dist/{chunk-6OCZCBLT.js → chunk-5MHENUR3.js} +3 -3
- package/dist/{chunk-ACUFGUTH.js → chunk-67QXALQY.js} +69 -16
- package/dist/{chunk-ORKXVTJI.js → chunk-6DNSUUKB.js} +6 -6
- package/dist/{chunk-NRNZJELI.js → chunk-7RHN6N5F.js} +1 -1
- package/dist/{chunk-NN267VD6.js → chunk-7SNB3KGY.js} +2 -2
- package/dist/{chunk-EZXMEROT.js → chunk-7X2TCJJ7.js} +1 -1
- package/dist/{chunk-EQ6MHHC2.js → chunk-AOITLZJO.js} +1 -1
- package/dist/{chunk-OLKDBDIZ.js → chunk-B2WXMYMA.js} +17 -9
- package/dist/{chunk-VN2BQZSL.js → chunk-BEPEMS56.js} +4 -4
- package/dist/{chunk-MNQ2N4YH.js → chunk-BM6LSTMG.js} +3 -3
- package/dist/{chunk-J5ZACODW.js → chunk-CDBPBLYJ.js} +2 -2
- package/dist/{chunk-LRHW62CP.js → chunk-CTWD5ND3.js} +10 -10
- package/dist/{chunk-IR4JEH5Q.js → chunk-CZBTUYLW.js} +2 -2
- package/dist/{chunk-VNEVQU4Y.js → chunk-DACTRVDQ.js} +3 -3
- package/dist/{chunk-GTA7W75W.js → chunk-DE3JRSGT.js} +44 -2
- package/dist/{chunk-5TF5KKGF.js → chunk-DFJIVRYU.js} +1 -1
- package/dist/{chunk-VVQQJIRX.js → chunk-E5OW6L6E.js} +2 -2
- package/dist/{chunk-KDA3LTQU.js → chunk-ESXZZU25.js} +3 -3
- package/dist/{chunk-WKD5W3TN.js → chunk-EVRVYDKJ.js} +4 -4
- package/dist/{chunk-ISPEHDUQ.js → chunk-EWMPCW7J.js} +1 -1
- package/dist/{chunk-BR6FHEP5.js → chunk-FCNMU7LC.js} +2 -2
- package/dist/{chunk-WH6EXEDN.js → chunk-FF3VETCD.js} +1 -1
- package/dist/{chunk-KH2HGTPT.js → chunk-FFZE3G5R.js} +1 -1
- package/dist/{chunk-EHV6WJDU.js → chunk-FLHKID4G.js} +2 -2
- package/dist/{chunk-IT2YDRMD.js → chunk-G55B5LP6.js} +1 -1
- package/dist/{chunk-R2SL4STW.js → chunk-GXPAR6JC.js} +2 -2
- package/dist/{chunk-5VNF24CQ.js → chunk-GZSJYNAJ.js} +28 -25
- package/dist/{chunk-GCI34AB3.js → chunk-HD5RVDL6.js} +1 -1
- package/dist/{chunk-DIUOG4KA.js → chunk-HZXRORAG.js} +2 -2
- package/dist/{chunk-RK5KGIYX.js → chunk-I2UMQAOQ.js} +1 -1
- package/dist/{chunk-PYXBD4ZH.js → chunk-I4OQGQ5M.js} +1 -1
- package/dist/{chunk-P4JJRVSY.js → chunk-I542AQXY.js} +2 -2
- package/dist/{chunk-AK6PJNCY.js → chunk-IK7DQLH7.js} +6 -6
- package/dist/{chunk-DYRXALWM.js → chunk-IMNIW22F.js} +1 -1
- package/dist/{chunk-V3TXAAMF.js → chunk-IPTZMILN.js} +1 -1
- package/dist/{chunk-M3NFK4OF.js → chunk-IQA5CXNE.js} +1 -1
- package/dist/{chunk-HMPPBQUY.js → chunk-JET2QWI5.js} +2 -2
- package/dist/{chunk-LHSVECRX.js → chunk-JN4ING5S.js} +2 -2
- package/dist/{chunk-VC4R6DPZ.js → chunk-JUI6DQFD.js} +3 -3
- package/dist/{chunk-FZUM2FWY.js → chunk-JX7623IE.js} +5 -275
- package/dist/{chunk-TMGMUL3J.js → chunk-JYOOWDQK.js} +1 -1
- package/dist/{chunk-OYUASBFR.js → chunk-LIQZZ6AE.js} +1 -1
- package/dist/{chunk-XRQQIE2X.js → chunk-M3MXR3HG.js} +2 -2
- package/dist/{chunk-TZRMV44S.js → chunk-M5PWCI3M.js} +3 -3
- package/dist/{chunk-S4PA46LO.js → chunk-MOTJT42J.js} +2 -2
- package/dist/{chunk-43GCSOM5.js → chunk-MR7VKWYT.js} +1 -1
- package/dist/{chunk-OXTPNY3V.js → chunk-MXOWNQCI.js} +1 -1
- package/dist/{chunk-37ZR6H7S.js → chunk-MZ2LNNLT.js} +6 -6
- package/dist/{chunk-GHQ2B7CB.js → chunk-NAUOUIEW.js} +1 -1
- package/dist/{chunk-MZZN4RLK.js → chunk-NECZT66A.js} +2 -2
- package/dist/{chunk-RWHVILFO.js → chunk-OFAEOC67.js} +6 -6
- package/dist/{chunk-QYAZSX4L.js → chunk-OO4R2IFF.js} +1 -1
- package/dist/{chunk-RHB37MXS.js → chunk-P4FZ67X5.js} +3 -3
- package/dist/{chunk-MKXMXMRH.js → chunk-PBTXEWFY.js} +7 -7
- package/dist/{chunk-6M2D5R5Q.js → chunk-PCH55NAO.js} +1 -1
- package/dist/{chunk-EOO255GS.js → chunk-POCPG2WI.js} +7 -7
- package/dist/{chunk-AQQK6BFW.js → chunk-PVR4LBWK.js} +10 -10
- package/dist/{upstreamProxy-W5FWAT5Z.js → chunk-QCAKISPA.js} +0 -11
- package/dist/{chunk-HMEMBYTA.js → chunk-QQSVDBSH.js} +16 -14
- package/dist/{chunk-SLNSV3HI.js → chunk-RCTY7VNK.js} +1 -1
- package/dist/{chunk-LK2GOIB7.js → chunk-RGGQBF7T.js} +1 -1
- package/dist/{chunk-S54GG7OD.js → chunk-RV6ZSL4E.js} +3 -3
- package/dist/{chunk-5BK52ECX.js → chunk-SGLUNJTO.js} +2 -2
- package/dist/{chunk-ZEPP4IYU.js → chunk-SXMAJMTP.js} +3 -3
- package/dist/{chunk-ONLHSDFK.js → chunk-T4TF22AD.js} +5 -5
- package/dist/{chunk-X3EWYERU.js → chunk-TM4PTEAL.js} +1 -1
- package/dist/{chunk-FKHIDW46.js → chunk-TPVRUKKI.js} +4 -4
- package/dist/{chunk-CL5IBQJC.js → chunk-U7ZCBWNM.js} +4 -0
- package/dist/{chunk-F3TMSCSZ.js → chunk-UAU4SIOQ.js} +3 -3
- package/dist/chunk-UG3G4HEH.js +701 -0
- package/dist/{chunk-ZQMS7HXL.js → chunk-ULNYVLR5.js} +1 -1
- package/dist/{chunk-EH4AQ3DS.js → chunk-UX4HQHMS.js} +3 -3
- package/dist/{chunk-37GD3CWK.js → chunk-VOJ3ICMF.js} +1 -1
- package/dist/{chunk-WOG6H6QL.js → chunk-VTLYJLGX.js} +2 -2
- package/dist/{chunk-ZH2LHLVS.js → chunk-W4JWPYLU.js} +1 -1
- package/dist/{chunk-PHEXH35X.js → chunk-W56YNDIJ.js} +1 -1
- package/dist/{chunk-ESYKCW5A.js → chunk-WN4W76IQ.js} +1 -1
- package/dist/{chunk-PE7IEERM.js → chunk-WT2OKPEW.js} +3 -3
- package/dist/{chunk-JRDSR3YU.js → chunk-XUCEC2EI.js} +1 -1
- package/dist/{chunk-Y3NV4IJX.js → chunk-YRXIEP35.js} +1 -1
- package/dist/{chunk-VS5SC7OM.js → chunk-YZERHM3O.js} +2 -2
- package/dist/{chunk-6LWG6HAU.js → chunk-Z2DDFW7J.js} +9 -9
- package/dist/{chunk-J2PFGVTU.js → chunk-Z2EKCD7H.js} +1 -1
- package/dist/{chunk-D2UY5VC3.js → chunk-Z46RV43W.js} +1 -1
- package/dist/{chunk-EYAHZIYQ.js → chunk-ZJTSSZVG.js} +1 -1
- package/dist/{chunk-3WASKIY5.js → chunk-ZQMK76GC.js} +1 -1
- package/dist/{chunk-ZJ6LT2NW.js → chunk-ZR7CJIH3.js} +58 -35
- package/dist/{clean-XEOLR4BJ.js → clean-YTQ7THRZ.js} +16 -15
- package/dist/cli.js +65 -65
- package/dist/{cloud-A4HVQUQM.js → cloud-5C5SCK4H.js} +2 -2
- package/dist/{cloud-FIUFEYC3.js → cloud-NYF5MJVW.js} +4 -4
- package/dist/{cloudrun-O3I4TRAZ.js → cloudrun-XXGMWBUO.js} +3 -3
- package/dist/{compare-LRJSRWR3.js → compare-Z32R2SCB.js} +31 -30
- package/dist/{component-UB7BMON5.js → component-UAZQ4P7D.js} +3 -3
- package/dist/{compositions-E3EDTQ3J.js → compositions-WRX752GP.js} +9 -8
- package/dist/{contactSheet-2JNX5JCQ.js → contactSheet-O3FOOHOX.js} +3 -3
- package/dist/{curve-QLYI5ZTJ.js → curve-GPONFTFR.js} +9 -8
- package/dist/{cuts-Y2XN3NND.js → cuts-RC2WIAYL.js} +10 -9
- package/dist/{delete-CJBPT67E.js → delete-MDRUJACW.js} +4 -4
- package/dist/{deploy-J2NMEORU.js → deploy-EV4JCQW6.js} +2 -2
- package/dist/{describeProject-TPF3Z2HR.js → describeProject-D2MMDRME.js} +6 -5
- package/dist/{destroy-ORZHOLMM.js → destroy-IBQ64X7C.js} +2 -2
- package/dist/{deterministicFonts-4JVXQH5F.js → deterministicFonts-QY4KNTOU.js} +2 -2
- package/dist/{diff-5KBBWVT7.js → diff-BGZFEZ7V.js} +31 -30
- package/dist/{dist-UGBEQYQQ.js → dist-BKWVQR7A.js} +8 -8
- package/dist/{dist-YLXB4RLU.js → dist-YX7FMBUD.js} +3 -1
- package/dist/{doctor-H2OX6GBM.js → doctor-TDF4VFEI.js} +9 -8
- package/dist/{energy-274ABZCI.js → energy-DDE435SP.js} +10 -9
- package/dist/{events-SDXGCMWR.js → events-CQLKSC62.js} +2 -2
- package/dist/{events-72RX4ARF.js → events-IFAKMWNL.js} +11 -10
- package/dist/{events-3ZG334OJ.js → events-WA3SQMWZ.js} +4 -4
- package/dist/{execute-QFAHJM6Q.js → execute-H337HQ2I.js} +24 -23
- package/dist/{extract-PMFDZHVG.js → extract-LOH2HC74.js} +10 -9
- package/dist/{face-SS3SCFVS.js → face-RMDNBINB.js} +11 -10
- package/dist/{feedback-GUOORIB3.js → feedback-QX4CBEFU.js} +6 -6
- package/dist/{ffmpeg-6OO3GLBM.js → ffmpeg-LXWLSIJN.js} +5 -4
- package/dist/{figma-7UPOW7FE.js → figma-QNCIZZKI.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -8
- package/dist/{frames-U3YGMMMJ.js → frames-M3ZAUTAZ.js} +12 -11
- package/dist/{generate-AUPHWEEL.js → generate-JHWY26CH.js} +21 -20
- package/dist/{get-A2NZGSFG.js → get-UOPVKIUK.js} +4 -4
- package/dist/{gpuPolicy-W433AKJE.js → gpuPolicy-4UHHZMH7.js} +5 -4
- package/dist/{grade-compare-5C2LRNHQ.js → grade-compare-TRTR3HGM.js} +30 -29
- package/dist/{heifImagePrep-D446M7WT.js → heifImagePrep-7DRKOFIJ.js} +6 -5
- package/dist/{help-3LV7M6B7.js → help-XBJ3CPJG.js} +1 -1
- package/dist/{history-ZQHBWWZE.js → history-4NBOWTAK.js} +9 -9
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-XQ2IJOMG.js → info-6OUYHW5G.js} +11 -10
- package/dist/{init-ZKRYYGOT.js → init-U4UGYE5D.js} +27 -26
- package/dist/{ink-A53ZJM3Y.js → ink-3K5U33XB.js} +10 -9
- package/dist/{inspect-MQ4EK7IR.js → inspect-U6QLWQW2.js} +31 -30
- package/dist/{installer-FC2Z2XXY.js → installer-2LTM4GWP.js} +5 -5
- package/dist/{keyframes-B55NHFTC.js → keyframes-HRT4ICFF.js} +7 -7
- package/dist/{lambda-2QOMUSG6.js → lambda-QCYXB7S3.js} +10 -9
- package/dist/{layout-7YH7VP7S.js → layout-S6E5YVK5.js} +31 -30
- package/dist/{lint-KAJRCNL2.js → lint-JNQUZ5H6.js} +7 -7
- package/dist/{list-RNSNNZQE.js → list-IEATKMVG.js} +4 -4
- package/dist/{localPage-GJ6C7W53.js → localPage-KKLCOLJR.js} +6 -5
- package/dist/{login-JVPXGRUD.js → login-BWXQWFKL.js} +4 -4
- package/dist/{look-YVXOUUZD.js → look-5EMJASLS.js} +10 -9
- package/dist/{manager-54RABD4L.js → manager-7XKYKMB7.js} +6 -5
- package/dist/{measure-3YFE6T4L.js → measure-UW3MUWR7.js} +11 -11
- package/dist/{media-treatment-JGN2SUZ4.js → media-treatment-C26U3INH.js} +11 -10
- package/dist/{media-use-2I2N7TE5.js → media-use-IGSJKXLU.js} +3 -3
- package/dist/{models-QSEJP7DQ.js → models-XQMHEBHU.js} +9 -8
- package/dist/{motionShot-2NLQJU33.js → motionShot-PH2I6VOO.js} +14 -13
- package/dist/{normalize-audio-64TH5ILM.js → normalize-audio-ROHXFODM.js} +7 -7
- package/dist/{open-64HC2QB2.js → open-UAGIY4HR.js} +15 -15
- package/dist/{parakeetRunner-V7U32IZL.js → parakeetRunner-OOJI6E2B.js} +11 -10
- package/dist/{pipeline-OMPNZQWD.js → pipeline-GQUCPCXS.js} +8 -7
- package/dist/{plan-TFZG6XYY.js → plan-PNV4KSCO.js} +18 -17
- package/dist/{play-4UDHK5VX.js → play-UEEYAMEA.js} +19 -19
- package/dist/{preflight-4WCKA5GQ.js → preflight-E6FYCMJX.js} +6 -5
- package/dist/{present-6P7GSOPW.js → present-ZKBO5RTJ.js} +13 -13
- package/dist/{preview-BT4WQGVC.js → preview-SQFT4TGS.js} +20 -19
- package/dist/{probe-FH3TBZ4E.js → probe-35RQ7WQ6.js} +10 -9
- package/dist/{producer-FSE66NZO.js → producer-7PCYSXHR.js} +1 -1
- package/dist/{projectConfig-UW5YWKWL.js → projectConfig-LSJSU4UR.js} +8 -8
- package/dist/publicNetwork-CWRD7PSE.js +34 -0
- package/dist/{publication-SHADGLOC.js → publication-4EYVOO47.js} +3 -3
- package/dist/{publish-T3CTDP4X.js → publish-UEF3X6G7.js} +13 -13
- package/dist/{remove-background-O2TPD3D2.js → remove-background-KES26J53.js} +9 -8
- package/dist/{render-BVHGKYHI.js → render-4C7Q32BC.js} +37 -36
- package/dist/{render-3CA3HN76.js → render-GH2KWOVT.js} +24 -23
- package/dist/{render-NPNT5RU7.js → render-IFRE426H.js} +4 -4
- package/dist/{render-batch-PKXLME2H.js → render-batch-2BWEMPAQ.js} +4 -4
- package/dist/{resolver-4XARUMYN.js → resolver-PM56BNET.js} +5 -5
- package/dist/{reverse-JFMJXJGH.js → reverse-I6VOINAN.js} +1 -1
- package/dist/{screenshotCapture-VQHYCPIL.js → screenshotCapture-HXTGIPHY.js} +8 -7
- package/dist/{service-EUTTPCZS.js → service-KXRPG74T.js} +9 -8
- package/dist/{share-2B4TPNAM.js → share-G2UPZLLH.js} +12 -11
- package/dist/{sherpa-KCSNZSHQ.js → sherpa-P3IEXV3S.js} +10 -9
- package/dist/{skills-C2ANFQ34.js → skills-4KNW2APN.js} +7 -7
- package/dist/{skillsUpdateCheck-5SHCR7NW.js → skillsUpdateCheck-XRXMK2BR.js} +3 -3
- package/dist/{snapshot-5FUXM5ZY.js → snapshot-MSTKQXSJ.js} +42 -41
- package/dist/{src-LPQZ7OIH.js → src-5O3RW44E.js} +9 -7
- package/dist/{src-BBV5FVBE.js → src-EJXQBNFT.js} +8 -7
- package/dist/{start-72LKTGKX.js → start-WERFNWUG.js} +19 -18
- package/dist/{staticProjectServer-SZCFUX63.js → staticProjectServer-MTL5UOLQ.js} +18 -17
- package/dist/{status-YTVMG6TS.js → status-MOLSRFMM.js} +12 -12
- package/dist/studio/assets/{hyperframes-player-CjQNefFs.js → hyperframes-player-DYtpqF4w.js} +1 -1
- package/dist/studio/assets/{index-B85NqQ6A.js → index-D_6Nvt4M.js} +121 -121
- package/dist/studio/assets/index-pSFnTYYo.js +469 -0
- package/dist/studio/assets/pausedVideoDecoder-D_jYmpmj.js +1 -0
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-PQS4K2CS.js → studio-api-BTDNUTUL.js} +8 -8
- package/dist/{studioServer-2MVX2Y4H.js → studioServer-A73V7BGB.js} +55 -54
- package/dist/{sync-2B3MWR6Z.js → sync-VV4THGGW.js} +10 -9
- package/dist/{synthesize-KF5QG6ZN.js → synthesize-HOLHQCR2.js} +2 -2
- package/dist/{telemetry-CJEW3BVT.js → telemetry-VTF2M5AG.js} +4 -4
- package/dist/{templates-HXOBKWG7.js → templates-IDYVXLRA.js} +12 -12
- package/dist/{timeline-HIRADRSL.js → timeline-RHXNE24Z.js} +18 -17
- package/dist/{tokens-6UWEIY7L.js → tokens-TYYUI63J.js} +2 -2
- package/dist/{transcribe-W5JTJ34L.js → transcribe-5JGZPJCT.js} +24 -23
- package/dist/{transcribe-WGMHJ2EN.js → transcribe-ZC22NJXV.js} +8 -7
- package/dist/{tts-IF65L6CN.js → tts-3VHEX4RB.js} +1 -1
- package/dist/{update-HAAZ3VDJ.js → update-QIVTZXMN.js} +9 -9
- package/dist/{updateCheck-WEE7DFPV.js → updateCheck-7RZEDERP.js} +2 -2
- package/dist/{upgrade-GVNUJJPT.js → upgrade-HYRR4ZLW.js} +4 -4
- package/dist/{urlDownloader-KIIAJEO5.js → urlDownloader-YPKIQ2PI.js} +4 -3
- package/dist/{validate-2R3OKTIA.js → validate-ZWUJ2E2U.js} +24 -23
- package/dist/{video-IFAQCSQX.js → video-CNLMBOOB.js} +8 -7
- package/dist/{voices-NXOZK3PB.js → voices-4GOW5GZG.js} +19 -18
- package/dist/warmCheck.js +41 -40
- package/package.json +1 -1
- package/dist/chunk-TSYRN646.js +0 -84
- package/dist/studio/assets/codec-D3GU4v7H.js +0 -314
- package/dist/studio/assets/index-B7N7k0rf.js +0 -150
- package/dist/studio/assets/pausedVideoDecoder-CPaoO7Pl.js +0 -1
|
@@ -0,0 +1,701 @@
|
|
|
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
|
+
|
|
8
|
+
// ../engine/src/utils/networkPolicy.ts
|
|
9
|
+
import { BlockList, isIP } from "net";
|
|
10
|
+
var NON_PUBLIC_IPV4_ADDRESSES = new BlockList();
|
|
11
|
+
for (const [network, prefix] of [
|
|
12
|
+
["0.0.0.0", 8],
|
|
13
|
+
["10.0.0.0", 8],
|
|
14
|
+
["100.64.0.0", 10],
|
|
15
|
+
["127.0.0.0", 8],
|
|
16
|
+
["169.254.0.0", 16],
|
|
17
|
+
["172.16.0.0", 12],
|
|
18
|
+
["192.0.0.0", 24],
|
|
19
|
+
["192.0.2.0", 24],
|
|
20
|
+
["192.88.99.0", 24],
|
|
21
|
+
["192.168.0.0", 16],
|
|
22
|
+
["198.18.0.0", 15],
|
|
23
|
+
["198.51.100.0", 24],
|
|
24
|
+
["203.0.113.0", 24],
|
|
25
|
+
["224.0.0.0", 4],
|
|
26
|
+
["240.0.0.0", 4]
|
|
27
|
+
]) {
|
|
28
|
+
NON_PUBLIC_IPV4_ADDRESSES.addSubnet(network, prefix, "ipv4");
|
|
29
|
+
}
|
|
30
|
+
var NON_PUBLIC_IPV6_ADDRESSES = new BlockList();
|
|
31
|
+
for (const [network, prefix] of [
|
|
32
|
+
["::", 128],
|
|
33
|
+
["::1", 128],
|
|
34
|
+
["::ffff:0:0", 96],
|
|
35
|
+
["fc00::", 7],
|
|
36
|
+
["fe80::", 10],
|
|
37
|
+
["fec0::", 10],
|
|
38
|
+
["ff00::", 8],
|
|
39
|
+
["2001:db8::", 32]
|
|
40
|
+
]) {
|
|
41
|
+
NON_PUBLIC_IPV6_ADDRESSES.addSubnet(network, prefix, "ipv6");
|
|
42
|
+
}
|
|
43
|
+
function isBlockedNetworkHost(hostname) {
|
|
44
|
+
const h = hostname.toLowerCase().replace(/\.$/, "").replace(/^\[|\]$/g, "");
|
|
45
|
+
if (h === "localhost" || h.endsWith(".localhost") || h.endsWith(".local") || h.endsWith(".internal"))
|
|
46
|
+
return true;
|
|
47
|
+
const addressType = isIP(h);
|
|
48
|
+
if (addressType === 0) return false;
|
|
49
|
+
return addressType === 4 ? NON_PUBLIC_IPV4_ADDRESSES.check(h, "ipv4") : NON_PUBLIC_IPV6_ADDRESSES.check(h, "ipv6");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ../engine/src/services/publicNetwork/upstreamProxy.ts
|
|
53
|
+
import { request as httpRequest } from "http";
|
|
54
|
+
var CAPTURE_PROXY_ENV = "HYPERFRAMES_CAPTURE_PROXY";
|
|
55
|
+
var TUNNEL_TIMEOUT_MS = 15e3;
|
|
56
|
+
function defaultPort(target) {
|
|
57
|
+
return target.port || (target.protocol === "https:" ? "443" : "80");
|
|
58
|
+
}
|
|
59
|
+
function captureUpstreamProxy(env = process.env) {
|
|
60
|
+
const raw = env[CAPTURE_PROXY_ENV]?.trim();
|
|
61
|
+
if (!raw) return void 0;
|
|
62
|
+
let url;
|
|
63
|
+
let credentials;
|
|
64
|
+
try {
|
|
65
|
+
url = new URL(raw);
|
|
66
|
+
if (url.username || url.password) {
|
|
67
|
+
credentials = `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`;
|
|
68
|
+
}
|
|
69
|
+
} catch {
|
|
70
|
+
throw new Error(`${CAPTURE_PROXY_ENV} is not a valid proxy URL`);
|
|
71
|
+
}
|
|
72
|
+
if (url.protocol !== "http:") {
|
|
73
|
+
throw new Error(`${CAPTURE_PROXY_ENV} must be an http:// proxy URL`);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
host: url.hostname.replace(/^\[(.*)\]$/, "$1"),
|
|
77
|
+
port: Number(url.port || 80),
|
|
78
|
+
authorization: credentials ? `Basic ${Buffer.from(credentials).toString("base64")}` : void 0
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function connectAuthority(target) {
|
|
82
|
+
return `${target.hostname}:${defaultPort(target)}`;
|
|
83
|
+
}
|
|
84
|
+
function openUpstreamTunnel(proxy, authority, options = {}) {
|
|
85
|
+
return new Promise((resolve, reject) => {
|
|
86
|
+
const req = httpRequest({
|
|
87
|
+
host: proxy.host,
|
|
88
|
+
port: proxy.port,
|
|
89
|
+
method: "CONNECT",
|
|
90
|
+
path: authority,
|
|
91
|
+
headers: {
|
|
92
|
+
host: authority,
|
|
93
|
+
...proxy.authorization ? { "proxy-authorization": proxy.authorization } : {}
|
|
94
|
+
},
|
|
95
|
+
agent: false,
|
|
96
|
+
signal: options.signal
|
|
97
|
+
});
|
|
98
|
+
req.once("socket", (socket) => options.onSocket?.(socket));
|
|
99
|
+
req.setTimeout(
|
|
100
|
+
TUNNEL_TIMEOUT_MS,
|
|
101
|
+
() => req.destroy(new Error("Upstream proxy CONNECT timed out"))
|
|
102
|
+
);
|
|
103
|
+
req.once("connect", (response, socket, head) => {
|
|
104
|
+
const status = response.statusCode ?? 0;
|
|
105
|
+
if (status < 200 || status >= 300) {
|
|
106
|
+
socket.destroy();
|
|
107
|
+
reject(new Error(`Upstream proxy refused CONNECT with HTTP ${status}`));
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
socket.setTimeout(0);
|
|
111
|
+
if (head.length) socket.unshift(head);
|
|
112
|
+
resolve(socket);
|
|
113
|
+
});
|
|
114
|
+
req.once("response", (response) => {
|
|
115
|
+
response.resume();
|
|
116
|
+
req.destroy();
|
|
117
|
+
reject(new Error(`Upstream proxy refused CONNECT with HTTP ${response.statusCode}`));
|
|
118
|
+
});
|
|
119
|
+
req.once("error", reject);
|
|
120
|
+
req.end();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ../engine/src/services/publicNetwork/publicNetwork.ts
|
|
125
|
+
import { execFile } from "child_process";
|
|
126
|
+
import { promises as dns } from "dns";
|
|
127
|
+
import { readFile } from "fs/promises";
|
|
128
|
+
import { isIP as isIP2 } from "net";
|
|
129
|
+
import { request as httpRequest2 } from "http";
|
|
130
|
+
import { request as httpsRequest } from "https";
|
|
131
|
+
import { connect as tlsConnect } from "tls";
|
|
132
|
+
var DNS_TIMEOUT_MS = 1e4;
|
|
133
|
+
var CARES_TIMEOUT_MS = 5e3;
|
|
134
|
+
function isPublicIPv4(address) {
|
|
135
|
+
return isIP2(address) === 4 && !isBlockedNetworkHost(address);
|
|
136
|
+
}
|
|
137
|
+
function assertPublicHostname(hostname) {
|
|
138
|
+
const host = hostname.toLowerCase().replace(/\.$/, "");
|
|
139
|
+
if (isIP2(host) === 4) {
|
|
140
|
+
if (!isPublicIPv4(host)) throw new Error("Capture requires a public IPv4 address");
|
|
141
|
+
return host;
|
|
142
|
+
}
|
|
143
|
+
if (!host.includes(".") || !/^[a-z0-9.-]+$/.test(host) || /(?:^|\.)(?:localhost|local|internal|home|lan|test|invalid|example)$/.test(host) || host.split(".").some((label) => !label || label.startsWith("-") || label.endsWith("-"))) {
|
|
144
|
+
throw new Error("Capture requires a public hostname");
|
|
145
|
+
}
|
|
146
|
+
return host;
|
|
147
|
+
}
|
|
148
|
+
async function resolvePublicAddress(hostname) {
|
|
149
|
+
const host = assertPublicHostname(hostname);
|
|
150
|
+
if (isIP2(host) === 4) return host;
|
|
151
|
+
const answers = await resolveIPv4(host);
|
|
152
|
+
const first = answers[0];
|
|
153
|
+
if (!first || !answers.every(isPublicIPv4)) {
|
|
154
|
+
throw new Error("Capture DNS returned a non-public address");
|
|
155
|
+
}
|
|
156
|
+
return first;
|
|
157
|
+
}
|
|
158
|
+
async function resolveIPv4(host) {
|
|
159
|
+
const fromHostsFile = (await hostsFileAnswers()).get(host);
|
|
160
|
+
if (fromHostsFile) return fromHostsFile;
|
|
161
|
+
const deadline = Date.now() + DNS_TIMEOUT_MS;
|
|
162
|
+
const fromSystem = systemAnswers.get(host);
|
|
163
|
+
if (fromSystem) return beforeDeadline(fromSystem, deadline);
|
|
164
|
+
return resolveWithCares(host).catch(
|
|
165
|
+
() => beforeDeadline(systemLookupInKillableChild(host, deadline - Date.now()), deadline)
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
var hostsFile;
|
|
169
|
+
function hostsFileAnswers() {
|
|
170
|
+
const path = process.platform === "win32" ? `${process.env.SystemRoot ?? "C:\\Windows"}\\System32\\drivers\\etc\\hosts` : "/etc/hosts";
|
|
171
|
+
hostsFile ??= readFile(path, "utf8").then(parseHostsFile, () => /* @__PURE__ */ new Map());
|
|
172
|
+
return hostsFile;
|
|
173
|
+
}
|
|
174
|
+
function parseHostsFile(text) {
|
|
175
|
+
const answers = /* @__PURE__ */ new Map();
|
|
176
|
+
for (const line of text.split(/\r?\n/)) {
|
|
177
|
+
const [address, ...names] = line.replace(/#.*/, "").trim().split(/\s+/);
|
|
178
|
+
if (!address || isIP2(address) !== 4) continue;
|
|
179
|
+
for (const name of names) {
|
|
180
|
+
const key = name.toLowerCase().replace(/\.$/, "");
|
|
181
|
+
answers.set(key, [...answers.get(key) ?? [], address]);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return answers;
|
|
185
|
+
}
|
|
186
|
+
function beforeDeadline(work, deadline) {
|
|
187
|
+
let timer;
|
|
188
|
+
const late = new Promise((_resolve, reject) => {
|
|
189
|
+
timer = setTimeout(
|
|
190
|
+
() => reject(new Error("Capture DNS timed out")),
|
|
191
|
+
Math.max(0, deadline - Date.now())
|
|
192
|
+
);
|
|
193
|
+
});
|
|
194
|
+
return Promise.race([work, late]).finally(() => clearTimeout(timer));
|
|
195
|
+
}
|
|
196
|
+
async function resolveWithCares(host) {
|
|
197
|
+
const cancellableResolver = new dns.Resolver();
|
|
198
|
+
const timer = setTimeout(() => cancellableResolver.cancel(), CARES_TIMEOUT_MS);
|
|
199
|
+
try {
|
|
200
|
+
return await cancellableResolver.resolve4(host);
|
|
201
|
+
} finally {
|
|
202
|
+
clearTimeout(timer);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
var systemAnswers = /* @__PURE__ */ new Map();
|
|
206
|
+
var SYSTEM_LOOKUP = `require("node:dns").lookup(process.argv[1], { all: true, family: 4 }, (error, answers) =>
|
|
207
|
+
error ? process.stderr.write(String(error.code)) : process.stdout.write(JSON.stringify(answers.map((a) => a.address))))`;
|
|
208
|
+
var liveLookups = /* @__PURE__ */ new Set();
|
|
209
|
+
function helperEnded(error) {
|
|
210
|
+
if (!error) return "the lookup helper printed no answer";
|
|
211
|
+
return error.signal ? `the lookup helper was ended by ${error.signal}` : `the lookup helper exited with code ${error.code}`;
|
|
212
|
+
}
|
|
213
|
+
function systemLookupInKillableChild(host, timeoutMs) {
|
|
214
|
+
if (!process.listeners("exit").includes(killLiveLookups)) process.on("exit", killLiveLookups);
|
|
215
|
+
const answers = new Promise((resolve, reject) => {
|
|
216
|
+
const child = execFile(
|
|
217
|
+
process.execPath,
|
|
218
|
+
["-e", SYSTEM_LOOKUP, host],
|
|
219
|
+
{
|
|
220
|
+
timeout: Math.max(1, timeoutMs),
|
|
221
|
+
killSignal: "SIGKILL",
|
|
222
|
+
windowsHide: true,
|
|
223
|
+
env: { ...process.env, NODE_OPTIONS: "" }
|
|
224
|
+
},
|
|
225
|
+
(error, stdout, stderr) => {
|
|
226
|
+
if (error?.killed) reject(new Error("Capture DNS timed out"));
|
|
227
|
+
else if (!stdout) reject(new Error(`Capture DNS failed: ${stderr || helperEnded(error)}`));
|
|
228
|
+
else {
|
|
229
|
+
try {
|
|
230
|
+
resolve(JSON.parse(stdout));
|
|
231
|
+
} catch (parseError) {
|
|
232
|
+
reject(parseError);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
liveLookups.add(child);
|
|
238
|
+
child.once("exit", () => liveLookups.delete(child));
|
|
239
|
+
});
|
|
240
|
+
systemAnswers.set(host, answers);
|
|
241
|
+
answers.catch(() => systemAnswers.delete(host));
|
|
242
|
+
return answers;
|
|
243
|
+
}
|
|
244
|
+
function killLiveLookups() {
|
|
245
|
+
for (const child of liveLookups) child.kill("SIGKILL");
|
|
246
|
+
}
|
|
247
|
+
async function pinnedRoute(target, signal) {
|
|
248
|
+
const address = await new Promise((resolve, reject) => {
|
|
249
|
+
const onAbort = () => reject(signal.reason);
|
|
250
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
251
|
+
resolvePublicAddress(target.hostname).then(resolve, reject).finally(() => signal.removeEventListener("abort", onAbort));
|
|
252
|
+
});
|
|
253
|
+
signal.throwIfAborted();
|
|
254
|
+
return {
|
|
255
|
+
options: {
|
|
256
|
+
hostname: address,
|
|
257
|
+
port: target.port || void 0,
|
|
258
|
+
agent: false,
|
|
259
|
+
servername: target.hostname,
|
|
260
|
+
rejectUnauthorized: true
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
async function upstreamRoute(target, proxy, headers, signal) {
|
|
265
|
+
assertPublicHostname(target.hostname);
|
|
266
|
+
if (target.protocol === "http:") {
|
|
267
|
+
if (proxy.authorization) headers.set("proxy-authorization", proxy.authorization);
|
|
268
|
+
const path = `${target.origin}${target.pathname}${target.search}`;
|
|
269
|
+
return { options: { hostname: proxy.host, port: proxy.port, agent: false, path } };
|
|
270
|
+
}
|
|
271
|
+
const tunnel = await openUpstreamTunnel(proxy, connectAuthority(target), { signal });
|
|
272
|
+
return {
|
|
273
|
+
tunnel,
|
|
274
|
+
options: {
|
|
275
|
+
createConnection: () => tlsConnect({ socket: tunnel, servername: target.hostname, rejectUnauthorized: true })
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
async function publicRequest(url, init = {}) {
|
|
280
|
+
const target = new URL(url);
|
|
281
|
+
if (!["http:", "https:"].includes(target.protocol) || target.username || target.password) {
|
|
282
|
+
throw new Error("Capture requires an HTTP(S) URL without credentials");
|
|
283
|
+
}
|
|
284
|
+
const method = (init.method ?? "GET").toUpperCase();
|
|
285
|
+
if (!["GET", "HEAD"].includes(method) || init.body != null) {
|
|
286
|
+
throw new Error("Capture asset requests support only GET and HEAD without a body");
|
|
287
|
+
}
|
|
288
|
+
const signal = init.signal ?? AbortSignal.timeout(3e4);
|
|
289
|
+
signal.throwIfAborted();
|
|
290
|
+
const headers = new Headers(init.headers);
|
|
291
|
+
for (const name of [
|
|
292
|
+
"connection",
|
|
293
|
+
"proxy-authorization",
|
|
294
|
+
"proxy-connection",
|
|
295
|
+
"transfer-encoding",
|
|
296
|
+
"upgrade",
|
|
297
|
+
"content-length"
|
|
298
|
+
])
|
|
299
|
+
headers.delete(name);
|
|
300
|
+
headers.set("host", target.host);
|
|
301
|
+
headers.set("accept-encoding", "identity");
|
|
302
|
+
const proxy = captureUpstreamProxy();
|
|
303
|
+
const { options, tunnel } = proxy ? await upstreamRoute(target, proxy, headers, signal) : await pinnedRoute(target, signal);
|
|
304
|
+
return new Promise((resolve, reject) => {
|
|
305
|
+
const request2 = target.protocol === "https:" ? httpsRequest : httpRequest2;
|
|
306
|
+
const req = request2(
|
|
307
|
+
{
|
|
308
|
+
protocol: target.protocol,
|
|
309
|
+
path: `${target.pathname}${target.search}`,
|
|
310
|
+
...options,
|
|
311
|
+
method,
|
|
312
|
+
headers: Object.fromEntries(headers),
|
|
313
|
+
signal
|
|
314
|
+
},
|
|
315
|
+
(incoming) => {
|
|
316
|
+
try {
|
|
317
|
+
resolve(assetResponse(incoming, req, method));
|
|
318
|
+
} catch (error) {
|
|
319
|
+
incoming.destroy();
|
|
320
|
+
reject(error);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
req.once("error", (error) => {
|
|
325
|
+
tunnel?.destroy();
|
|
326
|
+
reject(error);
|
|
327
|
+
});
|
|
328
|
+
req.end();
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
function responseHeaders(incoming) {
|
|
332
|
+
const headers = new Headers();
|
|
333
|
+
for (const [name, value] of Object.entries(incoming.headers)) {
|
|
334
|
+
if (value === void 0) continue;
|
|
335
|
+
for (const item of Array.isArray(value) ? value : [value]) headers.append(name, item);
|
|
336
|
+
}
|
|
337
|
+
return headers;
|
|
338
|
+
}
|
|
339
|
+
function assetResponse(incoming, req, method) {
|
|
340
|
+
incoming.on("error", () => {
|
|
341
|
+
});
|
|
342
|
+
const headers = responseHeaders(incoming);
|
|
343
|
+
const encoding = headers.get("content-encoding")?.toLowerCase();
|
|
344
|
+
if (encoding && encoding !== "identity") {
|
|
345
|
+
throw new Error("Capture server ignored identity content encoding");
|
|
346
|
+
}
|
|
347
|
+
const status = incoming.statusCode ?? 502;
|
|
348
|
+
if (method === "HEAD" || [204, 205, 304].includes(status)) {
|
|
349
|
+
incoming.resume();
|
|
350
|
+
return new Response(null, { status, headers });
|
|
351
|
+
}
|
|
352
|
+
return new Response(responseBody(incoming, req), { status, headers });
|
|
353
|
+
}
|
|
354
|
+
function responseBody(incoming, req) {
|
|
355
|
+
let finished = false;
|
|
356
|
+
return new ReadableStream({
|
|
357
|
+
start(controller) {
|
|
358
|
+
incoming.on("data", (chunk) => {
|
|
359
|
+
if (finished) return;
|
|
360
|
+
controller.enqueue(chunk);
|
|
361
|
+
incoming.pause();
|
|
362
|
+
});
|
|
363
|
+
incoming.once("end", () => {
|
|
364
|
+
if (finished) return;
|
|
365
|
+
finished = true;
|
|
366
|
+
controller.close();
|
|
367
|
+
});
|
|
368
|
+
const fail = (error) => {
|
|
369
|
+
if (finished) return;
|
|
370
|
+
finished = true;
|
|
371
|
+
controller.error(error);
|
|
372
|
+
};
|
|
373
|
+
incoming.once("error", fail);
|
|
374
|
+
incoming.once("aborted", () => fail(new Error("Capture response aborted")));
|
|
375
|
+
incoming.pause();
|
|
376
|
+
},
|
|
377
|
+
pull() {
|
|
378
|
+
incoming.resume();
|
|
379
|
+
},
|
|
380
|
+
cancel() {
|
|
381
|
+
finished = true;
|
|
382
|
+
incoming.destroy();
|
|
383
|
+
req.destroy();
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// ../engine/src/utils/browserSafePort.ts
|
|
389
|
+
var RESTRICTED_PORTS = /* @__PURE__ */ new Set([
|
|
390
|
+
1,
|
|
391
|
+
7,
|
|
392
|
+
9,
|
|
393
|
+
11,
|
|
394
|
+
13,
|
|
395
|
+
15,
|
|
396
|
+
17,
|
|
397
|
+
19,
|
|
398
|
+
20,
|
|
399
|
+
21,
|
|
400
|
+
22,
|
|
401
|
+
23,
|
|
402
|
+
25,
|
|
403
|
+
37,
|
|
404
|
+
42,
|
|
405
|
+
43,
|
|
406
|
+
53,
|
|
407
|
+
69,
|
|
408
|
+
77,
|
|
409
|
+
79,
|
|
410
|
+
87,
|
|
411
|
+
95,
|
|
412
|
+
101,
|
|
413
|
+
102,
|
|
414
|
+
103,
|
|
415
|
+
104,
|
|
416
|
+
109,
|
|
417
|
+
110,
|
|
418
|
+
111,
|
|
419
|
+
113,
|
|
420
|
+
115,
|
|
421
|
+
117,
|
|
422
|
+
119,
|
|
423
|
+
123,
|
|
424
|
+
135,
|
|
425
|
+
137,
|
|
426
|
+
139,
|
|
427
|
+
143,
|
|
428
|
+
161,
|
|
429
|
+
179,
|
|
430
|
+
389,
|
|
431
|
+
427,
|
|
432
|
+
465,
|
|
433
|
+
512,
|
|
434
|
+
513,
|
|
435
|
+
514,
|
|
436
|
+
515,
|
|
437
|
+
526,
|
|
438
|
+
530,
|
|
439
|
+
531,
|
|
440
|
+
532,
|
|
441
|
+
540,
|
|
442
|
+
548,
|
|
443
|
+
554,
|
|
444
|
+
556,
|
|
445
|
+
563,
|
|
446
|
+
587,
|
|
447
|
+
601,
|
|
448
|
+
636,
|
|
449
|
+
989,
|
|
450
|
+
990,
|
|
451
|
+
993,
|
|
452
|
+
995,
|
|
453
|
+
1719,
|
|
454
|
+
1720,
|
|
455
|
+
1723,
|
|
456
|
+
2049,
|
|
457
|
+
3659,
|
|
458
|
+
4045,
|
|
459
|
+
5060,
|
|
460
|
+
5061,
|
|
461
|
+
6e3,
|
|
462
|
+
6566,
|
|
463
|
+
6665,
|
|
464
|
+
6666,
|
|
465
|
+
6667,
|
|
466
|
+
6668,
|
|
467
|
+
6669,
|
|
468
|
+
6697,
|
|
469
|
+
10080
|
|
470
|
+
]);
|
|
471
|
+
var MAX_ATTEMPTS = 32;
|
|
472
|
+
var isBrowserSafePort = (port) => !RESTRICTED_PORTS.has(port);
|
|
473
|
+
function listenOnce(server, host) {
|
|
474
|
+
return new Promise((resolve, reject) => {
|
|
475
|
+
server.once("error", reject);
|
|
476
|
+
server.listen(0, host, () => {
|
|
477
|
+
server.off("error", reject);
|
|
478
|
+
resolve(server.address().port);
|
|
479
|
+
});
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
function closeServer(server) {
|
|
483
|
+
return new Promise((resolve) => server.close(() => resolve()));
|
|
484
|
+
}
|
|
485
|
+
async function settleOnBrowserSafePort(server, host) {
|
|
486
|
+
let port = server.address().port;
|
|
487
|
+
for (let attempt = 1; !isBrowserSafePort(port); attempt++) {
|
|
488
|
+
if (attempt >= MAX_ATTEMPTS)
|
|
489
|
+
throw new Error(`The OS kept offering browser-restricted ports (last: ${port}).`);
|
|
490
|
+
await closeServer(server);
|
|
491
|
+
port = await listenOnce(server, host);
|
|
492
|
+
}
|
|
493
|
+
return port;
|
|
494
|
+
}
|
|
495
|
+
async function listenOnBrowserSafePort(server, host) {
|
|
496
|
+
await listenOnce(server, host);
|
|
497
|
+
return settleOnBrowserSafePort(server, host);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// ../engine/src/services/publicNetwork/captureProxy.ts
|
|
501
|
+
import { mkdir, mkdtemp, writeFile } from "fs/promises";
|
|
502
|
+
import { createServer, request } from "http";
|
|
503
|
+
import { connect } from "net";
|
|
504
|
+
import { tmpdir } from "os";
|
|
505
|
+
import { join } from "path";
|
|
506
|
+
var CONNECTION_TIMEOUT_MS = 15e3;
|
|
507
|
+
var HOP_HEADERS = /* @__PURE__ */ new Set([
|
|
508
|
+
"connection",
|
|
509
|
+
"proxy-connection",
|
|
510
|
+
"proxy-authorization",
|
|
511
|
+
"proxy-authenticate",
|
|
512
|
+
"keep-alive",
|
|
513
|
+
"te",
|
|
514
|
+
"trailer",
|
|
515
|
+
"transfer-encoding",
|
|
516
|
+
"upgrade"
|
|
517
|
+
]);
|
|
518
|
+
function forwardHeaders(message) {
|
|
519
|
+
const headers = { ...message.headers };
|
|
520
|
+
const connection = String(headers.connection ?? "").split(",");
|
|
521
|
+
for (const name of [...HOP_HEADERS, ...connection]) delete headers[name.trim().toLowerCase()];
|
|
522
|
+
return headers;
|
|
523
|
+
}
|
|
524
|
+
function destination(raw, tunnel) {
|
|
525
|
+
const url = new URL(tunnel ? `https://${raw}` : raw);
|
|
526
|
+
if (url.username || url.password || url.hash || (tunnel ? url.protocol !== "https:" || url.pathname !== "/" || !!url.search : url.protocol !== "http:")) {
|
|
527
|
+
throw new Error("Unsupported capture destination");
|
|
528
|
+
}
|
|
529
|
+
return url;
|
|
530
|
+
}
|
|
531
|
+
function refuse(response) {
|
|
532
|
+
if (!response.headersSent) response.writeHead(403, { Connection: "close" });
|
|
533
|
+
response.end();
|
|
534
|
+
}
|
|
535
|
+
async function httpPeer(url, proxy) {
|
|
536
|
+
if (!proxy) {
|
|
537
|
+
const hostname = await resolvePublicAddress(url.hostname);
|
|
538
|
+
return { hostname, family: 4, port: url.port || 80, path: url.pathname + url.search };
|
|
539
|
+
}
|
|
540
|
+
assertPublicHostname(url.hostname);
|
|
541
|
+
return { hostname: proxy.host, port: proxy.port, path: url.href };
|
|
542
|
+
}
|
|
543
|
+
async function forwardHttp(incoming, response, sockets, proxy) {
|
|
544
|
+
try {
|
|
545
|
+
const url = destination(incoming.url ?? "", false);
|
|
546
|
+
const peer = await httpPeer(url, proxy);
|
|
547
|
+
if (incoming.destroyed || response.destroyed) return;
|
|
548
|
+
const headers = forwardHeaders(incoming);
|
|
549
|
+
headers.host = url.host;
|
|
550
|
+
if (proxy?.authorization) headers["proxy-authorization"] = proxy.authorization;
|
|
551
|
+
const upstream = request(
|
|
552
|
+
{
|
|
553
|
+
...peer,
|
|
554
|
+
method: incoming.method,
|
|
555
|
+
headers,
|
|
556
|
+
agent: false,
|
|
557
|
+
signal: AbortSignal.timeout(3e4)
|
|
558
|
+
},
|
|
559
|
+
(received) => {
|
|
560
|
+
response.writeHead(received.statusCode ?? 502, forwardHeaders(received));
|
|
561
|
+
received.on("error", () => response.destroy());
|
|
562
|
+
received.pipe(response);
|
|
563
|
+
}
|
|
564
|
+
);
|
|
565
|
+
upstream.on("socket", (socket) => trackSocket(socket, sockets));
|
|
566
|
+
upstream.setTimeout(
|
|
567
|
+
CONNECTION_TIMEOUT_MS,
|
|
568
|
+
() => upstream.destroy(new Error("Capture request timed out"))
|
|
569
|
+
);
|
|
570
|
+
upstream.on("error", () => {
|
|
571
|
+
if (!response.headersSent) response.writeHead(502, { Connection: "close" });
|
|
572
|
+
response.end();
|
|
573
|
+
});
|
|
574
|
+
response.on("close", () => upstream.destroy());
|
|
575
|
+
incoming.on("error", () => upstream.destroy());
|
|
576
|
+
incoming.pipe(upstream);
|
|
577
|
+
} catch {
|
|
578
|
+
refuse(response);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
function trackSocket(socket, sockets) {
|
|
582
|
+
sockets.add(socket);
|
|
583
|
+
socket.once("close", () => sockets.delete(socket));
|
|
584
|
+
socket.on("error", () => socket.destroy());
|
|
585
|
+
}
|
|
586
|
+
async function forwardTunnelViaUpstream(url, proxy, client, head, sockets) {
|
|
587
|
+
let upstream;
|
|
588
|
+
try {
|
|
589
|
+
upstream = await openUpstreamTunnel(proxy, connectAuthority(url), {
|
|
590
|
+
onSocket: (socket) => trackSocket(socket, sockets)
|
|
591
|
+
});
|
|
592
|
+
} catch {
|
|
593
|
+
if (!client.destroyed) {
|
|
594
|
+
client.end("HTTP/1.1 502 Bad Gateway\r\nConnection: close\r\nContent-Length: 0\r\n\r\n");
|
|
595
|
+
}
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
if (client.destroyed) return void upstream.destroy();
|
|
599
|
+
upstream.setTimeout(CONNECTION_TIMEOUT_MS, () => upstream.destroy());
|
|
600
|
+
client.write("HTTP/1.1 200 Connection Established\r\n\r\n");
|
|
601
|
+
if (head.length) upstream.write(head);
|
|
602
|
+
upstream.pipe(client);
|
|
603
|
+
client.pipe(upstream);
|
|
604
|
+
upstream.once("close", () => client.destroy());
|
|
605
|
+
client.once("close", () => upstream.destroy());
|
|
606
|
+
}
|
|
607
|
+
async function forwardTunnel(incoming, client, head, sockets, proxy) {
|
|
608
|
+
try {
|
|
609
|
+
const url = destination(incoming.url ?? "", true);
|
|
610
|
+
if (proxy) {
|
|
611
|
+
assertPublicHostname(url.hostname);
|
|
612
|
+
return await forwardTunnelViaUpstream(url, proxy, client, head, sockets);
|
|
613
|
+
}
|
|
614
|
+
const address = await resolvePublicAddress(url.hostname);
|
|
615
|
+
if (client.destroyed) return;
|
|
616
|
+
const upstream = connect({ host: address, family: 4, port: Number(url.port || 443) });
|
|
617
|
+
trackSocket(upstream, sockets);
|
|
618
|
+
const connectDeadline = setTimeout(() => upstream.destroy(), CONNECTION_TIMEOUT_MS);
|
|
619
|
+
connectDeadline.unref();
|
|
620
|
+
upstream.once("close", () => clearTimeout(connectDeadline));
|
|
621
|
+
upstream.setTimeout(CONNECTION_TIMEOUT_MS, () => upstream.destroy());
|
|
622
|
+
upstream.once("connect", () => {
|
|
623
|
+
clearTimeout(connectDeadline);
|
|
624
|
+
if (client.destroyed) return upstream.destroy();
|
|
625
|
+
client.write("HTTP/1.1 200 Connection Established\r\n\r\n");
|
|
626
|
+
if (head.length) upstream.write(head);
|
|
627
|
+
upstream.pipe(client);
|
|
628
|
+
client.pipe(upstream);
|
|
629
|
+
});
|
|
630
|
+
upstream.once("close", () => client.destroy());
|
|
631
|
+
client.once("close", () => upstream.destroy());
|
|
632
|
+
} catch {
|
|
633
|
+
client.end("HTTP/1.1 403 Forbidden\r\nConnection: close\r\nContent-Length: 0\r\n\r\n");
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
async function startCaptureProxy(upstream = captureUpstreamProxy() ?? null) {
|
|
637
|
+
const proxy = upstream ?? void 0;
|
|
638
|
+
const sockets = /* @__PURE__ */ new Set();
|
|
639
|
+
const server = createServer(
|
|
640
|
+
(incoming, response) => void forwardHttp(incoming, response, sockets, proxy)
|
|
641
|
+
);
|
|
642
|
+
server.on("connection", (socket) => trackSocket(socket, sockets));
|
|
643
|
+
server.on(
|
|
644
|
+
"connect",
|
|
645
|
+
(incoming, socket, head) => void forwardTunnel(incoming, socket, head, sockets, proxy)
|
|
646
|
+
);
|
|
647
|
+
server.on("upgrade", (_incoming, socket) => socket.destroy());
|
|
648
|
+
server.maxConnections = 128;
|
|
649
|
+
server.headersTimeout = CONNECTION_TIMEOUT_MS;
|
|
650
|
+
server.requestTimeout = 3e4;
|
|
651
|
+
server.keepAliveTimeout = 1e3;
|
|
652
|
+
await listenOnBrowserSafePort(server, "127.0.0.1");
|
|
653
|
+
const address = server.address();
|
|
654
|
+
if (!address || typeof address === "string") throw new Error("Capture proxy did not bind");
|
|
655
|
+
let closing;
|
|
656
|
+
return {
|
|
657
|
+
url: `http://127.0.0.1:${address.port}`,
|
|
658
|
+
close() {
|
|
659
|
+
closing ??= new Promise((resolve) => {
|
|
660
|
+
server.close(() => resolve());
|
|
661
|
+
for (const socket of sockets) socket.destroy();
|
|
662
|
+
});
|
|
663
|
+
return closing;
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
function browserProxyArgs(proxyUrl, directHost) {
|
|
668
|
+
return [
|
|
669
|
+
`--proxy-server=${proxyUrl}`,
|
|
670
|
+
`--proxy-bypass-list=<-loopback>${directHost ? `;${directHost}` : ""}`,
|
|
671
|
+
"--disable-quic",
|
|
672
|
+
"--force-webrtc-ip-handling-policy=disable_non_proxied_udp"
|
|
673
|
+
];
|
|
674
|
+
}
|
|
675
|
+
async function createPublicOnlyProfile(prefix) {
|
|
676
|
+
const profile = await mkdtemp(join(tmpdir(), prefix));
|
|
677
|
+
await mkdir(join(profile, "Default"));
|
|
678
|
+
await writeFile(
|
|
679
|
+
join(profile, "Default", "Preferences"),
|
|
680
|
+
JSON.stringify({ webrtc: { ip_handling_policy: "disable_non_proxied_udp" } })
|
|
681
|
+
);
|
|
682
|
+
return profile;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export {
|
|
686
|
+
isBlockedNetworkHost,
|
|
687
|
+
captureUpstreamProxy,
|
|
688
|
+
connectAuthority,
|
|
689
|
+
openUpstreamTunnel,
|
|
690
|
+
isPublicIPv4,
|
|
691
|
+
assertPublicHostname,
|
|
692
|
+
resolvePublicAddress,
|
|
693
|
+
systemLookupInKillableChild,
|
|
694
|
+
publicRequest,
|
|
695
|
+
isBrowserSafePort,
|
|
696
|
+
settleOnBrowserSafePort,
|
|
697
|
+
listenOnBrowserSafePort,
|
|
698
|
+
startCaptureProxy,
|
|
699
|
+
browserProxyArgs,
|
|
700
|
+
createPublicOnlyProfile
|
|
701
|
+
};
|