hyperframes 0.8.173 → 0.8.174
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-V7VBTFNG.js → add-XANMFNIP.js} +14 -15
- package/dist/{animatedGifPrep-62S72ZY6.js → animatedGifPrep-OUQ4M2T3.js} +9 -11
- package/dist/api.js +19 -21
- package/dist/{asset-Z4JI2F6V.js → asset-SVONSQ67.js} +2 -2
- package/dist/{assetCataloger-Q7LE7BCC.js → assetCataloger-AG77T6SF.js} +9 -11
- package/dist/{audio-HIHNLQJ7.js → audio-DMQOTXKL.js} +16 -18
- package/dist/{auth-4K6DSZCD.js → auth-ED7SPBS6.js} +2 -2
- package/dist/{autoUpdate-DXZDD5VT.js → autoUpdate-4QQYZOVT.js} +2 -2
- package/dist/{backgroundChecks-ODMKKJ4S.js → backgroundChecks-2VT46P5S.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-I4BFJGPA.js → batchRender-KIYAPCTG.js} +4 -4
- package/dist/{beats-7QCA6GDR.js → beats-OE7M5BEE.js} +6 -7
- package/dist/{benchmark-IT4WTSMZ.js → benchmark-2ZQP2RNF.js} +11 -12
- package/dist/{browser-5VHM72PM.js → browser-CSSJ3VWW.js} +5 -6
- package/dist/{bundleWithLocalizedFonts-MKTQCB2Y.js → bundleWithLocalizedFonts-ZUC4MLSO.js} +2 -2
- package/dist/{capture-CMNNIMIL.js → capture-3NXAHID3.js} +2 -2
- package/dist/{capture-B5Y45EWD.js → capture-APNSW4ZT.js} +22 -18
- package/dist/{catalog-AKPJ65GY.js → catalog-CFDBIVSC.js} +15 -16
- package/dist/{catch-up-2SVYRMD3.js → catch-up-OUK522JT.js} +6 -7
- package/dist/{check-Q7AX6K7O.js → check-PUDEOXGP.js} +37 -39
- package/dist/{checkBrowser-CPXD5BZY.js → checkBrowser-PMRJSTFJ.js} +34 -36
- package/dist/chunk-2CDBTQKS.js +113 -0
- package/dist/{chunk-KR5ZHRF2.js → chunk-2XSAYE7U.js} +2 -2
- package/dist/{chunk-QVPOR7WE.js → chunk-32GKETR7.js} +22 -1
- package/dist/{chunk-BTPZ74Z3.js → chunk-3MDO2Q4F.js} +1 -1
- package/dist/{chunk-3O45NOL7.js → chunk-4PX47Z65.js} +1 -1
- package/dist/{chunk-IK3SOMZ4.js → chunk-4VTUDCHM.js} +19 -22
- package/dist/{chunk-NOMPG5HQ.js → chunk-4WQUBVDO.js} +3 -3
- package/dist/{chunk-HCOL75LA.js → chunk-55LJK3H2.js} +3 -3
- package/dist/{chunk-H5C375DW.js → chunk-6HF2WFPV.js} +5 -5
- package/dist/{chunk-BCPJSBCS.js → chunk-ALCCEHX2.js} +7 -3
- package/dist/{chunk-XDPXSQJO.js → chunk-APMA7XXB.js} +1 -1
- package/dist/{chunk-L4SFGSSQ.js → chunk-AR2SEGPZ.js} +1 -1
- package/dist/{chunk-ETPPGNJB.js → chunk-B23GBPCW.js} +2 -2
- package/dist/{chunk-4RDDUBOC.js → chunk-CI7ZHFSV.js} +11 -11
- package/dist/chunk-CIWX5UKC.js +16 -0
- package/dist/{chunk-4D2T6Y5Y.js → chunk-CSMKMVGG.js} +6 -6
- package/dist/{chunk-BYRHCRU3.js → chunk-D2YN4FNH.js} +2 -2
- package/dist/{chunk-PBVUVNWP.js → chunk-DRR3UMIY.js} +1 -1
- package/dist/{chunk-TNHRCZT3.js → chunk-EAR5LFOH.js} +42 -2
- package/dist/{chunk-5JTRGGTX.js → chunk-EJZJ5AY7.js} +1 -1
- package/dist/{chunk-ODR7V2JL.js → chunk-G4UUEQDT.js} +1 -1
- package/dist/{chunk-2TNPXPI5.js → chunk-GK2FIKIQ.js} +10 -8
- package/dist/{chunk-CBOYQOLY.js → chunk-GXWV4FNV.js} +1 -1
- package/dist/{chunk-QURKHVV5.js → chunk-H2BPHBDY.js} +1 -1
- package/dist/{chunk-X3SCQP2A.js → chunk-HB2UP4V7.js} +1 -1
- package/dist/chunk-HIP62XAW.js +36 -0
- package/dist/{chunk-6JQDH4O6.js → chunk-HIYAJFRH.js} +1 -1
- package/dist/{chunk-45IAFBUP.js → chunk-HZZYJV7K.js} +14 -14
- package/dist/{chunk-A2DMF2Q6.js → chunk-HZZZ6C6Z.js} +2 -2
- package/dist/{chunk-XZNKIYIG.js → chunk-JKPI7VLI.js} +1 -1
- package/dist/{chunk-TWZRU64W.js → chunk-JL76Y45C.js} +7 -7
- package/dist/{chunk-KRWEUM4R.js → chunk-LR72ON5B.js} +1 -1
- package/dist/{chunk-C4QGOXO2.js → chunk-LUKY7253.js} +491 -133
- package/dist/{chunk-2QJDC4NT.js → chunk-MXNPYP5F.js} +1 -1
- package/dist/{chunk-VFCKXTBB.js → chunk-NL5F3AD4.js} +27 -38
- package/dist/{chunk-WIAO42MD.js → chunk-ONXTLGJB.js} +5 -5
- package/dist/{chunk-N7RTLKMM.js → chunk-PLYTTPVE.js} +2 -2
- package/dist/{chunk-PCLYCYBK.js → chunk-QJCVK7CI.js} +4 -4
- package/dist/{chunk-6HKO6VWS.js → chunk-QRO2UBWS.js} +1 -1
- package/dist/{chunk-ROQBQHBK.js → chunk-QUK2IZKI.js} +1 -1
- package/dist/{chunk-2DWYRHJS.js → chunk-RLBLLBLL.js} +2 -2
- package/dist/{chunk-U7EGMXQR.js → chunk-RMKL5FVH.js} +4 -17
- package/dist/{chunk-2BL7BJ22.js → chunk-RNKNDYBN.js} +1 -1
- package/dist/{chunk-SOAXQ7Q7.js → chunk-RYR3LTZR.js} +2 -2
- package/dist/{chunk-5E43335V.js → chunk-RZ2FMZ5U.js} +1 -1
- package/dist/{chunk-L3RCYYON.js → chunk-S5D4Q74P.js} +2 -2
- package/dist/{chunk-V2D4QZBC.js → chunk-SEHRMJTO.js} +3 -3
- package/dist/{chunk-X2ALZSKK.js → chunk-SEXAKOK3.js} +3 -3
- package/dist/{chunk-6RIH2NDU.js → chunk-SH43VDEF.js} +9 -9
- package/dist/{chunk-YOOW26KG.js → chunk-SI76MFBF.js} +2 -2
- package/dist/{chunk-QWQ6GQTI.js → chunk-T6AGUTZJ.js} +2 -4
- package/dist/{chunk-LN4SZS7W.js → chunk-TI3HKGQC.js} +3 -3
- package/dist/{chunk-CHALU2TF.js → chunk-UDJHYQSZ.js} +1 -1
- package/dist/{chunk-MWNSVO4P.js → chunk-UKAOWORD.js} +8 -8
- package/dist/chunk-UKJECUDK.js +3805 -0
- package/dist/{chunk-OFFNB2SU.js → chunk-UQLXFITA.js} +241 -6
- package/dist/{chunk-JYVGYKXG.js → chunk-W2LGJSEN.js} +73 -1
- package/dist/{chunk-BYVBP3U5.js → chunk-W3YVQ6VI.js} +9 -9
- package/dist/{chunk-FDWTZVA6.js → chunk-W4AECR7V.js} +1 -1
- package/dist/{chunk-2YTOJ447.js → chunk-X3BE2HX4.js} +3 -3
- package/dist/{chunk-TDPVEMBS.js → chunk-XFCLWWL3.js} +1 -1
- package/dist/{chunk-O433SZAJ.js → chunk-XVIFWEPR.js} +35 -16
- package/dist/{clean-SBFI3ZKR.js → clean-6SVCU47L.js} +18 -20
- package/dist/cli.js +53 -53
- package/dist/{cloud-IRE4HLEK.js → cloud-TIISRMZV.js} +4 -4
- package/dist/{cloudrun-GIHWEBGM.js → cloudrun-4TMBWELQ.js} +5 -5
- package/dist/{compare-S6NM2FSV.js → compare-YV2XTKYX.js} +28 -30
- package/dist/{compiler-WCWRB2LZ.js → compiler-O5R3ZZDV.js} +5 -6
- package/dist/{component-WDFZQ2HN.js → component-7LWSMRKZ.js} +3 -3
- package/dist/{compositions-RMUBDPD4.js → compositions-5VTSC4M3.js} +14 -16
- package/dist/{delete-SDNARGJ4.js → delete-AV2SKLZW.js} +4 -4
- package/dist/{deploy-4MK3Y67M.js → deploy-NKWMPAMH.js} +19 -5
- package/dist/{destroy-GFQLTIY3.js → destroy-UKP522AE.js} +4 -2
- package/dist/{dist-FAN2FFAV.js → dist-2FMTAVGL.js} +3 -3
- package/dist/{dist-65ELHZOF.js → dist-4FY5EEH5.js} +3 -3
- package/dist/{doctor-YPCZILXV.js → doctor-XOCYSEAZ.js} +14 -16
- package/dist/{events-INXDJ44V.js → events-6QPRKX45.js} +4 -5
- package/dist/{events-Q2K7SNEZ.js → events-MAZUZI43.js} +5 -6
- package/dist/{feedback-FRGRCTIX.js → feedback-MGRILBMP.js} +10 -11
- package/dist/{ffmpeg-7BYARPLM.js → ffmpeg-YCULCUB2.js} +24 -4
- package/dist/{figma-C262EFOC.js → figma-UMBACTCG.js} +3 -3
- package/dist/fontLocalizeCli.js +11 -13
- package/dist/{get-ZIUUGSVI.js → get-LWEOLWYN.js} +4 -4
- package/dist/{gpuPolicy-FRLW63IY.js → gpuPolicy-MCIQK5Z7.js} +9 -11
- package/dist/{grade-compare-DN342HJC.js → grade-compare-MZQOTX3F.js} +29 -31
- package/dist/{help-XQPBPSBP.js → help-THPG2NRP.js} +1 -1
- package/dist/{history-PF5FUC6M.js → history-2IQYTDU5.js} +8 -9
- package/dist/hyperframe-runtime.js +55 -55
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +55 -55
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-PC7IKGVB.js → info-CXMADV6K.js} +10 -11
- package/dist/{init-ORZX3PSQ.js → init-Y5GU454D.js} +34 -34
- package/dist/{inspect-L5GRL6SP.js → inspect-S7JDKEMJ.js} +29 -31
- package/dist/{installer-KXS557O7.js → installer-AY23RPEZ.js} +5 -5
- package/dist/{keyframes-EIZDSXUH.js → keyframes-FKYT6QAJ.js} +8 -9
- package/dist/{lambda-U3N7MRD7.js → lambda-7WMZGRH5.js} +16 -12
- package/dist/{layout-WHAVE2H5.js → layout-LL4GOS6G.js} +29 -31
- package/dist/{lint-I7PYIW56.js → lint-2M7FY4ZT.js} +11 -12
- package/dist/{lintProject-7IEOAXJY.js → lintProject-ARKJXDQF.js} +3 -3
- package/dist/{list-XXQM3WDO.js → list-SZBMUHBW.js} +4 -4
- package/dist/{login-64NUUDYU.js → login-QRACITGK.js} +4 -4
- package/dist/{manager-B6MVBM2E.js → manager-W2BTPAVT.js} +25 -3
- package/dist/{media-treatment-5XIM4A3F.js → media-treatment-E4VJETTT.js} +23 -18
- package/dist/{models-WRB3S67Z.js → models-AHO3MYE7.js} +13 -15
- package/dist/{motionShot-BOFBL73C.js → motionShot-LMMYPGPT.js} +19 -21
- package/dist/{normalize-audio-PP4BSZSU.js → normalize-audio-RDWIWZOO.js} +6 -7
- package/dist/{open-F4CUWMZF.js → open-WOKRHFDH.js} +14 -15
- package/dist/{parakeetRunner-O7QYJ7V7.js → parakeetRunner-RY2KIE63.js} +16 -18
- package/dist/{pipeline-BCHSFFT3.js → pipeline-LEA32KLW.js} +11 -13
- package/dist/{play-PPBR2GJK.js → play-3S46XG66.js} +21 -23
- package/dist/{policies-DCSIM4AB.js → policies-5NTZOHJA.js} +2 -0
- package/dist/preflight-MCOFNWFQ.js +52 -0
- package/dist/{present-Y7VTCZRZ.js → present-GR7F4CTI.js} +17 -19
- package/dist/{preview-53AD4OME.js → preview-TKEAF3KR.js} +34 -25
- package/dist/{producer-WBJDNLBF.js → producer-BJ5SUPVD.js} +1 -1
- package/dist/{progress-5AM2MZ7V.js → progress-I37JB7R4.js} +1 -0
- package/dist/{projectConfig-4KUGQ4P6.js → projectConfig-YJBYWSNK.js} +7 -7
- package/dist/{publication-OFDIFS4R.js → publication-2HXIW4LS.js} +3 -3
- package/dist/{publish-RWWTY743.js → publish-LHJFEKEI.js} +11 -11
- package/dist/{remove-background-G7VK3VKP.js → remove-background-AQUUVAPD.js} +12 -14
- package/dist/{render-7PPMS4P6.js → render-AOHXNGIM.js} +40 -38
- package/dist/{render-6CXZNXXZ.js → render-AXTGGHVZ.js} +9 -4
- package/dist/{render-52W63I3Y.js → render-B5S7FLLS.js} +14 -15
- package/dist/{render-batch-2EJVUVVN.js → render-batch-DMQG3QWK.js} +4 -4
- package/dist/renderSetupWorker.js +3 -3
- package/dist/{resolver-FF5GV6IA.js → resolver-FV54X3T2.js} +5 -5
- package/dist/sam-IKPEJRRO.js +21 -0
- package/dist/{screenshotCapture-XAYELJK7.js → screenshotCapture-HXEZ3TNJ.js} +20 -3
- package/dist/{sherpa-QJPI6B5S.js → sherpa-RKURBTUM.js} +15 -17
- package/dist/skills/hyperframes/SKILL.md +42 -0
- package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
- package/dist/skills/media-use/scripts/lib/recipe-store.mjs +5 -2
- package/dist/{skills-H6ZJNOLH.js → skills-YUXI4IRF.js} +11 -10
- package/dist/{skillsUpdateCheck-4EBGMO2A.js → skillsUpdateCheck-HK3GDYD6.js} +3 -3
- package/dist/{snapshot-DZRUBWRH.js → snapshot-D6Q52Z4X.js} +32 -34
- package/dist/{src-ZL7ACIZ3.js → src-DPR7JBU3.js} +10 -12
- package/dist/{src-WD5GOYON.js → src-MRYINZ62.js} +8 -10
- package/dist/{staticProjectServer-72JF5PPO.js → staticProjectServer-RT7JATD2.js} +15 -16
- package/dist/{status-RGHSK3DJ.js → status-BV7QAUQD.js} +2 -3
- package/dist/studio/assets/{hyperframes-player-B-wEZiX3.js → hyperframes-player-B4KfQdfl.js} +1 -1
- package/dist/studio/assets/{index-DPugLDRK.js → index-Bsc8xBh9.js} +1 -1
- package/dist/studio/assets/{index-Bvkb0Zxy.js → index-DGl_Zvb3.js} +97 -97
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-BL6CLOA6.js → studio-api-NL2RMVB5.js} +9 -10
- package/dist/{studioServer-TRWCZZXP.js → studioServer-VL2GUVCR.js} +47 -49
- package/dist/{system-VRXC6S4A.js → system-7F3UEHQT.js} +2 -3
- package/dist/{telemetry-FDSW3ZOZ.js → telemetry-5PJWDFSZ.js} +5 -6
- package/dist/{timeline-ZRN336EA.js → timeline-OH35TN25.js} +124 -51
- package/dist/{tokens-RMLNQHIB.js → tokens-YISVK7W2.js} +2 -2
- package/dist/{transcribe-SOODKU6H.js → transcribe-6KBSE76Q.js} +12 -14
- package/dist/{transcribe-AEHHCYAL.js → transcribe-KRPN2FWA.js} +22 -24
- package/dist/{updateCheck-OSPEYRBY.js → updateCheck-QCZTFFSQ.js} +2 -2
- package/dist/{upgrade-AK4S7DMX.js → upgrade-DRFQISI6.js} +2 -2
- package/dist/{urlDownloader-FSCMLFG7.js → urlDownloader-CJDXTKMC.js} +8 -10
- package/dist/{validate-JJTCKZIV.js → validate-BKY3FIJC.js} +23 -25
- package/dist/{video-ZDM5CFI2.js → video-3UEJ57Q7.js} +9 -11
- package/package.json +1 -1
- package/dist/chunk-7JDEZNBY.js +0 -3805
- package/dist/chunk-7KDQAD2W.js +0 -81
- package/dist/chunk-BXCMXMJQ.js +0 -73
- package/dist/chunk-KCF6GHJP.js +0 -250
- package/dist/preflight-G5KP7ZKA.js +0 -32
|
@@ -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-XVIFWEPR.js";
|
|
7
10
|
import {
|
|
8
11
|
detectWsl
|
|
9
|
-
} from "./chunk-
|
|
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
|
|
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 (
|
|
198
|
-
if (
|
|
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
|
|
202
|
-
|
|
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
|
-
|
|
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,
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
findFFmpeg,
|
|
15
15
|
findFFprobe,
|
|
16
16
|
getFFmpegInstallHint
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4VTUDCHM.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_VP9_CPU_USED,
|
|
20
20
|
SDR_RGB_TO_BT709_FILTER,
|
|
21
21
|
SDR_RGB_TO_TAGGED_BT709_FILTER,
|
|
22
22
|
renderProvenanceArgs
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XVIFWEPR.js";
|
|
24
24
|
|
|
25
25
|
// src/background-removal/pipeline.ts
|
|
26
26
|
import { spawn } from "child_process";
|
|
@@ -270,7 +270,7 @@ function inferInputKind(inputPath) {
|
|
|
270
270
|
}
|
|
271
271
|
async function probeMedia(inputPath) {
|
|
272
272
|
const isImage = inferInputKind(inputPath) === "image";
|
|
273
|
-
const engine = await import("./src-
|
|
273
|
+
const engine = await import("./src-MRYINZ62.js");
|
|
274
274
|
const meta = await engine.extractMediaMetadata(inputPath);
|
|
275
275
|
if (isImage) {
|
|
276
276
|
return { width: meta.width, height: meta.height, fps: 0, frameCount: 1 };
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
downloadToFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2CDBTQKS.js";
|
|
10
10
|
import {
|
|
11
11
|
CACHE_DIR,
|
|
12
12
|
PINNED_PACKAGES,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
emitWords,
|
|
22
22
|
getPreparedWavDurationSeconds,
|
|
23
23
|
prepareWav
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TI3HKGQC.js";
|
|
25
25
|
import {
|
|
26
26
|
stoppedByCancelSignal
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-AR2SEGPZ.js";
|
|
28
28
|
import {
|
|
29
29
|
PARAKEET_MODEL_LABEL,
|
|
30
30
|
SHERPA_ERROR_PREFIX,
|
|
@@ -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-
|
|
9
|
+
} from "./chunk-GXWV4FNV.js";
|
|
10
10
|
import {
|
|
11
11
|
findSyncPartner,
|
|
12
12
|
readLinkTiming,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
extractMediaMetadata,
|
|
19
19
|
resolveReferencedDuration,
|
|
20
20
|
resolveReferencedStart
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XVIFWEPR.js";
|
|
22
22
|
import {
|
|
23
23
|
byStart,
|
|
24
24
|
compositionOriginSeconds,
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
hostInPointSeconds,
|
|
28
28
|
parseFpsWithDefault,
|
|
29
29
|
resolveMediaStartSeconds
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RMKL5FVH.js";
|
|
31
31
|
import {
|
|
32
32
|
HF_AUDIO_AUTOMATION_ATTR,
|
|
33
33
|
HF_AUDIO_FX_ATTR,
|
|
34
34
|
parseAudioFxChain,
|
|
35
35
|
parseAutomation,
|
|
36
36
|
resolveAutomation
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-UKJECUDK.js";
|
|
38
38
|
import {
|
|
39
39
|
isSubCompositionHost,
|
|
40
40
|
topLevelElements,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
} from "./chunk-6BNTGNGD.js";
|
|
46
46
|
import {
|
|
47
47
|
parseNumeric
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-32GKETR7.js";
|
|
49
49
|
import {
|
|
50
50
|
readMediaOffsetSeconds,
|
|
51
51
|
readPlaybackRate,
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "./chunk-DCAI5DBR.js";
|
|
13
13
|
import {
|
|
14
14
|
createProjectConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UDJHYQSZ.js";
|
|
16
16
|
import {
|
|
17
17
|
isHyperframesProject
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RMKL5FVH.js";
|
|
19
19
|
|
|
20
20
|
// src/utils/desktopApp.ts
|
|
21
21
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -159,13 +159,16 @@ function desktopInstalled({
|
|
|
159
159
|
return true;
|
|
160
160
|
return DESKTOP_BUNDLE_IDS.some(spotlight);
|
|
161
161
|
}
|
|
162
|
+
function insideHostApp(env = process.env) {
|
|
163
|
+
return Boolean(env.HYPERFRAMES_DESKTOP_PROJECT);
|
|
164
|
+
}
|
|
162
165
|
function desktopHint(dir, {
|
|
163
166
|
env = process.env,
|
|
164
167
|
ready = HANDOFF_READY,
|
|
165
168
|
installed,
|
|
166
169
|
platform = process.platform
|
|
167
170
|
} = {}) {
|
|
168
|
-
if (env
|
|
171
|
+
if (insideHostApp(env)) return null;
|
|
169
172
|
if (ready && (installed ?? desktopInstalled({ platform, env })))
|
|
170
173
|
return `Keep editing by chatting with Framey in the desktop app: ${openCommandFor(dir)}`;
|
|
171
174
|
const url = desktopDownloadUrl(platform);
|
|
@@ -178,5 +181,6 @@ export {
|
|
|
178
181
|
HANDOFF_READY,
|
|
179
182
|
openInDesktop,
|
|
180
183
|
desktopInstalled,
|
|
184
|
+
insideHostApp,
|
|
181
185
|
desktopHint
|
|
182
186
|
};
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-VWG7OQKU.js";
|
|
10
10
|
import {
|
|
11
11
|
getSystemMeta
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-T6AGUTZJ.js";
|
|
13
13
|
import {
|
|
14
14
|
getInvocationId
|
|
15
15
|
} from "./chunk-54HJ63Q2.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-XUXGIA7H.js";
|
|
30
30
|
import {
|
|
31
31
|
VERSION
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SI76MFBF.js";
|
|
33
33
|
import {
|
|
34
34
|
CANARIES,
|
|
35
35
|
canaryEnvVar,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QJCVK7CI.js";
|
|
23
23
|
import {
|
|
24
24
|
MEDIA_LINK_ATTR,
|
|
25
25
|
relinkSplitHalves
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
scanProjectMediaCodecMap,
|
|
55
55
|
shouldPrewarmProxy,
|
|
56
56
|
waitForProxy
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-APMA7XXB.js";
|
|
58
58
|
import {
|
|
59
59
|
HistoryBusyError,
|
|
60
60
|
MAX_WINDOW_IDLE_MS,
|
|
@@ -102,12 +102,10 @@ import {
|
|
|
102
102
|
replaceFileAtomically
|
|
103
103
|
} from "./chunk-EOVYQ3IG.js";
|
|
104
104
|
import {
|
|
105
|
-
addScenePartsManifest
|
|
106
|
-
} from "./chunk-OFFNB2SU.js";
|
|
107
|
-
import {
|
|
105
|
+
addScenePartsManifest,
|
|
108
106
|
ensureHfIds,
|
|
109
107
|
stampHfIdsInPlace
|
|
110
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-UQLXFITA.js";
|
|
111
109
|
import {
|
|
112
110
|
PREVIEW_PROXY_BOX_PARAM,
|
|
113
111
|
formatPreviewProxyBox,
|
|
@@ -115,9 +113,8 @@ import {
|
|
|
115
113
|
gsapCdnDist,
|
|
116
114
|
motionPathPluginUrl,
|
|
117
115
|
parseFps,
|
|
118
|
-
parsePreviewProxyBox
|
|
119
|
-
|
|
120
|
-
} from "./chunk-U7EGMXQR.js";
|
|
116
|
+
parsePreviewProxyBox
|
|
117
|
+
} from "./chunk-RMKL5FVH.js";
|
|
121
118
|
import {
|
|
122
119
|
AFTER_FONTS_SCRIPT_TYPE,
|
|
123
120
|
RUNTIME_BOOTSTRAP_ATTR,
|
|
@@ -131,7 +128,7 @@ import {
|
|
|
131
128
|
resolveRateSpec,
|
|
132
129
|
sourceTimeAt,
|
|
133
130
|
stripEmbeddedRuntimeScripts
|
|
134
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-UKJECUDK.js";
|
|
135
132
|
import {
|
|
136
133
|
HTML_ATTRIBUTE_ENTITIES,
|
|
137
134
|
MagicString,
|
|
@@ -156,6 +153,9 @@ import {
|
|
|
156
153
|
FFPROBE_PATH_ENV,
|
|
157
154
|
findFfBinary
|
|
158
155
|
} from "./chunk-VAS6HQX3.js";
|
|
156
|
+
import {
|
|
157
|
+
sameInstant
|
|
158
|
+
} from "./chunk-32GKETR7.js";
|
|
159
159
|
import {
|
|
160
160
|
decodeCssEscapes,
|
|
161
161
|
decodeWellFormedEscapes,
|
|
@@ -5497,7 +5497,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5497
5497
|
let block = extractGsapScriptBlock(html);
|
|
5498
5498
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5499
5499
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5500
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5500
|
+
const { GSAP_CDN } = await import("./dist-4FY5EEH5.js");
|
|
5501
5501
|
const bootstrap = [
|
|
5502
5502
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5503
5503
|
"<script>",
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
// src/utils/copyDir.ts
|
|
9
|
+
import { cpSync } from "fs";
|
|
10
|
+
function copyDirSync(src, dest, options = {}) {
|
|
11
|
+
cpSync(src, dest, { ...options, recursive: true, filter: () => true });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
copyDirSync
|
|
16
|
+
};
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
} from "./chunk-5ETJX6WM.js";
|
|
17
17
|
import {
|
|
18
18
|
runEnvironmentChecks
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HZZZ6C6Z.js";
|
|
20
20
|
import {
|
|
21
21
|
getAvailableMemoryMb,
|
|
22
22
|
getFreeDiskMb,
|
|
23
23
|
getShmSizeMb,
|
|
24
24
|
getSystemMeta
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-T6AGUTZJ.js";
|
|
26
26
|
import {
|
|
27
27
|
defineCommand
|
|
28
28
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -32,21 +32,21 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
getUpdateMeta,
|
|
34
34
|
withMeta
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-JKPI7VLI.js";
|
|
36
36
|
import {
|
|
37
37
|
CONFIG_PATH,
|
|
38
38
|
withFileLock
|
|
39
39
|
} from "./chunk-XUXGIA7H.js";
|
|
40
40
|
import {
|
|
41
41
|
VERSION
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-SI76MFBF.js";
|
|
43
43
|
import {
|
|
44
44
|
OPTIONAL_PACKAGES,
|
|
45
45
|
installedOptionalPackageVersion
|
|
46
46
|
} from "./chunk-3DKN5WKL.js";
|
|
47
47
|
import {
|
|
48
48
|
resolveExtractCacheDir
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-XVIFWEPR.js";
|
|
50
50
|
import {
|
|
51
51
|
normalizeErrorMessage
|
|
52
52
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -232,7 +232,7 @@ function checkEnvironment() {
|
|
|
232
232
|
return { ok: true, detail: parts.join(" \xB7 ") };
|
|
233
233
|
}
|
|
234
234
|
async function checkWhisper() {
|
|
235
|
-
const { findWhisper, getInstallInstructions } = await import("./manager-
|
|
235
|
+
const { findWhisper, getInstallInstructions } = await import("./manager-W2BTPAVT.js");
|
|
236
236
|
const result = findWhisper();
|
|
237
237
|
if (result) {
|
|
238
238
|
return { ok: true, detail: result.executablePath };
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
flush,
|
|
9
9
|
shouldTrack,
|
|
10
10
|
trackEvent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-B23GBPCW.js";
|
|
12
12
|
import {
|
|
13
13
|
getPowerState
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-T6AGUTZJ.js";
|
|
15
15
|
import {
|
|
16
16
|
CliRuntimeError
|
|
17
17
|
} from "./chunk-PBN6GBJE.js";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
shouldTrack
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B23GBPCW.js";
|
|
10
10
|
|
|
11
11
|
// src/telemetry/renderObservability.ts
|
|
12
12
|
function renderObservabilityTelemetryPayload(observability) {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-BRHI7EIA.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveCaptureBrowserGpuMode
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2XSAYE7U.js";
|
|
17
17
|
import {
|
|
18
18
|
isNavigationTimeoutError,
|
|
19
19
|
withRemainingBudget
|
|
@@ -237,6 +237,8 @@ async function navigateForCapture(page, url, totalTimeoutMs) {
|
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
239
|
var PUPPETEER_LAUNCH_DEFAULT_TIMEOUT_MS = 3e4;
|
|
240
|
+
var PAGE_LOAD_BLOCKING_TYPES = /* @__PURE__ */ new Set(["Document", "Script", "Stylesheet"]);
|
|
241
|
+
var NAMED_BLOCKING_REQUESTS = 3;
|
|
240
242
|
var SENT_OR_ANSWERED_WITHOUT_NETWORK = [
|
|
241
243
|
"Network.requestWillBeSentExtraInfo",
|
|
242
244
|
"Network.responseReceived"
|
|
@@ -246,6 +248,7 @@ async function gotoWhenSent(page, url, timeoutMs, coldChromeFirstRequestTimeoutM
|
|
|
246
248
|
try {
|
|
247
249
|
await cdp.send("Network.enable");
|
|
248
250
|
const sent = documentRequestSent(cdp);
|
|
251
|
+
const unfinished = unfinishedPageLoadRequests(cdp);
|
|
249
252
|
const navigation = page.goto(url, { waitUntil: "domcontentloaded", timeout: 0 });
|
|
250
253
|
const navigationAwaitedBelow = navigation.catch(() => void 0);
|
|
251
254
|
await withRemainingBudget(
|
|
@@ -260,7 +263,7 @@ async function gotoWhenSent(page, url, timeoutMs, coldChromeFirstRequestTimeoutM
|
|
|
260
263
|
navigation,
|
|
261
264
|
timeoutMs,
|
|
262
265
|
"loading the page",
|
|
263
|
-
() => new TimeoutError(
|
|
266
|
+
() => new TimeoutError(pageLoadTimeoutMessage(timeoutMs, url, unfinished()))
|
|
264
267
|
);
|
|
265
268
|
} finally {
|
|
266
269
|
await cdp.detach().catch(() => void 0);
|
|
@@ -285,6 +288,43 @@ function documentRequestSent(cdp) {
|
|
|
285
288
|
}
|
|
286
289
|
});
|
|
287
290
|
}
|
|
291
|
+
function unfinishedPageLoadRequests(cdp) {
|
|
292
|
+
const unfinished = /* @__PURE__ */ new Map();
|
|
293
|
+
cdp.on("Network.requestWillBeSent", ({ requestId, request, type }) => {
|
|
294
|
+
if (type && PAGE_LOAD_BLOCKING_TYPES.has(type)) unfinished.set(requestId, request.url);
|
|
295
|
+
});
|
|
296
|
+
for (const event of ["Network.loadingFinished", "Network.loadingFailed"]) {
|
|
297
|
+
cdp.on(event, ({ requestId }) => unfinished.delete(requestId));
|
|
298
|
+
}
|
|
299
|
+
return () => [...unfinished.values()];
|
|
300
|
+
}
|
|
301
|
+
function urlWithoutSecrets(raw) {
|
|
302
|
+
try {
|
|
303
|
+
const url = new URL(raw);
|
|
304
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") return `${url.protocol}\u2026`;
|
|
305
|
+
return `${url.origin}${url.pathname}${url.search ? "?\u2026" : ""}`;
|
|
306
|
+
} catch {
|
|
307
|
+
return "(unreadable URL)";
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function originOf(raw) {
|
|
311
|
+
try {
|
|
312
|
+
return new URL(raw).origin;
|
|
313
|
+
} catch {
|
|
314
|
+
return null;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function pageLoadTimeoutMessage(timeoutMs, pageUrl, waitingOn) {
|
|
318
|
+
const exceeded = `Navigation timeout of ${timeoutMs} ms exceeded`;
|
|
319
|
+
if (waitingOn.length === 0) return exceeded;
|
|
320
|
+
const named = waitingOn.slice(0, NAMED_BLOCKING_REQUESTS).map(urlWithoutSecrets).join(", ");
|
|
321
|
+
const unnamed = waitingOn.length - NAMED_BLOCKING_REQUESTS;
|
|
322
|
+
const more = unnamed > 0 ? ` and ${unnamed} more` : "";
|
|
323
|
+
const pageOrigin = new URL(pageUrl).origin;
|
|
324
|
+
const fromAnotherServer = waitingOn.some((request) => originOf(request) !== pageOrigin);
|
|
325
|
+
const advice = fromAnotherServer ? " A <script> or stylesheet from another server holds the page until it arrives; serve it from the project instead." : "";
|
|
326
|
+
return `${exceeded} while the page was still loading ${named}${more}.${advice}`;
|
|
327
|
+
}
|
|
288
328
|
|
|
289
329
|
export {
|
|
290
330
|
BrowserCleanupError,
|
|
@@ -16,6 +16,9 @@ import {
|
|
|
16
16
|
resolveLocalAssetCandidates,
|
|
17
17
|
resolveProjectRelativeSrc
|
|
18
18
|
} from "./chunk-6BNTGNGD.js";
|
|
19
|
+
import {
|
|
20
|
+
findFfBinary
|
|
21
|
+
} from "./chunk-VAS6HQX3.js";
|
|
19
22
|
import {
|
|
20
23
|
COMPOSITION_VARIABLE_TYPES,
|
|
21
24
|
FONT_ALIAS_KEYS,
|
|
@@ -27,15 +30,14 @@ import {
|
|
|
27
30
|
resolveAliasDisplayName
|
|
28
31
|
} from "./chunk-OYLO6TYK.js";
|
|
29
32
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-VAS6HQX3.js";
|
|
32
|
-
import {
|
|
33
|
+
COLOR_GRADING_SOURCE_TAGS,
|
|
33
34
|
COMPOSITION_ATTRIBUTES,
|
|
34
35
|
checkSubCompositionUsability,
|
|
35
36
|
parseNumeric,
|
|
36
37
|
readClipTiming,
|
|
38
|
+
spansOverlap,
|
|
37
39
|
validateColorGradingContract
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-32GKETR7.js";
|
|
39
41
|
import {
|
|
40
42
|
readAuthoredDurationSeconds,
|
|
41
43
|
readDataDurationSeconds,
|
|
@@ -5766,11 +5768,11 @@ var mediaRules = [
|
|
|
5766
5768
|
snippet: truncateSnippet(tag.raw)
|
|
5767
5769
|
});
|
|
5768
5770
|
};
|
|
5769
|
-
if (
|
|
5771
|
+
if (!COLOR_GRADING_SOURCE_TAGS.includes(tag.name)) {
|
|
5770
5772
|
report(
|
|
5771
5773
|
"color_grading_non_media",
|
|
5772
|
-
`data-color-grading on <${tag.name}> has no effect. The shader runtime only grades real <video> and <
|
|
5773
|
-
"Move the grading attribute to the real <video> or <
|
|
5774
|
+
`data-color-grading on <${tag.name}> has no effect. The shader runtime only grades real <video>, <img> and <canvas> elements.`,
|
|
5775
|
+
"Move the grading attribute to the real <video>, <img> or <canvas> element. Do not attach it to a wrapper or CSS background."
|
|
5774
5776
|
);
|
|
5775
5777
|
continue;
|
|
5776
5778
|
}
|
|
@@ -10988,7 +10990,7 @@ function lintDuplicateAudioTracks(htmlSources) {
|
|
|
10988
10990
|
const a = tracks[i];
|
|
10989
10991
|
const b = tracks[j];
|
|
10990
10992
|
if (a.trackIndex !== b.trackIndex) continue;
|
|
10991
|
-
if (a.start
|
|
10993
|
+
if (spansOverlap(a.start, a.end, b.start, b.end)) {
|
|
10992
10994
|
findings.push({
|
|
10993
10995
|
code: "duplicate_audio_track",
|
|
10994
10996
|
severity: "warning",
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
// src/commands/lambda/repoRoot.ts
|
|
9
|
+
import { existsSync } from "fs";
|
|
10
|
+
import { dirname, resolve } from "path";
|
|
11
|
+
import { fileURLToPath } from "url";
|
|
12
|
+
function repoRoot() {
|
|
13
|
+
const override = process.env.HYPERFRAMES_REPO_ROOT;
|
|
14
|
+
if (override) {
|
|
15
|
+
if (existsSync(resolve(override, "packages", "aws-lambda", "package.json"))) return override;
|
|
16
|
+
throw new Error(
|
|
17
|
+
"[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."
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
let dir = dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
for (let depth = 0; depth < 12; depth++) {
|
|
22
|
+
if (existsSync(resolve(dir, "packages", "aws-lambda", "package.json"))) {
|
|
23
|
+
return dir;
|
|
24
|
+
}
|
|
25
|
+
const parent = dirname(dir);
|
|
26
|
+
if (parent === dir) break;
|
|
27
|
+
dir = parent;
|
|
28
|
+
}
|
|
29
|
+
throw new Error(
|
|
30
|
+
"[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."
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
repoRoot
|
|
36
|
+
};
|