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
package/lib/app/firebase-app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v11.0.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -18,64 +18,62 @@
|
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.FirebaseApp = exports.FirebaseAppInternals = void 0;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const credential_internal_1 = require("./credential-internal");
|
|
22
|
+
const validator = require("../utils/validator");
|
|
23
|
+
const deep_copy_1 = require("../utils/deep-copy");
|
|
24
|
+
const error_1 = require("../utils/error");
|
|
25
|
+
const TOKEN_EXPIRY_THRESHOLD_MILLIS = 5 * 60 * 1000;
|
|
26
26
|
/**
|
|
27
27
|
* Internals of a FirebaseApp instance.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
class FirebaseAppInternals {
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
31
|
-
|
|
31
|
+
constructor(credential_) {
|
|
32
32
|
this.credential_ = credential_;
|
|
33
33
|
this.tokenListeners_ = [];
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
if (forceRefresh === void 0) { forceRefresh = false; }
|
|
35
|
+
getToken(forceRefresh = false) {
|
|
37
36
|
if (forceRefresh || this.shouldRefresh()) {
|
|
38
37
|
return this.refreshToken();
|
|
39
38
|
}
|
|
40
39
|
return Promise.resolve(this.cachedToken_);
|
|
41
|
-
}
|
|
42
|
-
|
|
40
|
+
}
|
|
41
|
+
getCachedToken() {
|
|
43
42
|
return this.cachedToken_ || null;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
var _this = this;
|
|
43
|
+
}
|
|
44
|
+
refreshToken() {
|
|
47
45
|
return Promise.resolve(this.credential_.getAccessToken())
|
|
48
|
-
.then(
|
|
46
|
+
.then((result) => {
|
|
49
47
|
// Since the developer can provide the credential implementation, we want to weakly verify
|
|
50
48
|
// the return type until the type is properly exported.
|
|
51
49
|
if (!validator.isNonNullObject(result) ||
|
|
52
50
|
typeof result.expires_in !== 'number' ||
|
|
53
51
|
typeof result.access_token !== 'string') {
|
|
54
|
-
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL,
|
|
52
|
+
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, `Invalid access token generated: "${JSON.stringify(result)}". Valid access ` +
|
|
55
53
|
'tokens must be an object with the "expires_in" (number) and "access_token" ' +
|
|
56
54
|
'(string) properties.');
|
|
57
55
|
}
|
|
58
|
-
|
|
56
|
+
const token = {
|
|
59
57
|
accessToken: result.access_token,
|
|
60
58
|
expirationTime: Date.now() + (result.expires_in * 1000),
|
|
61
59
|
};
|
|
62
|
-
if (!
|
|
63
|
-
||
|
|
64
|
-
||
|
|
60
|
+
if (!this.cachedToken_
|
|
61
|
+
|| this.cachedToken_.accessToken !== token.accessToken
|
|
62
|
+
|| this.cachedToken_.expirationTime !== token.expirationTime) {
|
|
65
63
|
// Update the cache before firing listeners. Listeners may directly query the
|
|
66
64
|
// cached token state.
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
this.cachedToken_ = token;
|
|
66
|
+
this.tokenListeners_.forEach((listener) => {
|
|
69
67
|
listener(token.accessToken);
|
|
70
68
|
});
|
|
71
69
|
}
|
|
72
70
|
return token;
|
|
73
71
|
})
|
|
74
|
-
.catch(
|
|
75
|
-
|
|
72
|
+
.catch((error) => {
|
|
73
|
+
let errorMessage = (typeof error === 'string') ? error : error.message;
|
|
76
74
|
errorMessage = 'Credential implementation provided to initializeApp() via the ' +
|
|
77
75
|
'"credential" property failed to fetch a valid Google OAuth2 access token with the ' +
|
|
78
|
-
|
|
76
|
+
`following error: "${errorMessage}".`;
|
|
79
77
|
if (errorMessage.indexOf('invalid_grant') !== -1) {
|
|
80
78
|
errorMessage += ' There are two likely causes: (1) your server time is not properly ' +
|
|
81
79
|
'synced or (2) your certificate key file has been revoked. To solve (1), re-sync the ' +
|
|
@@ -86,136 +84,123 @@ var FirebaseAppInternals = /** @class */ (function () {
|
|
|
86
84
|
}
|
|
87
85
|
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, errorMessage);
|
|
88
86
|
});
|
|
89
|
-
}
|
|
90
|
-
|
|
87
|
+
}
|
|
88
|
+
shouldRefresh() {
|
|
91
89
|
return !this.cachedToken_ || (this.cachedToken_.expirationTime - Date.now()) <= TOKEN_EXPIRY_THRESHOLD_MILLIS;
|
|
92
|
-
}
|
|
90
|
+
}
|
|
93
91
|
/**
|
|
94
92
|
* Adds a listener that is called each time a token changes.
|
|
95
93
|
*
|
|
96
94
|
* @param listener - The listener that will be called with each new token.
|
|
97
95
|
*/
|
|
98
|
-
|
|
96
|
+
addAuthTokenListener(listener) {
|
|
99
97
|
this.tokenListeners_.push(listener);
|
|
100
98
|
if (this.cachedToken_) {
|
|
101
99
|
listener(this.cachedToken_.accessToken);
|
|
102
100
|
}
|
|
103
|
-
}
|
|
101
|
+
}
|
|
104
102
|
/**
|
|
105
103
|
* Removes a token listener.
|
|
106
104
|
*
|
|
107
105
|
* @param listener - The listener to remove.
|
|
108
106
|
*/
|
|
109
|
-
|
|
110
|
-
this.tokenListeners_ = this.tokenListeners_.filter(
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
}());
|
|
107
|
+
removeAuthTokenListener(listener) {
|
|
108
|
+
this.tokenListeners_ = this.tokenListeners_.filter((other) => other !== listener);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
114
111
|
exports.FirebaseAppInternals = FirebaseAppInternals;
|
|
115
112
|
/**
|
|
116
113
|
* Global context object for a collection of services using a shared authentication state.
|
|
117
114
|
*
|
|
118
115
|
* @internal
|
|
119
116
|
*/
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
class FirebaseApp {
|
|
118
|
+
constructor(options, name, appStore) {
|
|
122
119
|
this.appStore = appStore;
|
|
123
120
|
this.services_ = {};
|
|
124
121
|
this.isDeleted_ = false;
|
|
125
122
|
this.name_ = name;
|
|
126
|
-
this.options_ = deep_copy_1.deepCopy(options);
|
|
123
|
+
this.options_ = (0, deep_copy_1.deepCopy)(options);
|
|
127
124
|
if (!validator.isNonNullObject(this.options_)) {
|
|
128
125
|
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_APP_OPTIONS, 'Invalid Firebase app options passed as the first argument to initializeApp() for the ' +
|
|
129
|
-
|
|
126
|
+
`app named "${this.name_}". Options must be a non-null object.`);
|
|
130
127
|
}
|
|
131
|
-
|
|
128
|
+
const hasCredential = ('credential' in this.options_);
|
|
132
129
|
if (!hasCredential) {
|
|
133
|
-
this.options_.credential = credential_internal_1.getApplicationDefault(this.options_.httpAgent);
|
|
130
|
+
this.options_.credential = (0, credential_internal_1.getApplicationDefault)(this.options_.httpAgent);
|
|
134
131
|
}
|
|
135
|
-
|
|
132
|
+
const credential = this.options_.credential;
|
|
136
133
|
if (typeof credential !== 'object' || credential === null || typeof credential.getAccessToken !== 'function') {
|
|
137
134
|
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_APP_OPTIONS, 'Invalid Firebase app options passed as the first argument to initializeApp() for the ' +
|
|
138
|
-
|
|
135
|
+
`app named "${this.name_}". The "credential" property must be an object which implements ` +
|
|
139
136
|
'the Credential interface.');
|
|
140
137
|
}
|
|
141
138
|
this.INTERNAL = new FirebaseAppInternals(credential);
|
|
142
139
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
*/
|
|
162
|
-
get: function () {
|
|
163
|
-
this.checkDestroyed_();
|
|
164
|
-
return deep_copy_1.deepCopy(this.options_);
|
|
165
|
-
},
|
|
166
|
-
enumerable: false,
|
|
167
|
-
configurable: true
|
|
168
|
-
});
|
|
140
|
+
/**
|
|
141
|
+
* Returns the name of the FirebaseApp instance.
|
|
142
|
+
*
|
|
143
|
+
* @returns The name of the FirebaseApp instance.
|
|
144
|
+
*/
|
|
145
|
+
get name() {
|
|
146
|
+
this.checkDestroyed_();
|
|
147
|
+
return this.name_;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Returns the options for the FirebaseApp instance.
|
|
151
|
+
*
|
|
152
|
+
* @returns The options for the FirebaseApp instance.
|
|
153
|
+
*/
|
|
154
|
+
get options() {
|
|
155
|
+
this.checkDestroyed_();
|
|
156
|
+
return (0, deep_copy_1.deepCopy)(this.options_);
|
|
157
|
+
}
|
|
169
158
|
/**
|
|
170
159
|
* @internal
|
|
171
160
|
*/
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
};
|
|
161
|
+
getOrInitService(name, init) {
|
|
162
|
+
return this.ensureService_(name, () => init(this));
|
|
163
|
+
}
|
|
176
164
|
/**
|
|
177
165
|
* Deletes the FirebaseApp instance.
|
|
178
166
|
*
|
|
179
167
|
* @returns An empty Promise fulfilled once the FirebaseApp instance is deleted.
|
|
180
168
|
*/
|
|
181
|
-
|
|
182
|
-
var _this = this;
|
|
183
|
-
var _a;
|
|
169
|
+
delete() {
|
|
184
170
|
this.checkDestroyed_();
|
|
185
171
|
// Also remove the instance from the AppStore. This is needed to support the existing
|
|
186
172
|
// app.delete() use case. In the future we can remove this API, and deleteApp() will
|
|
187
173
|
// become the only way to tear down an App.
|
|
188
|
-
|
|
189
|
-
return Promise.all(Object.keys(this.services_).map(
|
|
190
|
-
|
|
174
|
+
this.appStore?.removeApp(this.name);
|
|
175
|
+
return Promise.all(Object.keys(this.services_).map((serviceName) => {
|
|
176
|
+
const service = this.services_[serviceName];
|
|
191
177
|
if (isStateful(service)) {
|
|
192
178
|
return service.delete();
|
|
193
179
|
}
|
|
194
180
|
return Promise.resolve();
|
|
195
|
-
})).then(
|
|
196
|
-
|
|
197
|
-
|
|
181
|
+
})).then(() => {
|
|
182
|
+
this.services_ = {};
|
|
183
|
+
this.isDeleted_ = true;
|
|
198
184
|
});
|
|
199
|
-
}
|
|
185
|
+
}
|
|
200
186
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
201
|
-
|
|
187
|
+
ensureService_(serviceName, initializer) {
|
|
202
188
|
this.checkDestroyed_();
|
|
203
189
|
if (!(serviceName in this.services_)) {
|
|
204
190
|
this.services_[serviceName] = initializer();
|
|
205
191
|
}
|
|
206
192
|
return this.services_[serviceName];
|
|
207
|
-
}
|
|
193
|
+
}
|
|
208
194
|
/**
|
|
209
195
|
* Throws an Error if the FirebaseApp instance has already been deleted.
|
|
210
196
|
*/
|
|
211
197
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
212
|
-
|
|
198
|
+
checkDestroyed_() {
|
|
213
199
|
if (this.isDeleted_) {
|
|
214
|
-
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.APP_DELETED,
|
|
200
|
+
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.APP_DELETED, `Firebase app named "${this.name_}" has already been deleted.`);
|
|
215
201
|
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
}());
|
|
202
|
+
}
|
|
203
|
+
}
|
|
219
204
|
exports.FirebaseApp = FirebaseApp;
|
|
220
205
|
function isStateful(service) {
|
|
221
206
|
return typeof service.delete === 'function';
|