hyperframes 0.8.90 → 0.8.92
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-QCKUCHLO.js → add-GCLS5XT7.js} +16 -16
- package/dist/{animatedGifPrep-JV7YPNCR.js → animatedGifPrep-VMFM2PBA.js} +6 -6
- package/dist/{asset-X5G7FLIA.js → asset-NFBCQ2QB.js} +2 -2
- package/dist/{assetCataloger-MYUR6H4S.js → assetCataloger-27YXPNX2.js} +2 -2
- package/dist/{auth-HUTOY6UC.js → auth-J6MHERMA.js} +2 -2
- package/dist/{autoUpdate-GVXUAVME.js → autoUpdate-D7RMTMHF.js} +2 -2
- package/dist/{backgroundChecks-DP64TQBS.js → backgroundChecks-ZUXDCYTJ.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-MIBYP2SP.js → batchRender-DCN2X35X.js} +3 -3
- package/dist/{beats-2BAVXPN4.js → beats-5FEJVZZY.js} +10 -10
- package/dist/{benchmark-AXEIQN5S.js → benchmark-ZBDA5GFV.js} +12 -12
- package/dist/{browser-GOL5PWIJ.js → browser-EAGFAPYB.js} +9 -9
- package/dist/{bundleWithLocalizedFonts-CCWJW35L.js → bundleWithLocalizedFonts-W7JJ23TN.js} +2 -2
- package/dist/{capture-CFMXNRM6.js → capture-27ZCA6CP.js} +7 -7
- package/dist/{capture-MWX7ONGJ.js → capture-W5XUURVP.js} +2 -2
- package/dist/{catalog-UDASP3IK.js → catalog-SPPSMRB5.js} +16 -16
- package/dist/{check-IMDTJ2RH.js → check-NV3OKYHO.js} +30 -30
- package/dist/{checkBrowser-OCN4Z4FT.js → checkBrowser-KL4V257E.js} +29 -29
- package/dist/{chunk-UXTEARGO.js → chunk-2A6FVDIZ.js} +1 -1
- package/dist/{chunk-JVYVKXTA.js → chunk-2E4WZU4S.js} +3 -3
- package/dist/{chunk-77SYQXQN.js → chunk-2RWYPLRR.js} +2 -2
- package/dist/{chunk-HMQ27CEJ.js → chunk-6WIXZ3HB.js} +3 -3
- package/dist/{chunk-4HDAVJMN.js → chunk-7AGI2TLZ.js} +2 -2
- package/dist/{chunk-FPWCGP7T.js → chunk-AIW6VOK6.js} +3 -3
- package/dist/{chunk-LP4D3V7E.js → chunk-BMQLA6GZ.js} +35 -42
- package/dist/{chunk-MGUSGIWE.js → chunk-CU2N7HZD.js} +1 -1
- package/dist/{chunk-W7KUW4QD.js → chunk-DKTP377I.js} +1 -1
- package/dist/{chunk-AUON4YVS.js → chunk-DU2IMZTI.js} +2 -2
- package/dist/{chunk-VBXD76KN.js → chunk-E3UXLITA.js} +1 -1
- package/dist/{chunk-PQ3I6CAC.js → chunk-ENV2LB4E.js} +3 -3
- package/dist/{chunk-6QBQPTRJ.js → chunk-FLGA3ZUU.js} +5 -5
- package/dist/{chunk-SGJSK536.js → chunk-FWLRQHMF.js} +1 -1
- package/dist/{chunk-U325D5ZG.js → chunk-GXIHEX7Z.js} +1 -1
- package/dist/{chunk-PWAWHXTQ.js → chunk-J7PWGYI3.js} +3 -3
- package/dist/{chunk-NL6WSNWA.js → chunk-JYEIGPLH.js} +4 -4
- package/dist/{chunk-DGPMOHUO.js → chunk-JZP473HH.js} +9 -9
- package/dist/{chunk-U24VGXGA.js → chunk-KVA65K7M.js} +39 -10
- package/dist/{chunk-VQX6DC4V.js → chunk-LNYBSC5Z.js} +114 -62
- package/dist/{chunk-WLIQG73N.js → chunk-MCR5L5H5.js} +1 -1
- package/dist/{chunk-MEIIOQNR.js → chunk-MWVZQN2E.js} +1 -1
- package/dist/{chunk-ANWEGAE6.js → chunk-NRAXUJQS.js} +3 -3
- package/dist/{chunk-AAW5AF54.js → chunk-NRQLS4HO.js} +4 -4
- package/dist/{chunk-OV4CCBM3.js → chunk-NZVRTDVW.js} +1 -1
- package/dist/{chunk-KRXGOOP3.js → chunk-O63VBAED.js} +1 -1
- package/dist/{chunk-FWDM3N34.js → chunk-QOJZKPIC.js} +4 -4
- package/dist/{chunk-KGDCJK72.js → chunk-QVOBDLUO.js} +3 -3
- package/dist/{chunk-GVHRNT6C.js → chunk-R7RHFXEK.js} +1 -1
- package/dist/{chunk-CYG65ZCX.js → chunk-RP6O7QFB.js} +74 -63
- package/dist/{chunk-WJ4NAOYT.js → chunk-RZC26MUU.js} +1 -1
- package/dist/{chunk-YQ5SWLDS.js → chunk-SSAULSQM.js} +8 -8
- package/dist/{chunk-TQGNT45W.js → chunk-SVQIWXWC.js} +2 -2
- package/dist/{chunk-XLJXHNXC.js → chunk-TDMX5OUY.js} +1 -1
- package/dist/{chunk-M3K5IF5G.js → chunk-TXN5R33Q.js} +2 -2
- package/dist/{chunk-2YPJQAU5.js → chunk-UURZ5VB2.js} +1 -1
- package/dist/{chunk-GK6OCEV7.js → chunk-WBASC4GU.js} +3 -3
- package/dist/chunk-WNYPPH3Y.js +3528 -0
- package/dist/{chunk-AP2WIRY6.js → chunk-WRN74OOR.js} +1 -1
- package/dist/{chunk-WRZG77MO.js → chunk-XGVMRQ6N.js} +8 -8
- package/dist/{chunk-GSWG25MG.js → chunk-YB7OWCJ7.js} +1 -1
- package/dist/{chunk-BNHS2BR4.js → chunk-Z44U3GMN.js} +1 -1
- package/dist/{chunk-WCQOPUJ4.js → chunk-ZOF426FA.js} +23 -10
- package/dist/{clean-F7NNEFPY.js → clean-CKYQK575.js} +14 -14
- package/dist/cli.js +50 -50
- package/dist/{cloud-GSFIMHVY.js → cloud-HRH5HUBL.js} +4 -4
- package/dist/{cloudrun-ZUZ35J2A.js → cloudrun-HSHBRCS4.js} +3 -3
- package/dist/{compare-26UBKHZI.js → compare-45VBPJBR.js} +24 -24
- package/dist/{compiler-XICNIB6E.js → compiler-HBDJ2FCK.js} +13 -3
- package/dist/{component-5QG3ILQS.js → component-IOAEAQSN.js} +3 -3
- package/dist/{compositions-IFRNCQ5G.js → compositions-VECXWCML.js} +17 -15
- package/dist/{delete-Z2L6F346.js → delete-ESBMF3XA.js} +2 -2
- package/dist/{dist-V6OCFIID.js → dist-COKVABAK.js} +2 -2
- package/dist/{dist-5Q62YHZI.js → dist-HJFL4ZN5.js} +1 -1
- package/dist/{doctor-WLSP4XWV.js → doctor-AGIH65QA.js} +10 -10
- package/dist/{events-FERXZJ74.js → events-EAINIMXE.js} +9 -9
- package/dist/{events-SFI5FAYU.js → events-INGDO67S.js} +8 -8
- package/dist/{feedback-6ZIZEN2J.js → feedback-XISLH3UL.js} +10 -10
- package/dist/{figma-OKUQYGPU.js → figma-O36BE6S7.js} +3 -3
- package/dist/fontLocalizeCli.js +8 -8
- package/dist/{get-JFVMDJ4K.js → get-2TBRXWDH.js} +2 -2
- package/dist/{gpuPolicy-Z3VMNZAH.js → gpuPolicy-FDXLHK7O.js} +6 -6
- package/dist/{grade-compare-TGVT536U.js → grade-compare-3AH3U2UM.js} +24 -24
- package/dist/{help-JHJAEATI.js → help-AQHVWZ7U.js} +1 -1
- package/dist/{history-IKW2UMZJ.js → history-YUY6U7VJ.js} +14 -14
- 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-GOMASHNG.js → info-CG74OV3N.js} +11 -11
- package/dist/{init-VHK4JK2I.js → init-BSRRUJTN.js} +21 -21
- package/dist/{inspect-NR4M3D3O.js → inspect-T6XSKC5K.js} +25 -25
- package/dist/{installer-IZI7H77F.js → installer-EGIOS5UQ.js} +5 -5
- package/dist/{keyframes-4Z6UHXTR.js → keyframes-HBASU3QG.js} +22 -17
- package/dist/{lambda-QOMWH34Y.js → lambda-64LK5VBR.js} +4 -4
- package/dist/{layout-F5STB2UB.js → layout-QVKBBOF5.js} +25 -25
- package/dist/{lint-XIKDK5NE.js → lint-GQPGCGYW.js} +12 -12
- package/dist/{lintProject-OUOTD5DS.js → lintProject-ESEUOGXF.js} +1 -1
- package/dist/{list-PV5AVDEA.js → list-MFG3CWUG.js} +2 -2
- package/dist/{login-4JVYU5EP.js → login-UY5HMZ63.js} +4 -4
- package/dist/{media-treatment-DQWRIN3R.js → media-treatment-PLRQ4NJB.js} +12 -12
- package/dist/{models-QMYYYGH4.js → models-VK3NR4ZI.js} +7 -7
- package/dist/{motionShot-F7PMQYSA.js → motionShot-VNNW6WV6.js} +10 -10
- package/dist/{normalize-audio-AVLP7MKR.js → normalize-audio-LWC5EDG4.js} +10 -10
- package/dist/{pipeline-437AL3MK.js → pipeline-S24AZTNK.js} +6 -6
- package/dist/{play-4GAAK5T4.js → play-WOGMI4FU.js} +20 -20
- package/dist/{preflight-AUMMYJTT.js → preflight-O7TG2WSZ.js} +7 -7
- package/dist/{present-WIRBZKR2.js → present-NK4CEHVO.js} +15 -15
- package/dist/{preview-NUQRYW6F.js → preview-6IFZAPIL.js} +18 -18
- package/dist/{producer-O7IG6IS4.js → producer-ULL2HNOC.js} +1 -1
- package/dist/{projectConfig-6RZN57VN.js → projectConfig-6DIB7H7E.js} +7 -7
- package/dist/{publication-Z64ENECQ.js → publication-OAGIQJHU.js} +3 -3
- package/dist/{publish-6LR5HSDV.js → publish-XRUKN32V.js} +9 -9
- package/dist/{remove-background-SOPXL32V.js → remove-background-P2W275SH.js} +7 -7
- package/dist/{render-ZVTBJQGB.js → render-APAOFW2G.js} +3 -3
- package/dist/{render-MDIGXG66.js → render-BQ55H4P5.js} +22 -22
- package/dist/{render-LUZG33CD.js → render-W5KZWLFB.js} +12 -12
- package/dist/{render-batch-SWB7ZEVV.js → render-batch-WPWPY5UA.js} +3 -3
- package/dist/{renderCancellation-34NDBFXL.js → renderCancellation-LN37WZR4.js} +6 -6
- package/dist/renderSetupWorker.js +1 -1
- package/dist/{resolver-XCOW3Q47.js → resolver-DMRC6NBN.js} +5 -5
- package/dist/{sherpa-ZRV5HYUT.js → sherpa-7DHFDVXD.js} +7 -7
- package/dist/{skills-YZOZUC2R.js → skills-P42VIJ2S.js} +11 -11
- package/dist/{skillsUpdateCheck-V2MIGABK.js → skillsUpdateCheck-MV4HDYO7.js} +3 -3
- package/dist/{snapshot-DEKOD4F6.js → snapshot-OFUU3SMV.js} +25 -25
- package/dist/{src-ZL5S6ZOV.js → src-6CP5D2JF.js} +5 -5
- package/dist/{src-WPCXIBAP.js → src-YUWEFLV4.js} +7 -7
- package/dist/{staticProjectServer-JSX6RZC3.js → staticProjectServer-FPLN4VJQ.js} +14 -14
- package/dist/{status-YW2IXW7Y.js → status-Z3CRKR35.js} +6 -6
- package/dist/studio/assets/{hyperframes-player-DDjER_ii.js → hyperframes-player-DKJPDHUp.js} +1 -1
- package/dist/studio/assets/{index-BKE3_N4v.js → index-C5_j5-3u.js} +178 -178
- package/dist/studio/assets/{index-5SFeUXP8.js → index-CHZ4kFWm.js} +1 -1
- package/dist/studio/assets/{index-CVsCxnlz.js → index-DpzpqJ_j.js} +1 -1
- package/dist/studio/{chunk-KU4F7QZ3.js → chunk-QPSOTK6M.js} +8 -1
- package/dist/studio/chunk-QPSOTK6M.js.map +1 -0
- package/dist/studio/index.d.ts +18 -14
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +9190 -8916
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/player.js +1 -1
- package/dist/{studio-api-JLNPQ3TO.js → studio-api-4FHIU7WA.js} +7 -7
- package/dist/{studioServer-ZCL433KM.js → studioServer-PIPRPNH2.js} +38 -38
- package/dist/{system-L4N5VQRB.js → system-47NPBMGC.js} +6 -6
- package/dist/{telemetry-RPKG2UZI.js → telemetry-AH7RMCZ5.js} +9 -9
- package/dist/{timeline-DUIEKLUY.js → timeline-E7QT5JZZ.js} +14 -14
- package/dist/{tokens-KPHKWWZ6.js → tokens-OJWP37XP.js} +2 -2
- package/dist/{transcribe-4SDPHYKI.js → transcribe-AZ3MXBCY.js} +7 -7
- package/dist/{transcribe-TNYWMNAY.js → transcribe-ZUVU222E.js} +12 -12
- package/dist/{updateCheck-PBVAHMGC.js → updateCheck-B57VMFQ3.js} +2 -2
- package/dist/{upgrade-CFBD6XYU.js → upgrade-P67KFD64.js} +2 -2
- package/dist/{urlDownloader-AQDUJKGE.js → urlDownloader-3LDWI4UF.js} +5 -5
- package/dist/{validate-INYRDUJN.js → validate-I7W4ERNH.js} +15 -15
- package/dist/{video-PWBBDS2L.js → video-X4WQOX3E.js} +6 -6
- package/package.json +1 -1
- package/dist/chunk-247O73KD.js +0 -3528
- package/dist/studio/chunk-KU4F7QZ3.js.map +0 -1
|
@@ -7,16 +7,16 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
parseFeedbackRating,
|
|
9
9
|
trackRenderFeedback
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QVOBDLUO.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ENV2LB4E.js";
|
|
14
14
|
import {
|
|
15
15
|
c
|
|
16
16
|
} from "./chunk-ZTZA4UWZ.js";
|
|
17
17
|
import {
|
|
18
18
|
detectAgentRuntime
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WRN74OOR.js";
|
|
20
20
|
import {
|
|
21
21
|
readConfig,
|
|
22
22
|
writeConfig
|
|
@@ -83,7 +83,7 @@ async function maybePromptRenderFeedback(opts) {
|
|
|
83
83
|
async function getDoctorSummary() {
|
|
84
84
|
try {
|
|
85
85
|
const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
|
|
86
|
-
import("./system-
|
|
86
|
+
import("./system-47NPBMGC.js"),
|
|
87
87
|
import("./ffmpeg-QIUFEFTY.js")
|
|
88
88
|
]);
|
|
89
89
|
const sys = getSystemMeta();
|
|
@@ -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-2RWYPLRR.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/compatibility.ts
|
|
12
12
|
import { compareVersions } from "compare-versions";
|
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
DEFAULT_REGISTRY_URL,
|
|
9
9
|
fetchItemFile,
|
|
10
10
|
validRegistryItem
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-J7PWGYI3.js";
|
|
12
12
|
import {
|
|
13
13
|
publishRegistryFile,
|
|
14
14
|
registryTargetPath
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-E3UXLITA.js";
|
|
16
16
|
import {
|
|
17
17
|
validateVariables
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZOF426FA.js";
|
|
19
19
|
import {
|
|
20
20
|
realProjectRoot
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WNYPPH3Y.js";
|
|
22
22
|
import {
|
|
23
23
|
isCompositionVariable
|
|
24
24
|
} from "./chunk-HBBJFK6I.js";
|
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
flush,
|
|
9
9
|
shouldTrack,
|
|
10
10
|
trackEvent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ENV2LB4E.js";
|
|
12
12
|
import {
|
|
13
13
|
getPowerState
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WRN74OOR.js";
|
|
15
15
|
import {
|
|
16
16
|
CliRuntimeError
|
|
17
17
|
} from "./chunk-PBN6GBJE.js";
|
|
18
18
|
import {
|
|
19
19
|
redactTelemetryString
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZOF426FA.js";
|
|
21
21
|
import {
|
|
22
22
|
readConfig
|
|
23
23
|
} from "./chunk-XUXGIA7H.js";
|
|
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
|
|
|
1278
1278
|
} catch (err) {
|
|
1279
1279
|
if (err instanceof Error) {
|
|
1280
1280
|
try {
|
|
1281
|
-
const { trackCommandFailure } = await import("./events-
|
|
1281
|
+
const { trackCommandFailure } = await import("./events-EAINIMXE.js");
|
|
1282
1282
|
trackCommandFailure(
|
|
1283
1283
|
command,
|
|
1284
1284
|
err,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
splitElementInHtml,
|
|
16
16
|
unwrapElementsFromHtml,
|
|
17
17
|
wrapElementsInHtml
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6WIXZ3HB.js";
|
|
19
19
|
import {
|
|
20
20
|
PROXY_PARAMS_VERSION,
|
|
21
21
|
PROXY_PENDING_RETRY_AFTER_SECONDS,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
shouldPrewarmProxy,
|
|
42
42
|
waitForProxy,
|
|
43
43
|
walkDir
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-2E4WZU4S.js";
|
|
45
45
|
import {
|
|
46
46
|
parseGsapScriptAcorn
|
|
47
47
|
} from "./chunk-XMNWWURD.js";
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
formatRenderOutputTimestamp,
|
|
60
60
|
parseFps,
|
|
61
61
|
sameInstant
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ZOF426FA.js";
|
|
63
63
|
import {
|
|
64
64
|
MagicString,
|
|
65
65
|
VALID_CANVAS_RESOLUTIONS,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
import {
|
|
69
69
|
addScenePartsManifest,
|
|
70
70
|
ensureHfIds
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-LNYBSC5Z.js";
|
|
72
72
|
import {
|
|
73
73
|
ProjectRootMissingError,
|
|
74
74
|
findStartTags,
|
|
@@ -83,10 +83,11 @@ import {
|
|
|
83
83
|
realpath,
|
|
84
84
|
resolveWithinProject,
|
|
85
85
|
stripEmbeddedRuntimeScripts
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-WNYPPH3Y.js";
|
|
87
87
|
import {
|
|
88
|
-
isWithinProjectRoot
|
|
89
|
-
|
|
88
|
+
isWithinProjectRoot,
|
|
89
|
+
readProjectFile
|
|
90
|
+
} from "./chunk-KVA65K7M.js";
|
|
90
91
|
import {
|
|
91
92
|
FFPROBE_PATH_ENV,
|
|
92
93
|
findFfBinary
|
|
@@ -2073,7 +2074,7 @@ import {
|
|
|
2073
2074
|
existsSync as existsSync3,
|
|
2074
2075
|
lstatSync as lstatSync22,
|
|
2075
2076
|
openSync as openSync3,
|
|
2076
|
-
readFileSync as
|
|
2077
|
+
readFileSync as readFileSync32,
|
|
2077
2078
|
readlinkSync,
|
|
2078
2079
|
writeFileSync as writeFileSync4,
|
|
2079
2080
|
writeSync as writeSync2,
|
|
@@ -5020,10 +5021,10 @@ function unrollDynamicAnimations(script, animationId, elements) {
|
|
|
5020
5021
|
}
|
|
5021
5022
|
|
|
5022
5023
|
// ../studio-server/dist/index.js
|
|
5023
|
-
import { existsSync as existsSync22
|
|
5024
|
+
import { existsSync as existsSync22 } from "fs";
|
|
5024
5025
|
import { randomUUID as randomUUID7 } from "crypto";
|
|
5025
5026
|
import { dirname as dirname23, relative as relative22, resolve as resolve5, sep as sep3 } from "path";
|
|
5026
|
-
import { createReadStream as createReadStream2, existsSync as existsSync5, readFileSync as
|
|
5027
|
+
import { createReadStream as createReadStream2, existsSync as existsSync5, readFileSync as readFileSync52, statSync as statSync42 } from "fs";
|
|
5027
5028
|
import { Readable } from "stream";
|
|
5028
5029
|
import { join as join8, resolve as resolve42 } from "path";
|
|
5029
5030
|
import { createHash as createHash4 } from "crypto";
|
|
@@ -5033,14 +5034,14 @@ var STUDIO_PREVIEW_MARK_META = "hyperframes-studio-preview";
|
|
|
5033
5034
|
var STUDIO_PREVIEW_LAZY_ATTR = "data-hf-preview-lazy";
|
|
5034
5035
|
|
|
5035
5036
|
// ../studio-server/dist/index.js
|
|
5036
|
-
import { existsSync as existsSync42, readFileSync as
|
|
5037
|
+
import { existsSync as existsSync42, readFileSync as readFileSync42 } from "fs";
|
|
5037
5038
|
import { join as join62 } from "path";
|
|
5038
5039
|
import { readlinkSync as readlinkSync2 } from "fs";
|
|
5039
5040
|
import { dirname as dirname42, join as join7, parse as parse2, relative as relative32, resolve as resolve32 } from "path";
|
|
5040
|
-
import { readFileSync as
|
|
5041
|
+
import { readFileSync as readFileSync62 } from "fs";
|
|
5041
5042
|
import { join as join9 } from "path";
|
|
5042
5043
|
import { streamSSE } from "hono/streaming";
|
|
5043
|
-
import { existsSync as existsSync6, readFileSync as
|
|
5044
|
+
import { existsSync as existsSync6, readFileSync as readFileSync72, unlinkSync as unlinkSync3, readdirSync as readdirSync32, statSync as statSync5 } from "fs";
|
|
5044
5045
|
import { join as join10 } from "path";
|
|
5045
5046
|
import { HTTPException } from "hono/http-exception";
|
|
5046
5047
|
import { open, stat as stat2 } from "fs/promises";
|
|
@@ -5049,7 +5050,7 @@ import {
|
|
|
5049
5050
|
closeSync as closeSync22,
|
|
5050
5051
|
fstatSync as fstatSync22,
|
|
5051
5052
|
openSync as openSync22,
|
|
5052
|
-
readFileSync as
|
|
5053
|
+
readFileSync as readFileSync9,
|
|
5053
5054
|
readdirSync as readdirSync42,
|
|
5054
5055
|
renameSync as renameSync32,
|
|
5055
5056
|
rmSync as rmSync42,
|
|
@@ -5059,18 +5060,18 @@ import {
|
|
|
5059
5060
|
} from "fs";
|
|
5060
5061
|
import { join as join11 } from "path";
|
|
5061
5062
|
import { createHash as createHash32, randomUUID as randomUUID23 } from "crypto";
|
|
5062
|
-
import { readFileSync as
|
|
5063
|
-
import { existsSync as existsSync7, readFileSync as
|
|
5063
|
+
import { readFileSync as readFileSync8 } from "fs";
|
|
5064
|
+
import { existsSync as existsSync7, readFileSync as readFileSync10, statSync as statSync7 } from "fs";
|
|
5064
5065
|
import { join as join12, resolve as resolve52 } from "path";
|
|
5065
5066
|
import { closeSync as closeSync32, constants as constants3, fstatSync as fstatSync3, openSync as openSync32, readSync } from "fs";
|
|
5066
5067
|
import { streamSSE as streamSSE2 } from "hono/streaming";
|
|
5067
5068
|
import { existsSync as existsSync8 } from "fs";
|
|
5068
5069
|
import { basename as basename22, dirname as dirname52, extname as extname2, join as join13, posix } from "path";
|
|
5069
|
-
import { existsSync as existsSync9, readFileSync as
|
|
5070
|
+
import { existsSync as existsSync9, readFileSync as readFileSync11 } from "fs";
|
|
5070
5071
|
import { homedir as homedir2 } from "os";
|
|
5071
5072
|
import { join as join14 } from "path";
|
|
5072
5073
|
import { createHash as createHash42 } from "crypto";
|
|
5073
|
-
import { readFileSync as
|
|
5074
|
+
import { readFileSync as readFileSync12, readdirSync as readdirSync5, rmSync as rmSync5 } from "fs";
|
|
5074
5075
|
import { join as join15 } from "path";
|
|
5075
5076
|
async function filterCompositionFiles(projectDir, files) {
|
|
5076
5077
|
const htmlFiles = files.filter((f) => f.endsWith(".html") && !isInHiddenOrVendorDir(f));
|
|
@@ -5509,6 +5510,16 @@ function canonicalProjectPath(projectDir, candidate) {
|
|
|
5509
5510
|
}
|
|
5510
5511
|
return canonical;
|
|
5511
5512
|
}
|
|
5513
|
+
function readCompositionSource(file) {
|
|
5514
|
+
const read = readProjectFile(file);
|
|
5515
|
+
if (read.kind === "folder") {
|
|
5516
|
+
throw new CompositionInsertionError("Composition source is a folder, not an HTML file", 400);
|
|
5517
|
+
}
|
|
5518
|
+
if (read.kind === "missing") {
|
|
5519
|
+
throw new CompositionInsertionError("Composition source was not found", 404);
|
|
5520
|
+
}
|
|
5521
|
+
return read.text;
|
|
5522
|
+
}
|
|
5512
5523
|
function validateSourcePath(sourcePath) {
|
|
5513
5524
|
if (!sourcePath.trim() || sourcePath.includes("\0") || /^[a-z]+:/i.test(sourcePath)) {
|
|
5514
5525
|
throw new CompositionInsertionError("Invalid composition source path", 400);
|
|
@@ -5537,7 +5548,7 @@ function validateDependencyGraph(projectDir, targetAbs, sourceAbs) {
|
|
|
5537
5548
|
}
|
|
5538
5549
|
if (visited.has(file)) return;
|
|
5539
5550
|
visiting.add(file);
|
|
5540
|
-
const source =
|
|
5551
|
+
const source = readCompositionSource(file);
|
|
5541
5552
|
const { document: document2 } = compositionRoot(source);
|
|
5542
5553
|
for (const host of descendants(document2, "[data-composition-src]")) {
|
|
5543
5554
|
const dependency = host.getAttribute("data-composition-src");
|
|
@@ -5601,7 +5612,7 @@ function insertCompositionIntoSource(input) {
|
|
|
5601
5612
|
const targetAbs = canonicalProjectFile(input.projectDir, input.targetPath);
|
|
5602
5613
|
const sourceAbs = canonicalProjectFile(input.projectDir, input.sourcePath);
|
|
5603
5614
|
validateDependencyGraph(input.projectDir, targetAbs, sourceAbs);
|
|
5604
|
-
const source =
|
|
5615
|
+
const source = readCompositionSource(sourceAbs);
|
|
5605
5616
|
const sourceComposition = compositionRoot(source).root;
|
|
5606
5617
|
const duration = positiveAttribute(
|
|
5607
5618
|
sourceComposition,
|
|
@@ -5837,7 +5848,7 @@ function foldAndCommitElementPatchBatches(projectDir, batches, writeFile2, reque
|
|
|
5837
5848
|
resolvedPaths.add(absPath);
|
|
5838
5849
|
let before;
|
|
5839
5850
|
try {
|
|
5840
|
-
before =
|
|
5851
|
+
before = readFileSync32(absPath, "utf-8");
|
|
5841
5852
|
} catch {
|
|
5842
5853
|
return { error: "not-found", sourceFile: batch.sourceFile };
|
|
5843
5854
|
}
|
|
@@ -5893,7 +5904,7 @@ function commitElementPatchBatchesWithReceipts(c, projectDir, batches) {
|
|
|
5893
5904
|
);
|
|
5894
5905
|
}
|
|
5895
5906
|
function writeFileWithReceipt(c, filePath, absPath, html) {
|
|
5896
|
-
const overwrote =
|
|
5907
|
+
const overwrote = readFileSync32(absPath);
|
|
5897
5908
|
replaceFileAtomically(absPath, html, statSync32(absPath).mode);
|
|
5898
5909
|
const version = fileContentVersion(html);
|
|
5899
5910
|
const writeToken = createWriteToken(c.req.header("X-Hyperframes-Write-Token"));
|
|
@@ -5903,7 +5914,7 @@ function writeFileWithReceipt(c, filePath, absPath, html) {
|
|
|
5903
5914
|
function writeMutationResult(c, projectDir, filePath, absPath, html, original) {
|
|
5904
5915
|
const backup = snapshotBeforeWrite(projectDir, absPath);
|
|
5905
5916
|
if (backup.error) return c.json({ error: `backup failed: ${backup.error}` }, 500);
|
|
5906
|
-
if (
|
|
5917
|
+
if (readFileSync32(absPath, "utf-8") !== original) {
|
|
5907
5918
|
return c.json({ error: "file changed", conflict: true, path: filePath }, 409);
|
|
5908
5919
|
}
|
|
5909
5920
|
const { version } = writeFileWithReceipt(c, filePath, absPath, html);
|
|
@@ -5986,7 +5997,7 @@ function updateReferences(projectDir, oldPath, newPath) {
|
|
|
5986
5997
|
let updatedCount = 0;
|
|
5987
5998
|
for (const file of textFiles) {
|
|
5988
5999
|
if (!isSafePath(projectDir, file)) continue;
|
|
5989
|
-
const content =
|
|
6000
|
+
const content = readFileSync32(file, "utf-8");
|
|
5990
6001
|
if (!content.includes(oldPath)) continue;
|
|
5991
6002
|
const updated = content.split(oldPath).join(newPath);
|
|
5992
6003
|
if (updated !== content) {
|
|
@@ -6260,12 +6271,12 @@ function containsRawGsapExpression(value) {
|
|
|
6260
6271
|
return Object.values(value).some(containsRawGsapExpression);
|
|
6261
6272
|
}
|
|
6262
6273
|
async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
6263
|
-
const beforeHtml =
|
|
6274
|
+
const beforeHtml = readFileSync32(res.absPath, "utf-8");
|
|
6264
6275
|
let html = beforeHtml;
|
|
6265
6276
|
let block = extractGsapScriptBlock(html);
|
|
6266
6277
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
6267
6278
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
6268
|
-
const { GSAP_CDN } = await import("./dist-
|
|
6279
|
+
const { GSAP_CDN } = await import("./dist-COKVABAK.js");
|
|
6269
6280
|
const bootstrap = [
|
|
6270
6281
|
`<script src="${GSAP_CDN}"></script>`,
|
|
6271
6282
|
"<script>",
|
|
@@ -6327,7 +6338,7 @@ async function applyGsapMutations(c, res, mutations) {
|
|
|
6327
6338
|
const changed = block.scriptText !== initialScript;
|
|
6328
6339
|
const newHtml = changed ? block.replaceScript(block.scriptText) : html;
|
|
6329
6340
|
let backupPath = null;
|
|
6330
|
-
if (
|
|
6341
|
+
if (readFileSync32(res.absPath, "utf-8") !== beforeHtml) {
|
|
6331
6342
|
return c.json({ error: "file changed during GSAP mutation", conflict: true }, 409);
|
|
6332
6343
|
}
|
|
6333
6344
|
if (changed) {
|
|
@@ -7164,7 +7175,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7164
7175
|
if (stat22.size > MAX_TEXT_READ_BYTES) {
|
|
7165
7176
|
return c.json({ error: "too large to read as text", why: "too_large" }, 413);
|
|
7166
7177
|
}
|
|
7167
|
-
const content =
|
|
7178
|
+
const content = readFileSync32(fd);
|
|
7168
7179
|
const version = fileContentVersion(content);
|
|
7169
7180
|
c.header("ETag", version);
|
|
7170
7181
|
if (content.subarray(0, GIT_BINARY_SNIFF_BYTES).includes(0)) {
|
|
@@ -7189,7 +7200,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7189
7200
|
if (expectedVersion === null && !createOnly) {
|
|
7190
7201
|
let currentContent = null;
|
|
7191
7202
|
try {
|
|
7192
|
-
currentContent =
|
|
7203
|
+
currentContent = readFileSync32(res.absPath);
|
|
7193
7204
|
} catch (error) {
|
|
7194
7205
|
if (!error || typeof error !== "object" || !("code" in error) || error.code !== "ENOENT") {
|
|
7195
7206
|
throw error;
|
|
@@ -7216,7 +7227,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7216
7227
|
if (!error || typeof error !== "object" || !("code" in error) || error.code !== "EEXIST") {
|
|
7217
7228
|
throw error;
|
|
7218
7229
|
}
|
|
7219
|
-
const currentContent =
|
|
7230
|
+
const currentContent = readFileSync32(res.absPath);
|
|
7220
7231
|
return c.json(
|
|
7221
7232
|
{
|
|
7222
7233
|
error: "file conflict",
|
|
@@ -7251,7 +7262,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7251
7262
|
);
|
|
7252
7263
|
}
|
|
7253
7264
|
try {
|
|
7254
|
-
const currentContent =
|
|
7265
|
+
const currentContent = readFileSync32(fd);
|
|
7255
7266
|
overwrote = currentContent;
|
|
7256
7267
|
const currentVersion = fileContentVersion(currentContent);
|
|
7257
7268
|
if (expectedVersion !== currentVersion) {
|
|
@@ -7327,7 +7338,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7327
7338
|
}
|
|
7328
7339
|
let before;
|
|
7329
7340
|
try {
|
|
7330
|
-
before =
|
|
7341
|
+
before = readFileSync32(ctx.absPath, "utf-8");
|
|
7331
7342
|
} catch (error) {
|
|
7332
7343
|
if (!error || typeof error !== "object" || !("code" in error) || error.code !== "ENOENT") {
|
|
7333
7344
|
throw error;
|
|
@@ -7356,7 +7367,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7356
7367
|
}
|
|
7357
7368
|
const backup = snapshotBeforeWrite(ctx.project.dir, ctx.absPath);
|
|
7358
7369
|
if (backup.error) return c.json({ error: `backup failed: ${backup.error}` }, 500);
|
|
7359
|
-
const current =
|
|
7370
|
+
const current = readFileSync32(ctx.absPath, "utf-8");
|
|
7360
7371
|
if (current !== before) {
|
|
7361
7372
|
const currentVersion2 = fileContentVersion(current);
|
|
7362
7373
|
return c.json({ error: "file conflict", currentVersion: currentVersion2, currentContent: current }, 409);
|
|
@@ -7389,7 +7400,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7389
7400
|
}
|
|
7390
7401
|
const parsed = await parseMutationBody(c);
|
|
7391
7402
|
if ("error" in parsed) return parsed.error;
|
|
7392
|
-
const originalContent =
|
|
7403
|
+
const originalContent = readFileSync32(ctx.absPath, "utf-8");
|
|
7393
7404
|
return writeIfChanged(
|
|
7394
7405
|
c,
|
|
7395
7406
|
ctx.project.dir,
|
|
@@ -7410,7 +7421,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7410
7421
|
if (!Array.isArray(targets) || targets.length === 0) {
|
|
7411
7422
|
return c.json({ error: "targets required" }, 400);
|
|
7412
7423
|
}
|
|
7413
|
-
const originalContent =
|
|
7424
|
+
const originalContent = readFileSync32(ctx.absPath, "utf-8");
|
|
7414
7425
|
let next = originalContent;
|
|
7415
7426
|
for (const target of targets) {
|
|
7416
7427
|
next = removeElementFromHtml(next, target);
|
|
@@ -7443,7 +7454,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7443
7454
|
seen.add(absPath);
|
|
7444
7455
|
let before;
|
|
7445
7456
|
try {
|
|
7446
|
-
before =
|
|
7457
|
+
before = readFileSync32(absPath, "utf-8");
|
|
7447
7458
|
} catch {
|
|
7448
7459
|
return c.json({ error: `not found: ${file.path}` }, 404);
|
|
7449
7460
|
}
|
|
@@ -7470,7 +7481,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7470
7481
|
prepared.push(folded);
|
|
7471
7482
|
}
|
|
7472
7483
|
for (const file of prepared) {
|
|
7473
|
-
const current =
|
|
7484
|
+
const current = readFileSync32(file.absPath, "utf-8");
|
|
7474
7485
|
if (current !== file.before) {
|
|
7475
7486
|
return c.json(
|
|
7476
7487
|
{
|
|
@@ -7513,7 +7524,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7513
7524
|
const conflicts = [];
|
|
7514
7525
|
for (const file of written.reverse()) {
|
|
7515
7526
|
try {
|
|
7516
|
-
const current =
|
|
7527
|
+
const current = readFileSync32(file.absPath, "utf-8");
|
|
7517
7528
|
if (current !== file.after) {
|
|
7518
7529
|
conflicts.push(file.path);
|
|
7519
7530
|
continue;
|
|
@@ -7561,7 +7572,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7561
7572
|
const fallbackTiming = typeof parsed.body.elementStart === "number" && typeof parsed.body.elementDuration === "number" ? { start: parsed.body.elementStart, duration: parsed.body.elementDuration } : void 0;
|
|
7562
7573
|
let originalContent;
|
|
7563
7574
|
try {
|
|
7564
|
-
originalContent =
|
|
7575
|
+
originalContent = readFileSync32(ctx.absPath, "utf-8");
|
|
7565
7576
|
} catch {
|
|
7566
7577
|
return c.json({ error: "not found" }, 404);
|
|
7567
7578
|
}
|
|
@@ -7619,7 +7630,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7619
7630
|
for (let attempt = 1; ; attempt += 1) {
|
|
7620
7631
|
let originalContent;
|
|
7621
7632
|
try {
|
|
7622
|
-
originalContent =
|
|
7633
|
+
originalContent = readFileSync32(ctx.absPath, "utf-8");
|
|
7623
7634
|
} catch {
|
|
7624
7635
|
return c.json({ error: "not found" }, 404);
|
|
7625
7636
|
}
|
|
@@ -7725,7 +7736,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7725
7736
|
}
|
|
7726
7737
|
let originalContent;
|
|
7727
7738
|
try {
|
|
7728
|
-
originalContent =
|
|
7739
|
+
originalContent = readFileSync32(ctx.absPath, "utf-8");
|
|
7729
7740
|
} catch {
|
|
7730
7741
|
return c.json({ error: "not found" }, 404);
|
|
7731
7742
|
}
|
|
@@ -7781,7 +7792,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7781
7792
|
).map((entry) => ({ target: entry.target, track: entry.track }));
|
|
7782
7793
|
let originalContent;
|
|
7783
7794
|
try {
|
|
7784
|
-
originalContent =
|
|
7795
|
+
originalContent = readFileSync32(ctx.absPath, "utf-8");
|
|
7785
7796
|
} catch {
|
|
7786
7797
|
return c.json({ error: "not found" }, 404);
|
|
7787
7798
|
}
|
|
@@ -7810,7 +7821,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7810
7821
|
if ("error" in parsed) return parsed.error;
|
|
7811
7822
|
let content;
|
|
7812
7823
|
try {
|
|
7813
|
-
content =
|
|
7824
|
+
content = readFileSync32(ctx.absPath, "utf-8");
|
|
7814
7825
|
} catch {
|
|
7815
7826
|
return c.json({ exists: false });
|
|
7816
7827
|
}
|
|
@@ -7854,7 +7865,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7854
7865
|
}
|
|
7855
7866
|
ensureDir(project.dir, destAbs);
|
|
7856
7867
|
try {
|
|
7857
|
-
writeFileSync4(destAbs,
|
|
7868
|
+
writeFileSync4(destAbs, readFileSync32(srcAbs), { flag: "wx" });
|
|
7858
7869
|
} catch (error) {
|
|
7859
7870
|
if (!error || typeof error !== "object" || !("code" in error) || error.code !== "EEXIST") {
|
|
7860
7871
|
throw error;
|
|
@@ -7898,7 +7909,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7898
7909
|
mustExist: true
|
|
7899
7910
|
});
|
|
7900
7911
|
if ("error" in res) return res.error;
|
|
7901
|
-
const html =
|
|
7912
|
+
const html = readFileSync32(res.absPath, "utf-8");
|
|
7902
7913
|
const block = extractGsapScriptBlock(html);
|
|
7903
7914
|
if (!block) {
|
|
7904
7915
|
return c.json({
|
|
@@ -7954,7 +7965,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7954
7965
|
if (!body || typeof body.expected !== "string" || typeof body.restore !== "string") {
|
|
7955
7966
|
return c.json({ error: "expected and restore contents required" }, 400);
|
|
7956
7967
|
}
|
|
7957
|
-
const current =
|
|
7968
|
+
const current = readFileSync32(res.absPath, "utf-8");
|
|
7958
7969
|
if (current !== body.expected) {
|
|
7959
7970
|
return c.json({ ok: true, restored: false, conflict: true });
|
|
7960
7971
|
}
|
|
@@ -8062,7 +8073,7 @@ function tagRootCompositionFile(bodyHtml, compPath) {
|
|
|
8062
8073
|
function buildSubCompositionHtml(projectDir, compPath, runtimeUrl, baseHref, rawOverride) {
|
|
8063
8074
|
const compFile = join62(projectDir, compPath);
|
|
8064
8075
|
if (!existsSync42(compFile)) return null;
|
|
8065
|
-
const rawComp = rawOverride ??
|
|
8076
|
+
const rawComp = rawOverride ?? readFileSync42(compFile, "utf-8");
|
|
8066
8077
|
let compHeadContent = "";
|
|
8067
8078
|
let rewrittenContent;
|
|
8068
8079
|
let htmlAttrs = "";
|
|
@@ -8095,7 +8106,7 @@ function buildSubCompositionHtml(projectDir, compPath, runtimeUrl, baseHref, raw
|
|
|
8095
8106
|
const indexPath = join62(projectDir, "index.html");
|
|
8096
8107
|
let headContent = "";
|
|
8097
8108
|
if (existsSync42(indexPath)) {
|
|
8098
|
-
const indexHtml =
|
|
8109
|
+
const indexHtml = readFileSync42(indexPath, "utf-8");
|
|
8099
8110
|
const headMatch = indexHtml.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
8100
8111
|
headContent = headMatch?.[1] ?? "";
|
|
8101
8112
|
}
|
|
@@ -8265,7 +8276,7 @@ function readStudioMotionManifestContent(projectDir) {
|
|
|
8265
8276
|
const manifestPath = join8(projectDir, STUDIO_MOTION_PATH);
|
|
8266
8277
|
if (!existsSync5(manifestPath)) return "";
|
|
8267
8278
|
try {
|
|
8268
|
-
return
|
|
8279
|
+
return readFileSync52(manifestPath, "utf-8");
|
|
8269
8280
|
} catch {
|
|
8270
8281
|
return "";
|
|
8271
8282
|
}
|
|
@@ -8416,13 +8427,13 @@ function resolveProjectMainHtml(projectDir, projectId) {
|
|
|
8416
8427
|
recordPreviewRead(projectDir, blockHtmlPath);
|
|
8417
8428
|
if (existsSync5(indexPath)) {
|
|
8418
8429
|
return {
|
|
8419
|
-
html:
|
|
8430
|
+
html: readFileSync52(indexPath, "utf-8"),
|
|
8420
8431
|
compositionPath: "index.html"
|
|
8421
8432
|
};
|
|
8422
8433
|
}
|
|
8423
8434
|
if (existsSync5(blockHtmlPath)) {
|
|
8424
8435
|
return {
|
|
8425
|
-
html:
|
|
8436
|
+
html: readFileSync52(blockHtmlPath, "utf-8"),
|
|
8426
8437
|
compositionPath: `${projectId}.html`
|
|
8427
8438
|
};
|
|
8428
8439
|
}
|
|
@@ -8557,7 +8568,7 @@ ${etag}`;
|
|
|
8557
8568
|
function pinSubCompHfIds(compFile, compPath) {
|
|
8558
8569
|
if (!/\.html?$/i.test(compPath)) return void 0;
|
|
8559
8570
|
try {
|
|
8560
|
-
return ensureHfIds(
|
|
8571
|
+
return ensureHfIds(readFileSync52(compFile, "utf-8"));
|
|
8561
8572
|
} catch {
|
|
8562
8573
|
return null;
|
|
8563
8574
|
}
|
|
@@ -8668,7 +8679,7 @@ ${etag}`;
|
|
|
8668
8679
|
recordProxyRequest();
|
|
8669
8680
|
servedContentType = PROXY_VARIANT_CONFIG[proxyVariant].contentType;
|
|
8670
8681
|
}
|
|
8671
|
-
const textBuffer = isText ? Buffer.from(
|
|
8682
|
+
const textBuffer = isText ? Buffer.from(readFileSync52(file, "utf-8"), "utf-8") : null;
|
|
8672
8683
|
const totalSize = textBuffer ? textBuffer.length : statSync42(servedPath).size;
|
|
8673
8684
|
const bodyFor = (start, end) => textBuffer ? new Uint8Array(textBuffer.subarray(start, end + 1)) : (
|
|
8674
8685
|
// Node's web stream type and the DOM one do not overlap for tsc on
|
|
@@ -8727,7 +8738,7 @@ async function lintUncoveredHtml(adapter, projectDir, htmlFiles, coveredFiles) {
|
|
|
8727
8738
|
const findings = [];
|
|
8728
8739
|
for (const file of htmlFiles) {
|
|
8729
8740
|
if (coveredFiles.has(file)) continue;
|
|
8730
|
-
const content =
|
|
8741
|
+
const content = readFileSync62(join9(projectDir, file), "utf-8");
|
|
8731
8742
|
const result = await adapter.lint(content, { filePath: file, isSubComposition: true });
|
|
8732
8743
|
for (const finding of result?.findings ?? []) {
|
|
8733
8744
|
findings.push({ ...finding, file });
|
|
@@ -8892,7 +8903,7 @@ function registerRenderRoutes(api, adapter) {
|
|
|
8892
8903
|
}
|
|
8893
8904
|
const contentType = renderContentType(job.outputPath);
|
|
8894
8905
|
const filename = job.outputPath.split("/").pop() ?? `render.mp4`;
|
|
8895
|
-
const content =
|
|
8906
|
+
const content = readFileSync72(job.outputPath);
|
|
8896
8907
|
return new Response(content, {
|
|
8897
8908
|
headers: {
|
|
8898
8909
|
"Content-Type": contentType,
|
|
@@ -8910,7 +8921,7 @@ function registerRenderRoutes(api, adapter) {
|
|
|
8910
8921
|
}
|
|
8911
8922
|
const contentType = renderContentType(job.outputPath);
|
|
8912
8923
|
const filename = job.outputPath.split("/").pop() ?? `render.mp4`;
|
|
8913
|
-
const content =
|
|
8924
|
+
const content = readFileSync72(job.outputPath);
|
|
8914
8925
|
return new Response(content, {
|
|
8915
8926
|
headers: {
|
|
8916
8927
|
"Content-Type": contentType,
|
|
@@ -8943,7 +8954,7 @@ function registerRenderRoutes(api, adapter) {
|
|
|
8943
8954
|
if (!fp) return c.json({ error: "forbidden" }, 403);
|
|
8944
8955
|
if (!existsSync6(fp)) return c.json({ error: "not found" }, 404);
|
|
8945
8956
|
const contentType = renderContentType(fp);
|
|
8946
|
-
const content =
|
|
8957
|
+
const content = readFileSync72(fp);
|
|
8947
8958
|
return new Response(content, {
|
|
8948
8959
|
headers: {
|
|
8949
8960
|
"Content-Type": contentType,
|
|
@@ -8967,7 +8978,7 @@ function registerRenderRoutes(api, adapter) {
|
|
|
8967
8978
|
let durationMs;
|
|
8968
8979
|
if (existsSync6(metaPath)) {
|
|
8969
8980
|
try {
|
|
8970
|
-
const meta = JSON.parse(
|
|
8981
|
+
const meta = JSON.parse(readFileSync72(metaPath, "utf-8"));
|
|
8971
8982
|
if (meta.status === "failed" && !existsSync6(fp)) status = "failed";
|
|
8972
8983
|
if (meta.durationMs) durationMs = meta.durationMs;
|
|
8973
8984
|
} catch {
|
|
@@ -9207,7 +9218,7 @@ function projectReader(projectDir) {
|
|
|
9207
9218
|
const file = resolveWithinProject(projectDir, compPath);
|
|
9208
9219
|
let source = null;
|
|
9209
9220
|
try {
|
|
9210
|
-
source = file ?
|
|
9221
|
+
source = file ? readFileSync8(file, "utf-8") : null;
|
|
9211
9222
|
} catch {
|
|
9212
9223
|
}
|
|
9213
9224
|
sources.set(compPath, source);
|
|
@@ -9317,7 +9328,7 @@ function readFileOnce(file) {
|
|
|
9317
9328
|
try {
|
|
9318
9329
|
const stat22 = fstatSync22(fd);
|
|
9319
9330
|
if (!stat22.isFile()) return "not-a-file";
|
|
9320
|
-
return { data:
|
|
9331
|
+
return { data: readFileSync9(fd), mtimeMs: stat22.mtimeMs };
|
|
9321
9332
|
} finally {
|
|
9322
9333
|
closeSync22(fd);
|
|
9323
9334
|
}
|
|
@@ -9468,7 +9479,7 @@ function registerWaveformRoutes(api, adapter) {
|
|
|
9468
9479
|
const cachePath = join12(cacheDir, buildWaveformCacheKey(assetPath, stats));
|
|
9469
9480
|
try {
|
|
9470
9481
|
if (isWaveformCacheDirectory(cacheDir) && existsSync7(cachePath)) {
|
|
9471
|
-
const peaks2 = JSON.parse(
|
|
9482
|
+
const peaks2 = JSON.parse(readFileSync10(cachePath, "utf-8"));
|
|
9472
9483
|
return c.json({ peaks: peaks2 });
|
|
9473
9484
|
}
|
|
9474
9485
|
} catch {
|
|
@@ -9951,7 +9962,7 @@ function readGlobalAssets(home = homedir2()) {
|
|
|
9951
9962
|
const manifestPath = join14(home, ".media", "manifest.jsonl");
|
|
9952
9963
|
if (!existsSync9(manifestPath)) return [];
|
|
9953
9964
|
const out = [];
|
|
9954
|
-
for (const line of
|
|
9965
|
+
for (const line of readFileSync11(manifestPath, "utf8").split("\n")) {
|
|
9955
9966
|
if (!line.trim()) continue;
|
|
9956
9967
|
try {
|
|
9957
9968
|
const rec = JSON.parse(line);
|
|
@@ -10196,7 +10207,7 @@ ${key}`).digest("hex").slice(0, 32)}.html`);
|
|
|
10196
10207
|
return {
|
|
10197
10208
|
read(key) {
|
|
10198
10209
|
try {
|
|
10199
|
-
return
|
|
10210
|
+
return readFileSync12(fileFor(key), "utf-8");
|
|
10200
10211
|
} catch {
|
|
10201
10212
|
return null;
|
|
10202
10213
|
}
|