hyperframes 0.8.176 → 0.8.177
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/bin/hyperframes.mjs +3 -0
- package/dist/{add-YZGUHLDP.js → add-YVP5YBNV.js} +5 -5
- package/dist/api.d.ts +2 -0
- package/dist/api.js +5 -5
- package/dist/{asset-YPC34MTV.js → asset-CZHAZMDR.js} +2 -2
- package/dist/{audio-33JHU37L.js → audio-F37HJPGZ.js} +8 -8
- package/dist/{auth-UUIHOS2D.js → auth-CADZEUXD.js} +1 -1
- package/dist/{autoUpdate-F747BE3R.js → autoUpdate-46XNDX2V.js} +2 -2
- package/dist/{backgroundChecks-3YLO2CSC.js → backgroundChecks-UWDSDJHJ.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{beats-DQDV2ZFS.js → beats-COVC2QGG.js} +4 -4
- package/dist/{benchmark-ZPPZEIHZ.js → benchmark-HDPPG2FE.js} +5 -5
- package/dist/{browser-ZFLEP3E6.js → browser-JEIXZKJN.js} +3 -3
- package/dist/{capture-5OW6VNXU.js → capture-YMF7J55W.js} +1 -1
- package/dist/captureCompositionFrame-QUYL3DEX.js +88 -0
- package/dist/{catalog-3A6KKCWF.js → catalog-DTB6S66P.js} +18 -10
- package/dist/{catch-up-KPGCLN4C.js → catch-up-Y4KO7XHK.js} +4 -4
- package/dist/{check-I3XLXS77.js → check-3YLTRK6W.js} +41 -30
- package/dist/{checkBrowser-KX7LNAFA.js → checkBrowser-LEUOWFNZ.js} +60 -40
- package/dist/{chunk-X6ZRZWPZ.js → chunk-2CEIKEFU.js} +1 -1
- package/dist/{chunk-SSE6NWZI.js → chunk-2PNLYDGZ.js} +8 -8
- package/dist/{chunk-VER46LXI.js → chunk-2YT3SCXL.js} +1 -1
- package/dist/{chunk-5TGVURKQ.js → chunk-457OAAL2.js} +1 -1
- package/dist/{chunk-OUMYTLPP.js → chunk-4YBNQDZM.js} +1 -1
- package/dist/{chunk-7XX4QGQV.js → chunk-6GMZRHYD.js} +50 -14
- package/dist/{chunk-J53AJK3Q.js → chunk-6OV3YGZF.js} +1 -1
- package/dist/{chunk-MDTMWUJI.js → chunk-7L4JOVV7.js} +1 -1
- package/dist/{chunk-HTC3VGU3.js → chunk-AFSBPASX.js} +28 -9
- package/dist/{chunk-USEUH5VV.js → chunk-BEX7K4WO.js} +1 -1
- package/dist/{chunk-VDUTZXIJ.js → chunk-BHFIITTD.js} +3 -3
- package/dist/{chunk-RBOVQRMR.js → chunk-BQTCQ6VN.js} +6 -12
- package/dist/{chunk-SURF34CK.js → chunk-HLBAQBHT.js} +1 -1
- package/dist/{chunk-HVMHVW5G.js → chunk-JWUKHXM6.js} +1 -1
- package/dist/{chunk-R2TVJ4DW.js → chunk-M3MXTYDE.js} +1 -1
- package/dist/{chunk-44XBAKKT.js → chunk-MNEC244Z.js} +2 -2
- package/dist/{chunk-EEVCXPUA.js → chunk-MPNVXG3J.js} +2 -2
- package/dist/{chunk-BVXZYFAL.js → chunk-MXFCQCKE.js} +2 -2
- package/dist/{chunk-7LU4ZHYV.js → chunk-P3MMF2JQ.js} +1 -1
- package/dist/{chunk-GOOB64LO.js → chunk-S3T3TDAB.js} +1 -1
- package/dist/{chunk-MLRCTTSD.js → chunk-SJFA4CZ3.js} +95 -10
- package/dist/{chunk-T6NA6TR3.js → chunk-SSYUONVH.js} +2 -2
- package/dist/{chunk-KUOUUG33.js → chunk-UEGULMAH.js} +79 -37
- package/dist/{chunk-BTCHRQNV.js → chunk-WNQUXBDU.js} +2 -2
- package/dist/{chunk-OMUKSCWE.js → chunk-XXHHPB6E.js} +6 -6
- package/dist/{chunk-NGRNAF5X.js → chunk-YCRX5APY.js} +1 -1
- package/dist/{clean-6REGQY3I.js → clean-BDXOJ4PW.js} +8 -8
- package/dist/cli.js +50 -50
- package/dist/{cloud-RAQZPMNP.js → cloud-HVG2LUBO.js} +4 -4
- package/dist/commands/contrast-audit.browser.js +166 -22
- package/dist/{compare-XYFSHHMQ.js → compare-ZXORZDGQ.js} +18 -18
- package/dist/{component-CRAO6Q2E.js → component-AZHVBBVP.js} +3 -3
- package/dist/{compositions-4SHILZZX.js → compositions-WFILUFC4.js} +5 -5
- package/dist/{delete-ZS4AHMTY.js → delete-I34NH2Q4.js} +2 -2
- package/dist/{doctor-OL4FYABY.js → doctor-6YID47TF.js} +3 -3
- package/dist/{events-Z3XZCRFZ.js → events-G76VOIBQ.js} +3 -3
- package/dist/{events-LIJBGTTX.js → events-OKT2KO6S.js} +2 -2
- package/dist/{feedback-OE6SB2VE.js → feedback-EGU7SSXF.js} +4 -4
- package/dist/{figma-DMUCMO67.js → figma-SUJPNBQQ.js} +3 -3
- package/dist/fontLocalizeCli.js +1 -1
- package/dist/{get-NQOQVUI5.js → get-7MYYFGO7.js} +2 -2
- package/dist/{grade-compare-HLTHHQGH.js → grade-compare-P22VRQLA.js} +18 -18
- package/dist/{help-ZAXWHAYF.js → help-HL6QBZMC.js} +1 -1
- package/dist/{history-CMY7ZEEW.js → history-OG2IXOQA.js} +7 -7
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-STR7EYI3.js → info-7P77JIWI.js} +5 -5
- package/dist/{init-YSMKK5VG.js → init-JI7QDJV4.js} +15 -15
- package/dist/{inspect-QV6DC6GO.js → inspect-7GSF776P.js} +17 -17
- package/dist/{keyframes-HN3DW5FG.js → keyframes-6NM477BA.js} +6 -6
- package/dist/{lambda-PG3JKNWS.js → lambda-4DNBHUPF.js} +2 -2
- package/dist/{layout-O4QAR2XY.js → layout-IBDEMDYP.js} +17 -17
- package/dist/{lint-AY55R4UR.js → lint-BGAON4GT.js} +6 -6
- package/dist/{list-TH2KCVNN.js → list-PGWNFSLX.js} +2 -2
- package/dist/{login-TRCMRV4B.js → login-IAGLU3R3.js} +4 -4
- package/dist/{manager-2J4XGDZ3.js → manager-VOGZQSK4.js} +5 -3
- package/dist/{media-treatment-ET5QQSWP.js → media-treatment-Z4N3JEDB.js} +6 -6
- package/dist/{models-RFUUSCG6.js → models-QUOIJVQI.js} +4 -4
- package/dist/{motionShot-2ET565ZV.js → motionShot-GPNESXTN.js} +2 -2
- package/dist/{normalize-audio-LUOJSD3W.js → normalize-audio-C264N2QE.js} +5 -5
- package/dist/{open-MVEOYQRQ.js → open-HB5F4HSD.js} +4 -4
- package/dist/{parakeetRunner-3TG7EHWA.js → parakeetRunner-2ZQOINZQ.js} +4 -4
- package/dist/{play-I3WJPYXK.js → play-VQ4HA4CC.js} +10 -10
- package/dist/{present-DUZBKUYH.js → present-HU46P43M.js} +9 -9
- package/dist/{preview-7J5TBTRP.js → preview-LNTJ62DX.js} +5 -5
- package/dist/{render-IYTGM6DE.js → render-DV76TO7S.js} +5 -5
- package/dist/{render-JUS2ROIN.js → render-TPE44TOW.js} +21 -21
- package/dist/{sherpa-PRI3JLUP.js → sherpa-IBMU4WV6.js} +3 -3
- package/dist/skills/media-use/references/operations.md +3 -1
- package/dist/{skills-CZ6VW5SZ.js → skills-M2ANTFD6.js} +5 -5
- package/dist/{skillsUpdateCheck-K4UKUAOC.js → skillsUpdateCheck-4WNEKKDW.js} +3 -3
- package/dist/{snapshot-MPE4GIMJ.js → snapshot-5AKBT5IQ.js} +25 -25
- package/dist/{staticProjectServer-DG4VZO4G.js → staticProjectServer-UVFPQEUZ.js} +4 -4
- package/dist/studio/assets/{hyperframes-player-DBHpVw8L.js → hyperframes-player-BulZP0_1.js} +1 -1
- package/dist/studio/assets/{index-BkDF4Z-5.js → index-B1Gypobp.js} +4 -4
- package/dist/studio/assets/{index-DHRXpmtI.js → index-CGncBUsJ.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-RGNBVLLL.js → studio-api-RVIU7JP2.js} +2 -2
- package/dist/{studioServer-FWACRD3Y.js → studioServer-K22MWDLW.js} +16 -16
- package/dist/{telemetry-CHJA5JFQ.js → telemetry-SUAMGBFK.js} +3 -3
- package/dist/{timeline-TZDMQBSM.js → timeline-SGVBFT36.js} +12 -12
- package/dist/{tokens-B5KI7FBA.js → tokens-IFHWY5WC.js} +2 -2
- package/dist/{transcribe-VHUDXZET.js → transcribe-GY4JHB7V.js} +9 -8
- package/dist/{transcribe-M7NO6XBP.js → transcribe-KAOCI5CW.js} +4 -4
- package/dist/{updateCheck-NMD6AFFG.js → updateCheck-YUNDJDLW.js} +2 -2
- package/dist/{upgrade-WGFMGJ5O.js → upgrade-PL2BFWTO.js} +2 -2
- package/dist/{validate-NM3GLUWX.js → validate-2NALRIFW.js} +14 -14
- package/package.json +1 -1
- package/dist/{capture-6XCCIPT4.js → capture-QVW6JPTF.js} +0 -0
- package/dist/{chunk-5EA4C6RA.js → chunk-GZG3ZZOO.js} +3 -3
- package/dist/{chunk-3Q4Y33FT.js → chunk-PIH4P2G6.js} +4 -4
- package/dist/{deploy-NKWMPAMH.js → deploy-3TTQZGTF.js} +4 -4
- package/dist/{destroy-UKP522AE.js → destroy-BEL232I5.js} +3 -3
|
@@ -32,14 +32,14 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
getUpdateMeta,
|
|
34
34
|
withMeta
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-457OAAL2.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-MPNVXG3J.js";
|
|
43
43
|
import {
|
|
44
44
|
OPTIONAL_PACKAGES,
|
|
45
45
|
installedOptionalPackageVersion
|
|
@@ -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-VOGZQSK4.js");
|
|
236
236
|
const result = findWhisper();
|
|
237
237
|
if (result) {
|
|
238
238
|
return { ok: true, detail: result.executablePath };
|
|
@@ -21,10 +21,13 @@ import {
|
|
|
21
21
|
emitWords,
|
|
22
22
|
getPreparedWavDurationSeconds,
|
|
23
23
|
prepareWav
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6GMZRHYD.js";
|
|
25
25
|
import {
|
|
26
26
|
stoppedByCancelSignal
|
|
27
27
|
} from "./chunk-X6HYBA4A.js";
|
|
28
|
+
import {
|
|
29
|
+
verifies
|
|
30
|
+
} from "./chunk-SJFA4CZ3.js";
|
|
28
31
|
import {
|
|
29
32
|
PARAKEET_MODEL_LABEL,
|
|
30
33
|
SHERPA_ERROR_PREFIX,
|
|
@@ -36,8 +39,8 @@ import {
|
|
|
36
39
|
|
|
37
40
|
// src/whisper/sherpa.ts
|
|
38
41
|
import { execFile, spawn } from "child_process";
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
42
|
+
import { randomUUID } from "crypto";
|
|
43
|
+
import { mkdirSync, renameSync, rmSync, statSync } from "fs";
|
|
41
44
|
import { homedir } from "os";
|
|
42
45
|
import { join } from "path";
|
|
43
46
|
import { createInterface } from "readline";
|
|
@@ -209,15 +212,6 @@ function sherpaParakeetInstalled(cliUrl = import.meta.url) {
|
|
|
209
212
|
(f) => statSync(join(PARAKEET_MODEL_DIR, f.name), { throwIfNoEntry: false })?.size === f.bytes
|
|
210
213
|
);
|
|
211
214
|
}
|
|
212
|
-
async function sha256File(path) {
|
|
213
|
-
const hash = createHash("sha256");
|
|
214
|
-
for await (const chunk of createReadStream(path)) hash.update(chunk);
|
|
215
|
-
return hash.digest("hex");
|
|
216
|
-
}
|
|
217
|
-
async function verifies(path, file) {
|
|
218
|
-
if (statSync(path, { throwIfNoEntry: false })?.size !== file.bytes) return false;
|
|
219
|
-
return await sha256File(path) === file.sha256;
|
|
220
|
-
}
|
|
221
215
|
async function ensureParakeetModel({
|
|
222
216
|
dir = PARAKEET_MODEL_DIR,
|
|
223
217
|
files = PARAKEET_MODEL_FILES,
|
|
@@ -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-2CEIKEFU.js";
|
|
10
10
|
|
|
11
11
|
// src/telemetry/renderObservability.ts
|
|
12
12
|
function renderObservabilityTelemetryPayload(observability) {
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7L4JOVV7.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -229,7 +229,7 @@ var asset_default = defineCommand({
|
|
|
229
229
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
230
230
|
);
|
|
231
231
|
}
|
|
232
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
232
|
+
const { trackFigmaImport } = await import("./telemetry-SUAMGBFK.js");
|
|
233
233
|
trackFigmaImport({
|
|
234
234
|
phase: "asset",
|
|
235
235
|
reused: results.every((r) => r.reused),
|
|
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
|
|
8
8
|
// src/version.ts
|
|
9
|
-
var VERSION = true ? "0.8.
|
|
10
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
9
|
+
var VERSION = true ? "0.8.177" : "0.0.0-dev";
|
|
10
|
+
var PRODUCER_VERSION = true ? "0.8.177" : "0.0.0-dev";
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
13
|
VERSION,
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
RegistryCompatibilityError,
|
|
9
9
|
gateRegistryItemsCompatibility
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-P3MMF2JQ.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_PROJECT_CONFIG,
|
|
13
13
|
createProjectConfig,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-OYEDHVSI.js";
|
|
30
30
|
import {
|
|
31
31
|
trackRegistryItemAdded
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-S3T3TDAB.js";
|
|
33
33
|
import {
|
|
34
34
|
defineCommand
|
|
35
35
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MPNVXG3J.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/compatibility.ts
|
|
12
12
|
import { compareVersions } from "compare-versions";
|
|
@@ -16,9 +16,24 @@ import {
|
|
|
16
16
|
|
|
17
17
|
// src/whisper/manager.ts
|
|
18
18
|
import { execFileSync } from "child_process";
|
|
19
|
-
import { existsSync, mkdirSync, readdirSync, rmSync } from "fs";
|
|
19
|
+
import { existsSync, mkdirSync, readdirSync, renameSync, rmSync, statSync as statSync2 } from "fs";
|
|
20
20
|
import { homedir, platform } from "os";
|
|
21
21
|
import { join } from "path";
|
|
22
|
+
|
|
23
|
+
// src/whisper/modelFile.ts
|
|
24
|
+
import { createHash } from "crypto";
|
|
25
|
+
import { createReadStream, statSync } from "fs";
|
|
26
|
+
async function sha256File(path) {
|
|
27
|
+
const hash = createHash("sha256");
|
|
28
|
+
for await (const chunk of createReadStream(path)) hash.update(chunk);
|
|
29
|
+
return hash.digest("hex");
|
|
30
|
+
}
|
|
31
|
+
async function verifies(path, file) {
|
|
32
|
+
if (statSync(path, { throwIfNoEntry: false })?.size !== file.bytes) return false;
|
|
33
|
+
return await sha256File(path) === file.sha256;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/whisper/manager.ts
|
|
22
37
|
var MODELS_DIR = join(homedir(), ".cache", "hyperframes", "whisper", "models");
|
|
23
38
|
var DEFAULT_MODEL = "small.en";
|
|
24
39
|
var WhisperUnavailableError = class extends Error {
|
|
@@ -32,8 +47,62 @@ function isWhisperUnavailable(err) {
|
|
|
32
47
|
if (err instanceof WhisperUnavailableError) return true;
|
|
33
48
|
return err instanceof Error && "code" in err && err.code === "WHISPER_UNAVAILABLE";
|
|
34
49
|
}
|
|
50
|
+
var MODEL_REVISION = "5359861c739e955e79d9a303bcbc70fb988958b1";
|
|
35
51
|
function getModelUrl(model) {
|
|
36
|
-
return `https://huggingface.co/ggerganov/whisper.cpp/resolve/
|
|
52
|
+
return `https://huggingface.co/ggerganov/whisper.cpp/resolve/${MODEL_REVISION}/ggml-${model}.bin`;
|
|
53
|
+
}
|
|
54
|
+
var pinned = (model, bytes, sha256) => [
|
|
55
|
+
model,
|
|
56
|
+
{ name: `ggml-${model}.bin`, bytes, sha256 }
|
|
57
|
+
];
|
|
58
|
+
var PINNED_MODELS = new Map([
|
|
59
|
+
pinned("tiny", 77691713, "be07e048e1e599ad46341c8d2a135645097a538221678b7acdd1b1919c6e1b21"),
|
|
60
|
+
pinned("tiny.en", 77704715, "921e4cf8686fdd993dcd081a5da5b6c365bfde1162e72b08d75ac75289920b1f"),
|
|
61
|
+
pinned("base", 147951465, "60ed5bc3dd14eea856493d334349b405782ddcaf0028d4b5df4088345fba2efe"),
|
|
62
|
+
pinned(
|
|
63
|
+
"base.en",
|
|
64
|
+
147964211,
|
|
65
|
+
"a03779c86df3323075f5e796cb2ce5029f00ec8869eee3fdfb897afe36c6d002"
|
|
66
|
+
),
|
|
67
|
+
pinned("small", 487601967, "1be3a9b2063867b937e64e2ec7483364a79917e157fa98c5d94b5c1fffea987b"),
|
|
68
|
+
pinned(
|
|
69
|
+
"small.en",
|
|
70
|
+
487614201,
|
|
71
|
+
"c6138d6d58ecc8322097e0f987c32f1be8bb0a18532a3f88f734d1bbf9c41e5d"
|
|
72
|
+
),
|
|
73
|
+
pinned(
|
|
74
|
+
"medium",
|
|
75
|
+
1533763059,
|
|
76
|
+
"6c14d5adee5f86394037b4e4e8b59f1673b6cee10e3cf0b11bbdbee79c156208"
|
|
77
|
+
),
|
|
78
|
+
pinned(
|
|
79
|
+
"medium.en",
|
|
80
|
+
1533774781,
|
|
81
|
+
"cc37e93478338ec7700281a7ac30a10128929eb8f427dda2e865faa8f6da4356"
|
|
82
|
+
),
|
|
83
|
+
pinned(
|
|
84
|
+
"large-v1",
|
|
85
|
+
3094623691,
|
|
86
|
+
"7d99f41a10525d0206bddadd86760181fa920438b6b33237e3118ff6c83bb53d"
|
|
87
|
+
),
|
|
88
|
+
pinned(
|
|
89
|
+
"large-v2",
|
|
90
|
+
3094623691,
|
|
91
|
+
"9a423fe4d40c82774b6af34115b8b935f34152246eb19e80e376071d3f999487"
|
|
92
|
+
),
|
|
93
|
+
pinned(
|
|
94
|
+
"large-v3",
|
|
95
|
+
3095033483,
|
|
96
|
+
"64d182b440b98d5203c4f9bd541544d84c605196c4f7b845dfa11fb23594d1e2"
|
|
97
|
+
),
|
|
98
|
+
pinned(
|
|
99
|
+
"large-v3-turbo",
|
|
100
|
+
1624555275,
|
|
101
|
+
"1fc70f774d38eb169993ac391eea357ef47c88757ef72ee5943879b7e8e2bc69"
|
|
102
|
+
)
|
|
103
|
+
]);
|
|
104
|
+
function pinnedWhisperModel(model) {
|
|
105
|
+
return PINNED_MODELS.get(model);
|
|
37
106
|
}
|
|
38
107
|
function whichBinary(name) {
|
|
39
108
|
try {
|
|
@@ -189,15 +258,28 @@ async function ensureWhisper(options) {
|
|
|
189
258
|
}
|
|
190
259
|
async function ensureModel(model = DEFAULT_MODEL, options) {
|
|
191
260
|
const modelPath = join(MODELS_DIR, `ggml-${model}.bin`);
|
|
192
|
-
|
|
261
|
+
const pin = PINNED_MODELS.get(model);
|
|
262
|
+
const cachedBytes = statSync2(modelPath, { throwIfNoEntry: false })?.size;
|
|
263
|
+
if (cachedBytes !== void 0 && (!pin || cachedBytes === pin.bytes)) return modelPath;
|
|
193
264
|
mkdirSync(MODELS_DIR, { recursive: true });
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
265
|
+
rmSync(modelPath, { force: true });
|
|
266
|
+
options?.onProgress?.(
|
|
267
|
+
cachedBytes === void 0 ? `Downloading model ${model}...` : `Model ${model} is incomplete; downloading it again...`
|
|
268
|
+
);
|
|
269
|
+
const downloaded = `${modelPath}.${process.pid}.download`;
|
|
270
|
+
try {
|
|
271
|
+
await downloadFile(getModelUrl(model), downloaded, {
|
|
272
|
+
signal: options?.signal,
|
|
273
|
+
onProgress: options?.onDownloadProgress
|
|
274
|
+
});
|
|
275
|
+
if (pin && !await verifies(downloaded, pin)) {
|
|
276
|
+
throw new Error(
|
|
277
|
+
`${pin.name} did not match its pinned size and sha256, so it was discarded. Re-run to retry.`
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
renameSync(downloaded, modelPath);
|
|
281
|
+
} finally {
|
|
282
|
+
rmSync(downloaded, { force: true });
|
|
201
283
|
}
|
|
202
284
|
return modelPath;
|
|
203
285
|
}
|
|
@@ -206,10 +288,13 @@ function hasFFmpeg() {
|
|
|
206
288
|
}
|
|
207
289
|
|
|
208
290
|
export {
|
|
291
|
+
sha256File,
|
|
292
|
+
verifies,
|
|
209
293
|
MODELS_DIR,
|
|
210
294
|
DEFAULT_MODEL,
|
|
211
295
|
WhisperUnavailableError,
|
|
212
296
|
isWhisperUnavailable,
|
|
297
|
+
pinnedWhisperModel,
|
|
213
298
|
findWhisper,
|
|
214
299
|
listWhisperModels,
|
|
215
300
|
getInstallInstructions,
|
|
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
trackLintReport,
|
|
9
9
|
trackLintRuleStreak
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S3T3TDAB.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2CEIKEFU.js";
|
|
14
14
|
import {
|
|
15
15
|
LINT_RULE_COUNT,
|
|
16
16
|
LINT_RULE_GROUP_COUNTS
|
|
@@ -59,6 +59,36 @@ var DENSE_GEOMETRY_SEEK_OPTIONS = {
|
|
|
59
59
|
waitForVideoFrames: false,
|
|
60
60
|
skipWebglDraws: true
|
|
61
61
|
};
|
|
62
|
+
function launchKey(html, noListen, options) {
|
|
63
|
+
const viewport = resolveCompositionViewportFromHtml(html);
|
|
64
|
+
const gpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
|
|
65
|
+
return JSON.stringify([viewport, compositionRequiresWebGpu(html), noListen, gpuMode]);
|
|
66
|
+
}
|
|
67
|
+
function prelaunchCompositionBrowser(html, browserGpuMode) {
|
|
68
|
+
const abort = new AbortController();
|
|
69
|
+
const options = { browserGpuMode, signal: abort.signal };
|
|
70
|
+
const key = launchKey(html, false, options);
|
|
71
|
+
const launched = launchCompositionBrowser(html, false, options).catch(() => void 0);
|
|
72
|
+
let taken = false;
|
|
73
|
+
const discard = async () => {
|
|
74
|
+
if (taken) return;
|
|
75
|
+
taken = true;
|
|
76
|
+
abort.abort();
|
|
77
|
+
await (await launched)?.browser.close().catch(() => void 0);
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
launched,
|
|
81
|
+
take: async (wanted) => {
|
|
82
|
+
if (wanted !== key) return discard().then(() => void 0);
|
|
83
|
+
taken = true;
|
|
84
|
+
const result = await launched;
|
|
85
|
+
if (result?.browser.connected) return result;
|
|
86
|
+
await result?.browser.close().catch(() => void 0);
|
|
87
|
+
return void 0;
|
|
88
|
+
},
|
|
89
|
+
discard
|
|
90
|
+
};
|
|
91
|
+
}
|
|
62
92
|
function resolveCliChromeGpuMode(envMode = process.env.PRODUCER_BROWSER_GPU_MODE) {
|
|
63
93
|
return resolveLocalBrowserGpuMode(void 0, envMode);
|
|
64
94
|
}
|
|
@@ -144,13 +174,37 @@ async function installPageFunctionGuard(page) {
|
|
|
144
174
|
await page.evaluateOnNewDocument("self.__name = self.__name || ((fn) => fn);");
|
|
145
175
|
}
|
|
146
176
|
async function openSettledCompositionPage(html, url, options) {
|
|
177
|
+
const viewport = resolveCompositionViewportFromHtml(html);
|
|
178
|
+
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
179
|
+
const answer = (await import("./staticProjectServer-UVFPQEUZ.js")).inProcessAnswer(url);
|
|
180
|
+
const noListen = answer !== void 0;
|
|
181
|
+
let chromeBrowser;
|
|
182
|
+
try {
|
|
183
|
+
const launched = await options.prelaunched?.take(launchKey(html, noListen, options)) ?? await launchCompositionBrowser(html, noListen, options);
|
|
184
|
+
chromeBrowser = launched.browser;
|
|
185
|
+
const softwareWebGpu = launched.softwareWebGpu;
|
|
186
|
+
options.onBrowser?.(chromeBrowser);
|
|
187
|
+
options.onBrowserReady?.();
|
|
188
|
+
const page = await chromeBrowser.newPage();
|
|
189
|
+
await installPageFunctionGuard(page);
|
|
190
|
+
await page.setViewport(viewport);
|
|
191
|
+
if (answer) await answerPageInProcess(page, url, answer);
|
|
192
|
+
await options.beforeNavigate?.(page);
|
|
193
|
+
await gotoWhenSent(page, url, pageNavigationTimeoutMs(options.navigationTimeoutMs));
|
|
194
|
+
await assertWebGpuAdapterAvailable(page, requiresWebGpu, softwareWebGpu);
|
|
195
|
+
const renderReadyTimedOut = !await waitForCompositionSettle(page, options);
|
|
196
|
+
return { browser: chromeBrowser, page, renderReadyTimedOut };
|
|
197
|
+
} catch (err) {
|
|
198
|
+
return rethrowAfterBrowserCleanup(chromeBrowser, err);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
async function launchCompositionBrowser(html, noListen, options) {
|
|
147
202
|
const viewport = resolveCompositionViewportFromHtml(html);
|
|
148
203
|
const { ensureBrowser, findSystemBrowser } = await import("./manager-HEUPD2YB.js");
|
|
149
204
|
const browser = await ensureBrowser({ signal: options.signal });
|
|
150
205
|
const puppeteer = await import("puppeteer-core");
|
|
151
206
|
const { buildChromeArgs } = await import("./src-JGPFLYBL.js");
|
|
152
207
|
const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
|
|
153
|
-
const answer = (await import("./staticProjectServer-DG4VZO4G.js")).inProcessAnswer(url);
|
|
154
208
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
155
209
|
let softwareWebGpu = false;
|
|
156
210
|
const launch = async (executablePath) => {
|
|
@@ -158,7 +212,7 @@ async function openSettledCompositionPage(html, url, options) {
|
|
|
158
212
|
const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, executablePath, {
|
|
159
213
|
signal: options.signal,
|
|
160
214
|
onBrowser: options.onBrowser,
|
|
161
|
-
noListen
|
|
215
|
+
noListen
|
|
162
216
|
});
|
|
163
217
|
options.signal?.throwIfAborted();
|
|
164
218
|
const webGpu = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
|
|
@@ -171,51 +225,37 @@ async function openSettledCompositionPage(html, url, options) {
|
|
|
171
225
|
headless: true,
|
|
172
226
|
signal: options.signal,
|
|
173
227
|
executablePath,
|
|
174
|
-
...
|
|
228
|
+
...noListen ? oneProcessOverPipe({ args }) : { args }
|
|
175
229
|
});
|
|
176
230
|
};
|
|
177
231
|
let chromeBrowser;
|
|
178
232
|
try {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
throw new Error(`${message}
|
|
233
|
+
chromeBrowser = await launch(browser.executablePath);
|
|
234
|
+
} catch (launchError) {
|
|
235
|
+
const message = normalizeErrorMessage(launchError);
|
|
236
|
+
const remediation = windowsChromeCrashRemediation(message);
|
|
237
|
+
if (!remediation) throw launchError;
|
|
238
|
+
const systemBrowser = browser.source === "cache" || browser.source === "download" ? findSystemBrowser() : void 0;
|
|
239
|
+
if (!systemBrowser || systemBrowser.executablePath === browser.executablePath) {
|
|
240
|
+
throw new Error(`${message}
|
|
188
241
|
|
|
189
242
|
${remediation}`, { cause: launchError });
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
243
|
+
}
|
|
244
|
+
console.warn(
|
|
245
|
+
`[hyperframes] Managed chrome-headless-shell crashed at launch; retrying once with system Chrome at ${systemBrowser.executablePath}.`
|
|
246
|
+
);
|
|
247
|
+
try {
|
|
248
|
+
chromeBrowser = await launch(systemBrowser.executablePath);
|
|
249
|
+
} catch (fallbackError) {
|
|
250
|
+
throw new Error(
|
|
251
|
+
`System Chrome fallback also failed: ${normalizeErrorMessage(fallbackError)}
|
|
199
252
|
|
|
200
253
|
${remediation}`,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
254
|
+
{ cause: fallbackError }
|
|
255
|
+
);
|
|
204
256
|
}
|
|
205
|
-
options.onBrowser?.(chromeBrowser);
|
|
206
|
-
options.onBrowserReady?.();
|
|
207
|
-
const page = await chromeBrowser.newPage();
|
|
208
|
-
await installPageFunctionGuard(page);
|
|
209
|
-
await page.setViewport(viewport);
|
|
210
|
-
if (answer) await answerPageInProcess(page, url, answer);
|
|
211
|
-
await options.beforeNavigate?.(page);
|
|
212
|
-
await gotoWhenSent(page, url, pageNavigationTimeoutMs(options.navigationTimeoutMs));
|
|
213
|
-
await assertWebGpuAdapterAvailable(page, requiresWebGpu, softwareWebGpu);
|
|
214
|
-
const renderReadyTimedOut = !await waitForCompositionSettle(page, options);
|
|
215
|
-
return { browser: chromeBrowser, page, renderReadyTimedOut };
|
|
216
|
-
} catch (err) {
|
|
217
|
-
return rethrowAfterBrowserCleanup(chromeBrowser, err);
|
|
218
257
|
}
|
|
258
|
+
return { browser: chromeBrowser, softwareWebGpu };
|
|
219
259
|
}
|
|
220
260
|
function seekInPage(t, fallbackToBridgeAndTimelines, exactTime, skipDraws) {
|
|
221
261
|
const getProperty = (target, key) => {
|
|
@@ -502,6 +542,7 @@ export {
|
|
|
502
542
|
AUDIT_SEEK_OPTIONS,
|
|
503
543
|
SCREENSHOT_SEEK_OPTIONS,
|
|
504
544
|
DENSE_GEOMETRY_SEEK_OPTIONS,
|
|
545
|
+
prelaunchCompositionBrowser,
|
|
505
546
|
resolveCliChromeGpuMode,
|
|
506
547
|
waitForRuntimeReady,
|
|
507
548
|
installPageFunctionGuard,
|
|
@@ -513,6 +554,7 @@ export {
|
|
|
513
554
|
DEFAULT_ZOOM_PADDING_PX,
|
|
514
555
|
DEFAULT_ZOOM_SCALE,
|
|
515
556
|
parseZoomTarget,
|
|
557
|
+
clampCropRegion,
|
|
516
558
|
padCropRegion,
|
|
517
559
|
resolveCropRegion,
|
|
518
560
|
captureRegionCrop,
|
|
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
parseFeedbackRating,
|
|
9
9
|
trackRenderFeedback
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S3T3TDAB.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2CEIKEFU.js";
|
|
14
14
|
import {
|
|
15
15
|
detectAgentRuntime
|
|
16
16
|
} from "./chunk-T6AGUTZJ.js";
|
|
@@ -4,12 +4,15 @@ 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
|
+
resolveProject
|
|
9
|
+
} from "./chunk-HLBAQBHT.js";
|
|
7
10
|
import {
|
|
8
11
|
installPageFunctionGuard,
|
|
9
12
|
resolveCliChromeGpuMode,
|
|
10
13
|
seekCompositionTimeline,
|
|
11
14
|
waitForRuntimeReady
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UEGULMAH.js";
|
|
13
16
|
import {
|
|
14
17
|
resolveCompositionViewportFromHtml
|
|
15
18
|
} from "./chunk-FH7WODJH.js";
|
|
@@ -20,9 +23,6 @@ import {
|
|
|
20
23
|
import {
|
|
21
24
|
pageNavigationTimeoutMs
|
|
22
25
|
} from "./chunk-X4PK5ZXP.js";
|
|
23
|
-
import {
|
|
24
|
-
resolveProject
|
|
25
|
-
} from "./chunk-SURF34CK.js";
|
|
26
26
|
import {
|
|
27
27
|
defineCommand
|
|
28
28
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
printDeprecationNotice,
|
|
38
38
|
withMeta
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-457OAAL2.js";
|
|
40
40
|
import {
|
|
41
41
|
decodeWellFormedEscapes
|
|
42
42
|
} from "./chunk-BSQ7XANM.js";
|
|
@@ -250,7 +250,7 @@ async function validateInBrowser(project, opts) {
|
|
|
250
250
|
const projectDir = project.dir;
|
|
251
251
|
const { bundleToSingleHtml } = await import("./compiler-5TFPJPQQ.js");
|
|
252
252
|
const { ensureBrowser } = await import("./manager-HEUPD2YB.js");
|
|
253
|
-
const { serveStaticProjectHtml } = await import("./staticProjectServer-
|
|
253
|
+
const { serveStaticProjectHtml } = await import("./staticProjectServer-UVFPQEUZ.js");
|
|
254
254
|
const { lintProject } = await import("./lintProject-ARKJXDQF.js");
|
|
255
255
|
const lintResult = await lintProject(projectDir);
|
|
256
256
|
const compositionErrors = extractCompositionErrorsFromLint(lintResult);
|
|
@@ -6,19 +6,16 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
redactHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BHFIITTD.js";
|
|
10
10
|
import "./chunk-Z27A7NUB.js";
|
|
11
11
|
import "./chunk-5ETJX6WM.js";
|
|
12
12
|
import {
|
|
13
13
|
loadProducer
|
|
14
14
|
} from "./chunk-MG66UO4N.js";
|
|
15
|
-
import
|
|
16
|
-
formatBytes
|
|
17
|
-
} from "./chunk-K2FLNJVB.js";
|
|
18
|
-
import "./chunk-3Q4Y33FT.js";
|
|
15
|
+
import "./chunk-PIH4P2G6.js";
|
|
19
16
|
import "./chunk-TNDNFZOK.js";
|
|
20
|
-
import "./chunk-6JR2XUEE.js";
|
|
21
17
|
import "./chunk-C6TPGUWD.js";
|
|
18
|
+
import "./chunk-6JR2XUEE.js";
|
|
22
19
|
import {
|
|
23
20
|
CACHE_DIR_NAME,
|
|
24
21
|
cleanupProxyCache
|
|
@@ -29,6 +26,9 @@ import {
|
|
|
29
26
|
pruneGoneProjectHistories
|
|
30
27
|
} from "./chunk-GMJ3ILLW.js";
|
|
31
28
|
import "./chunk-FFDC5OWV.js";
|
|
29
|
+
import {
|
|
30
|
+
formatBytes
|
|
31
|
+
} from "./chunk-K2FLNJVB.js";
|
|
32
32
|
import "./chunk-5ZSLJXQX.js";
|
|
33
33
|
import "./chunk-5CS4T6C6.js";
|
|
34
34
|
import "./chunk-T6AGUTZJ.js";
|
|
@@ -47,12 +47,12 @@ import "./chunk-7FMUTGOH.js";
|
|
|
47
47
|
import "./chunk-XRKMITSS.js";
|
|
48
48
|
import {
|
|
49
49
|
withMeta
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-457OAAL2.js";
|
|
51
51
|
import "./chunk-K4WIOZFP.js";
|
|
52
52
|
import "./chunk-XUXGIA7H.js";
|
|
53
53
|
import "./chunk-WERLJGIC.js";
|
|
54
54
|
import "./chunk-ISN5GRYI.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-MPNVXG3J.js";
|
|
56
56
|
import "./chunk-3DKN5WKL.js";
|
|
57
57
|
import "./chunk-EOVYQ3IG.js";
|
|
58
58
|
import "./chunk-6BEFEWFB.js";
|