MCPcopy
hub / github.com/vercel/hyper / getDeprecatedConfig

Function getDeprecatedConfig

app/plugins.ts:389–413  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

387}
388
389export const getDeprecatedConfig = () => {
390 const deprecated: Record<string, {css: string[]}> = {};
391 const baseConfig = config.getConfig();
392 modules.forEach((plugin) => {
393 if (!plugin.decorateConfig) {
394 return;
395 }
396 // We need to clone config in case of plugin modifies config directly.
397 let configTmp: configOptions;
398 try {
399 configTmp = plugin.decorateConfig(JSON.parse(JSON.stringify(baseConfig)));
400 } catch (e) {
401 notify('Plugin error!', `"${plugin._name}" has encountered an error. Check Developer Tools for details.`, {
402 error: e
403 });
404 return;
405 }
406 const pluginCSSDeprecated = config.getDeprecatedCSS(configTmp);
407 if (pluginCSSDeprecated.length === 0) {
408 return;
409 }
410 deprecated[plugin._name] = {css: pluginCSSDeprecated};
411 });
412 return deprecated;
413};
414
415export const decorateMenu = (tpl: any) => {
416 return decorateObject(tpl, 'decorateMenu');

Callers

nothing calls this directly

Calls 3

parseMethod · 0.80
notifyFunction · 0.70
forEachMethod · 0.45

Tested by

no test coverage detected