Socket
Socket
Sign inDemoInstall

@firebase/app-compat

Package Overview
Dependencies
Maintainers
5
Versions
1151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/app-compat - npm Package Compare versions

Comparing version 0.0.900-exp.a9388d5b2 to 0.0.900-exp.a9e3f07fc

dist/src/public-types.d.ts

23

dist/index.cjs.js

@@ -59,4 +59,3 @@ 'use strict';

// add itself to container
// TODO: change the component name to 'app-compat' before the official release
modularAPIs._addComponent(app, new component.Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */));
modularAPIs._addComponent(app, new component.Component('app-compat', function () { return _this; }, "PUBLIC" /* PUBLIC */));
this.container = app.container;

@@ -147,2 +146,9 @@ }

};
FirebaseAppImpl.prototype.toJSON = function () {
return {
name: this.name,
automaticDataCollectionEnabled: this.automaticDataCollectionEnabled,
options: this.options
};
};
return FirebaseAppImpl;

@@ -285,2 +291,3 @@ }());

var componentName = component.name;
var componentNameWithoutCompat = componentName.replace('-compat', '');
if (modularAPIs._registerComponent(component) &&

@@ -293,3 +300,3 @@ component.type === "PUBLIC" /* PUBLIC */) {

// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (typeof appArg[componentName] !== 'function') {
if (typeof appArg[componentNameWithoutCompat] !== 'function') {
// Invalid argument.

@@ -303,3 +310,3 @@ // This happens in the following case: firebase.storage('gs:/')

// eslint-disable-next-line @typescript-eslint/no-explicit-any
return appArg[componentName]();
return appArg[componentNameWithoutCompat]();
};

@@ -311,6 +318,6 @@ // ... and a container for service-level properties.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName] = serviceNamespace;
namespace[componentNameWithoutCompat] = serviceNamespace;
// Patch the FirebaseAppImpl prototype
// eslint-disable-next-line @typescript-eslint/no-explicit-any
firebaseAppImpl.prototype[componentName] =
firebaseAppImpl.prototype[componentNameWithoutCompat] =
// TODO: The eslint disable can be removed and the 'ignoreRestArgs'

@@ -330,3 +337,3 @@ // option added to the no-explicit-any rule when ESlint releases it.

? // eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName]
namespace[componentNameWithoutCompat]
: null;

@@ -407,3 +414,3 @@ }

var name = "@firebase/app-compat";
var version = "0.0.900-exp.a9388d5b2";
var version = "0.0.900";

@@ -410,0 +417,0 @@ /**

@@ -32,4 +32,3 @@ import { ErrorFactory, contains, deepExtend, createSubscribe, isBrowser } from '@firebase/util';

// add itself to container
// TODO: change the component name to 'app-compat' before the official release
_addComponent(app, new Component('app', () => this, "PUBLIC" /* PUBLIC */));
_addComponent(app, new Component('app-compat', () => this, "PUBLIC" /* PUBLIC */));
this.container = app.container;

@@ -105,2 +104,9 @@ }

}
toJSON() {
return {
name: this.name,
automaticDataCollectionEnabled: this.automaticDataCollectionEnabled,
options: this.options
};
}
}

@@ -240,2 +246,3 @@ // TODO: investigate why the following needs to be commented out

const componentName = component.name;
const componentNameWithoutCompat = componentName.replace('-compat', '');
if (_registerComponent(component) &&

@@ -247,3 +254,3 @@ component.type === "PUBLIC" /* PUBLIC */) {

// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (typeof appArg[componentName] !== 'function') {
if (typeof appArg[componentNameWithoutCompat] !== 'function') {
// Invalid argument.

@@ -257,3 +264,3 @@ // This happens in the following case: firebase.storage('gs:/')

// eslint-disable-next-line @typescript-eslint/no-explicit-any
return appArg[componentName]();
return appArg[componentNameWithoutCompat]();
};

@@ -265,6 +272,6 @@ // ... and a container for service-level properties.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName] = serviceNamespace;
namespace[componentNameWithoutCompat] = serviceNamespace;
// Patch the FirebaseAppImpl prototype
// eslint-disable-next-line @typescript-eslint/no-explicit-any
firebaseAppImpl.prototype[componentName] =
firebaseAppImpl.prototype[componentNameWithoutCompat] =
// TODO: The eslint disable can be removed and the 'ignoreRestArgs'

@@ -280,3 +287,3 @@ // option added to the no-explicit-any rule when ESlint releases it.

? // eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName]
namespace[componentNameWithoutCompat]
: null;

@@ -357,3 +364,3 @@ }

