@firebase/app-compat
Advanced tools
Comparing version 0.0.900-exp.894b5da5a to 0.0.900-exp.8b4d7550f
@@ -111,6 +111,13 @@ 'use strict'; | ||
FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) { | ||
var _a; | ||
if (instanceIdentifier === void 0) { instanceIdentifier = modularAPIs._DEFAULT_ENTRY_NAME; } | ||
this._delegate.checkDestroyed(); | ||
// Initialize instance if InstatiationMode is `EXPLICIT`. | ||
var provider = this._delegate.container.getProvider(name); | ||
if (!provider.isInitialized() && | ||
((_a = provider.getComponent()) === null || _a === void 0 ? void 0 : _a.instantiationMode) === "EXPLICIT" /* EXPLICIT */) { | ||
provider.initialize(); | ||
} | ||
// getImmediate will always succeed because _getService is only called for registered components. | ||
return this._delegate.container.getProvider(name).getImmediate({ | ||
return provider.getImmediate({ | ||
identifier: instanceIdentifier | ||
@@ -223,8 +230,8 @@ }); | ||
app: app, | ||
registerVersion: modularAPIs.registerVersion, | ||
setLogLevel: modularAPIs.setLogLevel, | ||
onLog: modularAPIs.onLog, | ||
registerVersion: modularAPIs__namespace.registerVersion, | ||
setLogLevel: modularAPIs__namespace.setLogLevel, | ||
onLog: modularAPIs__namespace.onLog, | ||
// @ts-ignore | ||
apps: null, | ||
SDK_VERSION: modularAPIs.SDK_VERSION, | ||
SDK_VERSION: modularAPIs__namespace.SDK_VERSION, | ||
INTERNAL: { | ||
@@ -264,3 +271,3 @@ registerComponent: registerComponentCompat, | ||
function app(name) { | ||
name = name || modularAPIs._DEFAULT_ENTRY_NAME; | ||
name = name || modularAPIs__namespace._DEFAULT_ENTRY_NAME; | ||
if (!util.contains(apps, name)) { | ||
@@ -275,6 +282,11 @@ throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name }); | ||
* Create a new App instance (name must be unique). | ||
* | ||
* This function is idempotent. It can be called more than once and return the same instance using the same options and config. | ||
*/ | ||
function initializeAppCompat(options, rawConfig) { | ||
if (rawConfig === void 0) { rawConfig = {}; } | ||
var app = modularAPIs.initializeApp(options, rawConfig); | ||
var app = modularAPIs__namespace.initializeApp(options, rawConfig); | ||
if (util.contains(apps, app.name)) { | ||
return apps[app.name]; | ||
} | ||
var appCompat = new firebaseAppImpl(app, namespace); | ||
@@ -294,3 +306,3 @@ apps[app.name] = appCompat; | ||
var componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (modularAPIs._registerComponent(component) && | ||
if (modularAPIs__namespace._registerComponent(component) && | ||
component.type === "PUBLIC" /* PUBLIC */) { | ||
@@ -391,3 +403,3 @@ // create service namespace for public components | ||
} | ||
var firebase = createFirebaseNamespace(); | ||
var firebase$1 = createFirebaseNamespace(); | ||
@@ -413,3 +425,3 @@ /** | ||
var name = "@firebase/app-compat"; | ||
var version = "0.0.900-exp.894b5da5a"; | ||
var version = "0.0.900-exp.8b4d7550f"; | ||
@@ -463,7 +475,7 @@ /** | ||
} | ||
var firebase$1 = firebase; | ||
var firebase = firebase$1; | ||
registerCoreComponents(); | ||
exports.default = firebase$1; | ||
exports.firebase = firebase$1; | ||
exports.default = firebase; | ||
exports.firebase = firebase; | ||
//# sourceMappingURL=index.cjs.js.map |
import { ErrorFactory, contains, deepExtend, createSubscribe, isBrowser } from '@firebase/util'; | ||
import { Component } from '@firebase/component'; | ||
import * as modularAPIs from '@firebase/app'; | ||
import { _addComponent, deleteApp, _DEFAULT_ENTRY_NAME, _addOrOverwriteComponent, registerVersion, setLogLevel, onLog, SDK_VERSION, initializeApp, _registerComponent } from '@firebase/app'; | ||
import { _addComponent, deleteApp, _DEFAULT_ENTRY_NAME, _addOrOverwriteComponent, registerVersion } from '@firebase/app'; | ||
import { Logger } from '@firebase/logger'; | ||
@@ -71,5 +71,12 @@ | ||
_getService(name, instanceIdentifier = _DEFAULT_ENTRY_NAME) { | ||
var _a; | ||
this._delegate.checkDestroyed(); | ||
// Initialize instance if InstatiationMode is `EXPLICIT`. | ||
const provider = this._delegate.container.getProvider(name); | ||
if (!provider.isInitialized() && | ||
((_a = provider.getComponent()) === null || _a === void 0 ? void 0 : _a.instantiationMode) === "EXPLICIT" /* EXPLICIT */) { | ||
provider.initialize(); | ||
} | ||
// getImmediate will always succeed because _getService is only called for registered components. | ||
return this._delegate.container.getProvider(name).getImmediate({ | ||
return provider.getImmediate({ | ||
identifier: instanceIdentifier | ||
@@ -179,8 +186,8 @@ }); | ||
app, | ||
registerVersion: registerVersion, | ||
setLogLevel: setLogLevel, | ||
onLog: onLog, | ||
registerVersion: modularAPIs.registerVersion, | ||
setLogLevel: modularAPIs.setLogLevel, | ||
onLog: modularAPIs.onLog, | ||
// @ts-ignore | ||
apps: null, | ||
SDK_VERSION: SDK_VERSION, | ||
SDK_VERSION: modularAPIs.SDK_VERSION, | ||
INTERNAL: { | ||
@@ -220,3 +227,3 @@ registerComponent: registerComponentCompat, | ||
function app(name) { | ||
name = name || _DEFAULT_ENTRY_NAME; | ||
name = name || modularAPIs._DEFAULT_ENTRY_NAME; | ||
if (!contains(apps, name)) { | ||
@@ -231,5 +238,10 @@ throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name }); | ||
* Create a new App instance (name must be unique). | ||
* | ||
* This function is idempotent. It can be called more than once and return the same instance using the same options and config. | ||
*/ | ||
function initializeAppCompat(options, rawConfig = {}) { | ||
const app = initializeApp(options, rawConfig); | ||
const app = modularAPIs.initializeApp(options, rawConfig); | ||
if (contains(apps, app.name)) { | ||
return apps[app.name]; | ||
} | ||
const appCompat = new firebaseAppImpl(app, namespace); | ||
@@ -249,3 +261,3 @@ apps[app.name] = appCompat; | ||
const componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (_registerComponent(component) && | ||
if (modularAPIs._registerComponent(component) && | ||
component.type === "PUBLIC" /* PUBLIC */) { | ||
@@ -341,3 +353,3 @@ // create service namespace for public components | ||
} | ||
const firebase = createFirebaseNamespace(); | ||
const firebase$1 = createFirebaseNamespace(); | ||
@@ -363,3 +375,3 @@ /** | ||
const name = "@firebase/app-compat"; | ||
const version = "0.0.900-exp.894b5da5a"; | ||
const version = "0.0.900-exp.8b4d7550f"; | ||
@@ -419,7 +431,7 @@ /** | ||
} | ||
const firebase$1 = firebase; | ||
const firebase = firebase$1; | ||
registerCoreComponents(); | ||
export default firebase$1; | ||
export { firebase$1 as firebase }; | ||
export default firebase; | ||
export { firebase }; | ||
//# sourceMappingURL=index.esm2017.js.map |
@@ -5,3 +5,3 @@ import { ErrorFactory, contains, deepExtend, createSubscribe, isBrowser } from '@firebase/util'; | ||
import * as modularAPIs from '@firebase/app'; | ||
import { deleteApp, _addComponent, _addOrOverwriteComponent, _DEFAULT_ENTRY_NAME, registerVersion, setLogLevel, onLog, SDK_VERSION, initializeApp, _registerComponent } from '@firebase/app'; | ||
import { deleteApp, _addComponent, _addOrOverwriteComponent, _DEFAULT_ENTRY_NAME, registerVersion } from '@firebase/app'; | ||
import { Logger } from '@firebase/logger'; | ||
@@ -87,6 +87,13 @@ | ||
FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) { | ||
var _a; | ||
if (instanceIdentifier === void 0) { instanceIdentifier = _DEFAULT_ENTRY_NAME; } | ||
this._delegate.checkDestroyed(); | ||
// Initialize instance if InstatiationMode is `EXPLICIT`. | ||
var provider = this._delegate.container.getProvider(name); | ||
if (!provider.isInitialized() && | ||
((_a = provider.getComponent()) === null || _a === void 0 ? void 0 : _a.instantiationMode) === "EXPLICIT" /* EXPLICIT */) { | ||
provider.initialize(); | ||
} | ||
// getImmediate will always succeed because _getService is only called for registered components. | ||
return this._delegate.container.getProvider(name).getImmediate({ | ||
return provider.getImmediate({ | ||
identifier: instanceIdentifier | ||
@@ -199,8 +206,8 @@ }); | ||
app: app, | ||
registerVersion: registerVersion, | ||
setLogLevel: setLogLevel, | ||
onLog: onLog, | ||
registerVersion: modularAPIs.registerVersion, | ||
setLogLevel: modularAPIs.setLogLevel, | ||
onLog: modularAPIs.onLog, | ||
// @ts-ignore | ||
apps: null, | ||
SDK_VERSION: SDK_VERSION, | ||
SDK_VERSION: modularAPIs.SDK_VERSION, | ||
INTERNAL: { | ||
@@ -240,3 +247,3 @@ registerComponent: registerComponentCompat, | ||
function app(name) { | ||
name = name || _DEFAULT_ENTRY_NAME; | ||
name = name || modularAPIs._DEFAULT_ENTRY_NAME; | ||
if (!contains(apps, name)) { | ||
@@ -251,6 +258,11 @@ throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name }); | ||
* Create a new App instance (name must be unique). | ||
* | ||
* This function is idempotent. It can be called more than once and return the same instance using the same options and config. | ||
*/ | ||
function initializeAppCompat(options, rawConfig) { | ||
if (rawConfig === void 0) { rawConfig = {}; } | ||
var app = initializeApp(options, rawConfig); | ||
var app = modularAPIs.initializeApp(options, rawConfig); | ||
if (contains(apps, app.name)) { | ||
return apps[app.name]; | ||
} | ||
var appCompat = new firebaseAppImpl(app, namespace); | ||
@@ -270,3 +282,3 @@ apps[app.name] = appCompat; | ||
var componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (_registerComponent(component) && | ||
if (modularAPIs._registerComponent(component) && | ||
component.type === "PUBLIC" /* PUBLIC */) { | ||
@@ -367,3 +379,3 @@ // create service namespace for public components | ||
} | ||
var firebase = createFirebaseNamespace(); | ||
var firebase$1 = createFirebaseNamespace(); | ||
@@ -389,3 +401,3 @@ /** | ||
var name = "@firebase/app-compat"; | ||
var version = "0.0.900-exp.894b5da5a"; | ||
var version = "0.0.900-exp.8b4d7550f"; | ||
@@ -439,7 +451,7 @@ /** | ||
} | ||
var firebase$1 = firebase; | ||
var firebase = firebase$1; | ||
registerCoreComponents(); | ||
export default firebase$1; | ||
export { firebase$1 as firebase }; | ||
export default firebase; | ||
export { firebase }; | ||
//# sourceMappingURL=index.esm5.js.map |
import * as modularAPIs from '@firebase/app'; | ||
import { deleteApp, _addComponent, _DEFAULT_ENTRY_NAME, registerVersion, setLogLevel, onLog, SDK_VERSION, initializeApp, _registerComponent } from '@firebase/app'; | ||
import { deleteApp, _addComponent, _DEFAULT_ENTRY_NAME, registerVersion } from '@firebase/app'; | ||
import { Component } from '@firebase/component'; | ||
@@ -148,8 +148,8 @@ import { ErrorFactory, contains, deepExtend } from '@firebase/util'; | ||
app: app, | ||
registerVersion: registerVersion, | ||
setLogLevel: setLogLevel, | ||
onLog: onLog, | ||
registerVersion: modularAPIs.registerVersion, | ||
setLogLevel: modularAPIs.setLogLevel, | ||
onLog: modularAPIs.onLog, | ||
// @ts-ignore | ||
apps: null, | ||
SDK_VERSION: SDK_VERSION, | ||
SDK_VERSION: modularAPIs.SDK_VERSION, | ||
INTERNAL: { | ||
@@ -189,3 +189,3 @@ registerComponent: registerComponentCompat, | ||
function app(name) { | ||
name = name || _DEFAULT_ENTRY_NAME; | ||
name = name || modularAPIs._DEFAULT_ENTRY_NAME; | ||
if (!contains(apps, name)) { | ||
@@ -200,6 +200,11 @@ throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name }); | ||
* Create a new App instance (name must be unique). | ||
* | ||
* This function is idempotent. It can be called more than once and return the same instance using the same options and config. | ||
*/ | ||
function initializeAppCompat(options, rawConfig) { | ||
if (rawConfig === void 0) { rawConfig = {}; } | ||
var app = initializeApp(options, rawConfig); | ||
var app = modularAPIs.initializeApp(options, rawConfig); | ||
if (contains(apps, app.name)) { | ||
return apps[app.name]; | ||
} | ||
var appCompat = new firebaseAppImpl(app, namespace); | ||
@@ -219,3 +224,3 @@ apps[app.name] = appCompat; | ||
var componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (_registerComponent(component) && | ||
if (modularAPIs._registerComponent(component) && | ||
component.type === "PUBLIC" /* PUBLIC */) { | ||
@@ -306,4 +311,4 @@ // create service namespace for public components | ||
if (component.type === "PUBLIC" /* PUBLIC */ && | ||
component.name !== 'performance' && | ||
component.name !== 'installations') { | ||
!component.name.includes('performance') && | ||
!component.name.includes('installations')) { | ||
throw Error(name + " cannot register with the standalone perf instance"); | ||
@@ -317,3 +322,3 @@ } | ||
var name$1 = "@firebase/app-compat"; | ||
var version = "0.0.900-exp.894b5da5a"; | ||
var version = "0.0.900-exp.8b4d7550f"; | ||
@@ -320,0 +325,0 @@ /** |
import * as modularAPIs from '@firebase/app'; | ||
import { _addComponent, deleteApp, _DEFAULT_ENTRY_NAME, registerVersion, setLogLevel, onLog, SDK_VERSION, initializeApp, _registerComponent } from '@firebase/app'; | ||
import { _addComponent, deleteApp, _DEFAULT_ENTRY_NAME, registerVersion } from '@firebase/app'; | ||
import { Component } from '@firebase/component'; | ||
@@ -132,8 +132,8 @@ import { ErrorFactory, contains, deepExtend } from '@firebase/util'; | ||
app, | ||
registerVersion: registerVersion, | ||
setLogLevel: setLogLevel, | ||
onLog: onLog, | ||
registerVersion: modularAPIs.registerVersion, | ||
setLogLevel: modularAPIs.setLogLevel, | ||
onLog: modularAPIs.onLog, | ||
// @ts-ignore | ||
apps: null, | ||
SDK_VERSION: SDK_VERSION, | ||
SDK_VERSION: modularAPIs.SDK_VERSION, | ||
INTERNAL: { | ||
@@ -173,3 +173,3 @@ registerComponent: registerComponentCompat, | ||
function app(name) { | ||
name = name || _DEFAULT_ENTRY_NAME; | ||
name = name || modularAPIs._DEFAULT_ENTRY_NAME; | ||
if (!contains(apps, name)) { | ||
@@ -184,5 +184,10 @@ throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name }); | ||
* Create a new App instance (name must be unique). | ||
* | ||
* This function is idempotent. It can be called more than once and return the same instance using the same options and config. | ||
*/ | ||
function initializeAppCompat(options, rawConfig = {}) { | ||
const app = initializeApp(options, rawConfig); | ||
const app = modularAPIs.initializeApp(options, rawConfig); | ||
if (contains(apps, app.name)) { | ||
return apps[app.name]; | ||
} | ||
const appCompat = new firebaseAppImpl(app, namespace); | ||
@@ -202,3 +207,3 @@ apps[app.name] = appCompat; | ||
const componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (_registerComponent(component) && | ||
if (modularAPIs._registerComponent(component) && | ||
component.type === "PUBLIC" /* PUBLIC */) { | ||
@@ -284,4 +289,4 @@ // create service namespace for public components | ||
if (component.type === "PUBLIC" /* PUBLIC */ && | ||
component.name !== 'performance' && | ||
component.name !== 'installations') { | ||
!component.name.includes('performance') && | ||
!component.name.includes('installations')) { | ||
throw Error(`${name} cannot register with the standalone perf instance`); | ||
@@ -295,3 +300,3 @@ } | ||
const name$1 = "@firebase/app-compat"; | ||
const version = "0.0.900-exp.894b5da5a"; | ||
const version = "0.0.900-exp.8b4d7550f"; | ||
@@ -298,0 +303,0 @@ /** |
{ | ||
"name": "@firebase/app-compat", | ||
"version": "0.0.900-exp.894b5da5a", | ||
"version": "0.0.900-exp.8b4d7550f", | ||
"description": "The primary entrypoint to the Firebase JS SDK", | ||
@@ -31,6 +31,6 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)", | ||
"dependencies": { | ||
"@firebase/app": "0.0.900-exp.894b5da5a", | ||
"@firebase/util": "1.0.0", | ||
"@firebase/app": "0.0.900-exp.8b4d7550f", | ||
"@firebase/util": "1.2.0", | ||
"@firebase/logger": "0.2.6", | ||
"@firebase/component": "0.4.1", | ||
"@firebase/component": "0.5.5", | ||
"tslib": "^2.1.0", | ||
@@ -41,6 +41,6 @@ "dom-storage": "2.1.0", | ||
"devDependencies": { | ||
"rollup": "2.35.1", | ||
"rollup": "2.52.2", | ||
"@rollup/plugin-json": "4.1.0", | ||
"rollup-plugin-replace": "2.2.0", | ||
"rollup-plugin-typescript2": "0.29.0", | ||
"rollup-plugin-typescript2": "0.30.0", | ||
"typescript": "4.2.2" | ||
@@ -47,0 +47,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
219800
2542
+ Added@firebase/app@0.0.900-exp.8b4d7550f(transitive)
+ Added@firebase/component@0.5.5(transitive)
+ Added@firebase/util@1.2.0(transitive)
- Removed@firebase/app@0.0.900-exp.894b5da5a(transitive)
- Removed@firebase/component@0.4.1(transitive)
- Removed@firebase/util@1.0.0(transitive)
Updated@firebase/component@0.5.5
Updated@firebase/util@1.2.0