@@ -327,19 +327,23 @@ export async function startAll(options: any, showUI: boolean = true): Promise<vo
327
327
const targets = filterEmulatorTargets ( options ) ;
328
328
options . targets = targets ;
329
329
330
- const projectId : string | undefined = getProjectId ( options , true ) ;
331
-
332
330
if ( targets . length === 0 ) {
333
331
throw new FirebaseError (
334
332
`No emulators to start, run ${ clc . bold ( "firebase init emulators" ) } to get started.`
335
333
) ;
336
334
}
335
+ const hubLogger = EmulatorLogger . forEmulator ( Emulators . HUB ) ;
336
+ hubLogger . logLabeled ( "BULLET" , "emulators" , `Starting emulators: ${ targets . join ( ", " ) } ` ) ;
337
+
338
+ const projectId : string | undefined = getProjectId ( options , true ) ;
339
+ if ( Constants . isDemoProject ( projectId ) ) {
340
+ hubLogger . logLabeled (
341
+ "BULLET" ,
342
+ "emulators" ,
343
+ `Detected demo project ID "${ projectId } ", emulated services will use a demo configuration and attempts to access non-emulated services for this project will fail.`
344
+ ) ;
345
+ }
337
346
338
- EmulatorLogger . forEmulator ( Emulators . HUB ) . logLabeled (
339
- "BULLET" ,
340
- "emulators" ,
341
- `Starting emulators: ${ targets . join ( ", " ) } `
342
- ) ;
343
347
const onlyOptions : string = options . only ;
344
348
if ( onlyOptions ) {
345
349
const requested : string [ ] = onlyOptions . split ( "," ) . map ( ( o ) => {
@@ -385,7 +389,7 @@ export async function startAll(options: any, showUI: boolean = true): Promise<vo
385
389
if ( foundMetadata ) {
386
390
exportMetadata = foundMetadata ;
387
391
} else {
388
- EmulatorLogger . forEmulator ( Emulators . HUB ) . logLabeled (
392
+ hubLogger . logLabeled (
389
393
"WARN" ,
390
394
"emulators" ,
391
395
`Could not find import/export metadata file, ${ clc . bold ( "skipping data import!" ) } `
@@ -418,7 +422,7 @@ export async function startAll(options: any, showUI: boolean = true): Promise<vo
418
422
const emulatorsNotRunning = ALL_SERVICE_EMULATORS . filter ( ( e ) => {
419
423
return e !== Emulators . FUNCTIONS && ! shouldStart ( options , e ) ;
420
424
} ) ;
421
- if ( emulatorsNotRunning . length > 0 ) {
425
+ if ( emulatorsNotRunning . length > 0 && ! Constants . isDemoProject ( projectId ) ) {
422
426
functionsLogger . logLabeled (
423
427
"WARN" ,
424
428
"functions" ,
@@ -652,7 +656,7 @@ export async function startAll(options: any, showUI: boolean = true): Promise<vo
652
656
}
653
657
654
658
if ( showUI && ! shouldStart ( options , Emulators . UI ) ) {
655
- EmulatorLogger . forEmulator ( Emulators . HUB ) . logLabeled (
659
+ hubLogger . logLabeled (
656
660
"WARN" ,
657
661
"emulators" ,
658
662
"The Emulator UI requires a project ID to start. Configure your default project with 'firebase use' or pass the --project flag."
0 commit comments