@firebase/remote-config-compat
Advanced tools
Comparing version 0.0.900-exp.f18a6d41d to 0.0.900-exp.f8e97019f
@@ -5,3 +5,2 @@ 'use strict'; | ||
var component = require('@firebase/component'); | ||
require('@firebase/remote-config-types'); | ||
var remoteConfig = require('@firebase/remote-config'); | ||
@@ -128,8 +127,8 @@ | ||
function registerRemoteConfigCompat(firebaseInstance) { | ||
firebaseInstance.INTERNAL.registerComponent(new component.Component('remote-config-compat', remoteConfigFactory, "PUBLIC" /* PUBLIC */).setMultipleInstances(true)); | ||
firebaseInstance.INTERNAL.registerComponent(new component.Component('remoteConfig-compat', remoteConfigFactory, "PUBLIC" /* PUBLIC */).setMultipleInstances(true)); | ||
firebaseInstance.registerVersion(name, version); | ||
} | ||
function remoteConfigFactory(container, namespace) { | ||
// TODO: change 'app' to 'app-compat' before the official release | ||
var app = container.getProvider('app').getImmediate(); | ||
function remoteConfigFactory(container, _a) { | ||
var namespace = _a.instanceIdentifier; | ||
var app = container.getProvider('app-compat').getImmediate(); | ||
// The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'` | ||
@@ -136,0 +135,0 @@ var remoteConfig = container.getProvider('remote-config-exp').getImmediate({ |
import firebase from '@firebase/app-compat'; | ||
import { Component } from '@firebase/component'; | ||
import '@firebase/remote-config-types'; | ||
import { activate, ensureInitialized, fetchConfig, fetchAndActivate, getAll, getBoolean, getNumber, getString, getValue, setLogLevel } from '@firebase/remote-config'; | ||
@@ -104,8 +103,7 @@ | ||
function registerRemoteConfigCompat(firebaseInstance) { | ||
firebaseInstance.INTERNAL.registerComponent(new Component('remote-config-compat', remoteConfigFactory, "PUBLIC" /* PUBLIC */).setMultipleInstances(true)); | ||
firebaseInstance.INTERNAL.registerComponent(new Component('remoteConfig-compat', remoteConfigFactory, "PUBLIC" /* PUBLIC */).setMultipleInstances(true)); | ||
firebaseInstance.registerVersion(name, version); | ||
} | ||
function remoteConfigFactory(container, namespace) { | ||
// TODO: change 'app' to 'app-compat' before the official release | ||
const app = container.getProvider('app').getImmediate(); | ||
function remoteConfigFactory(container, { instanceIdentifier: namespace }) { | ||
const app = container.getProvider('app-compat').getImmediate(); | ||
// The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'` | ||
@@ -112,0 +110,0 @@ const remoteConfig = container.getProvider('remote-config-exp').getImmediate({ |
import firebase from '@firebase/app-compat'; | ||
import { Component } from '@firebase/component'; | ||
import '@firebase/remote-config-types'; | ||
import { activate, ensureInitialized, fetchConfig, fetchAndActivate, getAll, getBoolean, getNumber, getString, getValue, setLogLevel } from '@firebase/remote-config'; | ||
@@ -121,8 +120,8 @@ | ||
function registerRemoteConfigCompat(firebaseInstance) { | ||
firebaseInstance.INTERNAL.registerComponent(new Component('remote-config-compat', remoteConfigFactory, "PUBLIC" /* PUBLIC */).setMultipleInstances(true)); | ||
firebaseInstance.INTERNAL.registerComponent(new Component('remoteConfig-compat', remoteConfigFactory, "PUBLIC" /* PUBLIC */).setMultipleInstances(true)); | ||
firebaseInstance.registerVersion(name, version); | ||
} | ||
function remoteConfigFactory(container, namespace) { | ||
// TODO: change 'app' to 'app-compat' before the official release | ||
var app = container.getProvider('app').getImmediate(); | ||
function remoteConfigFactory(container, _a) { | ||
var namespace = _a.instanceIdentifier; | ||
var app = container.getProvider('app-compat').getImmediate(); | ||
// The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'` | ||
@@ -129,0 +128,0 @@ var remoteConfig = container.getProvider('remote-config-exp').getImmediate({ |
@@ -20,4 +20,14 @@ /** | ||
interface NameServiceMapping { | ||
'remote-config-compat': RemoteConfigCompat; | ||
'remoteConfig-compat': RemoteConfigCompat; | ||
} | ||
} | ||
declare module '@firebase/app-compat' { | ||
interface FirebaseNamespace { | ||
remoteConfig?: { | ||
(app?: FirebaseApp): RemoteConfigCompat; | ||
}; | ||
} | ||
interface FirebaseApp { | ||
remoteConfig(): RemoteConfigCompat; | ||
} | ||
} |
@@ -17,7 +17,6 @@ /** | ||
*/ | ||
import { FirebaseApp } from '@firebase/app-types'; | ||
import { RemoteConfig } from "@firebase/remote-config-types"; | ||
import { FirebaseApp, _FirebaseService } from '@firebase/app-compat'; | ||
import { Value as ValueCompat, FetchStatus as FetchSTatusCompat, Settings as SettingsCompat, LogLevel as RemoteConfigLogLevel, RemoteConfig as RemoteConfigCompat } from '@firebase/remote-config-types'; | ||
import { FirebaseService } from '@firebase/app-types/private'; | ||
export declare class RemoteConfigCompatImpl implements RemoteConfigCompat, FirebaseService { | ||
import { RemoteConfig } from "@firebase/remote-config"; | ||
export declare class RemoteConfigCompatImpl implements RemoteConfigCompat, _FirebaseService { | ||
app: FirebaseApp; | ||
@@ -24,0 +23,0 @@ private _remoteConfig; |
@@ -17,5 +17,5 @@ /** | ||
*/ | ||
import { FirebaseApp } from '@firebase/app-types'; | ||
import { RemoteConfig } from "@firebase/remote-config-types"; | ||
import { FirebaseApp } from '@firebase/app-compat'; | ||
import { RemoteConfig } from "@firebase/remote-config"; | ||
export declare function getFakeApp(): FirebaseApp; | ||
export declare function getFakeModularRemoteConfig(): RemoteConfig; |
{ | ||
"name": "@firebase/remote-config-compat", | ||
"version": "0.0.900-exp.f18a6d41d", | ||
"version": "0.0.900-exp.f8e97019f", | ||
"description": "The compatibility package of Remote Config", | ||
@@ -29,12 +29,10 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)", | ||
"peerDependencies": { | ||
"@firebase/app-compat": "0.0.900-exp.f18a6d41d", | ||
"@firebase/app-types": "0.x" | ||
"@firebase/app-compat": "0.0.900-exp.f8e97019f" | ||
}, | ||
"dependencies": { | ||
"@firebase/remote-config": "0.0.900-exp.f18a6d41d", | ||
"@firebase/remote-config-types": "0.0.900-exp.f18a6d41d", | ||
"@firebase/util": "0.3.4", | ||
"@firebase/remote-config": "0.0.900-exp.f8e97019f", | ||
"@firebase/util": "0.4.0", | ||
"@firebase/logger": "0.2.6", | ||
"@firebase/component": "0.1.21", | ||
"tslib": "^1.11.1" | ||
"@firebase/component": "0.2.1", | ||
"tslib": "^2.1.0" | ||
}, | ||
@@ -46,3 +44,3 @@ "devDependencies": { | ||
"rollup-plugin-typescript2": "0.29.0", | ||
"typescript": "4.0.5", | ||
"typescript": "4.2.2", | ||
"@firebase/app-compat": "0.0.900" | ||
@@ -49,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
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
45819
6
512
+ Added@firebase/app@0.0.900-exp.f8e97019f(transitive)
+ Added@firebase/app-compat@0.0.900-exp.f8e97019f(transitive)
+ Added@firebase/component@0.2.1(transitive)
+ Added@firebase/installations@0.0.900-exp.f8e97019f(transitive)
+ Added@firebase/remote-config@0.0.900-exp.f8e97019f(transitive)
+ Added@firebase/util@0.4.0(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@firebase/remote-config-types@0.0.900-exp.f18a6d41d
- Removed@firebase/app@0.0.900-exp.f18a6d41d(transitive)
- Removed@firebase/app-compat@0.0.900-exp.f18a6d41d(transitive)
- Removed@firebase/app-types@0.0.900-exp.f18a6d41d0.9.3(transitive)
- Removed@firebase/component@0.1.21(transitive)
- Removed@firebase/installations@0.0.900-exp.f18a6d41d(transitive)
- Removed@firebase/installations-types@0.0.900-exp.f18a6d41d(transitive)
- Removed@firebase/remote-config@0.0.900-exp.f18a6d41d(transitive)
- Removed@firebase/remote-config-types@0.0.900-exp.f18a6d41d(transitive)
- Removed@firebase/util@0.3.4(transitive)
- Removedtslib@1.14.1(transitive)
Updated@firebase/component@0.2.1
Updated@firebase/util@0.4.0
Updatedtslib@^2.1.0