const name = "@firebase/app-compat";
const version = "0.0.900-exp.a9388d5b2";
const version = "0.0.900";

@@ -360,0 +367,0 @@ /**

@@ -34,4 +34,3 @@ import { ErrorFactory, contains, deepExtend, createSubscribe, isBrowser } from '@firebase/util';

// add itself to container
// TODO: change the component name to 'app-compat' before the official release
_addComponent(app, new Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */));
_addComponent(app, new Component('app-compat', function () { return _this; }, "PUBLIC" /* PUBLIC */));
this.container = app.container;

@@ -122,2 +121,9 @@ }

};
FirebaseAppImpl.prototype.toJSON = function () {
return {
name: this.name,
automaticDataCollectionEnabled: this.automaticDataCollectionEnabled,
options: this.options
};
};
return FirebaseAppImpl;

@@ -260,2 +266,3 @@ }());

var componentName = component.name;
var componentNameWithoutCompat = componentName.replace('-compat', '');
if (_registerComponent(component) &&

@@ -268,3 +275,3 @@ component.type === "PUBLIC" /* PUBLIC */) {

// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (typeof appArg[componentName] !== 'function') {
if (typeof appArg[componentNameWithoutCompat] !== 'function') {
// Invalid argument.

@@ -278,3 +285,3 @@ // This happens in the following case: firebase.storage('gs:/')

// eslint-disable-next-line @typescript-eslint/no-explicit-any
return appArg[componentName]();
return appArg[componentNameWithoutCompat]();
};

@@ -286,6 +293,6 @@ // ... and a container for service-level properties.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName] = serviceNamespace;
namespace[componentNameWithoutCompat] = serviceNamespace;
// Patch the FirebaseAppImpl prototype
// eslint-disable-next-line @typescript-eslint/no-explicit-any
firebaseAppImpl.prototype[componentName] =
firebaseAppImpl.prototype[componentNameWithoutCompat] =
// TODO: The eslint disable can be removed and the 'ignoreRestArgs'

@@ -305,3 +312,3 @@ // option added to the no-explicit-any rule when ESlint releases it.

? // eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName]
namespace[componentNameWithoutCompat]
: null;

@@ -382,3 +389,3 @@ }

var name = "@firebase/app-compat";
var version = "0.0.900-exp.a9388d5b2";
var version = "0.0.900";

@@ -385,0 +392,0 @@ /**

@@ -31,3 +31,3 @@ import * as modularAPIs from '@firebase/app';

// add itself to container
_addComponent(app, new Component('app', () => this, "PUBLIC" /* PUBLIC */));
_addComponent(app, new Component('app-compat', () => this, "PUBLIC" /* PUBLIC */));
}

@@ -199,2 +199,3 @@ get automaticDataCollectionEnabled() {

const componentName = component.name;
const componentNameWithoutCompat = componentName.replace('-compat', '');
if (_registerComponent(component) &&

@@ -206,3 +207,3 @@ component.type === "PUBLIC" /* PUBLIC */) {

// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (typeof appArg[componentName] !== 'function') {
if (typeof appArg[componentNameWithoutCompat] !== 'function') {
// Invalid argument.

@@ -216,3 +217,3 @@ // This happens in the following case: firebase.storage('gs:/')

// eslint-disable-next-line @typescript-eslint/no-explicit-any
return appArg[componentName]();
return appArg[componentNameWithoutCompat]();
};

@@ -224,6 +225,6 @@ // ... and a container for service-level properties.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName] = serviceNamespace;
namespace[componentNameWithoutCompat] = serviceNamespace;
// Patch the FirebaseAppImpl prototype
// eslint-disable-next-line @typescript-eslint/no-explicit-any
firebaseAppImpl.prototype[componentName] =
firebaseAppImpl.prototype[componentNameWithoutCompat] =
// TODO: The eslint disable can be removed and the 'ignoreRestArgs'

@@ -239,3 +240,3 @@ // option added to the no-explicit-any rule when ESlint releases it.

? // eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName]
namespace[componentNameWithoutCompat]
: null;

@@ -274,4 +275,3 @@ }

namespace.SDK_VERSION = `${namespace.SDK_VERSION}_LITE`;
const registerComponent = namespace.INTERNAL
.registerComponent;
const registerComponent = namespace.INTERNAL.registerComponent;
namespace.INTERNAL.registerComponent = registerComponentForLite;

@@ -297,3 +297,3 @@ /**

const name$1 = "@firebase/app-compat";
const version = "0.0.900-exp.a9388d5b2";
const version = "0.0.900";

@@ -300,0 +300,0 @@ /**

@@ -32,3 +32,3 @@ import * as modularAPIs from '@firebase/app';

// add itself to container
_addComponent(app, new Component('app', function () { return _this; }, "PUBLIC" /* PUBLIC */));
_addComponent(app, new Component('app-compat', function () { return _this; }, "PUBLIC" /* PUBLIC */));
}

