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

@firebase/data-connect

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/data-connect - npm Package Compare versions

Comparing version 0.0.1-dataconnect-preview.42eb5e521 to 0.0.1-dataconnect-preview.81ee5169c

39

dist/index.cjs.js

@@ -11,3 +11,3 @@ 'use strict';

const name = "@firebase/data-connect";
const version = "0.0.1-dataconnect-preview.42eb5e521";
const version = "0.0.1-dataconnect-preview.81ee5169c";

@@ -61,10 +61,6 @@ /**

function logDebug(msg) {
// if (logger.logLevel <= LogLevel.DEBUG) {
logger.debug(`DataConnect (${SDK_VERSION}): ${msg}`);
// }
}
function logError(msg) {
// if (logger.logLevel <= LogLevel.ERROR) {
logger.error(`DataConnect (${SDK_VERSION}): ${msg}`);
// }
}

@@ -133,21 +129,2 @@

}
class EmulatorTokenProvider {
constructor(accessToken) {
this.accessToken = accessToken;
}
getToken(forceRefresh) {
return Promise.resolve({
accessToken: this.accessToken
});
}
addTokenChangeListener(listener) {
// Invoke the listener immediately to match the behavior in Firebase Auth
// (see packages/auth/src/auth.js#L1807)
listener(this.accessToken);
}
removeTokenChangeListener(listener) { }
notifyForInvalidToken() { }
}
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
EmulatorTokenProvider.OWNER = 'owner';

@@ -524,2 +501,3 @@ /**

constructor(options, apiKey, authProvider, transportOptions) {
var _a;
this.apiKey = apiKey;

@@ -587,2 +565,6 @@ this.authProvider = authProvider;

this.connectorName = connector;
(_a = this.authProvider) === null || _a === void 0 ? void 0 : _a.addTokenChangeListener(token => {
logDebug(`New Token Available: ${token}`);
this.accessToken = token;
});
}

@@ -742,9 +724,3 @@ get endpointUrl() {

if (this.authProvider) {
this.authTokenProvider = this.isEmulator
? new EmulatorTokenProvider(EmulatorTokenProvider.OWNER)
: new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
this.authTokenProvider.addTokenChangeListener(token => {
logDebug(`New Token Available: ${token}`);
this._transport.onTokenChanged(token);
});
this.authTokenProvider = new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
}

@@ -952,3 +928,2 @@ this.initialized = true;

exports.DataConnect = DataConnect;
exports.EmulatorTokenProvider = EmulatorTokenProvider;
exports.FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR = FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR;

@@ -955,0 +930,0 @@ exports.FirebaseAuthProvider = FirebaseAuthProvider;

40

dist/index.esm2017.js

@@ -7,3 +7,3 @@ import { _removeServiceInstance, getApp, _getProvider, _registerComponent, registerVersion, SDK_VERSION as SDK_VERSION$1 } from '@firebase/app';

const name = "@firebase/data-connect";
const version = "0.0.1-dataconnect-preview.42eb5e521";
const version = "0.0.1-dataconnect-preview.81ee5169c";

@@ -57,10 +57,6 @@ /**

function logDebug(msg) {
// if (logger.logLevel <= LogLevel.DEBUG) {
logger.debug(`DataConnect (${SDK_VERSION}): ${msg}`);
// }
}
function logError(msg) {
// if (logger.logLevel <= LogLevel.ERROR) {
logger.error(`DataConnect (${SDK_VERSION}): ${msg}`);
// }
}

@@ -129,21 +125,2 @@

}
class EmulatorTokenProvider {
constructor(accessToken) {
this.accessToken = accessToken;
}
getToken(forceRefresh) {
return Promise.resolve({
accessToken: this.accessToken
});
}
addTokenChangeListener(listener) {
// Invoke the listener immediately to match the behavior in Firebase Auth
// (see packages/auth/src/auth.js#L1807)
listener(this.accessToken);
}
removeTokenChangeListener(listener) { }
notifyForInvalidToken() { }
}
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
EmulatorTokenProvider.OWNER = 'owner';

@@ -520,2 +497,3 @@ /**

constructor(options, apiKey, authProvider, transportOptions) {
var _a;
this.apiKey = apiKey;

@@ -583,2 +561,6 @@ this.authProvider = authProvider;

this.connectorName = connector;
(_a = this.authProvider) === null || _a === void 0 ? void 0 : _a.addTokenChangeListener(token => {
logDebug(`New Token Available: ${token}`);
this.accessToken = token;
});
}

@@ -738,9 +720,3 @@ get endpointUrl() {

if (this.authProvider) {
this.authTokenProvider = this.isEmulator
? new EmulatorTokenProvider(EmulatorTokenProvider.OWNER)
: new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
this.authTokenProvider.addTokenChangeListener(token => {
logDebug(`New Token Available: ${token}`);
this._transport.onTokenChanged(token);
});
this.authTokenProvider = new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
}

@@ -947,3 +923,3 @@ this.initialized = true;

export { DataConnect, EmulatorTokenProvider, FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR, FirebaseAuthProvider, MutationManager, MutationStr, QueryStr, SOURCE_CACHE, SOURCE_SERVER, connectDataConnectEmulator, executeMutation, executeQuery, getDataConnect, mutationRef, parseOptions, queryRef, setLogLevel, subscribe, terminate, toQueryRef };
export { DataConnect, FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR, FirebaseAuthProvider, MutationManager, MutationStr, QueryStr, SOURCE_CACHE, SOURCE_SERVER, connectDataConnectEmulator, executeMutation, executeQuery, getDataConnect, mutationRef, parseOptions, queryRef, setLogLevel, subscribe, terminate, toQueryRef };
//# sourceMappingURL=index.esm2017.js.map

@@ -8,3 +8,3 @@ import { __assign, __extends, __awaiter, __generator } from 'tslib';

var name = "@firebase/data-connect";
var version = "0.0.1-dataconnect-preview.42eb5e521";
var version = "0.0.1-dataconnect-preview.81ee5169c";

@@ -58,10 +58,6 @@ /**

function logDebug(msg) {
// if (logger.logLevel <= LogLevel.DEBUG) {
logger.debug("DataConnect (".concat(SDK_VERSION, "): ").concat(msg));
// }
}
function logError(msg) {
// if (logger.logLevel <= LogLevel.ERROR) {
logger.error("DataConnect (".concat(SDK_VERSION, "): ").concat(msg));
// }
}

@@ -133,22 +129,2 @@

}());
var EmulatorTokenProvider = /** @class */ (function () {
function EmulatorTokenProvider(accessToken) {
this.accessToken = accessToken;
}
EmulatorTokenProvider.prototype.getToken = function (forceRefresh) {
return Promise.resolve({
accessToken: this.accessToken
});
};
EmulatorTokenProvider.prototype.addTokenChangeListener = function (listener) {
// Invoke the listener immediately to match the behavior in Firebase Auth
// (see packages/auth/src/auth.js#L1807)
listener(this.accessToken);
};
EmulatorTokenProvider.prototype.removeTokenChangeListener = function (listener) { };
EmulatorTokenProvider.prototype.notifyForInvalidToken = function () { };
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
EmulatorTokenProvider.OWNER = 'owner';
return EmulatorTokenProvider;
}());

