firebase-admin 10.2.0 → 11.0.1
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.
- package/README.md +1 -1
- package/lib/app/core.d.ts +1 -1
- package/lib/app/core.js +1 -1
- package/lib/app/credential-factory.d.ts +1 -1
- package/lib/app/credential-factory.js +8 -8
- package/lib/app/credential-internal.d.ts +7 -1
- package/lib/app/credential-internal.js +120 -106
- package/lib/app/credential.d.ts +1 -1
- package/lib/app/credential.js +1 -1
- package/lib/app/firebase-app.d.ts +1 -1
- package/lib/app/firebase-app.js +76 -91
- package/lib/app/firebase-namespace.d.ts +1 -1
- package/lib/app/firebase-namespace.js +209 -279
- package/lib/app/index.d.ts +1 -1
- package/lib/app/index.js +4 -4
- package/lib/app/lifecycle.d.ts +1 -1
- package/lib/app/lifecycle.js +37 -43
- package/lib/app-check/app-check-api-client-internal.d.ts +1 -1
- package/lib/app-check/app-check-api-client-internal.js +54 -73
- package/lib/app-check/app-check-api.d.ts +1 -1
- package/lib/app-check/app-check-api.js +1 -1
- package/lib/app-check/app-check-namespace.d.ts +1 -1
- package/lib/app-check/app-check-namespace.js +1 -1
- package/lib/app-check/app-check.d.ts +1 -1
- package/lib/app-check/app-check.js +17 -19
- package/lib/app-check/index.d.ts +1 -1
- package/lib/app-check/index.js +7 -7
- package/lib/app-check/token-generator.d.ts +1 -1
- package/lib/app-check/token-generator.js +47 -52
- package/lib/app-check/token-verifier.d.ts +1 -1
- package/lib/app-check/token-verifier.js +46 -50
- package/lib/auth/action-code-settings-builder.d.ts +1 -1
- package/lib/auth/action-code-settings-builder.js +10 -11
- package/lib/auth/auth-api-request.d.ts +1 -1
- package/lib/auth/auth-api-request.js +346 -393
- package/lib/auth/auth-config.d.ts +1 -1
- package/lib/auth/auth-config.js +95 -106
- package/lib/auth/auth-namespace.d.ts +1 -1
- package/lib/auth/auth-namespace.js +1 -1
- package/lib/auth/auth.d.ts +1 -1
- package/lib/auth/auth.js +20 -40
- package/lib/auth/base-auth.d.ts +1 -1
- package/lib/auth/base-auth.js +137 -144
- package/lib/auth/identifier.d.ts +1 -1
- package/lib/auth/identifier.js +2 -2
- package/lib/auth/index.d.ts +1 -1
- package/lib/auth/index.js +7 -7
- package/lib/auth/tenant-manager.d.ts +1 -1
- package/lib/auth/tenant-manager.js +49 -71
- package/lib/auth/tenant.d.ts +1 -1
- package/lib/auth/tenant.js +44 -55
- package/lib/auth/token-generator.d.ts +1 -1
- package/lib/auth/token-generator.js +49 -53
- package/lib/auth/token-verifier.d.ts +1 -1
- package/lib/auth/token-verifier.js +83 -91
- package/lib/auth/user-import-builder.d.ts +1 -1
- package/lib/auth/user-import-builder.js +70 -73
- package/lib/auth/user-record.d.ts +1 -1
- package/lib/auth/user-record.js +62 -84
- package/lib/credential/index.d.ts +1 -1
- package/lib/credential/index.js +2 -2
- package/lib/database/database-namespace.d.ts +1 -1
- package/lib/database/database-namespace.js +1 -1
- package/lib/database/database.d.ts +1 -1
- package/lib/database/database.js +92 -108
- package/lib/database/index.d.ts +1 -1
- package/lib/database/index.js +10 -10
- package/lib/default-namespace.d.ts +1 -1
- package/lib/default-namespace.js +2 -2
- package/lib/eventarc/cloudevent.d.ts +1 -1
- package/lib/eventarc/cloudevent.js +1 -1
- package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
- package/lib/eventarc/eventarc-client-internal.js +63 -129
- package/lib/eventarc/eventarc-utils.d.ts +1 -1
- package/lib/eventarc/eventarc-utils.js +16 -32
- package/lib/eventarc/eventarc.d.ts +1 -1
- package/lib/eventarc/eventarc.js +51 -65
- package/lib/eventarc/index.d.ts +1 -1
- package/lib/eventarc/index.js +7 -7
- package/lib/firebase-namespace-api.d.ts +1 -1
- package/lib/firebase-namespace-api.js +8 -3
- package/lib/firestore/firestore-internal.d.ts +1 -1
- package/lib/firestore/firestore-internal.js +28 -37
- package/lib/firestore/firestore-namespace.d.ts +9 -1
- package/lib/firestore/firestore-namespace.js +2 -2
- package/lib/firestore/index.d.ts +2 -2
- package/lib/firestore/index.js +7 -7
- package/lib/functions/functions-api-client-internal.d.ts +19 -1
- package/lib/functions/functions-api-client-internal.js +83 -103
- package/lib/functions/functions-api.d.ts +1 -1
- package/lib/functions/functions-api.js +1 -1
- package/lib/functions/functions.d.ts +1 -1
- package/lib/functions/functions.js +13 -15
- package/lib/functions/index.d.ts +1 -1
- package/lib/functions/index.js +7 -7
- package/lib/index.d.ts +1 -1
- package/lib/index.js +14 -4
- package/lib/installations/index.d.ts +1 -1
- package/lib/installations/index.js +6 -6
- package/lib/installations/installations-namespace.d.ts +1 -1
- package/lib/installations/installations-namespace.js +1 -1
- package/lib/installations/installations-request-handler.d.ts +1 -1
- package/lib/installations/installations-request-handler.js +33 -36
- package/lib/installations/installations.d.ts +1 -1
- package/lib/installations/installations.js +17 -22
- package/lib/instance-id/index.d.ts +1 -1
- package/lib/instance-id/index.js +6 -6
- package/lib/instance-id/instance-id-namespace.d.ts +1 -1
- package/lib/instance-id/instance-id-namespace.js +1 -1
- package/lib/instance-id/instance-id.d.ts +1 -1
- package/lib/instance-id/instance-id.js +21 -26
- package/lib/machine-learning/index.d.ts +1 -1
- package/lib/machine-learning/index.js +7 -7
- package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
- package/lib/machine-learning/machine-learning-api-client.js +110 -124
- package/lib/machine-learning/machine-learning-namespace.d.ts +1 -1
- package/lib/machine-learning/machine-learning-namespace.js +1 -1
- package/lib/machine-learning/machine-learning-utils.d.ts +1 -1
- package/lib/machine-learning/machine-learning-utils.js +9 -24
- package/lib/machine-learning/machine-learning.d.ts +1 -1
- package/lib/machine-learning/machine-learning.js +146 -207
- package/lib/messaging/batch-request-internal.d.ts +1 -1
- package/lib/messaging/batch-request-internal.js +33 -35
- package/lib/messaging/index.d.ts +1 -1
- package/lib/messaging/index.js +7 -7
- package/lib/messaging/messaging-api-request-internal.d.ts +1 -1
- package/lib/messaging/messaging-api-request-internal.js +38 -40
- package/lib/messaging/messaging-api.d.ts +1 -1
- package/lib/messaging/messaging-api.js +1 -1
- package/lib/messaging/messaging-errors-internal.d.ts +1 -1
- package/lib/messaging/messaging-errors-internal.js +12 -13
- package/lib/messaging/messaging-internal.d.ts +1 -1
- package/lib/messaging/messaging-internal.js +51 -51
- package/lib/messaging/messaging-namespace.d.ts +1 -1
- package/lib/messaging/messaging-namespace.js +1 -1
- package/lib/messaging/messaging.d.ts +1 -1
- package/lib/messaging/messaging.js +184 -208
- package/lib/project-management/android-app.d.ts +1 -1
- package/lib/project-management/android-app.js +41 -43
- package/lib/project-management/app-metadata.d.ts +1 -1
- package/lib/project-management/app-metadata.js +1 -1
- package/lib/project-management/index.d.ts +1 -1
- package/lib/project-management/index.js +7 -7
- package/lib/project-management/ios-app.d.ts +1 -1
- package/lib/project-management/ios-app.js +25 -26
- package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
- package/lib/project-management/project-management-api-request-internal.js +84 -89
- package/lib/project-management/project-management-namespace.d.ts +1 -1
- package/lib/project-management/project-management-namespace.js +1 -1
- package/lib/project-management/project-management.d.ts +1 -1
- package/lib/project-management/project-management.js +80 -87
- package/lib/remote-config/index.d.ts +1 -1
- package/lib/remote-config/index.js +7 -7
- package/lib/remote-config/remote-config-api-client-internal.d.ts +1 -1
- package/lib/remote-config/remote-config-api-client-internal.js +116 -154
- package/lib/remote-config/remote-config-api.d.ts +1 -1
- package/lib/remote-config/remote-config-api.js +1 -1
- package/lib/remote-config/remote-config-namespace.d.ts +1 -1
- package/lib/remote-config/remote-config-namespace.js +1 -1
- package/lib/remote-config/remote-config.d.ts +1 -1
- package/lib/remote-config/remote-config.js +51 -59
- package/lib/security-rules/index.d.ts +1 -1
- package/lib/security-rules/index.js +7 -7
- package/lib/security-rules/security-rules-api-client-internal.d.ts +3 -1
- package/lib/security-rules/security-rules-api-client-internal.js +118 -107
- package/lib/security-rules/security-rules-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-internal.js +6 -21
- package/lib/security-rules/security-rules-namespace.d.ts +1 -1
- package/lib/security-rules/security-rules-namespace.js +1 -1
- package/lib/security-rules/security-rules.d.ts +1 -1
- package/lib/security-rules/security-rules.js +83 -92
- package/lib/storage/index.d.ts +1 -1
- package/lib/storage/index.js +7 -7
- package/lib/storage/storage-namespace.d.ts +1 -1
- package/lib/storage/storage-namespace.js +1 -1
- package/lib/storage/storage.d.ts +1 -1
- package/lib/storage/storage.js +25 -30
- package/lib/utils/api-request.d.ts +3 -1
- package/lib/utils/api-request.js +278 -356
- package/lib/utils/crypto-signer.d.ts +1 -1
- package/lib/utils/crypto-signer.js +58 -93
- package/lib/utils/deep-copy.d.ts +1 -1
- package/lib/utils/deep-copy.js +3 -3
- package/lib/utils/error.d.ts +1 -1
- package/lib/utils/error.js +611 -681
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +38 -43
- package/lib/utils/jwt.d.ts +1 -1
- package/lib/utils/jwt.js +97 -123
- package/lib/utils/validator.d.ts +1 -1
- package/lib/utils/validator.js +13 -13
- package/package.json +25 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v11.0.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -16,36 +16,23 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
var __extends = (this && this.__extends) || (function () {
|
|
20
|
-
var extendStatics = function (d, b) {
|
|
21
|
-
extendStatics = Object.setPrototypeOf ||
|
|
22
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
24
|
-
return extendStatics(d, b);
|
|
25
|
-
};
|
|
26
|
-
return function (d, b) {
|
|
27
|
-
extendStatics(d, b);
|
|
28
|
-
function __() { this.constructor = d; }
|
|
29
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
-
};
|
|
31
|
-
})();
|
|
32
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
20
|
exports.CryptoSignerErrorCode = exports.CryptoSignerError = exports.cryptoSignerFromApp = exports.IAMSigner = exports.ServiceAccountSigner = void 0;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
const credential_internal_1 = require("../app/credential-internal");
|
|
22
|
+
const api_request_1 = require("./api-request");
|
|
23
|
+
const validator = require("../utils/validator");
|
|
24
|
+
const ALGORITHM_RS256 = 'RS256';
|
|
38
25
|
/**
|
|
39
26
|
* A CryptoSigner implementation that uses an explicitly specified service account private key to
|
|
40
27
|
* sign data. Performs all operations locally, and does not make any RPC calls.
|
|
41
28
|
*/
|
|
42
|
-
|
|
29
|
+
class ServiceAccountSigner {
|
|
43
30
|
/**
|
|
44
31
|
* Creates a new CryptoSigner instance from the given service account credential.
|
|
45
32
|
*
|
|
46
33
|
* @param credential - A service account credential.
|
|
47
34
|
*/
|
|
48
|
-
|
|
35
|
+
constructor(credential) {
|
|
49
36
|
this.credential = credential;
|
|
50
37
|
this.algorithm = ALGORITHM_RS256;
|
|
51
38
|
if (!credential) {
|
|
@@ -58,20 +45,19 @@ var ServiceAccountSigner = /** @class */ (function () {
|
|
|
58
45
|
/**
|
|
59
46
|
* @inheritDoc
|
|
60
47
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
sign(buffer) {
|
|
49
|
+
const crypto = require('crypto'); // eslint-disable-line @typescript-eslint/no-var-requires
|
|
50
|
+
const sign = crypto.createSign('RSA-SHA256');
|
|
64
51
|
sign.update(buffer);
|
|
65
52
|
return Promise.resolve(sign.sign(this.credential.privateKey));
|
|
66
|
-
}
|
|
53
|
+
}
|
|
67
54
|
/**
|
|
68
55
|
* @inheritDoc
|
|
69
56
|
*/
|
|
70
|
-
|
|
57
|
+
getAccountId() {
|
|
71
58
|
return Promise.resolve(this.credential.clientEmail);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
}());
|
|
59
|
+
}
|
|
60
|
+
}
|
|
75
61
|
exports.ServiceAccountSigner = ServiceAccountSigner;
|
|
76
62
|
/**
|
|
77
63
|
* A CryptoSigner implementation that uses the remote IAM service to sign data. If initialized without
|
|
@@ -81,8 +67,8 @@ exports.ServiceAccountSigner = ServiceAccountSigner;
|
|
|
81
67
|
* @see https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/signBlob
|
|
82
68
|
* @see https://cloud.google.com/compute/docs/storing-retrieving-metadata
|
|
83
69
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
70
|
+
class IAMSigner {
|
|
71
|
+
constructor(httpClient, serviceAccountId) {
|
|
86
72
|
this.algorithm = ALGORITHM_RS256;
|
|
87
73
|
if (!httpClient) {
|
|
88
74
|
throw new CryptoSignerError({
|
|
@@ -102,19 +88,18 @@ var IAMSigner = /** @class */ (function () {
|
|
|
102
88
|
/**
|
|
103
89
|
* @inheritDoc
|
|
104
90
|
*/
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var request = {
|
|
91
|
+
sign(buffer) {
|
|
92
|
+
return this.getAccountId().then((serviceAccount) => {
|
|
93
|
+
const request = {
|
|
109
94
|
method: 'POST',
|
|
110
|
-
url:
|
|
95
|
+
url: `https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/${serviceAccount}:signBlob`,
|
|
111
96
|
data: { payload: buffer.toString('base64') },
|
|
112
97
|
};
|
|
113
|
-
return
|
|
114
|
-
}).then(
|
|
98
|
+
return this.httpClient.send(request);
|
|
99
|
+
}).then((response) => {
|
|
115
100
|
// Response from IAM is base64 encoded. Decode it into a buffer and return.
|
|
116
101
|
return Buffer.from(response.data.signedBlob, 'base64');
|
|
117
|
-
}).catch(
|
|
102
|
+
}).catch((err) => {
|
|
118
103
|
if (err instanceof api_request_1.HttpError) {
|
|
119
104
|
throw new CryptoSignerError({
|
|
120
105
|
code: CryptoSignerErrorCode.SERVER_ERROR,
|
|
@@ -124,43 +109,41 @@ var IAMSigner = /** @class */ (function () {
|
|
|
124
109
|
}
|
|
125
110
|
throw err;
|
|
126
111
|
});
|
|
127
|
-
}
|
|
112
|
+
}
|
|
128
113
|
/**
|
|
129
114
|
* @inheritDoc
|
|
130
115
|
*/
|
|
131
|
-
|
|
132
|
-
var _this = this;
|
|
116
|
+
getAccountId() {
|
|
133
117
|
if (validator.isNonEmptyString(this.serviceAccountId)) {
|
|
134
118
|
return Promise.resolve(this.serviceAccountId);
|
|
135
119
|
}
|
|
136
|
-
|
|
120
|
+
const request = {
|
|
137
121
|
method: 'GET',
|
|
138
122
|
url: 'http://metadata/computeMetadata/v1/instance/service-accounts/default/email',
|
|
139
123
|
headers: {
|
|
140
124
|
'Metadata-Flavor': 'Google',
|
|
141
125
|
},
|
|
142
126
|
};
|
|
143
|
-
|
|
144
|
-
return client.send(request).then(
|
|
127
|
+
const client = new api_request_1.HttpClient();
|
|
128
|
+
return client.send(request).then((response) => {
|
|
145
129
|
if (!response.text) {
|
|
146
130
|
throw new CryptoSignerError({
|
|
147
131
|
code: CryptoSignerErrorCode.INTERNAL_ERROR,
|
|
148
132
|
message: 'HTTP Response missing payload',
|
|
149
133
|
});
|
|
150
134
|
}
|
|
151
|
-
|
|
135
|
+
this.serviceAccountId = response.text;
|
|
152
136
|
return response.text;
|
|
153
|
-
}).catch(
|
|
137
|
+
}).catch((err) => {
|
|
154
138
|
throw new CryptoSignerError({
|
|
155
139
|
code: CryptoSignerErrorCode.INVALID_CREDENTIAL,
|
|
156
140
|
message: 'Failed to determine service account. Make sure to initialize ' +
|
|
157
141
|
'the SDK with a service account credential. Alternatively specify a service ' +
|
|
158
|
-
|
|
142
|
+
`account with iam.serviceAccounts.signBlob permission. Original error: ${err}`,
|
|
159
143
|
});
|
|
160
144
|
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
}());
|
|
145
|
+
}
|
|
146
|
+
}
|
|
164
147
|
exports.IAMSigner = IAMSigner;
|
|
165
148
|
/**
|
|
166
149
|
* Creates a new CryptoSigner instance for the given app. If the app has been initialized with a
|
|
@@ -170,7 +153,7 @@ exports.IAMSigner = IAMSigner;
|
|
|
170
153
|
* @returns A CryptoSigner instance.
|
|
171
154
|
*/
|
|
172
155
|
function cryptoSignerFromApp(app) {
|
|
173
|
-
|
|
156
|
+
const credential = app.options.credential;
|
|
174
157
|
if (credential instanceof credential_internal_1.ServiceAccountCredential) {
|
|
175
158
|
return new ServiceAccountSigner(credential);
|
|
176
159
|
}
|
|
@@ -183,55 +166,37 @@ exports.cryptoSignerFromApp = cryptoSignerFromApp;
|
|
|
183
166
|
* @param errorInfo - The error information (code and message).
|
|
184
167
|
* @constructor
|
|
185
168
|
*/
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
_this.errorInfo = errorInfo;
|
|
169
|
+
class CryptoSignerError extends Error {
|
|
170
|
+
constructor(errorInfo) {
|
|
171
|
+
super(errorInfo.message);
|
|
172
|
+
this.errorInfo = errorInfo;
|
|
191
173
|
/* tslint:disable:max-line-length */
|
|
192
174
|
// Set the prototype explicitly. See the following link for more details:
|
|
193
175
|
// https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
194
176
|
/* tslint:enable:max-line-length */
|
|
195
|
-
|
|
196
|
-
return _this;
|
|
177
|
+
this.__proto__ = CryptoSignerError.prototype;
|
|
197
178
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
enumerable: false,
|
|
212
|
-
configurable: true
|
|
213
|
-
});
|
|
214
|
-
Object.defineProperty(CryptoSignerError.prototype, "cause", {
|
|
215
|
-
/** @returns The error data. */
|
|
216
|
-
get: function () {
|
|
217
|
-
return this.errorInfo.cause;
|
|
218
|
-
},
|
|
219
|
-
enumerable: false,
|
|
220
|
-
configurable: true
|
|
221
|
-
});
|
|
222
|
-
return CryptoSignerError;
|
|
223
|
-
}(Error));
|
|
179
|
+
/** @returns The error code. */
|
|
180
|
+
get code() {
|
|
181
|
+
return this.errorInfo.code;
|
|
182
|
+
}
|
|
183
|
+
/** @returns The error message. */
|
|
184
|
+
get message() {
|
|
185
|
+
return this.errorInfo.message;
|
|
186
|
+
}
|
|
187
|
+
/** @returns The error data. */
|
|
188
|
+
get cause() {
|
|
189
|
+
return this.errorInfo.cause;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
224
192
|
exports.CryptoSignerError = CryptoSignerError;
|
|
225
193
|
/**
|
|
226
194
|
* Crypto Signer error codes and their default messages.
|
|
227
195
|
*/
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
CryptoSignerErrorCode.INVALID_ARGUMENT = 'invalid-argument';
|
|
232
|
-
CryptoSignerErrorCode.INTERNAL_ERROR = 'internal-error';
|
|
233
|
-
CryptoSignerErrorCode.INVALID_CREDENTIAL = 'invalid-credential';
|
|
234
|
-
CryptoSignerErrorCode.SERVER_ERROR = 'server-error';
|
|
235
|
-
return CryptoSignerErrorCode;
|
|
236
|
-
}());
|
|
196
|
+
class CryptoSignerErrorCode {
|
|
197
|
+
}
|
|
237
198
|
exports.CryptoSignerErrorCode = CryptoSignerErrorCode;
|
|
199
|
+
CryptoSignerErrorCode.INVALID_ARGUMENT = 'invalid-argument';
|
|
200
|
+
CryptoSignerErrorCode.INTERNAL_ERROR = 'internal-error';
|
|
201
|
+
CryptoSignerErrorCode.INVALID_CREDENTIAL = 'invalid-credential';
|
|
202
|
+
CryptoSignerErrorCode.SERVER_ERROR = 'server-error';
|
package/lib/utils/deep-copy.d.ts
CHANGED
package/lib/utils/deep-copy.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v11.0.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -51,7 +51,7 @@ function deepExtend(target, source) {
|
|
|
51
51
|
case Date: {
|
|
52
52
|
// Treat Dates like scalars; if the target date object had any child
|
|
53
53
|
// properties - they will be lost!
|
|
54
|
-
|
|
54
|
+
const dateValue = source;
|
|
55
55
|
return new Date(dateValue.getTime());
|
|
56
56
|
}
|
|
57
57
|
case Object:
|
|
@@ -67,7 +67,7 @@ function deepExtend(target, source) {
|
|
|
67
67
|
// Not a plain Object - treat it as a scalar.
|
|
68
68
|
return source;
|
|
69
69
|
}
|
|
70
|
-
for (
|
|
70
|
+
for (const prop in source) {
|
|
71
71
|
if (!Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
72
72
|
continue;
|
|
73
73
|
}
|
package/lib/utils/error.d.ts
CHANGED