Skip to content

Commit cea9ebe

Browse files
committed
Merge branch 'master' into launch.next
2 parents 5c3c3b7 + 3c5392d commit cea9ebe

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

spec/runtime/manifest.spec.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,36 @@ describe("stackToWire", () => {
77
params.clearParams();
88
});
99

10+
it("converts stack with null values values", () => {
11+
const stack: ManifestStack = {
12+
endpoints: {
13+
v2http: {
14+
platform: "gcfv2",
15+
entryPoint: "v2http",
16+
labels: {},
17+
httpsTrigger: {},
18+
maxInstances: null,
19+
},
20+
},
21+
requiredAPIs: [],
22+
specVersion: "v1alpha1",
23+
};
24+
const expected = {
25+
endpoints: {
26+
v2http: {
27+
platform: "gcfv2",
28+
entryPoint: "v2http",
29+
labels: {},
30+
httpsTrigger: {},
31+
maxInstances: null,
32+
},
33+
},
34+
requiredAPIs: [],
35+
specVersion: "v1alpha1",
36+
};
37+
expect(stackToWire(stack)).to.deep.equal(expected);
38+
});
39+
1040
it("converts Expression types in endpoint options to CEL", () => {
1141
const intParam = params.defineInt("foo", { default: 11 });
1242
const stringParam = params.defineString("bar", {

src/runtime/manifest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function stackToWire(stack: ManifestStack): Record<string, unknown> {
107107
for (const [key, val] of Object.entries(obj)) {
108108
if (val instanceof Expression) {
109109
obj[key] = val.toCEL();
110-
} else if (typeof val === "object") {
110+
} else if (typeof val === "object" && val !== null) {
111111
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
112112
traverse(val as any);
113113
}

src/v2/providers/alerts/appDistribution.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export interface NewTesterDevicePayload {
5050
/**
5151
* The internal payload object for receiving in-app feedback from a tester.
5252
* Payload is wrapped inside a `FirebaseAlertData` object.
53+
*
54+
* @alpha
5355
*/
5456
export interface InAppFeedbackPayload {
5557
["@type"]: "type.googleapis.com/google.events.firebase.firebasealerts.v1.AppDistroInAppFeedbackPayload";
@@ -258,6 +260,8 @@ export function onNewTesterIosDevicePublished(
258260
* Declares a function that can handle receiving new in-app feedback from a tester.
259261
* @param handler - Event handler which is run every time new feedback is received.
260262
* @returns A function that you can export and deploy.
263+
*
264+
* @alpha
261265
*/
262266
export function onInAppFeedbackPublished(
263267
handler: (event: AppDistributionEvent<InAppFeedbackPayload>) => any | Promise<any>
@@ -268,6 +272,8 @@ export function onInAppFeedbackPublished(
268272
* @param appId - A specific application the handler will trigger on.
269273
* @param handler - Event handler which is run every time new feedback is received.
270274
* @returns A function that you can export and deploy.
275+
*
276+
* @alpha
271277
*/
272278
export function onInAppFeedbackPublished(
273279
appId: string,
@@ -279,6 +285,8 @@ export function onInAppFeedbackPublished(
279285
* @param opts - Options that can be set on the function.
280286
* @param handler - Event handler which is run every time new feedback is received.
281287
* @returns A function that you can export and deploy.
288+
*
289+
* @alpha
282290
*/
283291
export function onInAppFeedbackPublished(
284292
opts: AppDistributionOptions,
@@ -290,6 +298,8 @@ export function onInAppFeedbackPublished(
290298
* @param appIdOrOptsOrHandler - A specific application, options, or an event-handling function.
291299
* @param handler - Event handler which is run every time new feedback is received.
292300
* @returns A function that you can export and deploy.
301+
*
302+
* @alpha
293303
*/
294304
export function onInAppFeedbackPublished(
295305
appIdOrOptsOrHandler:

0 commit comments

Comments
 (0)