INNER CODE UNIT · TypeScript
requestRefresh
remotion-dev/remotion · .pi/extensions/vercel-deployment/index.ts:283
const requestRefresh = (ctx: ExtensionContext) => {
if (ctx.mode !== 'tui' || activeContext !== ctx) {
return;
}
if (refreshRunning) {
refreshQueued = true;
return;
}
const expectedGeneration = generation;
const refresh = fetchVercelDeployment({pi, cwd: ctx.cwd})
.then((deployment) => {
if (expectedGeneration === generation && activeContext === ctx) {
presentWidget(ctx, deployment);
}
})
.catch(() => {
// GitHub and Vercel discovery is best-effort. The next refresh retries.