@@ -80,21 +80,20 @@ export const loadPipelabPlugin = async (id: string, options: { context: PipelabC
8080 ) ;
8181 const fetchDuration = Date . now ( ) - fetchStart ;
8282
83- console . log ( `[Plugins] [${ id } ] Attempting to import from: ${ entryPoint } ` ) ;
83+ console . debug ( `[Plugins] [${ id } ] Attempting to import from: ${ entryPoint } ` ) ;
8484 if ( ! existsSync ( entryPoint ) ) {
8585 console . error ( `[Plugins] [${ id } ] CRITICAL: Plugin entry point not found at ${ entryPoint } ` ) ;
8686 try {
8787 const files = await readdir ( packageDir , { recursive : true } ) ;
88- console . log ( `[Plugins] [${ id } ] Directory contents:` , files ) ;
88+ console . debug ( `[Plugins] [${ id } ] Directory contents:` , files ) ;
8989 } catch ( e ) { }
9090 }
9191
9292 const importStart = Date . now ( ) ;
9393 const pluginModule = await import ( pathToFileURL ( entryPoint ) . href ) ;
9494 const importDuration = Date . now ( ) - importStart ;
9595 const totalDuration = Date . now ( ) - start ;
96- console . log (
97- `[Plugins] [${ id } ] Successfully loaded from: ${ packageDir } (fetch: ${ fetchDuration } ms, import: ${ importDuration } ms, total: ${ totalDuration } ms)` ,
96+ console . debug ( `[Plugins] [${ id } ] Successfully loaded from: ${ packageDir } (fetch: ${ fetchDuration } ms, import: ${ importDuration } ms, total: ${ totalDuration } ms)` ,
9897 ) ;
9998
10099 const plugin = pluginModule . default ;
@@ -125,8 +124,7 @@ export const loadCustomPlugin = async (
125124 } ) ;
126125 const fetchDuration = Date . now ( ) - fetchStart ;
127126
128- console . log (
129- `[Plugins] [${ packageName } ] Attempting to import custom plugin from: ${ entryPoint } ` ,
127+ console . debug ( `[Plugins] [${ packageName } ] Attempting to import custom plugin from: ${ entryPoint } ` ,
130128 ) ;
131129 if ( ! existsSync ( entryPoint ) ) {
132130 console . error (
@@ -139,8 +137,7 @@ export const loadCustomPlugin = async (
139137 const pluginModule = await import ( pathToFileURL ( entryPoint ) . href ) ;
140138 const importDuration = Date . now ( ) - importStart ;
141139 const totalDuration = Date . now ( ) - start ;
142- console . log (
143- `[Plugins] [${ packageName } ] Successfully loaded custom plugin from: ${ packageDir } (fetch: ${ fetchDuration } ms, import: ${ importDuration } ms, total: ${ totalDuration } ms)` ,
140+ console . debug ( `[Plugins] [${ packageName } ] Successfully loaded custom plugin from: ${ packageDir } (fetch: ${ fetchDuration } ms, import: ${ importDuration } ms, total: ${ totalDuration } ms)` ,
144141 ) ;
145142
146143 const plugin = pluginModule . default ;
@@ -204,13 +201,13 @@ export async function findInstalledPlugins(
204201}
205202
206203export const builtInPlugins = async ( options : { context : PipelabContext } ) : Promise < void > => {
207- console . log ( "[Plugins] Starting background plugin loading..." ) ;
204+ console . debug ( "[Plugins] Starting background plugin loading..." ) ;
208205
209206 // Pre-ensure Node.js and PNPM once in parallel so plugins don't have to wait for them
210207 sendStartupProgress ( "Preparing environment..." ) ;
211208 const envStart = Date . now ( ) ;
212209 await Promise . all ( [ ensureNodeJS ( options . context ) , ensurePNPM ( options . context ) ] ) ;
213- console . log ( `[Plugins] Environment preparation took ${ Date . now ( ) - envStart } ms` ) ;
210+ console . debug ( `[Plugins] Environment preparation took ${ Date . now ( ) - envStart } ms` ) ;
214211
215212 const { usePlugins } = await import ( "@pipelab/shared" ) ;
216213 const { registerPlugins } = usePlugins ( ) ;
@@ -296,7 +293,10 @@ export const builtInPlugins = async (options: { context: PipelabContext }): Prom
296293 console . error ( `[Plugins] Failed to load settings config on startup:` , e ) ;
297294 }
298295
299- console . log ( `[Plugins] Total plugins to load on startup:` , Array . from ( pluginsToLoad . entries ( ) ) ) ;
296+ const pluginList = Array . from ( pluginsToLoad . keys ( ) )
297+ . map ( ( p ) => ` - ${ p } ` )
298+ . join ( "\n" ) ;
299+ console . log ( `\n[Plugins] Loading plugins in background:\n${ pluginList } \n` ) ;
300300
301301 // Now load all collected plugins in parallel
302302 const loadPromises = Array . from ( pluginsToLoad . entries ( ) ) . map ( async ( [ packageName , version ] ) => {
@@ -307,8 +307,7 @@ export const builtInPlugins = async (options: { context: PipelabContext }): Prom
307307 if ( plugin ) {
308308 registerPlugins ( [ plugin ] ) ;
309309 webSocketServer . broadcast ( "plugin:loaded" , { plugin } ) ;
310- console . log (
311- `[Plugins] Loaded ${ packageName } @${ version } in ${ Date . now ( ) - pluginStart } ms` ,
310+ console . debug ( `[Plugins] Loaded ${ packageName } @${ version } in ${ Date . now ( ) - pluginStart } ms` ,
312311 ) ;
313312 }
314313 } catch ( err ) {
@@ -317,7 +316,7 @@ export const builtInPlugins = async (options: { context: PipelabContext }): Prom
317316 } ) ;
318317 await Promise . all ( loadPromises ) ;
319318
320- console . log ( `[Plugins] All startup plugins loaded in ${ Date . now ( ) - totalStart } ms.` ) ;
319+ console . log ( `\n [Plugins] All startup plugins loaded in ${ Date . now ( ) - totalStart } ms.\n ` ) ;
321320 sendStartupProgress ( "All plugins loaded." ) ;
322321 setTimeout ( ( ) => {
323322 webSocketServer . broadcast ( "startup:progress" , { type : "done" } ) ;
0 commit comments