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:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user