@@ -544,2 +520,3 @@ /**

var _this = this;
var _a;
this.apiKey = apiKey;

@@ -607,2 +584,6 @@ this.authProvider = authProvider;

this.connectorName = connector;
(_a = this.authProvider) === null || _a === void 0 ? void 0 : _a.addTokenChangeListener(function (token) {
logDebug("New Token Available: ".concat(token));
_this.accessToken = token;
});
}

@@ -766,3 +747,2 @@ Object.defineProperty(RESTTransport.prototype, "endpointUrl", {

DataConnect.prototype.setInitialized = function () {
var _this = this;
if (this.initialized) {

@@ -776,9 +756,3 @@ return;

if (this.authProvider) {
this.authTokenProvider = this.isEmulator
? new EmulatorTokenProvider(EmulatorTokenProvider.OWNER)
: new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
this.authTokenProvider.addTokenChangeListener(function (token) {
logDebug("New Token Available: ".concat(token));
_this._transport.onTokenChanged(token);
});
this.authTokenProvider = new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
}

@@ -972,3 +946,3 @@ this.initialized = true;

export { DataConnect, EmulatorTokenProvider, FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR, FirebaseAuthProvider, MutationManager, MutationStr, QueryStr, SOURCE_CACHE, SOURCE_SERVER, connectDataConnectEmulator, executeMutation, executeQuery, getDataConnect, mutationRef, parseOptions, queryRef, setLogLevel, subscribe, terminate, toQueryRef };
export { DataConnect, FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR, FirebaseAuthProvider, MutationManager, MutationStr, QueryStr, SOURCE_CACHE, SOURCE_SERVER, connectDataConnectEmulator, executeMutation, executeQuery, getDataConnect, mutationRef, parseOptions, queryRef, setLogLevel, subscribe, terminate, toQueryRef };
//# sourceMappingURL=index.esm5.js.map

@@ -107,10 +107,6 @@ 'use strict';

function logDebug(msg) {
// if (logger.logLevel <= LogLevel.DEBUG) {
logger.debug("DataConnect (".concat(SDK_VERSION, "): ").concat(msg));
// }
}
function logError(msg) {
// if (logger.logLevel <= LogLevel.ERROR) {
logger.error("DataConnect (".concat(SDK_VERSION, "): ").concat(msg));
// }
}

@@ -194,3 +190,3 @@

var name = "@firebase/data-connect";
var version = "0.0.1-dataconnect-preview.42eb5e521";
var version = "0.0.1-dataconnect-preview.81ee5169c";

@@ -261,22 +257,2 @@ /**

}());
var EmulatorTokenProvider = /** @class */ (function () {
function EmulatorTokenProvider(accessToken) {
this.accessToken = accessToken;
}
EmulatorTokenProvider.prototype.getToken = function (forceRefresh) {
return Promise.resolve({
accessToken: this.accessToken
});
};
EmulatorTokenProvider.prototype.addTokenChangeListener = function (listener) {
// Invoke the listener immediately to match the behavior in Firebase Auth
// (see packages/auth/src/auth.js#L1807)
listener(this.accessToken);
};
EmulatorTokenProvider.prototype.removeTokenChangeListener = function (listener) { };
EmulatorTokenProvider.prototype.notifyForInvalidToken = function () { };
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
EmulatorTokenProvider.OWNER = 'owner';
return EmulatorTokenProvider;
}());

