Skip to content

Commit cdd1221

Browse files
committed
Run formatter
1 parent a5108a6 commit cdd1221

File tree

5 files changed

+28
-9
lines changed

5 files changed

+28
-9
lines changed

e2e/sample-apps/modular.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,24 @@ async function callFunctions(app) {
127127
if (e.message.includes('Unauthenticated')) {
128128
console.warn(
129129
'Functions blocked by App Check. ' +
130-
'Activate app check with a live sitekey to allow Functions calls'
130+
'Activate app check with a live sitekey to allow Functions calls'
131131
);
132132
} else {
133133
throw e;
134134
}
135135
}
136-
callTest = httpsCallableByUrl(functions, `https://us-central-${app.options.projectId}.cloudfunctions.net/callTest`);
136+
callTest = httpsCallableByUrl(
137+
functions,
138+
`https://us-central-${app.options.projectId}.cloudfunctions.net/callTest`
139+
);
137140
try {
138141
const result = await callTest({ data: 'blah' });
139142
console.log('[FUNCTIONS] result (by URL):', result.data);
140143
} catch (e) {
141144
if (e.message.includes('Unauthenticated')) {
142145
console.warn(
143146
'Functions blocked by App Check. ' +
144-
'Activate app check with a live sitekey to allow Functions calls'
147+
'Activate app check with a live sitekey to allow Functions calls'
145148
);
146149
} else {
147150
throw e;

e2e/tests/modular.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ import {
6565
Firestore,
6666
initializeFirestore
6767
} from 'firebase/firestore';
68-
import { Functions, getFunctions, httpsCallable, httpsCallableFromURL } from 'firebase/functions';
68+
import {
69+
Functions,
70+
getFunctions,
71+
httpsCallable,
72+
httpsCallableFromURL
73+
} from 'firebase/functions';
6974
import { getMessaging } from 'firebase/messaging';
7075
import {
7176
FirebasePerformance,
@@ -147,7 +152,7 @@ describe('MODULAR', () => {
147152
it('httpsCallableFromURL()', async () => {
148153
const callTest = httpsCallableFromURL<{ data: string }, { word: string }>(
149154
functions,
150-
`https://us-central1-${app.options.projectId}.cloudfunctions.net/callTest`,
155+
`https://us-central1-${app.options.projectId}.cloudfunctions.net/callTest`
151156
);
152157
const result = await callTest({ data: 'blah' });
153158
expect(result.data.word).to.equal('hellooo');

packages/functions-compat/src/service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ export class FunctionsService implements FirebaseFunctions, _FirebaseService {
4848
httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable {
4949
return httpsCallableExp(this._delegate, name, options);
5050
}
51-
httpsCallableFromURL(url: string, options?: HttpsCallableOptions): HttpsCallable {
51+
httpsCallableFromURL(
52+
url: string,
53+
options?: HttpsCallableOptions
54+
): HttpsCallable {
5255
return httpsCallableFromURLExp(this._delegate, url, options);
5356
}
5457
/**

packages/functions/src/api.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ export function httpsCallable<RequestData = unknown, ResponseData = unknown>(
9797
* @param url - The url of the trigger.
9898
* @public
9999
*/
100-
export function httpsCallableFromURL<RequestData = unknown, ResponseData = unknown>(
100+
export function httpsCallableFromURL<
101+
RequestData = unknown,
102+
ResponseData = unknown
103+
>(
101104
functionsInstance: Functions,
102105
url: string,
103106
options?: HttpsCallableOptions
@@ -107,4 +110,4 @@ export function httpsCallableFromURL<RequestData = unknown, ResponseData = unkno
107110
url,
108111
options
109112
);
110-
}
113+
}

packages/functions/src/service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,12 @@ export function httpsCallableFromURL<RequestData, ResponseData>(
211211
options?: HttpsCallableOptions
212212
): HttpsCallable<RequestData, ResponseData> {
213213
return (data => {
214-
return callAtURL(functionsInstance, functionsInstance._emulatorUrlOr(url), data, options || {});
214+
return callAtURL(
215+
functionsInstance,
216+
functionsInstance._emulatorUrlOr(url),
217+
data,
218+
options || {}
219+
);
215220
}) as HttpsCallable<RequestData, ResponseData>;
216221
}
217222

0 commit comments

Comments
 (0)