async function getEntries(router) {
	return [
		handlerModule(router),
		...(
			(await router.internals.routes?.getRoutes())?.map((r) =>
				Object.entries(r)
					.filter(([r, v]) => v && r.startsWith("$") && !r.startsWith("$$"))
					.map(([, v]) => toRouteId(v)),
			) ?? []
		).flat(),
	];
}
@param {import("./router-mode.js").Router<{ handler: string }>} router
@returns