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.555fe23c5 to 0.0.900-exp.57f19127c

43

dist/index.cjs.js

@@ -28,12 +28,12 @@ 'use strict';

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;
},

@@ -45,3 +45,3 @@ enumerable: false,

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

@@ -53,3 +53,3 @@ enumerable: false,

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

@@ -61,6 +61,6 @@ enumerable: false,

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

@@ -71,6 +71,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);
};

@@ -83,21 +83,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);
};

@@ -107,3 +107,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);
};

@@ -114,3 +114,3 @@ return RemoteConfigCompatImpl;

var name = "@firebase/remote-config-compat";
var version = "0.0.900";
var version = "0.0.900-exp.57f19127c";

@@ -134,6 +134,7 @@ /**

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) {
function remoteConfigFactory(container, _a) {
var namespace = _a.instanceIdentifier;
var app = container.getProvider('app-compat').getImmediate();

@@ -140,0 +141,0 @@ // The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'`

@@ -22,29 +22,29 @@ import firebase from '@firebase/app-compat';

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);
}

@@ -57,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);
}

@@ -81,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);
}

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

const name = "@firebase/remote-config-compat";
const version = "0.0.900";
const version = "0.0.900-exp.57f19127c";

@@ -107,6 +107,6 @@ /**

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) {
function remoteConfigFactory(container, { instanceIdentifier: namespace }) {
const app = container.getProvider('app-compat').getImmediate();

@@ -113,0 +113,0 @@ // The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'`

@@ -22,12 +22,12 @@ import firebase from '@firebase/app-compat';

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;
},

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

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

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

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

@@ -55,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;
},

@@ -65,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);
};

@@ -77,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);
};

@@ -101,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);
};

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

var name = "@firebase/remote-config-compat";
var version = "0.0.900";
var version = "0.0.900-exp.57f19127c";

@@ -128,6 +128,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) {
function remoteConfigFactory(container, _a) {
var namespace = _a.instanceIdentifier;
var app = container.getProvider('app-compat').getImmediate();

@@ -134,0 +135,0 @@ // The following call will always succeed because rc `import {...} from '@firebase/remote-config-exp'`

@@ -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;
}

@@ -22,4 +22,4 @@ /**

app: FirebaseApp;
private _remoteConfig;
constructor(app: FirebaseApp, _remoteConfig: RemoteConfig);
readonly _delegate: RemoteConfig;
constructor(app: FirebaseApp, _delegate: RemoteConfig);
get defaultConfig(): {

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

{
"name": "@firebase/remote-config-compat",
"version": "0.0.900-exp.555fe23c5",
"version": "0.0.900-exp.57f19127c",
"description": "The compatibility package of Remote Config",

@@ -8,5 +8,4 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",

"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": [

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

"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,14 +26,16 @@ "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-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.555fe23c5"
"@firebase/app-compat": "0.0.900-exp.57f19127c"
},
"dependencies": {
"@firebase/remote-config": "0.0.900-exp.555fe23c5",
"@firebase/util": "0.3.4",
"@firebase/remote-config": "0.0.900-exp.57f19127c",
"@firebase/remote-config-types": "0.1.9",
"@firebase/util": "1.1.0",
"@firebase/logger": "0.2.6",
"@firebase/component": "0.2.0",
"tslib": "^2.0.0"
"@firebase/component": "0.5.3",
"tslib": "^2.1.0"
},

@@ -63,3 +64,4 @@ "devDependencies": {

"reportDir": "./coverage/node"
}
},
"esm5": "dist/index.esm5.js"
}

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