()
| 122 | } |
| 123 | |
| 124 | function resolveUpdateCheckEntryModulePath(): string { |
| 125 | const currentModulePath = fileURLToPath(import.meta.url); |
| 126 | const extension = path.extname(currentModulePath) || '.js'; |
| 127 | const entryPaths = [ |
| 128 | path.join(path.dirname(currentModulePath), `update-check-entry${extension}`), |
| 129 | path.join(path.dirname(currentModulePath), 'internal', `update-check-entry${extension}`), |
| 130 | ]; |
| 131 | const entryPath = entryPaths.find((candidate) => fs.existsSync(candidate)); |
| 132 | if (!entryPath) { |
| 133 | throw new Error( |
| 134 | 'Update check entrypoint not found. Rebuild the package to include the update-check worker entry.', |
| 135 | ); |
| 136 | } |
| 137 | return entryPath; |
| 138 | } |
| 139 | |
| 140 | function spawnBackgroundUpdateCheck(cachePath: string, currentVersion: string): void { |
| 141 | const modulePath = resolveUpdateCheckEntryModulePath(); |
no outgoing calls
no test coverage detected