Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@firebase/remote-config-compat

Package Overview
Dependencies
Maintainers
5
Versions
1129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/remote-config-compat - npm Package Compare versions

Comparing version 0.0.900-exp.f919db6a9 to 0.1.0-20217250818

51

dist/index.cjs.js

@@ -5,3 +5,2 @@ 'use strict';

var component = require('@firebase/component');
require('@firebase/remote-config-types');
var remoteConfig = require('@firebase/remote-config');

@@ -30,12 +29,12 @@

var RemoteConfigCompatImpl = /** @class */ (function () {
function RemoteConfigCompatImpl(app, _remoteConfig) {
function RemoteConfigCompatImpl(app, _delegate) {
this.app = app;
this._remoteConfig = _remoteConfig;
this._delegate = _delegate;
}
Object.defineProperty(RemoteConfigCompatImpl.prototype, "defaultConfig", {
get: function () {
return this._remoteConfig.defaultConfig;
return this._delegate.defaultConfig;
},
set: function (value) {
this._remoteConfig.defaultConfig = value;
this._delegate.defaultConfig = value;
},

@@ -47,3 +46,3 @@ enumerable: false,

get: function () {
return this._remoteConfig.fetchTimeMillis;
return this._delegate.fetchTimeMillis;
},

@@ -55,3 +54,3 @@ enumerable: false,

get: function () {
return this._remoteConfig.lastFetchStatus;
return this._delegate.lastFetchStatus;
},

@@ -63,6 +62,6 @@ enumerable: false,

get: function () {
return this._remoteConfig.settings;
return this._delegate.settings;
},
set: function (value) {
this._remoteConfig.settings = value;
this._delegate.settings = value;
},

@@ -73,6 +72,6 @@ enumerable: false,

RemoteConfigCompatImpl.prototype.activate = function () {
return remoteConfig.activate(this._remoteConfig);
return remoteConfig.activate(this._delegate);
};
RemoteConfigCompatImpl.prototype.ensureInitialized = function () {
return remoteConfig.ensureInitialized(this._remoteConfig);
return remoteConfig.ensureInitialized(this._delegate);
};

@@ -85,21 +84,21 @@ /**

RemoteConfigCompatImpl.prototype.fetch = function () {
return remoteConfig.fetchConfig(this._remoteConfig);
return remoteConfig.fetchConfig(this._delegate);
};
RemoteConfigCompatImpl.prototype.fetchAndActivate = function () {
return remoteConfig.fetchAndActivate(this._remoteConfig);
return remoteConfig.fetchAndActivate(this._delegate);
};
RemoteConfigCompatImpl.prototype.getAll = function () {
return remoteConfig.getAll(this._remoteConfig);
return remoteConfig.getAll(this._delegate);
};
RemoteConfigCompatImpl.prototype.getBoolean = function (key) {
return remoteConfig.getBoolean(this._remoteConfig, key);
return remoteConfig.getBoolean(this._delegate, key);
};
RemoteConfigCompatImpl.prototype.getNumber = function (key) {
return remoteConfig.getNumber(this._remoteConfig, key);
return remoteConfig.getNumber(this._delegate, key);
};
RemoteConfigCompatImpl.prototype.getString = function (key) {
return remoteConfig.getString(this._remoteConfig, key);
return remoteConfig.getString(this._delegate, key);
};
RemoteConfigCompatImpl.prototype.getValue = function (key) {
return remoteConfig.getValue(this._remoteConfig, key);
return remoteConfig.getValue(this._delegate, key);
};

@@ -109,3 +108,3 @@ // Based on packages/firestore/src/util/log.ts but not static because we need per-instance levels

RemoteConfigCompatImpl.prototype.setLogLevel = function (logLevel) {
remoteConfig.setLogLevel(this._remoteConfig, logLevel);
remoteConfig.setLogLevel(this._delegate, logLevel);
};

@@ -116,3 +115,3 @@ return RemoteConfigCompatImpl;

var name = "@firebase/remote-config-compat";
var version = "0.0.900";
var version = "0.1.0-20217250818";

@@ -136,10 +135,10 @@ /**

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();
// The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'`
var remoteConfig = container.getProvider('remote-config-exp').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'`
var remoteConfig = container.getProvider('remote-config').getImmediate({
identifier: namespace

@@ -146,0 +145,0 @@ });

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';

@@ -23,29 +22,29 @@

class RemoteConfigCompatImpl {
constructor(app, _remoteConfig) {
constructor(app, _delegate) {
this.app = app;
this._remoteConfig = _remoteConfig;
this._delegate = _delegate;
}
get defaultConfig() {
return this._remoteConfig.defaultConfig;
return this._delegate.defaultConfig;
}
set defaultConfig(value) {
this._remoteConfig.defaultConfig = value;
this._delegate.defaultConfig = value;
}
get fetchTimeMillis() {
return this._remoteConfig.fetchTimeMillis;
return this._delegate.fetchTimeMillis;
}
get lastFetchStatus() {
return this._remoteConfig.lastFetchStatus;
return this._delegate.lastFetchStatus;
}
get settings() {
return this._remoteConfig.settings;
return this._delegate.settings;
}
set settings(value) {
this._remoteConfig.settings = value;
this._delegate.settings = value;
}
activate() {
return activate(this._remoteConfig);
return activate(this._delegate);
}
ensureInitialized() {
return ensureInitialized(this._remoteConfig);
return ensureInitialized(this._delegate);
}

@@ -58,21 +57,21 @@ /**

fetch() {
return fetchConfig(this._remoteConfig);
return fetchConfig(this._delegate);
}
fetchAndActivate() {
return fetchAndActivate(this._remoteConfig);
return fetchAndActivate(this._delegate);
}
getAll() {
return getAll(this._remoteConfig);
return getAll(this._delegate);
}
getBoolean(key) {
return getBoolean(this._remoteConfig, key);
return getBoolean(this._delegate, key);
}
getNumber(key) {
return getNumber(this._remoteConfig, key);
return getNumber(this._delegate, key);
}
getString(key) {
return getString(this._remoteConfig, key);
return getString(this._delegate, key);
}
getValue(key) {
return getValue(this._remoteConfig, key);
return getValue(this._delegate, key);
}

@@ -82,3 +81,3 @@ // Based on packages/firestore/src/util/log.ts but not static because we need per-instance levels

setLogLevel(logLevel) {
setLogLevel(this._remoteConfig, logLevel);
setLogLevel(this._delegate, logLevel);
}

@@ -88,3 +87,3 @@ }

const name = "@firebase/remote-config-compat";
const version = "0.0.900";
const version = "0.1.0-20217250818";

@@ -108,10 +107,9 @@ /**

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();
// The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'`
const remoteConfig = container.getProvider('remote-config-exp').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'`
const remoteConfig = container.getProvider('remote-config').getImmediate({
identifier: namespace

@@ -118,0 +116,0 @@ });

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';

@@ -23,12 +22,12 @@

var RemoteConfigCompatImpl = /** @class */ (function () {
function RemoteConfigCompatImpl(app, _remoteConfig) {
function RemoteConfigCompatImpl(app, _delegate) {
this.app = app;
this._remoteConfig = _remoteConfig;
this._delegate = _delegate;
}
Object.defineProperty(RemoteConfigCompatImpl.prototype, "defaultConfig", {
get: function () {
return this._remoteConfig.defaultConfig;
return this._delegate.defaultConfig;
},
set: function (value) {
this._remoteConfig.defaultConfig = value;
this._delegate.defaultConfig = value;
},

@@ -40,3 +39,3 @@ enumerable: false,

get: function () {
return this._remoteConfig.fetchTimeMillis;
return this._delegate.fetchTimeMillis;
},

@@ -48,3 +47,3 @@ enumerable: false,

get: function () {
return this._remoteConfig.lastFetchStatus;
return this._delegate.lastFetchStatus;
},

@@ -56,6 +55,6 @@ enumerable: false,

get: function () {
return this._remoteConfig.settings;
return this._delegate.settings;
},
set: function (value) {
this._remoteConfig.settings = value;
this._delegate.settings = value;
},

@@ -66,6 +65,6 @@ enumerable: false,

RemoteConfigCompatImpl.prototype.activate = function () {
return activate(this._remoteConfig);
return activate(this._delegate);
};
RemoteConfigCompatImpl.prototype.ensureInitialized = function () {
return ensureInitialized(this._remoteConfig);
return ensureInitialized(this._delegate);
};

@@ -78,21 +77,21 @@ /**

RemoteConfigCompatImpl.prototype.fetch = function () {
return fetchConfig(this._remoteConfig);
return fetchConfig(this._delegate);
};
RemoteConfigCompatImpl.prototype.fetchAndActivate = function () {
return fetchAndActivate(this._remoteConfig);
return fetchAndActivate(this._delegate);
};
RemoteConfigCompatImpl.prototype.getAll = function () {
return getAll(this._remoteConfig);
return getAll(this._delegate);
};
RemoteConfigCompatImpl.prototype.getBoolean = function (key) {
return getBoolean(this._remoteConfig, key);
return getBoolean(this._delegate, key);
};
RemoteConfigCompatImpl.prototype.getNumber = function (key) {
return getNumber(this._remoteConfig, key);
return getNumber(this._delegate, key);
};
RemoteConfigCompatImpl.prototype.getString = function (key) {
return getString(this._remoteConfig, key);
return getString(this._delegate, key);
};
RemoteConfigCompatImpl.prototype.getValue = function (key) {
return getValue(this._remoteConfig, key);
return getValue(this._delegate, key);
};

@@ -102,3 +101,3 @@ // Based on packages/firestore/src/util/log.ts but not static because we need per-instance levels

RemoteConfigCompatImpl.prototype.setLogLevel = function (logLevel) {
setLogLevel(this._remoteConfig, logLevel);
setLogLevel(this._delegate, logLevel);
};

@@ -109,3 +108,3 @@ return RemoteConfigCompatImpl;

var name = "@firebase/remote-config-compat";
var version = "0.0.900";
var version = "0.1.0-20217250818";

@@ -129,10 +128,10 @@ /**

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();
// The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'`
var remoteConfig = container.getProvider('remote-config-exp').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'`
var remoteConfig = container.getProvider('remote-config').getImmediate({
identifier: namespace

@@ -139,0 +138,0 @@ });

@@ -18,6 +18,27 @@ /**

import { RemoteConfig as RemoteConfigCompat } from '@firebase/remote-config-types';
declare module '@firebase/component' {
interface NameServiceMapping {
'remote-config-compat': RemoteConfigCompat;
declare module '@firebase/app-compat' {
interface FirebaseNamespace {
remoteConfig: {
(app?: FirebaseApp): RemoteConfigCompat;
};
}
interface FirebaseApp {
remoteConfig(): RemoteConfigCompat;
}
}
import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
import { Value, RemoteConfig, LogLevel } from "@firebase/remote-config";
declare module "@firebase/remote-config" {
function activate(remoteConfig: RemoteConfigCompat): Promise<boolean>;
function ensureInitialized(remoteConfig: RemoteConfigCompat): Promise<void>;
function fetchAndActivate(remoteConfig: RemoteConfigCompat): Promise<boolean>;
function fetchConfig(remoteConfig: RemoteConfigCompat): Promise<void>;
function getAll(remoteConfig: RemoteConfigCompat): Record<string, Value>;
function getBoolean(remoteConfig: RemoteConfigCompat, key: string): boolean;
function getNumber(remoteConfig: RemoteConfigCompat, key: string): number;
function getRemoteConfig(app?: FirebaseAppCompat): RemoteConfig;
function getString(remoteConfig: RemoteConfigCompat, key: string): string;
function getValue(remoteConfig: RemoteConfigCompat, key: string): Value;
function setLogLevel(remoteConfig: RemoteConfigCompat, logLevel: LogLevel): void;
}

@@ -17,10 +17,9 @@ /**

*/
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;
private _remoteConfig;
constructor(app: FirebaseApp, _remoteConfig: RemoteConfig);
readonly _delegate: RemoteConfig;
constructor(app: FirebaseApp, _delegate: RemoteConfig);
get defaultConfig(): {

@@ -27,0 +26,0 @@ [key: string]: string | number | boolean;

@@ -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.f919db6a9",
"version": "0.1.0-20217250818",
"description": "The compatibility package of Remote Config",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"private": false,
"main": "dist/index.cjs.js",
"browser": "dist/index.esm5.js",
"module": "dist/index.esm5.js",
"esm2017": "dist/index.esm2017.js",
"browser": "dist/index.esm2017.js",
"module": "dist/index.esm2017.js",
"files": [

@@ -18,3 +16,3 @@ "dist"

"build": "rollup -c",
"build:release": "rollup -c rollup.config.release.js",
"build:release": "yarn build && yarn add-compat-overloads",
"build:deps": "lerna run --scope @firebase/remote-config-compat --include-dependencies build",

@@ -26,27 +24,27 @@ "dev": "rollup -c -w",

"test:browser": "karma start --single-run",
"test:browser:debug": "karma start --browsers Chrome --auto-watch"
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
"add-compat-overloads": "ts-node-script ../../scripts/exp/create-overloads.ts -i ../remote-config/dist/remote-config-public.d.ts -o dist/src/index.d.ts -a -r RemoteConfig:RemoteConfigCompat -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/remote-config"
},
"license": "Apache-2.0",
"peerDependencies": {
"@firebase/app-compat": "0.0.900-exp.f919db6a9",
"@firebase/app-types": "0.x"
"@firebase/app-compat": "0.1.0-20217250818"
},
"dependencies": {
"@firebase/remote-config": "0.0.900-exp.f919db6a9",
"@firebase/remote-config-types": "0.0.900-exp.f919db6a9",
"@firebase/util": "0.3.4",
"@firebase/remote-config": "0.2.0-20217250818",
"@firebase/remote-config-types": "0.2.0-20217250818",
"@firebase/util": "1.3.0",
"@firebase/logger": "0.2.6",
"@firebase/component": "0.1.21",
"tslib": "^1.11.1"
"@firebase/component": "0.5.6",
"tslib": "^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",
"typescript": "4.0.5",
"@firebase/app-compat": "0.0.900"
"rollup-plugin-typescript2": "0.30.0",
"typescript": "4.2.2",
"@firebase/app-compat": "0.1.0-20217250818"
},
"repository": {
"directory": "packages-exp/remote-config-compat",
"directory": "packages/remote-config-compat",
"type": "git",

@@ -64,3 +62,4 @@ "url": "https://github.com/firebase/firebase-js-sdk.git"

"reportDir": "./coverage/node"
}
}
},
"esm5": "dist/index.esm5.js"
}
# @firebase/remote-compat
This is the compat package that recreates the v8 APIs.
This is the compat package that recreates the v8 APIs.
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc