@firebase/app-compat
Advanced tools
Comparing version 0.0.800-exp.fe55004be to 0.0.900-exp.1e0eb201d
@@ -8,5 +8,27 @@ 'use strict'; | ||
var component = require('@firebase/component'); | ||
var app = require('@firebase/app'); | ||
var modularAPIs = require('@firebase/app'); | ||
var logger$1 = require('@firebase/logger'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { | ||
return e[k]; | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
n['default'] = e; | ||
return Object.freeze(n); | ||
} | ||
var modularAPIs__namespace = /*#__PURE__*/_interopNamespace(modularAPIs); | ||
/** | ||
@@ -33,10 +55,10 @@ * @license | ||
var FirebaseAppImpl = /** @class */ (function () { | ||
function FirebaseAppImpl(app$1, firebase) { | ||
function FirebaseAppImpl(app, firebase) { | ||
var _this = this; | ||
this.app = app$1; | ||
this.app = app; | ||
this.firebase = firebase; | ||
// add itself to container | ||
// TODO: change the component name to 'app-compat' before the official release | ||
app._addComponent(app$1, new component.Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */)); | ||
this.container = app$1.container; | ||
modularAPIs._addComponent(app, new component.Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */)); | ||
this.container = app.container; | ||
} | ||
@@ -74,3 +96,3 @@ Object.defineProperty(FirebaseAppImpl.prototype, "automaticDataCollectionEnabled", { | ||
_this.firebase.INTERNAL.removeApp(_this.name); | ||
return app.deleteApp(_this.app); | ||
return modularAPIs.deleteApp(_this.app); | ||
}); | ||
@@ -93,3 +115,3 @@ }; | ||
FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) { | ||
if (instanceIdentifier === void 0) { instanceIdentifier = app._DEFAULT_ENTRY_NAME; } | ||
if (instanceIdentifier === void 0) { instanceIdentifier = modularAPIs._DEFAULT_ENTRY_NAME; } | ||
this.app.checkDestroyed(); | ||
@@ -112,3 +134,3 @@ // getImmediate will always succeed because _getService is only called for registered components. | ||
FirebaseAppImpl.prototype._removeServiceInstance = function (name, instanceIdentifier) { | ||
if (instanceIdentifier === void 0) { instanceIdentifier = app._DEFAULT_ENTRY_NAME; } | ||
if (instanceIdentifier === void 0) { instanceIdentifier = modularAPIs._DEFAULT_ENTRY_NAME; } | ||
this.app.container | ||
@@ -124,6 +146,6 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
FirebaseAppImpl.prototype._addComponent = function (component) { | ||
app._addComponent(this.app, component); | ||
modularAPIs._addComponent(this.app, component); | ||
}; | ||
FirebaseAppImpl.prototype._addOrOverwriteComponent = function (component) { | ||
app._addOrOverwriteComponent(this.app, component); | ||
modularAPIs._addOrOverwriteComponent(this.app, component); | ||
}; | ||
@@ -199,13 +221,14 @@ return FirebaseAppImpl; | ||
// @ts-ignore | ||
app: app$1, | ||
registerVersion: app.registerVersion, | ||
setLogLevel: app.setLogLevel, | ||
onLog: app.onLog, | ||
app: app, | ||
registerVersion: modularAPIs.registerVersion, | ||
setLogLevel: modularAPIs.setLogLevel, | ||
onLog: modularAPIs.onLog, | ||
// @ts-ignore | ||
apps: null, | ||
SDK_VERSION: app.SDK_VERSION, | ||
SDK_VERSION: modularAPIs.SDK_VERSION, | ||
INTERNAL: { | ||
registerComponent: registerComponentCompat, | ||
removeApp: removeApp, | ||
useAsService: useAsService | ||
useAsService: useAsService, | ||
modularAPIs: modularAPIs__namespace | ||
} | ||
@@ -239,4 +262,4 @@ }; | ||
*/ | ||
function app$1(name) { | ||
name = name || app._DEFAULT_ENTRY_NAME; | ||
function app(name) { | ||
name = name || modularAPIs._DEFAULT_ENTRY_NAME; | ||
if (!util.contains(apps, name)) { | ||
@@ -248,3 +271,3 @@ throw ERROR_FACTORY.create("no-app" /* NO_APP */, { appName: name }); | ||
// @ts-ignore | ||
app$1['App'] = firebaseAppImpl; | ||
app['App'] = firebaseAppImpl; | ||
/** | ||
@@ -255,5 +278,5 @@ * Create a new App instance (name must be unique). | ||
if (rawConfig === void 0) { rawConfig = {}; } | ||
var app$1 = app.initializeApp(options, rawConfig); | ||
var appCompat = new firebaseAppImpl(app$1, namespace); | ||
apps[app$1.name] = appCompat; | ||
var app = modularAPIs.initializeApp(options, rawConfig); | ||
var appCompat = new firebaseAppImpl(app, namespace); | ||
apps[app.name] = appCompat; | ||
return appCompat; | ||
@@ -270,3 +293,3 @@ } | ||
var componentName = component.name; | ||
if (app._registerComponent(component) && | ||
if (modularAPIs._registerComponent(component) && | ||
component.type === "PUBLIC" /* PUBLIC */) { | ||
@@ -276,3 +299,3 @@ // create service namespace for public components | ||
var serviceNamespace = function (appArg) { | ||
if (appArg === void 0) { appArg = app$1(); } | ||
if (appArg === void 0) { appArg = app(); } | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -389,3 +412,3 @@ if (typeof appArg[componentName] !== 'function') { | ||
var name = "@firebase/app-compat"; | ||
var version = "0.0.800-exp.fe55004be"; | ||
var version = "0.0.900-exp.1e0eb201d"; | ||
@@ -410,3 +433,3 @@ /** | ||
// Register `app` package. | ||
app.registerVersion(name, version, variant); | ||
modularAPIs.registerVersion(name, version, variant); | ||
} | ||
@@ -413,0 +436,0 @@ |
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'; | ||
@@ -171,12 +172,13 @@ import { Logger } from '@firebase/logger'; | ||
app, | ||
registerVersion, | ||
setLogLevel, | ||
onLog, | ||
registerVersion: registerVersion, | ||
setLogLevel: setLogLevel, | ||
onLog: onLog, | ||
// @ts-ignore | ||
apps: null, | ||
SDK_VERSION, | ||
SDK_VERSION: SDK_VERSION, | ||
INTERNAL: { | ||
registerComponent: registerComponentCompat, | ||
removeApp, | ||
useAsService | ||
useAsService, | ||
modularAPIs | ||
} | ||
@@ -349,3 +351,3 @@ }; | ||
const name = "@firebase/app-compat"; | ||
const version = "0.0.800-exp.fe55004be"; | ||
const version = "0.0.900-exp.1e0eb201d"; | ||
@@ -352,0 +354,0 @@ /** |
import { ErrorFactory, contains, deepExtend, createSubscribe, isBrowser } from '@firebase/util'; | ||
import { __assign } from 'tslib'; | ||
import { Component } from '@firebase/component'; | ||
import * as modularAPIs from '@firebase/app'; | ||
import { deleteApp, _addComponent, _addOrOverwriteComponent, _DEFAULT_ENTRY_NAME, registerVersion, setLogLevel, onLog, SDK_VERSION, initializeApp, _registerComponent } from '@firebase/app'; | ||
@@ -199,3 +200,4 @@ import { Logger } from '@firebase/logger'; | ||
removeApp: removeApp, | ||
useAsService: useAsService | ||
useAsService: useAsService, | ||
modularAPIs: modularAPIs | ||
} | ||
@@ -374,3 +376,3 @@ }; | ||
var name = "@firebase/app-compat"; | ||
var version = "0.0.800-exp.fe55004be"; | ||
var version = "0.0.900-exp.1e0eb201d"; | ||
@@ -377,0 +379,0 @@ /** |
@@ -0,1 +1,2 @@ | ||
import * as modularAPIs from '@firebase/app'; | ||
import { _addComponent, deleteApp, _DEFAULT_ENTRY_NAME, registerVersion, setLogLevel, onLog, SDK_VERSION, initializeApp, _registerComponent } from '@firebase/app'; | ||
@@ -131,12 +132,13 @@ import { Component } from '@firebase/component'; | ||
app, | ||
registerVersion, | ||
setLogLevel, | ||
onLog, | ||
registerVersion: registerVersion, | ||
setLogLevel: setLogLevel, | ||
onLog: onLog, | ||
// @ts-ignore | ||
apps: null, | ||
SDK_VERSION, | ||
SDK_VERSION: SDK_VERSION, | ||
INTERNAL: { | ||
registerComponent: registerComponentCompat, | ||
removeApp, | ||
useAsService | ||
useAsService, | ||
modularAPIs | ||
} | ||
@@ -289,3 +291,3 @@ }; | ||
const name$1 = "@firebase/app-compat"; | ||
const version = "0.0.800-exp.fe55004be"; | ||
const version = "0.0.900-exp.1e0eb201d"; | ||
@@ -292,0 +294,0 @@ /** |
@@ -0,1 +1,2 @@ | ||
import * as modularAPIs from '@firebase/app'; | ||
import { deleteApp, _addComponent, _DEFAULT_ENTRY_NAME, registerVersion, setLogLevel, onLog, SDK_VERSION, initializeApp, _registerComponent } from '@firebase/app'; | ||
@@ -156,3 +157,4 @@ import { Component } from '@firebase/component'; | ||
removeApp: removeApp, | ||
useAsService: useAsService | ||
useAsService: useAsService, | ||
modularAPIs: modularAPIs | ||
} | ||
@@ -311,3 +313,3 @@ }; | ||
var name$1 = "@firebase/app-compat"; | ||
var version = "0.0.800-exp.fe55004be"; | ||
var version = "0.0.900-exp.1e0eb201d"; | ||
@@ -314,0 +316,0 @@ /** |
{ | ||
"name": "@firebase/app-compat", | ||
"version": "0.0.800-exp.fe55004be", | ||
"version": "0.0.900-exp.1e0eb201d", | ||
"description": "The primary entrypoint to the Firebase JS SDK", | ||
@@ -33,6 +33,6 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)", | ||
"dependencies": { | ||
"@firebase/app": "0.0.800-exp.fe55004be", | ||
"@firebase/util": "0.3.2", | ||
"@firebase/app": "0.0.900-exp.1e0eb201d", | ||
"@firebase/util": "0.3.4", | ||
"@firebase/logger": "0.2.6", | ||
"@firebase/component": "0.1.19", | ||
"@firebase/component": "0.1.21", | ||
"tslib": "^1.11.1", | ||
@@ -43,7 +43,7 @@ "dom-storage": "2.1.0", | ||
"devDependencies": { | ||
"rollup": "2.28.1", | ||
"rollup-plugin-json": "4.0.0", | ||
"rollup": "2.33.2", | ||
"@rollup/plugin-json": "4.1.0", | ||
"rollup-plugin-replace": "2.2.0", | ||
"rollup-plugin-typescript2": "0.27.2", | ||
"typescript": "4.0.2" | ||
"rollup-plugin-typescript2": "0.29.0", | ||
"typescript": "4.0.5" | ||
}, | ||
@@ -50,0 +50,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
202887
2283
+ Added@firebase/app@0.0.900-exp.1e0eb201d(transitive)
+ Added@firebase/app-types@0.0.900-exp.1e0eb201d(transitive)
+ Added@firebase/component@0.1.21(transitive)
+ Added@firebase/util@0.3.4(transitive)
- Removed@firebase/app@0.0.800-exp.fe55004be(transitive)
- Removed@firebase/app-types@0.0.800-exp.fe55004be(transitive)
- Removed@firebase/component@0.1.19(transitive)
- Removed@firebase/util@0.3.2(transitive)
Updated@firebase/component@0.1.21
Updated@firebase/util@0.3.4