@@ -551,2 +527,3 @@ /**

var _this = this;
var _a;
this.apiKey = apiKey;

@@ -614,2 +591,6 @@ this.authProvider = authProvider;

this.connectorName = connector;
(_a = this.authProvider) === null || _a === void 0 ? void 0 : _a.addTokenChangeListener(function (token) {
logDebug("New Token Available: ".concat(token));
_this.accessToken = token;
});
}

@@ -773,3 +754,2 @@ Object.defineProperty(RESTTransport.prototype, "endpointUrl", {

DataConnect.prototype.setInitialized = function () {
var _this = this;
if (this.initialized) {

@@ -783,9 +763,3 @@ return;

if (this.authProvider) {
this.authTokenProvider = this.isEmulator
? new EmulatorTokenProvider(EmulatorTokenProvider.OWNER)
: new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
this.authTokenProvider.addTokenChangeListener(function (token) {
logDebug("New Token Available: ".concat(token));
_this._transport.onTokenChanged(token);
});
this.authTokenProvider = new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
}

@@ -972,3 +946,2 @@ this.initialized = true;

exports.DataConnect = DataConnect;
exports.EmulatorTokenProvider = EmulatorTokenProvider;
exports.FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR = FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR;

@@ -975,0 +948,0 @@ exports.FirebaseAuthProvider = FirebaseAuthProvider;

@@ -110,13 +110,2 @@ /**

export declare class EmulatorTokenProvider implements AuthTokenProvider {
private accessToken;
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
static OWNER: string;
constructor(accessToken: string);
getToken(forceRefresh: boolean): Promise<FirebaseAuthTokenData>;
addTokenChangeListener(listener: AuthTokenListener): void;
removeTokenChangeListener(listener: (token: string | null) => void): void;
notifyForInvalidToken(): void;
}
export declare function executeMutation<Data, Variables>(mutationRef: MutationRef<Data, Variables>): MutationPromise<Data, Variables>;

@@ -123,0 +112,0 @@

@@ -99,10 +99,6 @@ import { FirebaseError } from '@firebase/util';

function logDebug(msg) {
// if (logger.logLevel <= LogLevel.DEBUG) {
logger.debug(`DataConnect (${SDK_VERSION}): ${msg}`);
// }
}
function logError(msg) {
// if (logger.logLevel <= LogLevel.ERROR) {
logger.error(`DataConnect (${SDK_VERSION}): ${msg}`);
// }
}

@@ -173,3 +169,3 @@

const name = "@firebase/data-connect";
const version = "0.0.1-dataconnect-preview.42eb5e521";
const version = "0.0.1-dataconnect-preview.81ee5169c";

@@ -237,21 +233,2 @@ /**

}
class EmulatorTokenProvider {
constructor(accessToken) {
this.accessToken = accessToken;
}
getToken(forceRefresh) {
return Promise.resolve({
accessToken: this.accessToken
});
}
addTokenChangeListener(listener) {
// Invoke the listener immediately to match the behavior in Firebase Auth
// (see packages/auth/src/auth.js#L1807)
listener(this.accessToken);
}
removeTokenChangeListener(listener) { }
notifyForInvalidToken() { }
}
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
EmulatorTokenProvider.OWNER = 'owner';

@@ -523,2 +500,3 @@ /**

constructor(options, apiKey, authProvider, transportOptions) {
var _a;
this.apiKey = apiKey;

@@ -586,2 +564,6 @@ this.authProvider = authProvider;

this.connectorName = connector;
(_a = this.authProvider) === null || _a === void 0 ? void 0 : _a.addTokenChangeListener(token => {
logDebug(`New Token Available: ${token}`);
this.accessToken = token;
});
}

@@ -741,9 +723,3 @@ get endpointUrl() {

if (this.authProvider) {
this.authTokenProvider = this.isEmulator
? new EmulatorTokenProvider(EmulatorTokenProvider.OWNER)
: new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
this.authTokenProvider.addTokenChangeListener(token => {
logDebug(`New Token Available: ${token}`);
this._transport.onTokenChanged(token);
});
this.authTokenProvider = new FirebaseAuthProvider(this.app.name, this.app.options, this.authProvider);
}

@@ -942,3 +918,3 @@ this.initialized = true;

export { DataConnect, EmulatorTokenProvider, FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR, FirebaseAuthProvider, MutationManager, MutationStr, QueryStr, SOURCE_CACHE, SOURCE_SERVER, connectDataConnectEmulator, executeMutation, executeQuery, getDataConnect, mutationRef, parseOptions, queryRef, setLogLevel, subscribe, terminate, toQueryRef };
export { DataConnect, FIREBASE_DATA_CONNECT_EMULATOR_HOST_VAR, FirebaseAuthProvider, MutationManager, MutationStr, QueryStr, SOURCE_CACHE, SOURCE_SERVER, connectDataConnectEmulator, executeMutation, executeQuery, getDataConnect, mutationRef, parseOptions, queryRef, setLogLevel, subscribe, terminate, toQueryRef };
//# sourceMappingURL=index.node.esm.js.map

@@ -35,11 +35,1 @@ /**

}
export declare class EmulatorTokenProvider implements AuthTokenProvider {
private accessToken;
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
static OWNER: string;
constructor(accessToken: string);
getToken(forceRefresh: boolean): Promise<FirebaseAuthTokenData>;
addTokenChangeListener(listener: AuthTokenListener): void;
removeTokenChangeListener(listener: (token: string | null) => void): void;
notifyForInvalidToken(): void;
}

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

*/
import { LogLevelString } from "@firebase/logger";
import { LogLevelString } from '@firebase/logger';
export declare function setLogLevel(logLevel: LogLevelString): void;
export declare function logDebug(msg: string): void;
export declare function logError(msg: string): void;

