firebase-functions 6.3.0 → 6.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -572,7 +572,8 @@ function wrapOnCallHandler(options, handler, version) {
|
|
|
572
572
|
const { status } = httpErr.httpErrorCode;
|
|
573
573
|
const body = { error: httpErr.toJSON() };
|
|
574
574
|
if (version === "gcfv2" && req.header("accept") === "text/event-stream") {
|
|
575
|
-
res.
|
|
575
|
+
res.write(encodeSSE(body));
|
|
576
|
+
res.end();
|
|
576
577
|
}
|
|
577
578
|
else {
|
|
578
579
|
res.status(status).send(body);
|
|
@@ -140,6 +140,8 @@ export interface CallableOptions<T = any> extends HttpsOptions {
|
|
|
140
140
|
*/
|
|
141
141
|
heartbeatSeconds?: number | null;
|
|
142
142
|
/**
|
|
143
|
+
* @deprecated
|
|
144
|
+
*
|
|
143
145
|
* Callback for whether a request is authorized.
|
|
144
146
|
*
|
|
145
147
|
* Designed to allow reusable auth policies to be passed as an options object. Two built-in reusable policies exist:
|
|
@@ -148,10 +150,14 @@ export interface CallableOptions<T = any> extends HttpsOptions {
|
|
|
148
150
|
authPolicy?: (auth: AuthData | null, data: T) => boolean | Promise<boolean>;
|
|
149
151
|
}
|
|
150
152
|
/**
|
|
153
|
+
* @deprecated
|
|
154
|
+
*
|
|
151
155
|
* An auth policy that requires a user to be signed in.
|
|
152
156
|
*/
|
|
153
157
|
export declare const isSignedIn: () => (auth: AuthData | null) => boolean;
|
|
154
158
|
/**
|
|
159
|
+
* @deprecated
|
|
160
|
+
*
|
|
155
161
|
* An auth policy that requires a user to be both signed in and have a specific claim (optionally with a specific value)
|
|
156
162
|
*/
|
|
157
163
|
export declare const hasClaim: (claim: string, value?: string) => (auth: AuthData | null) => boolean;
|
|
@@ -37,11 +37,15 @@ const options = require("../options");
|
|
|
37
37
|
const onInit_1 = require("../../common/onInit");
|
|
38
38
|
const logger = require("../../logger");
|
|
39
39
|
/**
|
|
40
|
+
* @deprecated
|
|
41
|
+
*
|
|
40
42
|
* An auth policy that requires a user to be signed in.
|
|
41
43
|
*/
|
|
42
44
|
const isSignedIn = () => (auth) => !!auth;
|
|
43
45
|
exports.isSignedIn = isSignedIn;
|
|
44
46
|
/**
|
|
47
|
+
* @deprecated
|
|
48
|
+
*
|
|
45
49
|
* An auth policy that requires a user to be both signed in and have a specific claim (optionally with a specific value)
|
|
46
50
|
*/
|
|
47
51
|
const hasClaim = (claim, value) => (auth) => {
|