{"size": 312, "ext": "js", "max_stars_repo_path": "js/inc-sw.js", "max_stars_repo_name": "needalot/Bear-Portal.github.io", "max_stars_repo_stars_event_min_datetime": "2017-09-04T23:07:53.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-30T17:38:02.000Z", "max_issues_repo_path": "js/inc-sw.js", "max_issues_repo_name": "needalot/Bear-Portal.github.io", "max_issues_repo_issues_event_min_datetime": "2017-09-02T15:24:58.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T19:12:11.000Z", "max_forks_repo_path": "js/inc-sw.js", "max_forks_repo_name": "needalot/Bear-Portal.github.io", "max_forks_repo_forks_event_min_datetime": "2017-09-02T05:24:33.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-30T23:45:26.000Z"}
{"max_stars_count": 11, "max_issues_count": 188, "max_forks_count": 19, "avg_line_length": 31.2, "max_line_length": 77, "alphanum_fraction": 0.6730769231}
import { readFile, writeFile } from 'fs/promises'
import { fileURLToPath } from 'url'

async function main () {
  const swPath = fileURLToPath(new URL('../sw.js', import.meta.url))
  const sw = await readFile(swPath, 'utf8')
  await writeFile(swPath, sw.replace(/ugwa-sw-\d+/, 'ugwa-sw-' + Date.now()))
}
main()
