@firebase/app-compat
Advanced tools
Comparing version 0.0.900-exp.ab60f5fa9 to 0.0.900-exp.b0c8425bc
@@ -54,17 +54,16 @@ 'use strict'; | ||
var FirebaseAppImpl = /** @class */ (function () { | ||
function FirebaseAppImpl(app, firebase) { | ||
function FirebaseAppImpl(_delegate, firebase) { | ||
var _this = this; | ||
this.app = app; | ||
this._delegate = _delegate; | ||
this.firebase = firebase; | ||
// add itself to container | ||
// TODO: change the component name to 'app-compat' before the official release | ||
modularAPIs._addComponent(app, new component.Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */)); | ||
this.container = app.container; | ||
modularAPIs._addComponent(_delegate, new component.Component('app-compat', function () { return _this; }, "PUBLIC" /* PUBLIC */)); | ||
this.container = _delegate.container; | ||
} | ||
Object.defineProperty(FirebaseAppImpl.prototype, "automaticDataCollectionEnabled", { | ||
get: function () { | ||
return this.app.automaticDataCollectionEnabled; | ||
return this._delegate.automaticDataCollectionEnabled; | ||
}, | ||
set: function (val) { | ||
this.app.automaticDataCollectionEnabled = val; | ||
this._delegate.automaticDataCollectionEnabled = val; | ||
}, | ||
@@ -76,3 +75,3 @@ enumerable: false, | ||
get: function () { | ||
return this.app.name; | ||
return this._delegate.name; | ||
}, | ||
@@ -84,3 +83,3 @@ enumerable: false, | ||
get: function () { | ||
return this.app.options; | ||
return this._delegate.options; | ||
}, | ||
@@ -93,7 +92,7 @@ enumerable: false, | ||
return new Promise(function (resolve) { | ||
_this.app.checkDestroyed(); | ||
_this._delegate.checkDestroyed(); | ||
resolve(); | ||
}).then(function () { | ||
_this.firebase.INTERNAL.removeApp(_this.name); | ||
return modularAPIs.deleteApp(_this.app); | ||
return modularAPIs.deleteApp(_this._delegate); | ||
}); | ||
@@ -117,5 +116,5 @@ }; | ||
if (instanceIdentifier === void 0) { instanceIdentifier = modularAPIs._DEFAULT_ENTRY_NAME; } | ||
this.app.checkDestroyed(); | ||
this._delegate.checkDestroyed(); | ||
// getImmediate will always succeed because _getService is only called for registered components. | ||
return this.app.container.getProvider(name).getImmediate({ | ||
return this._delegate.container.getProvider(name).getImmediate({ | ||
identifier: instanceIdentifier | ||
@@ -136,3 +135,3 @@ }); | ||
if (instanceIdentifier === void 0) { instanceIdentifier = modularAPIs._DEFAULT_ENTRY_NAME; } | ||
this.app.container | ||
this._delegate.container | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -147,7 +146,14 @@ .getProvider(name) | ||
FirebaseAppImpl.prototype._addComponent = function (component) { | ||
modularAPIs._addComponent(this.app, component); | ||
modularAPIs._addComponent(this._delegate, component); | ||
}; | ||
FirebaseAppImpl.prototype._addOrOverwriteComponent = function (component) { | ||
modularAPIs._addOrOverwriteComponent(this.app, component); | ||
modularAPIs._addOrOverwriteComponent(this._delegate, component); | ||
}; | ||
FirebaseAppImpl.prototype.toJSON = function () { | ||
return { | ||
name: this.name, | ||
automaticDataCollectionEnabled: this.automaticDataCollectionEnabled, | ||
options: this.options | ||
}; | ||
}; | ||
return FirebaseAppImpl; | ||
@@ -290,2 +296,3 @@ }()); | ||
var componentName = component.name; | ||
var componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (modularAPIs._registerComponent(component) && | ||
@@ -298,3 +305,3 @@ component.type === "PUBLIC" /* PUBLIC */) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
if (typeof appArg[componentName] !== 'function') { | ||
if (typeof appArg[componentNameWithoutCompat] !== 'function') { | ||
// Invalid argument. | ||
@@ -308,3 +315,3 @@ // This happens in the following case: firebase.storage('gs:/') | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
return appArg[componentName](); | ||
return appArg[componentNameWithoutCompat](); | ||
}; | ||
@@ -316,6 +323,6 @@ // ... and a container for service-level properties. | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] = serviceNamespace; | ||
namespace[componentNameWithoutCompat] = serviceNamespace; | ||
// Patch the FirebaseAppImpl prototype | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
firebaseAppImpl.prototype[componentName] = | ||
firebaseAppImpl.prototype[componentNameWithoutCompat] = | ||
// TODO: The eslint disable can be removed and the 'ignoreRestArgs' | ||
@@ -335,3 +342,3 @@ // option added to the no-explicit-any rule when ESlint releases it. | ||
? // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] | ||
namespace[componentNameWithoutCompat] | ||
: null; | ||
@@ -412,3 +419,3 @@ } | ||
var name = "@firebase/app-compat"; | ||
var version = "0.0.900"; | ||
var version = "0.0.900-exp.b0c8425bc"; | ||
@@ -415,0 +422,0 @@ /** |
@@ -28,29 +28,28 @@ import { ErrorFactory, contains, deepExtend, createSubscribe, isBrowser } from '@firebase/util'; | ||
class FirebaseAppImpl { | ||
constructor(app, firebase) { | ||
this.app = app; | ||
constructor(_delegate, firebase) { | ||
this._delegate = _delegate; | ||
this.firebase = firebase; | ||
// add itself to container | ||
// TODO: change the component name to 'app-compat' before the official release | ||
_addComponent(app, new Component('app', () => this, "PUBLIC" /* PUBLIC */)); | ||
this.container = app.container; | ||
_addComponent(_delegate, new Component('app-compat', () => this, "PUBLIC" /* PUBLIC */)); | ||
this.container = _delegate.container; | ||
} | ||
get automaticDataCollectionEnabled() { | ||
return this.app.automaticDataCollectionEnabled; | ||
return this._delegate.automaticDataCollectionEnabled; | ||
} | ||
set automaticDataCollectionEnabled(val) { | ||
this.app.automaticDataCollectionEnabled = val; | ||
this._delegate.automaticDataCollectionEnabled = val; | ||
} | ||
get name() { | ||
return this.app.name; | ||
return this._delegate.name; | ||
} | ||
get options() { | ||
return this.app.options; | ||
return this._delegate.options; | ||
} | ||
delete() { | ||
return new Promise(resolve => { | ||
this.app.checkDestroyed(); | ||
this._delegate.checkDestroyed(); | ||
resolve(); | ||
}).then(() => { | ||
this.firebase.INTERNAL.removeApp(this.name); | ||
return deleteApp(this.app); | ||
return deleteApp(this._delegate); | ||
}); | ||
@@ -73,5 +72,5 @@ } | ||
_getService(name, instanceIdentifier = _DEFAULT_ENTRY_NAME) { | ||
this.app.checkDestroyed(); | ||
this._delegate.checkDestroyed(); | ||
// getImmediate will always succeed because _getService is only called for registered components. | ||
return this.app.container.getProvider(name).getImmediate({ | ||
return this._delegate.container.getProvider(name).getImmediate({ | ||
identifier: instanceIdentifier | ||
@@ -91,3 +90,3 @@ }); | ||
_removeServiceInstance(name, instanceIdentifier = _DEFAULT_ENTRY_NAME) { | ||
this.app.container | ||
this._delegate.container | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -102,7 +101,14 @@ .getProvider(name) | ||
_addComponent(component) { | ||
_addComponent(this.app, component); | ||
_addComponent(this._delegate, component); | ||
} | ||
_addOrOverwriteComponent(component) { | ||
_addOrOverwriteComponent(this.app, component); | ||
_addOrOverwriteComponent(this._delegate, component); | ||
} | ||
toJSON() { | ||
return { | ||
name: this.name, | ||
automaticDataCollectionEnabled: this.automaticDataCollectionEnabled, | ||
options: this.options | ||
}; | ||
} | ||
} | ||
@@ -242,2 +248,3 @@ // TODO: investigate why the following needs to be commented out | ||
const componentName = component.name; | ||
const componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (_registerComponent(component) && | ||
@@ -249,3 +256,3 @@ component.type === "PUBLIC" /* PUBLIC */) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
if (typeof appArg[componentName] !== 'function') { | ||
if (typeof appArg[componentNameWithoutCompat] !== 'function') { | ||
// Invalid argument. | ||
@@ -259,3 +266,3 @@ // This happens in the following case: firebase.storage('gs:/') | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
return appArg[componentName](); | ||
return appArg[componentNameWithoutCompat](); | ||
}; | ||
@@ -267,6 +274,6 @@ // ... and a container for service-level properties. | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] = serviceNamespace; | ||
namespace[componentNameWithoutCompat] = serviceNamespace; | ||
// Patch the FirebaseAppImpl prototype | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
firebaseAppImpl.prototype[componentName] = | ||
firebaseAppImpl.prototype[componentNameWithoutCompat] = | ||
// TODO: The eslint disable can be removed and the 'ignoreRestArgs' | ||
@@ -282,3 +289,3 @@ // option added to the no-explicit-any rule when ESlint releases it. | ||
? // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] | ||
namespace[componentNameWithoutCompat] | ||
: null; | ||
@@ -359,3 +366,3 @@ } | ||
const name = "@firebase/app-compat"; | ||
const version = "0.0.900"; | ||
const version = "0.0.900-exp.b0c8425bc"; | ||
@@ -362,0 +369,0 @@ /** |
@@ -29,17 +29,16 @@ import { ErrorFactory, contains, deepExtend, createSubscribe, isBrowser } from '@firebase/util'; | ||
var FirebaseAppImpl = /** @class */ (function () { | ||
function FirebaseAppImpl(app, firebase) { | ||
function FirebaseAppImpl(_delegate, firebase) { | ||
var _this = this; | ||
this.app = app; | ||
this._delegate = _delegate; | ||
this.firebase = firebase; | ||
// add itself to container | ||
// TODO: change the component name to 'app-compat' before the official release | ||
_addComponent(app, new Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */)); | ||
this.container = app.container; | ||
_addComponent(_delegate, new Component('app-compat', function () { return _this; }, "PUBLIC" /* PUBLIC */)); | ||
this.container = _delegate.container; | ||
} | ||
Object.defineProperty(FirebaseAppImpl.prototype, "automaticDataCollectionEnabled", { | ||
get: function () { | ||
return this.app.automaticDataCollectionEnabled; | ||
return this._delegate.automaticDataCollectionEnabled; | ||
}, | ||
set: function (val) { | ||
this.app.automaticDataCollectionEnabled = val; | ||
this._delegate.automaticDataCollectionEnabled = val; | ||
}, | ||
@@ -51,3 +50,3 @@ enumerable: false, | ||
get: function () { | ||
return this.app.name; | ||
return this._delegate.name; | ||
}, | ||
@@ -59,3 +58,3 @@ enumerable: false, | ||
get: function () { | ||
return this.app.options; | ||
return this._delegate.options; | ||
}, | ||
@@ -68,7 +67,7 @@ enumerable: false, | ||
return new Promise(function (resolve) { | ||
_this.app.checkDestroyed(); | ||
_this._delegate.checkDestroyed(); | ||
resolve(); | ||
}).then(function () { | ||
_this.firebase.INTERNAL.removeApp(_this.name); | ||
return deleteApp(_this.app); | ||
return deleteApp(_this._delegate); | ||
}); | ||
@@ -92,5 +91,5 @@ }; | ||
if (instanceIdentifier === void 0) { instanceIdentifier = _DEFAULT_ENTRY_NAME; } | ||
this.app.checkDestroyed(); | ||
this._delegate.checkDestroyed(); | ||
// getImmediate will always succeed because _getService is only called for registered components. | ||
return this.app.container.getProvider(name).getImmediate({ | ||
return this._delegate.container.getProvider(name).getImmediate({ | ||
identifier: instanceIdentifier | ||
@@ -111,3 +110,3 @@ }); | ||
if (instanceIdentifier === void 0) { instanceIdentifier = _DEFAULT_ENTRY_NAME; } | ||
this.app.container | ||
this._delegate.container | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -122,7 +121,14 @@ .getProvider(name) | ||
FirebaseAppImpl.prototype._addComponent = function (component) { | ||
_addComponent(this.app, component); | ||
_addComponent(this._delegate, component); | ||
}; | ||
FirebaseAppImpl.prototype._addOrOverwriteComponent = function (component) { | ||
_addOrOverwriteComponent(this.app, component); | ||
_addOrOverwriteComponent(this._delegate, component); | ||
}; | ||
FirebaseAppImpl.prototype.toJSON = function () { | ||
return { | ||
name: this.name, | ||
automaticDataCollectionEnabled: this.automaticDataCollectionEnabled, | ||
options: this.options | ||
}; | ||
}; | ||
return FirebaseAppImpl; | ||
@@ -265,2 +271,3 @@ }()); | ||
var componentName = component.name; | ||
var componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (_registerComponent(component) && | ||
@@ -273,3 +280,3 @@ component.type === "PUBLIC" /* PUBLIC */) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
if (typeof appArg[componentName] !== 'function') { | ||
if (typeof appArg[componentNameWithoutCompat] !== 'function') { | ||
// Invalid argument. | ||
@@ -283,3 +290,3 @@ // This happens in the following case: firebase.storage('gs:/') | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
return appArg[componentName](); | ||
return appArg[componentNameWithoutCompat](); | ||
}; | ||
@@ -291,6 +298,6 @@ // ... and a container for service-level properties. | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] = serviceNamespace; | ||
namespace[componentNameWithoutCompat] = serviceNamespace; | ||
// Patch the FirebaseAppImpl prototype | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
firebaseAppImpl.prototype[componentName] = | ||
firebaseAppImpl.prototype[componentNameWithoutCompat] = | ||
// TODO: The eslint disable can be removed and the 'ignoreRestArgs' | ||
@@ -310,3 +317,3 @@ // option added to the no-explicit-any rule when ESlint releases it. | ||
? // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] | ||
namespace[componentNameWithoutCompat] | ||
: null; | ||
@@ -387,3 +394,3 @@ } | ||
var name = "@firebase/app-compat"; | ||
var version = "0.0.900"; | ||
var version = "0.0.900-exp.b0c8425bc"; | ||
@@ -390,0 +397,0 @@ /** |
@@ -27,10 +27,10 @@ import * as modularAPIs from '@firebase/app'; | ||
class FirebaseAppLiteImpl { | ||
constructor(app, firebase) { | ||
this.app = app; | ||
constructor(_delegate, firebase) { | ||
this._delegate = _delegate; | ||
this.firebase = firebase; | ||
// add itself to container | ||
_addComponent(app, new Component('app', () => this, "PUBLIC" /* PUBLIC */)); | ||
_addComponent(_delegate, new Component('app-compat', () => this, "PUBLIC" /* PUBLIC */)); | ||
} | ||
get automaticDataCollectionEnabled() { | ||
return this.app.automaticDataCollectionEnabled; | ||
return this._delegate.automaticDataCollectionEnabled; | ||
} | ||
@@ -41,10 +41,10 @@ set automaticDataCollectionEnabled(val) { | ||
get name() { | ||
return this.app.name; | ||
return this._delegate.name; | ||
} | ||
get options() { | ||
return this.app.options; | ||
return this._delegate.options; | ||
} | ||
delete() { | ||
this.firebase.INTERNAL.removeApp(this.name); | ||
return deleteApp(this.app); | ||
return deleteApp(this._delegate); | ||
} | ||
@@ -66,5 +66,5 @@ /** | ||
_getService(name, instanceIdentifier = _DEFAULT_ENTRY_NAME) { | ||
this.app.checkDestroyed(); | ||
this._delegate.checkDestroyed(); | ||
// getImmediate will always succeed because _getService is only called for registered components. | ||
return this.app.container.getProvider(name).getImmediate({ | ||
return this._delegate.container.getProvider(name).getImmediate({ | ||
identifier: instanceIdentifier | ||
@@ -201,2 +201,3 @@ }); | ||
const componentName = component.name; | ||
const componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (_registerComponent(component) && | ||
@@ -208,3 +209,3 @@ component.type === "PUBLIC" /* PUBLIC */) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
if (typeof appArg[componentName] !== 'function') { | ||
if (typeof appArg[componentNameWithoutCompat] !== 'function') { | ||
// Invalid argument. | ||
@@ -218,3 +219,3 @@ // This happens in the following case: firebase.storage('gs:/') | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
return appArg[componentName](); | ||
return appArg[componentNameWithoutCompat](); | ||
}; | ||
@@ -226,6 +227,6 @@ // ... and a container for service-level properties. | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] = serviceNamespace; | ||
namespace[componentNameWithoutCompat] = serviceNamespace; | ||
// Patch the FirebaseAppImpl prototype | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
firebaseAppImpl.prototype[componentName] = | ||
firebaseAppImpl.prototype[componentNameWithoutCompat] = | ||
// TODO: The eslint disable can be removed and the 'ignoreRestArgs' | ||
@@ -241,3 +242,3 @@ // option added to the no-explicit-any rule when ESlint releases it. | ||
? // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] | ||
namespace[componentNameWithoutCompat] | ||
: null; | ||
@@ -276,4 +277,3 @@ } | ||
namespace.SDK_VERSION = `${namespace.SDK_VERSION}_LITE`; | ||
const registerComponent = namespace.INTERNAL | ||
.registerComponent; | ||
const registerComponent = namespace.INTERNAL.registerComponent; | ||
namespace.INTERNAL.registerComponent = registerComponentForLite; | ||
@@ -299,3 +299,3 @@ /** | ||
const name$1 = "@firebase/app-compat"; | ||
const version = "0.0.900"; | ||
const version = "0.0.900-exp.b0c8425bc"; | ||
@@ -302,0 +302,0 @@ /** |
@@ -27,12 +27,12 @@ import * as modularAPIs from '@firebase/app'; | ||
var FirebaseAppLiteImpl = /** @class */ (function () { | ||
function FirebaseAppLiteImpl(app, firebase) { | ||
function FirebaseAppLiteImpl(_delegate, firebase) { | ||
var _this = this; | ||
this.app = app; | ||
this._delegate = _delegate; | ||
this.firebase = firebase; | ||
// add itself to container | ||
_addComponent(app, new Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */)); | ||
_addComponent(_delegate, new Component('app-compat', function () { return _this; }, "PUBLIC" /* PUBLIC */)); | ||
} | ||
Object.defineProperty(FirebaseAppLiteImpl.prototype, "automaticDataCollectionEnabled", { | ||
get: function () { | ||
return this.app.automaticDataCollectionEnabled; | ||
return this._delegate.automaticDataCollectionEnabled; | ||
}, | ||
@@ -47,3 +47,3 @@ set: function (val) { | ||
get: function () { | ||
return this.app.name; | ||
return this._delegate.name; | ||
}, | ||
@@ -55,3 +55,3 @@ enumerable: false, | ||
get: function () { | ||
return this.app.options; | ||
return this._delegate.options; | ||
}, | ||
@@ -63,3 +63,3 @@ enumerable: false, | ||
this.firebase.INTERNAL.removeApp(this.name); | ||
return deleteApp(this.app); | ||
return deleteApp(this._delegate); | ||
}; | ||
@@ -82,5 +82,5 @@ /** | ||
if (instanceIdentifier === void 0) { instanceIdentifier = _DEFAULT_ENTRY_NAME; } | ||
this.app.checkDestroyed(); | ||
this._delegate.checkDestroyed(); | ||
// getImmediate will always succeed because _getService is only called for registered components. | ||
return this.app.container.getProvider(name).getImmediate({ | ||
return this._delegate.container.getProvider(name).getImmediate({ | ||
identifier: instanceIdentifier | ||
@@ -220,2 +220,3 @@ }); | ||
var componentName = component.name; | ||
var componentNameWithoutCompat = componentName.replace('-compat', ''); | ||
if (_registerComponent(component) && | ||
@@ -228,3 +229,3 @@ component.type === "PUBLIC" /* PUBLIC */) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
if (typeof appArg[componentName] !== 'function') { | ||
if (typeof appArg[componentNameWithoutCompat] !== 'function') { | ||
// Invalid argument. | ||
@@ -238,3 +239,3 @@ // This happens in the following case: firebase.storage('gs:/') | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
return appArg[componentName](); | ||
return appArg[componentNameWithoutCompat](); | ||
}; | ||
@@ -246,6 +247,6 @@ // ... and a container for service-level properties. | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] = serviceNamespace; | ||
namespace[componentNameWithoutCompat] = serviceNamespace; | ||
// Patch the FirebaseAppImpl prototype | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
firebaseAppImpl.prototype[componentName] = | ||
firebaseAppImpl.prototype[componentNameWithoutCompat] = | ||
// TODO: The eslint disable can be removed and the 'ignoreRestArgs' | ||
@@ -265,3 +266,3 @@ // option added to the no-explicit-any rule when ESlint releases it. | ||
? // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
namespace[componentName] | ||
namespace[componentNameWithoutCompat] | ||
: null; | ||
@@ -300,4 +301,3 @@ } | ||
namespace.SDK_VERSION = namespace.SDK_VERSION + "_LITE"; | ||
var registerComponent = namespace.INTERNAL | ||
.registerComponent; | ||
var registerComponent = namespace.INTERNAL.registerComponent; | ||
namespace.INTERNAL.registerComponent = registerComponentForLite; | ||
@@ -323,3 +323,3 @@ /** | ||
var name$1 = "@firebase/app-compat"; | ||
var version = "0.0.900"; | ||
var version = "0.0.900-exp.b0c8425bc"; | ||
@@ -326,0 +326,0 @@ /** |
@@ -17,6 +17,26 @@ /** | ||
*/ | ||
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types'; | ||
import { _FirebaseNamespace, FirebaseService } from '@firebase/app-types/private'; | ||
import { FirebaseOptions } from './public-types'; | ||
import { Component } from '@firebase/component'; | ||
import { _FirebaseAppInternal } from "@firebase/app-types"; | ||
import { _FirebaseAppInternal as _FirebaseAppExp } from "@firebase/app"; | ||
import { _FirebaseService, _FirebaseNamespace } from './types'; | ||
import { Compat } from '@firebase/util'; | ||
export interface _FirebaseApp { | ||
/** | ||
* The (read-only) name (identifier) for this App. '[DEFAULT]' is the default | ||
* App. | ||
*/ | ||
name: string; | ||
/** | ||
* The (read-only) configuration options from the app initialization. | ||
*/ | ||
options: FirebaseOptions; | ||
/** | ||
* The settable config flag for GDPR opt-in/opt-out | ||
*/ | ||
automaticDataCollectionEnabled: boolean; | ||
/** | ||
* Make the given App unusable and free resources. | ||
*/ | ||
delete(): Promise<void>; | ||
} | ||
/** | ||
@@ -26,7 +46,7 @@ * Global context object for a collection of services using | ||
*/ | ||
export declare class FirebaseAppImpl implements FirebaseApp { | ||
private readonly app; | ||
export declare class FirebaseAppImpl implements Compat<_FirebaseAppExp>, _FirebaseApp { | ||
readonly _delegate: _FirebaseAppExp; | ||
private readonly firebase; | ||
private readonly container; | ||
constructor(app: _FirebaseAppInternal, firebase: _FirebaseNamespace); | ||
private container; | ||
constructor(_delegate: _FirebaseAppExp, firebase: _FirebaseNamespace); | ||
get automaticDataCollectionEnabled(): boolean; | ||
@@ -51,3 +71,3 @@ set automaticDataCollectionEnabled(val: boolean); | ||
*/ | ||
_getService(name: string, instanceIdentifier?: string): FirebaseService; | ||
_getService(name: string, instanceIdentifier?: string): _FirebaseService; | ||
/** | ||
@@ -70,2 +90,3 @@ * Remove a service instance from the cache, so we will create a new instance for this service | ||
_addOrOverwriteComponent(component: Component): void; | ||
toJSON(): object; | ||
} |
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
import { FirebaseNamespace } from '@firebase/app-types'; | ||
import { FirebaseNamespace } from './public-types'; | ||
/** | ||
@@ -20,0 +20,0 @@ * Return a firebase namespace object. |
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
import { FirebaseNamespace } from '@firebase/app-types'; | ||
import { _FirebaseNamespace } from './types'; | ||
import { FirebaseAppImpl } from './firebaseApp'; | ||
@@ -28,2 +28,2 @@ import { FirebaseAppLiteImpl } from './lite/firebaseAppLite'; | ||
*/ | ||
export declare function createFirebaseNamespaceCore(firebaseAppImpl: typeof FirebaseAppImpl | typeof FirebaseAppLiteImpl): FirebaseNamespace; | ||
export declare function createFirebaseNamespaceCore(firebaseAppImpl: typeof FirebaseAppImpl | typeof FirebaseAppLiteImpl): _FirebaseNamespace; |
@@ -17,4 +17,6 @@ /** | ||
*/ | ||
import { FirebaseNamespace } from '@firebase/app-types'; | ||
import { FirebaseNamespace } from './public-types'; | ||
export declare const firebase: FirebaseNamespace; | ||
export default firebase; | ||
export { _FirebaseNamespace, _FirebaseService } from './types'; | ||
export { FirebaseApp, FirebaseNamespace } from './public-types'; |
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
export declare const firebase: import("@firebase/app-types").FirebaseNamespace; | ||
export declare const firebase: import("./public-types").FirebaseNamespace; | ||
export default firebase; |
@@ -17,5 +17,6 @@ /** | ||
*/ | ||
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types'; | ||
import { _FirebaseNamespace, FirebaseService } from '@firebase/app-types/private'; | ||
import { _FirebaseAppInternal } from "@firebase/app-types"; | ||
import { FirebaseApp, FirebaseOptions } from '../public-types'; | ||
import { _FirebaseNamespace, _FirebaseService } from '../types'; | ||
import { _FirebaseAppInternal as FirebaseAppExp } from "@firebase/app"; | ||
import { Compat } from '@firebase/util'; | ||
/** | ||
@@ -25,6 +26,6 @@ * Global context object for a collection of services using | ||
*/ | ||
export declare class FirebaseAppLiteImpl implements FirebaseApp { | ||
private readonly app; | ||
export declare class FirebaseAppLiteImpl implements FirebaseApp, Compat<FirebaseAppExp> { | ||
readonly _delegate: FirebaseAppExp; | ||
private readonly firebase; | ||
constructor(app: _FirebaseAppInternal, firebase: _FirebaseNamespace); | ||
constructor(_delegate: FirebaseAppExp, firebase: _FirebaseNamespace); | ||
get automaticDataCollectionEnabled(): boolean; | ||
@@ -49,3 +50,3 @@ set automaticDataCollectionEnabled(val: boolean); | ||
*/ | ||
_getService(name: string, instanceIdentifier?: string): FirebaseService; | ||
_getService(name: string, instanceIdentifier?: string): _FirebaseService; | ||
} |
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
import { FirebaseNamespace } from '@firebase/app-types'; | ||
import { FirebaseNamespace } from '../public-types'; | ||
export declare function createFirebaseNamespaceLite(): FirebaseNamespace; |
@@ -17,8 +17,9 @@ /** | ||
*/ | ||
import { FirebaseService } from '@firebase/app-types/private'; | ||
import { FirebaseApp } from '@firebase/app-types'; | ||
import { _FirebaseService } from '../src/types'; | ||
import { FirebaseApp } from '../src/public-types'; | ||
import { ComponentType, Component } from '@firebase/component'; | ||
export declare class TestService implements FirebaseService { | ||
export declare class TestService implements _FirebaseService { | ||
private app_; | ||
instanceIdentifier?: string | undefined; | ||
readonly _delegate: {}; | ||
constructor(app_: FirebaseApp, instanceIdentifier?: string | undefined); | ||
@@ -25,0 +26,0 @@ get app(): FirebaseApp; |
{ | ||
"name": "@firebase/app-compat", | ||
"version": "0.0.900-exp.ab60f5fa9", | ||
"version": "0.0.900-exp.b0c8425bc", | ||
"description": "The primary entrypoint to the Firebase JS SDK", | ||
@@ -32,7 +32,7 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)", | ||
"dependencies": { | ||
"@firebase/app": "0.0.900-exp.ab60f5fa9", | ||
"@firebase/util": "0.3.4", | ||
"@firebase/app": "0.0.900-exp.b0c8425bc", | ||
"@firebase/util": "0.4.1", | ||
"@firebase/logger": "0.2.6", | ||
"@firebase/component": "0.1.21", | ||
"tslib": "^1.11.1", | ||
"@firebase/component": "0.4.0", | ||
"tslib": "^2.1.0", | ||
"dom-storage": "2.1.0", | ||
@@ -46,3 +46,3 @@ "xmlhttprequest": "1.8.0" | ||
"rollup-plugin-typescript2": "0.29.0", | ||
"typescript": "4.0.5" | ||
"typescript": "4.2.2" | ||
}, | ||
@@ -49,0 +49,0 @@ "repository": { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215076
27
2496
35
284
+ Added@firebase/app@0.0.900-exp.b0c8425bc(transitive)
+ Added@firebase/component@0.4.0(transitive)
+ Added@firebase/util@0.4.1(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@firebase/app@0.0.900-exp.ab60f5fa9(transitive)
- Removed@firebase/app-types@0.0.900-exp.ab60f5fa9(transitive)
- Removed@firebase/component@0.1.21(transitive)
- Removed@firebase/util@0.3.4(transitive)
- Removedtslib@1.14.1(transitive)
Updated@firebase/component@0.4.0
Updated@firebase/util@0.4.1
Updatedtslib@^2.1.0