New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@firebase/remote-config-compat

Package Overview
Dependencies
Maintainers
5
Versions
1145
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.1e0eb201d to 0.0.900-exp.2c95db0e3

47

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-exp.1e0eb201d";
var version = "0.0.900";

@@ -136,8 +135,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'`

@@ -144,0 +143,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';

@@ -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-exp.1e0eb201d";
const version = "0.0.900";

@@ -108,8 +107,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'`

@@ -116,0 +114,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';

@@ -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-exp.1e0eb201d";
var version = "0.0.900";

@@ -129,8 +128,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'`

@@ -137,0 +136,0 @@ var remoteConfig = container.getProvider('remote-config-exp').getImmediate({

@@ -20,4 +20,30 @@ /**

interface NameServiceMapping {
'remote-config-compat': RemoteConfigCompat;
'remoteConfig-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.1e0eb201d",
"version": "0.0.900-exp.2c95db0e3",
"description": "The compatibility package of Remote Config",

@@ -18,3 +18,3 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",

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

@@ -27,23 +27,22 @@ "dev": "rollup -c -w",

"test:browser:debug": "karma start --browsers Chrome --auto-watch",
"prepare": "yarn build:release"
"add-compat-overloads": "ts-node-script ../../scripts/exp/create-overloads.ts -i ../remote-config-exp/dist/remote-config-exp-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.1e0eb201d",
"@firebase/app-types": "0.x"
"@firebase/app-compat": "0.0.900-exp.2c95db0e3"
},
"dependencies": {
"@firebase/remote-config": "0.0.900-exp.1e0eb201d",
"@firebase/remote-config-types": "0.0.900-exp.1e0eb201d",
"@firebase/util": "0.3.4",
"@firebase/remote-config": "0.0.900-exp.2c95db0e3",
"@firebase/remote-config-types": "0.1.9",
"@firebase/util": "0.4.1",
"@firebase/logger": "0.2.6",
"@firebase/component": "0.1.21",
"tslib": "^1.11.1"
"@firebase/component": "0.3.1",
"tslib": "^2.1.0"
},
"devDependencies": {
"rollup": "2.33.2",
"rollup": "2.35.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.29.0",
"typescript": "4.0.5",
"typescript": "4.2.2",
"@firebase/app-compat": "0.0.900"

@@ -50,0 +49,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

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