@firebase/app 0.10.15 → 0.10.16
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/dist/app/src/api.d.ts +207 -207
- package/dist/app/src/api.test.d.ts +22 -22
- package/dist/app/src/constants.d.ts +26 -26
- package/dist/app/src/errors.d.ts +67 -67
- package/dist/app/src/firebaseApp.d.ts +46 -46
- package/dist/app/src/firebaseApp.test.d.ts +17 -17
- package/dist/app/src/firebaseServerApp.d.ts +36 -36
- package/dist/app/src/firebaseServerApp.test.d.ts +17 -17
- package/dist/app/src/global_index.d.ts +868 -868
- package/dist/app/src/heartbeatService.d.ts +83 -83
- package/dist/app/src/heartbeatService.test.d.ts +23 -23
- package/dist/app/src/index.d.ts +9 -9
- package/dist/app/src/indexeddb.d.ts +20 -20
- package/dist/app/src/indexeddb.test.d.ts +17 -17
- package/dist/app/src/internal.d.ts +99 -99
- package/dist/app/src/internal.test.d.ts +23 -23
- package/dist/app/src/logger.d.ts +18 -18
- package/dist/app/src/platformLoggerService.d.ts +23 -23
- package/dist/app/src/platformLoggerService.test.d.ts +24 -24
- package/dist/app/src/public-types.d.ts +231 -231
- package/dist/app/src/registerCoreComponents.d.ts +17 -17
- package/dist/app/src/types.d.ts +55 -55
- package/dist/app/test/setup.d.ts +17 -17
- package/dist/app/test/util.d.ts +26 -26
- package/dist/esm/app/src/api.d.ts +207 -207
- package/dist/esm/app/src/api.test.d.ts +22 -22
- package/dist/esm/app/src/constants.d.ts +26 -26
- package/dist/esm/app/src/errors.d.ts +67 -67
- package/dist/esm/app/src/firebaseApp.d.ts +46 -46
- package/dist/esm/app/src/firebaseApp.test.d.ts +17 -17
- package/dist/esm/app/src/firebaseServerApp.d.ts +36 -36
- package/dist/esm/app/src/firebaseServerApp.test.d.ts +17 -17
- package/dist/esm/app/src/heartbeatService.d.ts +83 -83
- package/dist/esm/app/src/heartbeatService.test.d.ts +23 -23
- package/dist/esm/app/src/index.d.ts +9 -9
- package/dist/esm/app/src/indexeddb.d.ts +20 -20
- package/dist/esm/app/src/indexeddb.test.d.ts +17 -17
- package/dist/esm/app/src/internal.d.ts +99 -99
- package/dist/esm/app/src/internal.test.d.ts +23 -23
- package/dist/esm/app/src/logger.d.ts +18 -18
- package/dist/esm/app/src/platformLoggerService.d.ts +23 -23
- package/dist/esm/app/src/platformLoggerService.test.d.ts +24 -24
- package/dist/esm/app/src/public-types.d.ts +231 -231
- package/dist/esm/app/src/registerCoreComponents.d.ts +17 -17
- package/dist/esm/app/src/types.d.ts +55 -55
- package/dist/esm/app/test/setup.d.ts +17 -17
- package/dist/esm/app/test/util.d.ts +26 -26
- package/dist/esm/index.esm2017.js +1069 -1069
- package/dist/esm/index.esm2017.js.map +1 -1
- package/dist/index.cjs.js +1069 -1069
- package/dist/index.cjs.js.map +1 -1
- package/package.json +5 -5
package/dist/app/src/api.d.ts
CHANGED
|
@@ -1,207 +1,207 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebaseApp, FirebaseServerApp, FirebaseOptions, FirebaseAppSettings, FirebaseServerAppSettings } from './public-types';
|
|
18
|
-
import { LogLevelString, LogCallback, LogOptions } from '@firebase/logger';
|
|
19
|
-
export { FirebaseError } from '@firebase/util';
|
|
20
|
-
/**
|
|
21
|
-
* The current SDK version.
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
export declare const SDK_VERSION: string;
|
|
26
|
-
/**
|
|
27
|
-
* Creates and initializes a {@link @firebase/app#FirebaseApp} instance.
|
|
28
|
-
*
|
|
29
|
-
* See
|
|
30
|
-
* {@link
|
|
31
|
-
* https://firebase.google.com/docs/web/setup#add_firebase_to_your_app
|
|
32
|
-
* | Add Firebase to your app} and
|
|
33
|
-
* {@link
|
|
34
|
-
* https://firebase.google.com/docs/web/setup#multiple-projects
|
|
35
|
-
* | Initialize multiple projects} for detailed documentation.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```javascript
|
|
39
|
-
*
|
|
40
|
-
* // Initialize default app
|
|
41
|
-
* // Retrieve your own options values by adding a web app on
|
|
42
|
-
* // https://console.firebase.google.com
|
|
43
|
-
* initializeApp({
|
|
44
|
-
* apiKey: "AIza....", // Auth / General Use
|
|
45
|
-
* authDomain: "YOUR_APP.firebaseapp.com", // Auth with popup/redirect
|
|
46
|
-
* databaseURL: "https://YOUR_APP.firebaseio.com", // Realtime Database
|
|
47
|
-
* storageBucket: "YOUR_APP.appspot.com", // Storage
|
|
48
|
-
* messagingSenderId: "123456789" // Cloud Messaging
|
|
49
|
-
* });
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```javascript
|
|
54
|
-
*
|
|
55
|
-
* // Initialize another app
|
|
56
|
-
* const otherApp = initializeApp({
|
|
57
|
-
* databaseURL: "https://<OTHER_DATABASE_NAME>.firebaseio.com",
|
|
58
|
-
* storageBucket: "<OTHER_STORAGE_BUCKET>.appspot.com"
|
|
59
|
-
* }, "otherApp");
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
|
-
* @param options - Options to configure the app's services.
|
|
63
|
-
* @param name - Optional name of the app to initialize. If no name
|
|
64
|
-
* is provided, the default is `"[DEFAULT]"`.
|
|
65
|
-
*
|
|
66
|
-
* @returns The initialized app.
|
|
67
|
-
*
|
|
68
|
-
* @public
|
|
69
|
-
*/
|
|
70
|
-
export declare function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp;
|
|
71
|
-
/**
|
|
72
|
-
* Creates and initializes a FirebaseApp instance.
|
|
73
|
-
*
|
|
74
|
-
* @param options - Options to configure the app's services.
|
|
75
|
-
* @param config - FirebaseApp Configuration
|
|
76
|
-
*
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
79
|
-
export declare function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp;
|
|
80
|
-
/**
|
|
81
|
-
* Creates and initializes a FirebaseApp instance.
|
|
82
|
-
*
|
|
83
|
-
* @public
|
|
84
|
-
*/
|
|
85
|
-
export declare function initializeApp(): FirebaseApp;
|
|
86
|
-
/**
|
|
87
|
-
* Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
|
|
88
|
-
*
|
|
89
|
-
* The `FirebaseServerApp` is similar to `FirebaseApp`, but is intended for execution in
|
|
90
|
-
* server side rendering environments only. Initialization will fail if invoked from a
|
|
91
|
-
* browser environment.
|
|
92
|
-
*
|
|
93
|
-
* See
|
|
94
|
-
* {@link
|
|
95
|
-
* https://firebase.google.com/docs/web/setup#add_firebase_to_your_app
|
|
96
|
-
* | Add Firebase to your app} and
|
|
97
|
-
* {@link
|
|
98
|
-
* https://firebase.google.com/docs/web/setup#multiple-projects
|
|
99
|
-
* | Initialize multiple projects} for detailed documentation.
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```javascript
|
|
103
|
-
*
|
|
104
|
-
* // Initialize an instance of `FirebaseServerApp`.
|
|
105
|
-
* // Retrieve your own options values by adding a web app on
|
|
106
|
-
* // https://console.firebase.google.com
|
|
107
|
-
* initializeServerApp({
|
|
108
|
-
* apiKey: "AIza....", // Auth / General Use
|
|
109
|
-
* authDomain: "YOUR_APP.firebaseapp.com", // Auth with popup/redirect
|
|
110
|
-
* databaseURL: "https://YOUR_APP.firebaseio.com", // Realtime Database
|
|
111
|
-
* storageBucket: "YOUR_APP.appspot.com", // Storage
|
|
112
|
-
* messagingSenderId: "123456789" // Cloud Messaging
|
|
113
|
-
* },
|
|
114
|
-
* {
|
|
115
|
-
* authIdToken: "Your Auth ID Token"
|
|
116
|
-
* });
|
|
117
|
-
* ```
|
|
118
|
-
*
|
|
119
|
-
* @param options - `Firebase.AppOptions` to configure the app's services, or a
|
|
120
|
-
* a `FirebaseApp` instance which contains the `AppOptions` within.
|
|
121
|
-
* @param config - `FirebaseServerApp` configuration.
|
|
122
|
-
*
|
|
123
|
-
* @returns The initialized `FirebaseServerApp`.
|
|
124
|
-
*
|
|
125
|
-
* @public
|
|
126
|
-
*/
|
|
127
|
-
export declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config: FirebaseServerAppSettings): FirebaseServerApp;
|
|
128
|
-
/**
|
|
129
|
-
* Retrieves a {@link @firebase/app#FirebaseApp} instance.
|
|
130
|
-
*
|
|
131
|
-
* When called with no arguments, the default app is returned. When an app name
|
|
132
|
-
* is provided, the app corresponding to that name is returned.
|
|
133
|
-
*
|
|
134
|
-
* An exception is thrown if the app being retrieved has not yet been
|
|
135
|
-
* initialized.
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```javascript
|
|
139
|
-
* // Return the default app
|
|
140
|
-
* const app = getApp();
|
|
141
|
-
* ```
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* ```javascript
|
|
145
|
-
* // Return a named app
|
|
146
|
-
* const otherApp = getApp("otherApp");
|
|
147
|
-
* ```
|
|
148
|
-
*
|
|
149
|
-
* @param name - Optional name of the app to return. If no name is
|
|
150
|
-
* provided, the default is `"[DEFAULT]"`.
|
|
151
|
-
*
|
|
152
|
-
* @returns The app corresponding to the provided app name.
|
|
153
|
-
* If no app name is provided, the default app is returned.
|
|
154
|
-
*
|
|
155
|
-
* @public
|
|
156
|
-
*/
|
|
157
|
-
export declare function getApp(name?: string): FirebaseApp;
|
|
158
|
-
/**
|
|
159
|
-
* A (read-only) array of all initialized apps.
|
|
160
|
-
* @public
|
|
161
|
-
*/
|
|
162
|
-
export declare function getApps(): FirebaseApp[];
|
|
163
|
-
/**
|
|
164
|
-
* Renders this app unusable and frees the resources of all associated
|
|
165
|
-
* services.
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* ```javascript
|
|
169
|
-
* deleteApp(app)
|
|
170
|
-
* .then(function() {
|
|
171
|
-
* console.log("App deleted successfully");
|
|
172
|
-
* })
|
|
173
|
-
* .catch(function(error) {
|
|
174
|
-
* console.log("Error deleting app:", error);
|
|
175
|
-
* });
|
|
176
|
-
* ```
|
|
177
|
-
*
|
|
178
|
-
* @public
|
|
179
|
-
*/
|
|
180
|
-
export declare function deleteApp(app: FirebaseApp): Promise<void>;
|
|
181
|
-
/**
|
|
182
|
-
* Registers a library's name and version for platform logging purposes.
|
|
183
|
-
* @param library - Name of 1p or 3p library (e.g. firestore, angularfire)
|
|
184
|
-
* @param version - Current version of that library.
|
|
185
|
-
* @param variant - Bundle variant, e.g., node, rn, etc.
|
|
186
|
-
*
|
|
187
|
-
* @public
|
|
188
|
-
*/
|
|
189
|
-
export declare function registerVersion(libraryKeyOrName: string, version: string, variant?: string): void;
|
|
190
|
-
/**
|
|
191
|
-
* Sets log handler for all Firebase SDKs.
|
|
192
|
-
* @param logCallback - An optional custom log handler that executes user code whenever
|
|
193
|
-
* the Firebase SDK makes a logging call.
|
|
194
|
-
*
|
|
195
|
-
* @public
|
|
196
|
-
*/
|
|
197
|
-
export declare function onLog(logCallback: LogCallback | null, options?: LogOptions): void;
|
|
198
|
-
/**
|
|
199
|
-
* Sets log level for all Firebase SDKs.
|
|
200
|
-
*
|
|
201
|
-
* All of the log types above the current log level are captured (i.e. if
|
|
202
|
-
* you set the log level to `info`, errors are logged, but `debug` and
|
|
203
|
-
* `verbose` logs are not).
|
|
204
|
-
*
|
|
205
|
-
* @public
|
|
206
|
-
*/
|
|
207
|
-
export declare function setLogLevel(logLevel: LogLevelString): void;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebaseApp, FirebaseServerApp, FirebaseOptions, FirebaseAppSettings, FirebaseServerAppSettings } from './public-types';
|
|
18
|
+
import { LogLevelString, LogCallback, LogOptions } from '@firebase/logger';
|
|
19
|
+
export { FirebaseError } from '@firebase/util';
|
|
20
|
+
/**
|
|
21
|
+
* The current SDK version.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export declare const SDK_VERSION: string;
|
|
26
|
+
/**
|
|
27
|
+
* Creates and initializes a {@link @firebase/app#FirebaseApp} instance.
|
|
28
|
+
*
|
|
29
|
+
* See
|
|
30
|
+
* {@link
|
|
31
|
+
* https://firebase.google.com/docs/web/setup#add_firebase_to_your_app
|
|
32
|
+
* | Add Firebase to your app} and
|
|
33
|
+
* {@link
|
|
34
|
+
* https://firebase.google.com/docs/web/setup#multiple-projects
|
|
35
|
+
* | Initialize multiple projects} for detailed documentation.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```javascript
|
|
39
|
+
*
|
|
40
|
+
* // Initialize default app
|
|
41
|
+
* // Retrieve your own options values by adding a web app on
|
|
42
|
+
* // https://console.firebase.google.com
|
|
43
|
+
* initializeApp({
|
|
44
|
+
* apiKey: "AIza....", // Auth / General Use
|
|
45
|
+
* authDomain: "YOUR_APP.firebaseapp.com", // Auth with popup/redirect
|
|
46
|
+
* databaseURL: "https://YOUR_APP.firebaseio.com", // Realtime Database
|
|
47
|
+
* storageBucket: "YOUR_APP.appspot.com", // Storage
|
|
48
|
+
* messagingSenderId: "123456789" // Cloud Messaging
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```javascript
|
|
54
|
+
*
|
|
55
|
+
* // Initialize another app
|
|
56
|
+
* const otherApp = initializeApp({
|
|
57
|
+
* databaseURL: "https://<OTHER_DATABASE_NAME>.firebaseio.com",
|
|
58
|
+
* storageBucket: "<OTHER_STORAGE_BUCKET>.appspot.com"
|
|
59
|
+
* }, "otherApp");
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param options - Options to configure the app's services.
|
|
63
|
+
* @param name - Optional name of the app to initialize. If no name
|
|
64
|
+
* is provided, the default is `"[DEFAULT]"`.
|
|
65
|
+
*
|
|
66
|
+
* @returns The initialized app.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export declare function initializeApp(options: FirebaseOptions, name?: string): FirebaseApp;
|
|
71
|
+
/**
|
|
72
|
+
* Creates and initializes a FirebaseApp instance.
|
|
73
|
+
*
|
|
74
|
+
* @param options - Options to configure the app's services.
|
|
75
|
+
* @param config - FirebaseApp Configuration
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export declare function initializeApp(options: FirebaseOptions, config?: FirebaseAppSettings): FirebaseApp;
|
|
80
|
+
/**
|
|
81
|
+
* Creates and initializes a FirebaseApp instance.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export declare function initializeApp(): FirebaseApp;
|
|
86
|
+
/**
|
|
87
|
+
* Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
|
|
88
|
+
*
|
|
89
|
+
* The `FirebaseServerApp` is similar to `FirebaseApp`, but is intended for execution in
|
|
90
|
+
* server side rendering environments only. Initialization will fail if invoked from a
|
|
91
|
+
* browser environment.
|
|
92
|
+
*
|
|
93
|
+
* See
|
|
94
|
+
* {@link
|
|
95
|
+
* https://firebase.google.com/docs/web/setup#add_firebase_to_your_app
|
|
96
|
+
* | Add Firebase to your app} and
|
|
97
|
+
* {@link
|
|
98
|
+
* https://firebase.google.com/docs/web/setup#multiple-projects
|
|
99
|
+
* | Initialize multiple projects} for detailed documentation.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```javascript
|
|
103
|
+
*
|
|
104
|
+
* // Initialize an instance of `FirebaseServerApp`.
|
|
105
|
+
* // Retrieve your own options values by adding a web app on
|
|
106
|
+
* // https://console.firebase.google.com
|
|
107
|
+
* initializeServerApp({
|
|
108
|
+
* apiKey: "AIza....", // Auth / General Use
|
|
109
|
+
* authDomain: "YOUR_APP.firebaseapp.com", // Auth with popup/redirect
|
|
110
|
+
* databaseURL: "https://YOUR_APP.firebaseio.com", // Realtime Database
|
|
111
|
+
* storageBucket: "YOUR_APP.appspot.com", // Storage
|
|
112
|
+
* messagingSenderId: "123456789" // Cloud Messaging
|
|
113
|
+
* },
|
|
114
|
+
* {
|
|
115
|
+
* authIdToken: "Your Auth ID Token"
|
|
116
|
+
* });
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* @param options - `Firebase.AppOptions` to configure the app's services, or a
|
|
120
|
+
* a `FirebaseApp` instance which contains the `AppOptions` within.
|
|
121
|
+
* @param config - `FirebaseServerApp` configuration.
|
|
122
|
+
*
|
|
123
|
+
* @returns The initialized `FirebaseServerApp`.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export declare function initializeServerApp(options: FirebaseOptions | FirebaseApp, config: FirebaseServerAppSettings): FirebaseServerApp;
|
|
128
|
+
/**
|
|
129
|
+
* Retrieves a {@link @firebase/app#FirebaseApp} instance.
|
|
130
|
+
*
|
|
131
|
+
* When called with no arguments, the default app is returned. When an app name
|
|
132
|
+
* is provided, the app corresponding to that name is returned.
|
|
133
|
+
*
|
|
134
|
+
* An exception is thrown if the app being retrieved has not yet been
|
|
135
|
+
* initialized.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```javascript
|
|
139
|
+
* // Return the default app
|
|
140
|
+
* const app = getApp();
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```javascript
|
|
145
|
+
* // Return a named app
|
|
146
|
+
* const otherApp = getApp("otherApp");
|
|
147
|
+
* ```
|
|
148
|
+
*
|
|
149
|
+
* @param name - Optional name of the app to return. If no name is
|
|
150
|
+
* provided, the default is `"[DEFAULT]"`.
|
|
151
|
+
*
|
|
152
|
+
* @returns The app corresponding to the provided app name.
|
|
153
|
+
* If no app name is provided, the default app is returned.
|
|
154
|
+
*
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
export declare function getApp(name?: string): FirebaseApp;
|
|
158
|
+
/**
|
|
159
|
+
* A (read-only) array of all initialized apps.
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
export declare function getApps(): FirebaseApp[];
|
|
163
|
+
/**
|
|
164
|
+
* Renders this app unusable and frees the resources of all associated
|
|
165
|
+
* services.
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```javascript
|
|
169
|
+
* deleteApp(app)
|
|
170
|
+
* .then(function() {
|
|
171
|
+
* console.log("App deleted successfully");
|
|
172
|
+
* })
|
|
173
|
+
* .catch(function(error) {
|
|
174
|
+
* console.log("Error deleting app:", error);
|
|
175
|
+
* });
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
export declare function deleteApp(app: FirebaseApp): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Registers a library's name and version for platform logging purposes.
|
|
183
|
+
* @param library - Name of 1p or 3p library (e.g. firestore, angularfire)
|
|
184
|
+
* @param version - Current version of that library.
|
|
185
|
+
* @param variant - Bundle variant, e.g., node, rn, etc.
|
|
186
|
+
*
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
export declare function registerVersion(libraryKeyOrName: string, version: string, variant?: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* Sets log handler for all Firebase SDKs.
|
|
192
|
+
* @param logCallback - An optional custom log handler that executes user code whenever
|
|
193
|
+
* the Firebase SDK makes a logging call.
|
|
194
|
+
*
|
|
195
|
+
* @public
|
|
196
|
+
*/
|
|
197
|
+
export declare function onLog(logCallback: LogCallback | null, options?: LogOptions): void;
|
|
198
|
+
/**
|
|
199
|
+
* Sets log level for all Firebase SDKs.
|
|
200
|
+
*
|
|
201
|
+
* All of the log types above the current log level are captured (i.e. if
|
|
202
|
+
* you set the log level to `info`, errors are logged, but `debug` and
|
|
203
|
+
* `verbose` logs are not).
|
|
204
|
+
*
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
export declare function setLogLevel(logLevel: LogLevelString): void;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../test/setup';
|
|
18
|
-
declare module '@firebase/component' {
|
|
19
|
-
interface NameServiceMapping {
|
|
20
|
-
'test-shell': void;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../test/setup';
|
|
18
|
+
declare module '@firebase/component' {
|
|
19
|
+
interface NameServiceMapping {
|
|
20
|
+
'test-shell': void;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* The default app name
|
|
19
|
-
*
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
export declare const DEFAULT_ENTRY_NAME = "[DEFAULT]";
|
|
23
|
-
export declare const PLATFORM_LOG_STRING: {
|
|
24
|
-
readonly [x: string]: "fire-core" | "fire-core-compat" | "fire-analytics" | "fire-analytics-compat" | "fire-app-check" | "fire-app-check-compat" | "fire-auth" | "fire-auth-compat" | "fire-rtdb" | "fire-data-connect" | "fire-rtdb-compat" | "fire-fn" | "fire-fn-compat" | "fire-iid" | "fire-iid-compat" | "fire-fcm" | "fire-fcm-compat" | "fire-perf" | "fire-perf-compat" | "fire-rc" | "fire-rc-compat" | "fire-gcs" | "fire-gcs-compat" | "fire-fst" | "fire-fst-compat" | "fire-vertex" | "fire-js" | "fire-js-all";
|
|
25
|
-
readonly 'fire-js': "fire-js";
|
|
26
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The default app name
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEFAULT_ENTRY_NAME = "[DEFAULT]";
|
|
23
|
+
export declare const PLATFORM_LOG_STRING: {
|
|
24
|
+
readonly [x: string]: "fire-core" | "fire-core-compat" | "fire-analytics" | "fire-analytics-compat" | "fire-app-check" | "fire-app-check-compat" | "fire-auth" | "fire-auth-compat" | "fire-rtdb" | "fire-data-connect" | "fire-rtdb-compat" | "fire-fn" | "fire-fn-compat" | "fire-iid" | "fire-iid-compat" | "fire-fcm" | "fire-fcm-compat" | "fire-perf" | "fire-perf-compat" | "fire-rc" | "fire-rc-compat" | "fire-gcs" | "fire-gcs-compat" | "fire-fst" | "fire-fst-compat" | "fire-vertex" | "fire-js" | "fire-js-all";
|
|
25
|
+
readonly 'fire-js': "fire-js";
|
|
26
|
+
};
|
package/dist/app/src/errors.d.ts
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { ErrorFactory } from '@firebase/util';
|
|
18
|
-
export declare const enum AppError {
|
|
19
|
-
NO_APP = "no-app",
|
|
20
|
-
BAD_APP_NAME = "bad-app-name",
|
|
21
|
-
DUPLICATE_APP = "duplicate-app",
|
|
22
|
-
APP_DELETED = "app-deleted",
|
|
23
|
-
SERVER_APP_DELETED = "server-app-deleted",
|
|
24
|
-
NO_OPTIONS = "no-options",
|
|
25
|
-
INVALID_APP_ARGUMENT = "invalid-app-argument",
|
|
26
|
-
INVALID_LOG_ARGUMENT = "invalid-log-argument",
|
|
27
|
-
IDB_OPEN = "idb-open",
|
|
28
|
-
IDB_GET = "idb-get",
|
|
29
|
-
IDB_WRITE = "idb-set",
|
|
30
|
-
IDB_DELETE = "idb-delete",
|
|
31
|
-
FINALIZATION_REGISTRY_NOT_SUPPORTED = "finalization-registry-not-supported",
|
|
32
|
-
INVALID_SERVER_APP_ENVIRONMENT = "invalid-server-app-environment"
|
|
33
|
-
}
|
|
34
|
-
interface ErrorParams {
|
|
35
|
-
[AppError.NO_APP]: {
|
|
36
|
-
appName: string;
|
|
37
|
-
};
|
|
38
|
-
[AppError.BAD_APP_NAME]: {
|
|
39
|
-
appName: string;
|
|
40
|
-
};
|
|
41
|
-
[AppError.DUPLICATE_APP]: {
|
|
42
|
-
appName: string;
|
|
43
|
-
};
|
|
44
|
-
[AppError.APP_DELETED]: {
|
|
45
|
-
appName: string;
|
|
46
|
-
};
|
|
47
|
-
[AppError.INVALID_APP_ARGUMENT]: {
|
|
48
|
-
appName: string;
|
|
49
|
-
};
|
|
50
|
-
[AppError.IDB_OPEN]: {
|
|
51
|
-
originalErrorMessage?: string;
|
|
52
|
-
};
|
|
53
|
-
[AppError.IDB_GET]: {
|
|
54
|
-
originalErrorMessage?: string;
|
|
55
|
-
};
|
|
56
|
-
[AppError.IDB_WRITE]: {
|
|
57
|
-
originalErrorMessage?: string;
|
|
58
|
-
};
|
|
59
|
-
[AppError.IDB_DELETE]: {
|
|
60
|
-
originalErrorMessage?: string;
|
|
61
|
-
};
|
|
62
|
-
[AppError.FINALIZATION_REGISTRY_NOT_SUPPORTED]: {
|
|
63
|
-
appName?: string;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
export declare const ERROR_FACTORY: ErrorFactory<AppError, ErrorParams>;
|
|
67
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { ErrorFactory } from '@firebase/util';
|
|
18
|
+
export declare const enum AppError {
|
|
19
|
+
NO_APP = "no-app",
|
|
20
|
+
BAD_APP_NAME = "bad-app-name",
|
|
21
|
+
DUPLICATE_APP = "duplicate-app",
|
|
22
|
+
APP_DELETED = "app-deleted",
|
|
23
|
+
SERVER_APP_DELETED = "server-app-deleted",
|
|
24
|
+
NO_OPTIONS = "no-options",
|
|
25
|
+
INVALID_APP_ARGUMENT = "invalid-app-argument",
|
|
26
|
+
INVALID_LOG_ARGUMENT = "invalid-log-argument",
|
|
27
|
+
IDB_OPEN = "idb-open",
|
|
28
|
+
IDB_GET = "idb-get",
|
|
29
|
+
IDB_WRITE = "idb-set",
|
|
30
|
+
IDB_DELETE = "idb-delete",
|
|
31
|
+
FINALIZATION_REGISTRY_NOT_SUPPORTED = "finalization-registry-not-supported",
|
|
32
|
+
INVALID_SERVER_APP_ENVIRONMENT = "invalid-server-app-environment"
|
|
33
|
+
}
|
|
34
|
+
interface ErrorParams {
|
|
35
|
+
[AppError.NO_APP]: {
|
|
36
|
+
appName: string;
|
|
37
|
+
};
|
|
38
|
+
[AppError.BAD_APP_NAME]: {
|
|
39
|
+
appName: string;
|
|
40
|
+
};
|
|
41
|
+
[AppError.DUPLICATE_APP]: {
|
|
42
|
+
appName: string;
|
|
43
|
+
};
|
|
44
|
+
[AppError.APP_DELETED]: {
|
|
45
|
+
appName: string;
|
|
46
|
+
};
|
|
47
|
+
[AppError.INVALID_APP_ARGUMENT]: {
|
|
48
|
+
appName: string;
|
|
49
|
+
};
|
|
50
|
+
[AppError.IDB_OPEN]: {
|
|
51
|
+
originalErrorMessage?: string;
|
|
52
|
+
};
|
|
53
|
+
[AppError.IDB_GET]: {
|
|
54
|
+
originalErrorMessage?: string;
|
|
55
|
+
};
|
|
56
|
+
[AppError.IDB_WRITE]: {
|
|
57
|
+
originalErrorMessage?: string;
|
|
58
|
+
};
|
|
59
|
+
[AppError.IDB_DELETE]: {
|
|
60
|
+
originalErrorMessage?: string;
|
|
61
|
+
};
|
|
62
|
+
[AppError.FINALIZATION_REGISTRY_NOT_SUPPORTED]: {
|
|
63
|
+
appName?: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export declare const ERROR_FACTORY: ErrorFactory<AppError, ErrorParams>;
|
|
67
|
+
export {};
|