MCPcopy Index your code
hub / github.com/vercel/hyper / fetchFileData

Function fetchFileData

lib/index.tsx:36–49  ·  view source on GitHub ↗
(configData: configOptions)

Source from the content-addressed store, hash-verified

34Object.defineProperty(window, 'plugins', {get: () => plugins});
35
36const fetchFileData = (configData: configOptions) => {
37 const configInfo: configOptions = {...configData, bellSound: null};
38 if (!configInfo.bell || configInfo.bell.toUpperCase() !== 'SOUND' || !configInfo.bellSoundURL) {
39 store_.dispatch(reloadConfig(configInfo));
40 return;
41 }
42
43 void getBase64FileData(configInfo.bellSoundURL).then((base64FileData) => {
44 // prepend "base64," to the result of this method in order for this to work properly within xterm.js
45 const bellSound = !base64FileData ? null : 'base64,' + base64FileData;
46 configInfo.bellSound = bellSound;
47 store_.dispatch(reloadConfig(configInfo));
48 });
49};
50
51// initialize config
52store_.dispatch(loadConfig(config.getConfig()));

Callers 1

index.tsxFile · 0.85

Calls 2

reloadConfigFunction · 0.90
getBase64FileDataFunction · 0.90

Tested by

no test coverage detected