@@ -216,2 +216,3 @@ Object.defineProperty(FirebaseAppLiteImpl.prototype, "automaticDataCollectionEnabled", {

var componentName = component.name;
var componentNameWithoutCompat = componentName.replace('-compat', '');
if (_registerComponent(component) &&

@@ -224,3 +225,3 @@ component.type === "PUBLIC" /* PUBLIC */) {

// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (typeof appArg[componentName] !== 'function') {
if (typeof appArg[componentNameWithoutCompat] !== 'function') {
// Invalid argument.

@@ -234,3 +235,3 @@ // This happens in the following case: firebase.storage('gs:/')

// eslint-disable-next-line @typescript-eslint/no-explicit-any
return appArg[componentName]();
return appArg[componentNameWithoutCompat]();
};

@@ -242,6 +243,6 @@ // ... and a container for service-level properties.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName] = serviceNamespace;
namespace[componentNameWithoutCompat] = serviceNamespace;
// Patch the FirebaseAppImpl prototype
// eslint-disable-next-line @typescript-eslint/no-explicit-any
firebaseAppImpl.prototype[componentName] =
firebaseAppImpl.prototype[componentNameWithoutCompat] =
// TODO: The eslint disable can be removed and the 'ignoreRestArgs'

@@ -261,3 +262,3 @@ // option added to the no-explicit-any rule when ESlint releases it.

? // eslint-disable-next-line @typescript-eslint/no-explicit-any
namespace[componentName]
namespace[componentNameWithoutCompat]
: null;

@@ -296,4 +297,3 @@ }

namespace.SDK_VERSION = namespace.SDK_VERSION + "_LITE";
var registerComponent = namespace.INTERNAL
.registerComponent;
var registerComponent = namespace.INTERNAL.registerComponent;
namespace.INTERNAL.registerComponent = registerComponentForLite;

@@ -319,3 +319,3 @@ /**

var name$1 = "@firebase/app-compat";
var version = "0.0.900-exp.a9388d5b2";
var version = "0.0.900";

@@ -322,0 +322,0 @@ /**

@@ -17,6 +17,25 @@ /**

*/
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types';
import { _FirebaseNamespace, FirebaseService } from '@firebase/app-types/private';
import { FirebaseOptions } from './public-types';
import { Component } from '@firebase/component';
import { _FirebaseAppInternal } from "@firebase/app-types";
import { _FirebaseAppInternal as _FirebaseAppExp } from "@firebase/app";
import { _FirebaseService, _FirebaseNamespace } from './types';
export interface _FirebaseApp {
/**
* The (read-only) name (identifier) for this App. '[DEFAULT]' is the default
* App.
*/
name: string;
/**
* The (read-only) configuration options from the app initialization.
*/
options: FirebaseOptions;
/**
* The settable config flag for GDPR opt-in/opt-out
*/
automaticDataCollectionEnabled: boolean;
/**
* Make the given App unusable and free resources.
*/
delete(): Promise<void>;
}
/**

@@ -26,7 +45,7 @@ * Global context object for a collection of services using

*/
export declare class FirebaseAppImpl implements FirebaseApp {
export declare class FirebaseAppImpl implements _FirebaseApp {
private readonly app;
private readonly firebase;
private readonly container;
constructor(app: _FirebaseAppInternal, firebase: _FirebaseNamespace);
private container;
constructor(app: _FirebaseAppExp, firebase: _FirebaseNamespace);
get automaticDataCollectionEnabled(): boolean;

@@ -51,3 +70,3 @@ set automaticDataCollectionEnabled(val: boolean);

*/
_getService(name: string, instanceIdentifier?: string): FirebaseService;
_getService(name: string, instanceIdentifier?: string): _FirebaseService;
/**

@@ -70,2 +89,3 @@ * Remove a service instance from the cache, so we will create a new instance for this service

_addOrOverwriteComponent(component: Component): void;
toJSON(): object;
}

@@ -17,3 +17,3 @@ /**

*/
import { FirebaseNamespace } from '@firebase/app-types';
import { FirebaseNamespace } from './public-types';
/**

@@ -20,0 +20,0 @@ * Return a firebase namespace object.

@@ -17,3 +17,3 @@ /**

*/
import { FirebaseNamespace } from '@firebase/app-types';
import { _FirebaseNamespace } from './types';
import { FirebaseAppImpl } from './firebaseApp';

@@ -28,2 +28,2 @@ import { FirebaseAppLiteImpl } from './lite/firebaseAppLite';

*/
export declare function createFirebaseNamespaceCore(firebaseAppImpl: typeof FirebaseAppImpl | typeof FirebaseAppLiteImpl): FirebaseNamespace;
export declare function createFirebaseNamespaceCore(firebaseAppImpl: typeof FirebaseAppImpl | typeof FirebaseAppLiteImpl): _FirebaseNamespace;

@@ -17,4 +17,6 @@ /**

*/
import { FirebaseNamespace } from '@firebase/app-types';
import { FirebaseNamespace } from './public-types';
export declare const firebase: FirebaseNamespace;
export default firebase;
export { _FirebaseNamespace, _FirebaseService } from './types';
export { FirebaseApp, FirebaseNamespace } from './public-types';

@@ -17,3 +17,3 @@ /**

*/
export declare const firebase: import("@firebase/app-types").FirebaseNamespace;
export declare const firebase: import("./public-types").FirebaseNamespace;
export default firebase;

@@ -17,5 +17,5 @@ /**

*/
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types';
import { _FirebaseNamespace, FirebaseService } from '@firebase/app-types/private';
import { _FirebaseAppInternal } from "@firebase/app-types";
import { FirebaseApp, FirebaseOptions } from '../public-types';
import { _FirebaseNamespace, _FirebaseService } from '../types';
import { _FirebaseAppInternal as FirebaseAppExp } from "@firebase/app";
/**

@@ -28,3 +28,3 @@ * Global context object for a collection of services using

private readonly firebase;
constructor(app: _FirebaseAppInternal, firebase: _FirebaseNamespace);
constructor(app: FirebaseAppExp, firebase: _FirebaseNamespace);
get automaticDataCollectionEnabled(): boolean;

@@ -49,3 +49,3 @@ set automaticDataCollectionEnabled(val: boolean);

*/
_getService(name: string, instanceIdentifier?: string): FirebaseService;
_getService(name: string, instanceIdentifier?: string): _FirebaseService;
}

@@ -17,3 +17,3 @@ /**

*/
import { FirebaseNamespace } from '@firebase/app-types';
import { FirebaseNamespace } from '../public-types';
export declare function createFirebaseNamespaceLite(): FirebaseNamespace;

@@ -17,6 +17,6 @@ /**

*/
import { FirebaseService } from '@firebase/app-types/private';
import { FirebaseApp } from '@firebase/app-types';
import { _FirebaseService } from '../src/types';
import { FirebaseApp } from '../src/public-types';
import { ComponentType, Component } from '@firebase/component';
export declare class TestService implements FirebaseService {
export declare class TestService implements _FirebaseService {
private app_;

@@ -23,0 +23,0 @@ instanceIdentifier?: string | undefined;

{
"name": "@firebase/app-compat",
"version": "0.0.900-exp.a9388d5b2",
"version": "0.0.900-exp.a9e3f07fc",
"description": "The primary entrypoint to the Firebase JS SDK",

@@ -28,12 +28,11 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",

"test:browser:debug": "karma start --browsers Chrome --auto-watch",
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* src/**/*.test.ts --config ../../config/mocharc.node.js",
"prepare": "yarn build:release"
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* src/**/*.test.ts --config ../../config/mocharc.node.js"
},
"license": "Apache-2.0",
"dependencies": {
"@firebase/app": "0.0.900-exp.a9388d5b2",
"@firebase/util": "0.3.4",
"@firebase/app": "0.0.900-exp.a9e3f07fc",
"@firebase/util": "0.4.0",
"@firebase/logger": "0.2.6",
"@firebase/component": "0.1.21",
"tslib": "^1.11.1",
"@firebase/component": "0.3.0",
"tslib": "^2.1.0",
"dom-storage": "2.1.0",

@@ -43,7 +42,7 @@ "xmlhttprequest": "1.8.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"
},

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

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