Skip to content

Commit

Permalink
Make sure emulator success log message always shows (#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
samtstern committed May 7, 2019
1 parent 71c2b23 commit ccbae38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ fixed - Fixes issue where functions for unsupported services caused a ReferenceE
fixed - Fixes issue where headers and response codes for HTTP functions were lost.
fixed - Fixes issue where firebase serve does not properly start the Functions emulator.
fixed - Adds a devDependency on firebase-functions-test to the default functions init template to prevent emulator issues.
fixed - Adds a log message when emulators have successfully started.
4 changes: 0 additions & 4 deletions src/emulator/emulatorServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ export class EmulatorServer {

const name = this.instance.getName();
const info = this.instance.getInfo();
utils.logLabeledSuccess(
name,
`Emulator running at ${clc.bold.underline("http://" + info.host + ":" + info.port)}`
);
}

async connect(): Promise<void> {
Expand Down
9 changes: 9 additions & 0 deletions src/emulator/registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import * as clc from "cli-color";

import { ALL_EMULATORS, EmulatorInstance, Emulators } from "./types";
import * as FirebaseError from "../error";
import * as utils from "../utils";

/**
* Static registry for running emulators to discover each other.
Expand All @@ -15,6 +18,12 @@ export class EmulatorRegistry {

await instance.start();
this.set(instance.getName(), instance);

const info = instance.getInfo();
utils.logLabeledSuccess(
instance.getName(),
`Emulator started at ${clc.bold.underline(`http://${info.host}:${info.port}`)}`
);
}

static async stop(name: Emulators): Promise<void> {
Expand Down

0 comments on commit ccbae38

Please sign in to comment.