@@ -285,6 +285,30 @@ async function executepostSetup(projectDir: string, commands: PostSetupCommand[]
285
285
}
286
286
// Small grace delay after ready
287
287
await new Promise ( r => setTimeout ( r , 250 ) )
288
+
289
+ // If still not listening, wait a bit longer with additional probes instead of restarting
290
+ const readyAfterFirstPass = await new Promise < boolean > ( ( resolve ) => {
291
+ // eslint-disable-next-line ts/no-require-imports
292
+ const { spawn } = require ( 'node:child_process' )
293
+ const p = spawn ( pgIsReady , [ '-h' , host , '-p' , port ] , { stdio : 'ignore' } )
294
+ p . on ( 'close' , ( code : number ) => resolve ( code === 0 ) )
295
+ p . on ( 'error' , ( ) => resolve ( false ) )
296
+ } )
297
+ if ( ! readyAfterFirstPass ) {
298
+ for ( let i = 0 ; i < 12 ; i ++ ) {
299
+ const ok = await new Promise < boolean > ( ( resolve ) => {
300
+ // eslint-disable-next-line ts/no-require-imports
301
+ const { spawn } = require ( 'node:child_process' )
302
+ const p = spawn ( pgIsReady , [ '-h' , host , '-p' , port ] , { stdio : 'ignore' } )
303
+ p . on ( 'close' , ( code : number ) => resolve ( code === 0 ) )
304
+ p . on ( 'error' , ( ) => resolve ( false ) )
305
+ } )
306
+ if ( ok )
307
+ break
308
+ await new Promise ( r => setTimeout ( r , Math . min ( 750 + i * 250 , 3000 ) ) )
309
+ }
310
+ await new Promise ( r => setTimeout ( r , 250 ) )
311
+ }
288
312
}
289
313
catch { }
290
314
}
@@ -815,10 +839,20 @@ export async function dump(dir: string, options: DumpOptions = {}): Promise<void
815
839
// Regular path for non-shell integration calls
816
840
if ( localPackages . length > 0 || globalPackages . length > 0 ) {
817
841
await installPackagesOptimized ( localPackages , globalPackages , envDir , globalEnvDir , dryrun , quiet )
842
+ // Visual separator after dependency install list
843
+ try { console . log ( ) }
844
+ catch { }
818
845
}
819
846
820
847
// Auto-start services for any project that has services configuration
848
+ // Suppress interstitial processing messages during service startup phase
849
+ const prevProcessing = process . env . LAUNCHPAD_PROCESSING
850
+ process . env . LAUNCHPAD_PROCESSING = '0'
821
851
await setupProjectServices ( projectDir , sniffResult , ! effectiveQuiet )
852
+ if ( prevProcessing === undefined )
853
+ delete process . env . LAUNCHPAD_PROCESSING
854
+ else
855
+ process . env . LAUNCHPAD_PROCESSING = prevProcessing
822
856
823
857
// Ensure php.ini and Laravel post-setup runs (regular path)
824
858
await ensureProjectPhpIni ( projectDir , envDir )
@@ -845,9 +879,12 @@ export async function dump(dir: string, options: DumpOptions = {}): Promise<void
845
879
846
880
outputShellCode ( dir , envBinPath , envSbinPath , projectHash , sniffResult , globalBinPath , globalSbinPath )
847
881
}
848
- else if ( ! effectiveQuiet ) {
849
- // Final success summary for non-shell runs (used by tests)
850
- console . log ( 'Successfully set up environment' )
882
+ else {
883
+ // Always print a final activation message, even in quiet mode
884
+ const { config } = await import ( '../config' )
885
+ const activation = ( config . shellActivationMessage || '✅ Environment activated for {path}' )
886
+ . replace ( '{path}' , process . cwd ( ) )
887
+ console . log ( activation )
851
888
}
852
889
}
853
890
catch ( error ) {
@@ -1384,9 +1421,8 @@ async function setupProjectServices(projectDir: string, sniffResult: any, showMe
1384
1421
1385
1422
// Special handling for PostgreSQL: wait for readiness and create project database
1386
1423
if ( ( serviceName === 'postgres' || serviceName === 'postgresql' ) && hasPostgresInDeps ) {
1387
- if ( showMessages ) {
1424
+ if ( showMessages )
1388
1425
console . log ( '⏳ Verifying PostgreSQL readiness...' )
1389
- }
1390
1426
// Ensure postgres is actually accepting connections
1391
1427
try {
1392
1428
const { findBinaryInPath } = await import ( '../utils' )
@@ -1407,9 +1443,8 @@ async function setupProjectServices(projectDir: string, sniffResult: any, showMe
1407
1443
}
1408
1444
catch { }
1409
1445
1410
- if ( showMessages ) {
1446
+ if ( showMessages )
1411
1447
console . log ( '🔧 Creating project PostgreSQL database...' )
1412
- }
1413
1448
const projectName = path . basename ( projectDir ) . replace ( / \W / g, '_' )
1414
1449
try {
1415
1450
await createProjectDatabase ( projectName , {
0 commit comments