@@ -110,13 +110,2 @@ /**

export declare class EmulatorTokenProvider implements AuthTokenProvider {
private accessToken;
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
static OWNER: string;
constructor(accessToken: string);
getToken(forceRefresh: boolean): Promise<FirebaseAuthTokenData>;
addTokenChangeListener(listener: AuthTokenListener): void;
removeTokenChangeListener(listener: (token: string | null) => void): void;
notifyForInvalidToken(): void;
}
export declare function executeMutation<Data, Variables>(mutationRef: MutationRef<Data, Variables>): MutationPromise<Data, Variables>;

@@ -123,0 +112,0 @@

@@ -68,12 +68,2 @@ /**

export declare type DataSource = typeof SOURCE_CACHE | typeof SOURCE_SERVER;
export declare class EmulatorTokenProvider implements AuthTokenProvider {
private accessToken;
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
static OWNER: string;
constructor(accessToken: string);
getToken(forceRefresh: boolean): Promise<FirebaseAuthTokenData>;
addTokenChangeListener(listener: AuthTokenListener): void;
removeTokenChangeListener(listener: (token: string | null) => void): void;
notifyForInvalidToken(): void;
}
export declare function executeMutation<Data, Variables>(mutationRef: MutationRef<Data, Variables>): MutationPromise<Data, Variables>;

@@ -80,0 +70,0 @@ export declare function executeQuery<Data, Variables>(queryRef: QueryRef<Data, Variables>): QueryPromise<Data, Variables>;

@@ -35,11 +35,1 @@ /**

}
export declare class EmulatorTokenProvider implements AuthTokenProvider {
private accessToken;
/** A string that is treated as an admin access token by the RTDB emulator. Used by Admin SDK. */
static OWNER: string;
constructor(accessToken: string);
getToken(forceRefresh: boolean): Promise<FirebaseAuthTokenData>;
addTokenChangeListener(listener: AuthTokenListener): void;
removeTokenChangeListener(listener: (token: string | null) => void): void;
notifyForInvalidToken(): void;
}

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

