()
| 80 | }; |
| 81 | |
| 82 | const updateRecord = () => { |
| 83 | getBatchUpdateRecord().then((batchUpdateRecordObjectLite) => { |
| 84 | const list = batchUpdateRecordObjectLite?.list || []; |
| 85 | const site = [] as TBatchUpdateRecord[]; |
| 86 | const other = [] as TBatchUpdateRecord[]; |
| 87 | const ignored = [] as TBatchUpdateRecord[]; |
| 88 | for (const entry of list) { |
| 89 | if (!entry.checkUpdate) { |
| 90 | site.push(entry); |
| 91 | continue; |
| 92 | } |
| 93 | const newVersion = entry.newMeta?.version?.[0]; |
| 94 | const isIgnored = typeof newVersion === "string" && entry.script.ignoreVersion === newVersion; |
| 95 | const mEntry = { |
| 96 | ...entry, |
| 97 | }; |
| 98 | |
| 99 | if (isIgnored) { |
| 100 | ignored.push(mEntry); |
| 101 | } else { |
| 102 | if (!paramSite || mEntry.sites?.includes(paramSite)) { |
| 103 | site.push(mEntry); |
| 104 | } else { |
| 105 | other.push(mEntry); |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | setRecords({ site, other, ignored }); |
| 110 | }); |
| 111 | }; |
| 112 | |
| 113 | const onScriptUpdateCheck = (data: any) => { |
| 114 | if ( |
no test coverage detected