Move sdk watcher back to esbuild (#17316)

Demo of current state


https://github.com/user-attachments/assets/034aff50-9981-4c81-b5ce-410a07b8dbc9
This commit is contained in:
Charles Bochet
2026-01-22 13:04:43 +01:00
committed by GitHub
parent f92c8a98a4
commit 5a94ef7dbb
23 changed files with 437 additions and 274 deletions
@@ -0,0 +1,15 @@
export type LogPrefix = 'init' | 'manifest-watch' | 'functions-watch' | 'front-components-watch';
export const getOutputByPrefix = (output: string, prefix: LogPrefix): string => {
const prefixPattern = `[${prefix}]`;
const lines = output.split('\n');
return lines
.filter((line) => line.includes(prefixPattern))
.map((line) => {
// Remove ANSI color codes for snapshot comparison
const cleanLine = line.replace(/\x1B\[[0-9;]*m/g, '');
return cleanLine.trim();
})
.join('\n');
};
@@ -13,9 +13,9 @@ export const runAppDev = (options: RunAppDevOptions): Promise<RunCliCommandResul
command: 'app:dev',
args: [appPath],
waitForOutput: [
'✓ Manifest written to',
'✓ Functions built',
'✓ Front components built',
'[manifest-watch] ✓ Written to',
'[functions-watch] ✓ Built',
'[front-components-watch] ✓ Built',
],
timeout,
});