Skip to content

Commit e88a15a

Browse files
authored
Moves most of https pacakge into /common/providers/https. (#915)
Moves most of https pacakge into /common/providers/https. The actual encoding/decoding/error logic etc. of callable functions will stay the same between v1 and v2, so they should be in a /common file. The rest of /v1 is about trigger options, cors, etc. onCall's CORS options are part of the v1 namespace because v2 adds a "cors" option to HttpsOptions. In the v2 API, we will default to `"cors": true`, but a customer could say `"cors": "my.firebase.app"` and we will respsect it. I wish there was a way to make this diff not so noisy. Most of this is cut & paste.
1 parent 5e7fb2c commit e88a15a

File tree

8 files changed

+1383
-1197
lines changed

8 files changed

+1383
-1197
lines changed

spec/common/providers/https.spec.ts

Lines changed: 551 additions & 0 deletions
Large diffs are not rendered by default.

spec/v1/function-builder.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ describe('FunctionBuilder', () => {
287287
);
288288
});
289289

290-
it('should not set a serviceAccountEmail if service account is set to `default`', () => {
290+
it('should set a null serviceAccountEmail if service account is set to `default`', () => {
291291
const serviceAccount = 'default';
292292
const fn = functions
293293
.runWith({
@@ -296,7 +296,7 @@ describe('FunctionBuilder', () => {
296296
.auth.user()
297297
.onCreate((user) => user);
298298

299-
expect(fn.__trigger.serviceAccountEmail).to.be.undefined;
299+
expect(fn.__trigger.serviceAccountEmail).to.be.null;
300300
});
301301

302302
it('should throw an error if serviceAccount is set to an invalid value', () => {

0 commit comments

Comments
 (0)