async function getData({ id, ids, sizes }) {
  if (id) ids = [id];
  const res = {};
  const scripts = ids
    // Some ids shown in popup/editor may have been hard-deleted
    ? getScriptsByIdsOrAll(ids).filter(Boolean)
    : getScriptsByIdsOrAll();
  scripts.forEach(inferScriptProps);
  res[SCRIPTS] = scripts;
  if (sizes) res.sizes = getSizes(ids);
  if (!id) res.cache = await getIconCache(scripts);
  if (!id && sizes) res.sync = commands.SyncGetStates();
  return res;
}
@desc Get data for dashboard.
@return {Promise<{ scripts: VMScript[], cache: Object }>}