2021-04-02 15:59:29 +02:00
/ * *
* @ name EditRoles
* @ author DevilBro
* @ authorId 278543574059057154
* @ version 1.0 . 0
* @ description Allows you to locally edit Roles
* @ invite Jx3TjNS
* @ donate https : //www.paypal.me/MircoWittrien
* @ patreon https : //www.patreon.com/MircoWittrien
* @ website https : //mwittrien.github.io/
* @ source https : //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EditRoles/
* @ updateUrl https : //mwittrien.github.io/BetterDiscordAddons/Plugins/EditRoles/EditRoles.plugin.js
* /
module . exports = ( _ => {
const config = {
"info" : {
"name" : "EditRoles" ,
"author" : "DevilBro" ,
"version" : "1.0.0" ,
"description" : "Allows you to locally edit Roles"
}
} ;
return ! window . BDFDB _Global || ( ! window . BDFDB _Global . loaded && ! window . BDFDB _Global . started ) ? class {
getName ( ) { return config . info . name ; }
getAuthor ( ) { return config . info . author ; }
getVersion ( ) { return config . info . version ; }
getDescription ( ) { return ` The Library Plugin needed for ${ config . info . name } is missing. Open the Plugin Settings to download it. \n \n ${ config . info . description } ` ; }
downloadLibrary ( ) {
require ( "request" ) . get ( "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js" , ( e , r , b ) => {
if ( ! e && b && r . statusCode == 200 ) require ( "fs" ) . writeFile ( require ( "path" ) . join ( BdApi . Plugins . folder , "0BDFDB.plugin.js" ) , b , _ => BdApi . showToast ( "Finished downloading BDFDB Library" , { type : "success" } ) ) ;
else BdApi . alert ( "Error" , "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library" ) ;
} ) ;
}
load ( ) {
if ( ! window . BDFDB _Global || ! Array . isArray ( window . BDFDB _Global . pluginQueue ) ) window . BDFDB _Global = Object . assign ( { } , window . BDFDB _Global , { pluginQueue : [ ] } ) ;
if ( ! window . BDFDB _Global . downloadModal ) {
window . BDFDB _Global . downloadModal = true ;
BdApi . showConfirmationModal ( "Library Missing" , ` The Library Plugin needed for ${ config . info . name } is missing. Please click "Download Now" to install it. ` , {
confirmText : "Download Now" ,
cancelText : "Cancel" ,
onCancel : _ => { delete window . BDFDB _Global . downloadModal ; } ,
onConfirm : _ => {
delete window . BDFDB _Global . downloadModal ;
this . downloadLibrary ( ) ;
}
} ) ;
}
if ( ! window . BDFDB _Global . pluginQueue . includes ( config . info . name ) ) window . BDFDB _Global . pluginQueue . push ( config . info . name ) ;
}
start ( ) { this . load ( ) ; }
stop ( ) { }
getSettingsPanel ( ) {
let template = document . createElement ( "template" ) ;
template . innerHTML = ` <div style="color: var(--header-primary); font-size: 16px; font-weight: 300; white-space: pre; line-height: 22px;">The Library Plugin needed for ${ config . info . name } is missing. \n Please click <a style="font-weight: 500;">Download Now</a> to install it.</div> ` ;
template . content . firstElementChild . querySelector ( "a" ) . addEventListener ( "click" , this . downloadLibrary ) ;
return template . content . firstElementChild ;
}
} : ( ( [ Plugin , BDFDB ] ) => {
var changedRoles = { } ;
return class EditRoles extends Plugin {
onLoad ( ) {
this . patchedModules = {
before : {
2021-04-02 16:27:01 +02:00
DeveloperContextMenu : "default" ,
2021-04-02 15:59:29 +02:00
MemberListItem : "render" ,
UserPopout : "render"
}
} ;
}
onStart ( ) {
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . GuildStore , "getGuild" , { after : e => {
if ( e . returnValue ) e . returnValue = this . changeRolesInGuild ( e . returnValue ) ;
} } ) ;
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . MemberStore , "getMember" , { after : e => {
if ( e . returnValue ) {
let guild = BDFDB . LibraryModules . GuildStore . getGuild ( e . methodArguments [ 0 ] ) ;
if ( guild ) {
let role ;
for ( let id of e . returnValue . roles ) if ( guild . roles [ id ] && guild . roles [ id ] . colorString && ( ! role || role . position < guild . roles [ id ] . position ) ) role = guild . roles [ id ] ;
let data = role && changedRoles [ role . id ] ;
if ( data ) e . returnValue = Object . assign ( { } , e . returnValue , { colorString : data . color ? BDFDB . ColorUtils . convert ( data . color , "HEX" ) : null } ) ;
}
}
} } ) ;
this . forceUpdateAll ( ) ;
}
onStop ( ) {
this . forceUpdateAll ( ) ;
}
getSettingsPanel ( collapseStates = { } ) {
let settingsPanel ;
return settingsPanel = BDFDB . PluginUtils . createSettingsPanel ( this , {
collapseStates : collapseStates ,
children : _ => {
let settingsItems = [ ] ;
settingsItems . push ( BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Button" ,
color : BDFDB . LibraryComponents . Button . Colors . RED ,
label : "Reset all Roles" ,
onClick : _ => {
BDFDB . ModalUtils . confirm ( this , this . labels . confirm _resetall , _ => {
BDFDB . DataUtils . remove ( this , "roles" ) ;
this . forceUpdateAll ( ) ;
} ) ;
} ,
children : BDFDB . LanguageUtils . LanguageStrings . RESET
} ) ) ;
return settingsItems . flat ( 10 ) ;
}
} ) ;
}
onSettingsClosed ( ) {
if ( this . SettingsUpdated ) {
delete this . SettingsUpdated ;
this . forceUpdateAll ( ) ;
}
}
forceUpdateAll ( ) {
changedRoles = BDFDB . DataUtils . load ( this , "roles" ) ;
BDFDB . PatchUtils . forceAllUpdates ( this ) ;
BDFDB . MessageUtils . rerenderAll ( ) ;
}
onGuildContextMenu ( e ) {
if ( e . instance . props . guild ) e . instance . props . guild = this . changeRolesInGuild ( e . instance . props . guild ) ;
}
onDeveloperContextMenu ( e ) {
let guild = BDFDB . LibraryModules . FolderStore . getFlattenedGuilds ( ) . find ( g => g . roles [ e . instance . props . id ] ) ;
if ( guild ) e . returnvalue . props . children = [
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuGroup , {
children : BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : this . labels . context _localrolesettings ,
id : BDFDB . ContextMenuUtils . createItemId ( this . name , "settings-submenu" ) ,
children : BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuGroup , {
children : [
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : this . labels . submenu _rolesettings ,
id : BDFDB . ContextMenuUtils . createItemId ( this . name , "settings-change" ) ,
action : _ => {
this . openRoleSettingsModal ( guild . roles [ e . instance . props . id ] ) ;
}
} ) ,
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : this . labels . submenu _resetsettings ,
id : BDFDB . ContextMenuUtils . createItemId ( this . name , "settings-reset" ) ,
color : BDFDB . LibraryComponents . MenuItems . Colors . DANGER ,
disabled : ! changedRoles [ e . instance . props . id ] ,
action : event => {
let remove = _ => {
BDFDB . DataUtils . remove ( this , "roles" , e . instance . props . id ) ;
this . forceUpdateAll ( true ) ;
} ;
if ( event . shiftKey ) remove ( ) ;
else BDFDB . ModalUtils . confirm ( this , this . labels . confirm _reset , remove ) ;
}
} )
]
} )
} )
} ) ,
e . returnvalue . props . children
] . flat ( 10 ) . filter ( n => n ) ;
}
2021-04-02 16:27:01 +02:00
processDeveloperContextMenu ( e ) {
BDFDB . LibraryModules . SettingsUtils . updateLocalSettings ( { "developerMode" : true } ) ;
}
2021-04-02 15:59:29 +02:00
processMemberListItem ( e ) {
if ( e . instance . props . user ) {
let member = BDFDB . LibraryModules . MemberStore . getMember ( e . instance . props . guildId , e . instance . props . user . id ) ;
if ( member ) e . instance . props . colorString = member . colorString ;
}
}
processUserPopout ( e ) {
if ( e . instance . props . user && e . instance . props . guild && e . instance . props . guildMember ) e . instance . props . guild = this . changeRolesInGuild ( e . instance . props . guild ) ;
}
changeRolesInGuild ( guild ) {
let changed = false , roles = Object . assign ( { } , guild . roles ) ;
for ( let id in guild . roles ) {
let data = changedRoles [ id ] ;
if ( data && data . color ) {
changed = true ;
roles [ id ] = Object . assign ( { } , roles [ id ] , {
color : BDFDB . ColorUtils . convert ( data . color , "INT" ) ,
colorString : BDFDB . ColorUtils . convert ( data . color , "HEX" )
} ) ;
}
}
return ! changed ? guild : ( new BDFDB . DiscordObjects . Guild ( Object . assign ( { } , guild , { roles } ) ) ) ;
}
openRoleSettingsModal ( role ) {
let data = changedRoles [ role . id ] || { } ;
let newData = Object . assign ( { } , data ) ;
BDFDB . ModalUtils . open ( this , {
size : "MEDIUM" ,
header : this . labels . modal _header ,
subHeader : role . name ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormItem , {
title : this . labels . modal _colorpicker1 ,
className : BDFDB . disCN . marginbottom20 ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ColorSwatches , {
color : data . color ,
pickerConfig : {
alpha : false ,
gradient : false
} ,
onColorChange : value => { newData . color = value ; }
} )
]
} )
] ,
buttons : [ {
contents : BDFDB . LanguageUtils . LanguageStrings . SAVE ,
color : "BRAND" ,
close : true ,
onClick : _ => {
let changed = false ;
if ( Object . keys ( newData ) . every ( key => newData [ key ] == null || newData [ key ] == false ) && ( changed = true ) ) {
BDFDB . DataUtils . remove ( this , "roles" , role . id ) ;
}
else if ( ! BDFDB . equals ( newData , data ) && ( changed = true ) ) {
BDFDB . DataUtils . save ( newData , this , "roles" , role . id ) ;
}
if ( changed ) this . forceUpdateAll ( ) ;
}
} ]
} ) ;
}
setLabelsByLanguage ( ) {
switch ( BDFDB . LanguageUtils . getLanguage ( ) . id ) {
case "bg" : // Bulgarian
return {
confirm _reset : "Наистина ли искате да нулирате тази роля?" ,
confirm _resetall : "Наистина ли искате да нулирате всички роли?" ,
context _localrolesettings : "Настройки на местната роля" ,
modal _colorpicker1 : "Цвят на ролята" ,
modal _header : "Настройки на местната роля" ,
submenu _resetsettings : "Нулиране на ролята" ,
submenu _rolesettings : "Промяна на настройките"
} ;
case "da" : // Danish
return {
confirm _reset : "Er du sikker på, at du vil nulstille denne rolle?" ,
confirm _resetall : "Er du sikker på, at du vil nulstille alle roller?" ,
context _localrolesettings : "Lokale rolleindstillinger" ,
modal _colorpicker1 : "Rollefarve" ,
modal _header : "Lokale rolleindstillinger" ,
submenu _resetsettings : "Nulstil rolle" ,
submenu _rolesettings : "Ændre indstillinger"
} ;
case "de" : // German
return {
confirm _reset : "Möchtest du diese Rolle wirklich zurücksetzen?" ,
confirm _resetall : "Möchtest du wirklich alle Rollen zurücksetzen?" ,
context _localrolesettings : "Lokale Rolleneinstellungen" ,
modal _colorpicker1 : "Rollenfarbe" ,
modal _header : "Lokale Rolleneinstellungen" ,
submenu _resetsettings : "Rolle zurücksetzen" ,
submenu _rolesettings : "Einstellungen ändern"
} ;
case "el" : // Greek
return {
confirm _reset : "Είστε βέβαιοι ότι θέλετε ν α επαναφέρετε αυτόν τον ρόλο;" ,
confirm _resetall : "Είστε βέβαιοι ότι θέλετε ν α επαναφέρετε όλους τους ρόλους;" ,
context _localrolesettings : "Ρυθμίσεις τοπικού ρόλου" ,
modal _colorpicker1 : "Χρώμα ρόλου" ,
modal _header : "Ρυθμίσεις τοπικού ρόλου" ,
submenu _resetsettings : "Επαναφορά ρόλου" ,
submenu _rolesettings : "Αλλαξε ρυθμίσεις"
} ;
case "es" : // Spanish
return {
confirm _reset : "¿Está seguro de que desea restablecer este rol?" ,
confirm _resetall : "¿Está seguro de que desea restablecer todos los roles?" ,
context _localrolesettings : "Configuración de roles locales" ,
modal _colorpicker1 : "Color de la función" ,
modal _header : "Configuración de roles locales" ,
submenu _resetsettings : "Restablecer rol" ,
submenu _rolesettings : "Cambiar ajustes"
} ;
case "fi" : // Finnish
return {
confirm _reset : "Haluatko varmasti nollata tämän roolin?" ,
confirm _resetall : "Haluatko varmasti nollata kaikki roolit?" ,
context _localrolesettings : "Paikalliset rooliasetukset" ,
modal _colorpicker1 : "Roolin väri" ,
modal _header : "Paikalliset rooliasetukset" ,
submenu _resetsettings : "Nollaa rooli" ,
submenu _rolesettings : "Vaihda asetuksia"
} ;
case "fr" : // French
return {
confirm _reset : "Voulez-vous vraiment réinitialiser ce rôle?" ,
confirm _resetall : "Voulez-vous vraiment réinitialiser tous les rôles?" ,
context _localrolesettings : "Paramètres de rôle locaux" ,
modal _colorpicker1 : "Couleur du rôle" ,
modal _header : "Paramètres de rôle locaux" ,
submenu _resetsettings : "Réinitialiser le rôle" ,
submenu _rolesettings : "Modifier les paramètres"
} ;
case "hr" : // Croatian
return {
confirm _reset : "Jeste li sigurni da želite resetirati ovu ulogu?" ,
confirm _resetall : "Jeste li sigurni da želite resetirati sve uloge?" ,
context _localrolesettings : "Postavke lokalne uloge" ,
modal _colorpicker1 : "Boja uloge" ,
modal _header : "Postavke lokalne uloge" ,
submenu _resetsettings : "Resetiraj ulogu" ,
submenu _rolesettings : "Promijeniti postavke"
} ;
case "hu" : // Hungarian
return {
confirm _reset : "Biztosan vissza akarja állítani ezt a szerepet?" ,
confirm _resetall : "Biztosan vissza akarja állítani az összes szerepet?" ,
context _localrolesettings : "Helyi szerepbeállítások" ,
modal _colorpicker1 : "Szerepszín" ,
modal _header : "Helyi szerepbeállítások" ,
submenu _resetsettings : "A szerepkör visszaállítása" ,
submenu _rolesettings : "Beállítások megváltoztatása"
} ;
case "it" : // Italian
return {
confirm _reset : "Sei sicuro di voler reimpostare questo ruolo?" ,
confirm _resetall : "Sei sicuro di voler reimpostare tutti i ruoli?" ,
context _localrolesettings : "Impostazioni ruolo locale" ,
modal _colorpicker1 : "Colore ruolo" ,
modal _header : "Impostazioni ruolo locale" ,
submenu _resetsettings : "Reimposta ruolo" ,
submenu _rolesettings : "Cambia impostazioni"
} ;
case "ja" : // Japanese
return {
confirm _reset : "この役割をリセットしてもよろしいですか?" ,
confirm _resetall : "すべての役割をリセットしてもよろしいですか?" ,
context _localrolesettings : "ローカルロール設定" ,
modal _colorpicker1 : "役割の色" ,
modal _header : "ローカルロール設定" ,
submenu _resetsettings : "役割をリセット" ,
submenu _rolesettings : "設定を変更する"
} ;
case "ko" : // Korean
return {
confirm _reset : "이 역할을 재설정 하시겠습니까?" ,
confirm _resetall : "모든 역할을 재설정 하시겠습니까?" ,
context _localrolesettings : "로컬 역할 설정" ,
modal _colorpicker1 : "역할 색상" ,
modal _header : "로컬 역할 설정" ,
submenu _resetsettings : "역할 재설정" ,
submenu _rolesettings : "설정 변경"
} ;
case "lt" : // Lithuanian
return {
confirm _reset : "Ar tikrai norite iš naujo nustatyti šį vaidmenį?" ,
confirm _resetall : "Ar tikrai norite iš naujo nustatyti visus vaidmenis?" ,
context _localrolesettings : "Vietos vaidmens nustatymai" ,
modal _colorpicker1 : "Vaidmens spalva" ,
modal _header : "Vietos vaidmens nustatymai" ,
submenu _resetsettings : "Iš naujo nustatyti vaidmenį" ,
submenu _rolesettings : "Pakeisti nustatymus"
} ;
case "nl" : // Dutch
return {
confirm _reset : "Weet u zeker dat u deze rol wilt resetten?" ,
confirm _resetall : "Weet u zeker dat u alle rollen opnieuw wilt instellen?" ,
context _localrolesettings : "Lokale rolinstellingen" ,
modal _colorpicker1 : "Rol kleur" ,
modal _header : "Lokale rolinstellingen" ,
submenu _resetsettings : "Rol opnieuw instellen" ,
submenu _rolesettings : "Instellingen veranderen"
} ;
case "no" : // Norwegian
return {
confirm _reset : "Er du sikker på at du vil tilbakestille denne rollen?" ,
confirm _resetall : "Er du sikker på at du vil tilbakestille alle rollene?" ,
context _localrolesettings : "Lokale rolleinnstillinger" ,
modal _colorpicker1 : "Rollefarge" ,
modal _header : "Lokale rolleinnstillinger" ,
submenu _resetsettings : "Tilbakestill rolle" ,
submenu _rolesettings : "Endre innstillinger"
} ;
case "pl" : // Polish
return {
confirm _reset : "Czy na pewno chcesz zresetować tę rolę?" ,
confirm _resetall : "Czy na pewno chcesz zresetować wszystkie role?" ,
context _localrolesettings : "Ustawienia roli lokalnej" ,
modal _colorpicker1 : "Kolor roli" ,
modal _header : "Ustawienia roli lokalnej" ,
submenu _resetsettings : "Zresetuj rolę" ,
submenu _rolesettings : "Zmień ustawienia"
} ;
case "pt-BR" : // Portuguese (Brazil)
return {
confirm _reset : "Tem certeza de que deseja redefinir esta função?" ,
confirm _resetall : "Tem certeza de que deseja redefinir todas as funções?" ,
context _localrolesettings : "Configurações de função local" ,
modal _colorpicker1 : "Cor da Função" ,
modal _header : "Configurações de função local" ,
submenu _resetsettings : "Redefinir função" ,
submenu _rolesettings : "Mudar configurações"
} ;
case "ro" : // Romanian
return {
confirm _reset : "Sigur doriți să resetați acest rol?" ,
confirm _resetall : "Sigur doriți să resetați toate rolurile?" ,
context _localrolesettings : "Setări rol local" ,
modal _colorpicker1 : "Culoarea rolului" ,
modal _header : "Setări rol local" ,
submenu _resetsettings : "Resetați rolul" ,
submenu _rolesettings : "Schimbă setările"
} ;
case "ru" : // Russian
return {
confirm _reset : "Вы уверены, что хотите сбросить эту роль?" ,
confirm _resetall : "Вы уверены, что хотите сбросить все роли?" ,
context _localrolesettings : "Настройки локальной роли" ,
modal _colorpicker1 : "Цвет роли" ,
modal _header : "Настройки локальной роли" ,
submenu _resetsettings : "Сбросить роль" ,
submenu _rolesettings : "Изменить настройки"
} ;
case "sv" : // Swedish
return {
confirm _reset : "Är du säker på att du vill återställa denna roll?" ,
confirm _resetall : "Är du säker på att du vill återställa alla roller?" ,
context _localrolesettings : "Lokala rollinställningar" ,
modal _colorpicker1 : "Rollfärg" ,
modal _header : "Lokala rollinställningar" ,
submenu _resetsettings : "Återställ roll" ,
submenu _rolesettings : "Ändra inställningar"
} ;
case "th" : // Thai
return {
confirm _reset : "แน่ใจไหมว่าต้องการรีเซ็ตบทบาทนี้" ,
confirm _resetall : "แน่ใจไหมว่าต้องการรีเซ็ตบทบาททั้งหมด" ,
context _localrolesettings : "การตั้งค่าบทบาทท้องถิ่น" ,
modal _colorpicker1 : "สีของบทบาท" ,
modal _header : "การตั้งค่าบทบาทท้องถิ่น" ,
submenu _resetsettings : "รีเซ็ตบทบาท" ,
submenu _rolesettings : "เปลี่ยนการตั้งค่า"
} ;
case "tr" : // Turkish
return {
confirm _reset : "Bu Rolü sı fı rlamak istediğinizden emin misiniz?" ,
confirm _resetall : "Tüm Rolleri sı fı rlamak istediğinizden emin misiniz?" ,
context _localrolesettings : "Yerel Rol Ayarları " ,
modal _colorpicker1 : "Rol Rengi" ,
modal _header : "Yerel Rol Ayarları " ,
submenu _resetsettings : "Rolü Sı fı rla" ,
submenu _rolesettings : "Ayarları değiştir"
} ;
case "uk" : // Ukrainian
return {
confirm _reset : "Ви впевнені, що хочете скинути цю роль?" ,
confirm _resetall : "Ви впевнені, що хочете скинути всі ролі?" ,
context _localrolesettings : "Налаштування локальної ролі" ,
modal _colorpicker1 : "Колір ролі" ,
modal _header : "Налаштування локальної ролі" ,
submenu _resetsettings : "Скинути роль" ,
submenu _rolesettings : "Змінити налаштування"
} ;
case "vi" : // Vietnamese
return {
confirm _reset : "Bạn có chắc chắn muốn đặt lại Vai trò này không?" ,
confirm _resetall : "Bạn có chắc chắn muốn đặt lại tất cả các Vai trò không?" ,
context _localrolesettings : "Cài đặt vai trò cục bộ" ,
modal _colorpicker1 : "Màu vai trò" ,
modal _header : "Cài đặt vai trò cục bộ" ,
submenu _resetsettings : "Đặt lại vai trò" ,
submenu _rolesettings : "Thay đổi cài đặt"
} ;
case "zh-CN" : // Chinese (China)
return {
confirm _reset : "您确定要重置此角色吗?" ,
confirm _resetall : "您确定要重置所有角色吗?" ,
context _localrolesettings : "本地角色设置" ,
modal _colorpicker1 : "角色颜色" ,
modal _header : "本地角色设置" ,
submenu _resetsettings : "重置角色" ,
submenu _rolesettings : "更改设置"
} ;
case "zh-TW" : // Chinese (Taiwan)
return {
confirm _reset : "您確定要重置此角色嗎?" ,
confirm _resetall : "您確定要重置所有角色嗎?" ,
context _localrolesettings : "本地角色設置" ,
modal _colorpicker1 : "角色顏色" ,
modal _header : "本地角色設置" ,
submenu _resetsettings : "重置角色" ,
submenu _rolesettings : "更改設置"
} ;
default : // English
return {
confirm _reset : "Are you sure you want to reset this Role?" ,
confirm _resetall : "Are you sure you want to reset all Roles?" ,
context _localrolesettings : "Local Role Settings" ,
modal _colorpicker1 : "Role Color" ,
modal _header : "Local Role Settings" ,
submenu _resetsettings : "Reset Role" ,
submenu _rolesettings : "Change Settings"
} ;
}
}
} ;
} ) ( window . BDFDB _Global . PluginUtils . buildPlugin ( config ) ) ;
} ) ( ) ;