@@ -89,33 +89,29 @@ const GetPluginData = (pluginList) => {
8989 ` ;
9090
9191 const responseJson = await GithubGraphQL . Post ( query ) ;
92- const pluginData = await Firebase . GetPluginData ( ) ;
93-
94- const initialPluginData = pluginData . data ( ) ;
95- let mutablePluginData = structuredClone ( initialPluginData ) ;
9692
9793 const jsonResponse = Object . values ( responseJson . data )
9894 . map ( ( repository ) => repository )
99- . map ( ( repo : any ) : PluginDataProps => {
100- const pluginJson = JSON . parse ( repo . pluginJson . text ) ;
101-
102- return {
103- pluginJson : pluginJson ,
104- usesBackend : pluginJson ?. useBackend === true || pluginJson ?. useBackend === undefined ,
105- readme : repo ?. pluginReadme ?. text || repo . readme . text ,
106- stargazerCount : repo . stargazerCount ,
107- diskUsage : FormatSize ( repo . diskUsage ) ,
108- commitDate : repo . commit . committedDate ,
109- commitMessage : repo . commit . message ,
110- repoName : repo . repoName ,
111- repoOwner : repo . repoOwner . login ,
112- id : repo . commitId . oid ,
113- } ;
114- } ) ;
115-
116- if ( initialPluginData !== mutablePluginData ) {
117- Firebase . SetPluginData ( mutablePluginData ) ;
118- }
95+ . map ( ( repo : any ) : PluginDataProps | null => {
96+ try {
97+ const pluginJson = JSON . parse ( repo . pluginJson . text ) ;
98+ return {
99+ pluginJson : pluginJson ,
100+ usesBackend : pluginJson ?. useBackend === true || pluginJson ?. useBackend === undefined ,
101+ readme : repo ?. pluginReadme ?. text || repo . readme . text ,
102+ stargazerCount : repo . stargazerCount ,
103+ diskUsage : FormatSize ( repo . diskUsage ) ,
104+ commitDate : repo . commit . committedDate ,
105+ commitMessage : repo . commit . message ,
106+ repoName : repo . repoName ,
107+ repoOwner : repo . repoOwner . login ,
108+ id : repo . commitId . oid ,
109+ } ;
110+ } catch {
111+ return null ;
112+ }
113+ } )
114+ . filter ( ( item ) : item is PluginDataProps => item !== null ) ;
119115
120116 resolve ( jsonResponse ) ;
121117 } ) ;
0 commit comments