MCPcopy Create free account
hub / github.com/firebase/firebase-tools / initializeContext

Function initializeContext

src/functionsShellCommandAction.ts:98–109  ·  view source on GitHub ↗
(context: any)

Source from the content-addressed store, hash-verified

96 }
97
98 const initializeContext = (context: any) => {
99 for (const trigger of emulator.triggers) {
100 if (emulator.emulatedFunctions.includes(trigger.id)) {
101 const localFunction = new LocalFunction(trigger, emulator.urls, emulator);
102 const triggerNameDotNotation = trigger.name.replace(/-/g, ".");
103 _.set(context, triggerNameDotNotation, localFunction.makeFn());
104 }
105 }
106 context.help =
107 "Instructions for the Functions Shell can be found at: " +
108 "https://firebase.google.com/docs/functions/local-emulator";
109 };
110
111 for (const e of runningEmulators) {
112 const info = remoteEmulators[e];

Callers 1

actionFunctionFunction · 0.70

Calls 2

makeFnMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…