*/
import { LogLevelString } from "@firebase/logger";
import { LogLevelString } from '@firebase/logger';
export declare function setLogLevel(logLevel: LogLevelString): void;
export declare function logDebug(msg: string): void;
export declare function logError(msg: string): void;
{
"name": "@firebase/data-connect",
"version": "0.0.1-dataconnect-preview.42eb5e521",
"version": "0.0.1-dataconnect-preview.81ee5169c",
"description": "",

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

"dependencies": {
"@firebase/auth-interop-types": "0.2.2-dataconnect-preview.42eb5e521",
"@firebase/component": "0.6.6-dataconnect-preview.42eb5e521",
"@firebase/logger": "0.4.1-dataconnect-preview.42eb5e521",
"@firebase/util": "1.9.5-dataconnect-preview.42eb5e521",
"@firebase/auth-interop-types": "0.2.2-dataconnect-preview.81ee5169c",
"@firebase/component": "0.6.6-dataconnect-preview.81ee5169c",
"@firebase/logger": "0.4.1-dataconnect-preview.81ee5169c",
"@firebase/util": "1.9.5-dataconnect-preview.81ee5169c",
"tslib": "^2.1.0"
},
"devDependencies": {
"@firebase/app": "0.10.2-dataconnect-preview.42eb5e521",
"@firebase/app": "0.10.2-dataconnect-preview.81ee5169c",
"rollup": "2.79.1",

@@ -59,0 +59,0 @@ "rollup-plugin-typescript2": "0.31.2",

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