| 223 | } |
| 224 | |
| 225 | export async function updateCountBadge(indexes: PackageIndexes) { |
| 226 | const functionsCount = indexes.functions.filter(i => !i.internal).length |
| 227 | const url = `https://img.shields.io/badge/-${functionsCount}%20functions-13708a` |
| 228 | const data = await $fetch(url, { responseType: 'text' }) |
| 229 | await fs.writeFile(join(DIR_ROOT, 'packages/public/badge-function-count.svg'), data, 'utf-8') |
| 230 | } |
| 231 | |
| 232 | export async function updatePackageJSON(indexes: PackageIndexes) { |
| 233 | const { version } = JSON.parse(await fs.readFile('package.json', { encoding: 'utf8' })) |