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

abstracted-firebase

Package Overview
Dependencies
Maintainers
1
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstracted-firebase - npm Package Compare versions

Comparing version 0.14.5 to 0.15.0

dist/cjs/types.d.ts

17

dist/cjs/db.d.ts
import { SerializedQuery } from "serialized-query";
import { rtdb } from "firebase-api-surface";
import { FirebaseDatabase, DataSnapshot } from "@firebase/database-types";
import { EventType } from "./types";
declare type Mock = import("firemock").Mock;

@@ -10,3 +11,3 @@ export interface IPathSetter<T = any> {

export interface IFirebaseWatchContext {
eventType: rtdb.EventType;
eventType: EventType;
targetType: "path" | "query";

@@ -58,3 +59,3 @@ }

protected app: any;
protected _database: rtdb.IFirebaseDatabase;
protected _database: FirebaseDatabase;
protected abstract _firestore: any;

@@ -74,4 +75,4 @@ protected abstract _storage: any;

*/
watch(target: string | SerializedQuery, events: rtdb.EventType | rtdb.EventType[], cb: IFirebaseWatchHandler): void;
unWatch(events?: rtdb.EventType | rtdb.EventType[], cb?: any): void;
watch(target: string | SerializedQuery, events: EventType | EventType[], cb: IFirebaseWatchHandler): void;
unWatch(events?: EventType | EventType[], cb?: any): void;
/**

@@ -84,3 +85,3 @@ * Get a Firebase SerializedQuery reference

/** Get a DB reference for a given path in Firebase */
ref(path?: string): rtdb.IReference;
ref(path?: string): import("@firebase/database-types").Reference | import("firemock").Reference<any>;
readonly isMockDb: boolean;

@@ -120,5 +121,5 @@ readonly mock: Mock;

update<T = any>(path: string, value: Partial<T>): Promise<any>;
remove<T = any>(path: string, ignoreMissing?: boolean): Promise<void>;
remove<T = any>(path: string, ignoreMissing?: boolean): Promise<any>;
/** returns the firebase snapshot at a given path in the database */
getSnapshot(path: string | SerializedQuery): Promise<rtdb.IDataSnapshot>;
getSnapshot(path: string | SerializedQuery): Promise<DataSnapshot>;
/** returns the JS value at a given path in the database */

@@ -125,0 +126,0 @@ getValue<T = any>(path: string): Promise<T>;

@@ -5,3 +5,2 @@ export { RealTimeDB, IFirebaseListener, FirebaseBoolean, IFirebaseWatchCoreEvent, IFirebaseWatchEvent, IFirebaseWatchHandler } from "./db";

export { _getFirebaseType } from "./util";
export { rtdb } from "firebase-api-surface";
export declare type DebuggingCallback = (message: string) => void;

@@ -8,0 +7,0 @@ export declare type IFirebaseConfig = IFirebaseClientConfig | IFirebaseAdminConfig;

@@ -12,3 +12,1 @@ "use strict";

exports._getFirebaseType = util_1._getFirebaseType;
var firebase_api_surface_1 = require("firebase-api-surface");
exports.rtdb = firebase_api_surface_1.rtdb;
import { IFirebaseWatchHandler, IFirebaseWatchContext } from "./db";
export declare const WatcherEventWrapper: (context: IFirebaseWatchContext) => (handler: IFirebaseWatchHandler) => (snapshot: import("../../../../../../Users/ken/mine/forest-fire/abstracted-firebase/node_modules/firemock/dist/snapshot").default<any>, previousChildKey?: string) => any;
import { DataSnapshot } from "@firebase/database-types";
export declare const WatcherEventWrapper: (context: IFirebaseWatchContext) => (handler: IFirebaseWatchHandler) => (snapshot: DataSnapshot, previousChildKey?: string) => any;
import { SerializedQuery } from "serialized-query";
import { rtdb } from "firebase-api-surface";
import { FirebaseDatabase, DataSnapshot } from "@firebase/database-types";
import { EventType } from "./types";
declare type Mock = import("firemock").Mock;

@@ -10,3 +11,3 @@ export interface IPathSetter<T = any> {

export interface IFirebaseWatchContext {
eventType: rtdb.EventType;
eventType: EventType;
targetType: "path" | "query";

@@ -58,3 +59,3 @@ }

protected app: any;
protected _database: rtdb.IFirebaseDatabase;
protected _database: FirebaseDatabase;
protected abstract _firestore: any;

@@ -74,4 +75,4 @@ protected abstract _storage: any;

*/
watch(target: string | SerializedQuery, events: rtdb.EventType | rtdb.EventType[], cb: IFirebaseWatchHandler): void;
unWatch(events?: rtdb.EventType | rtdb.EventType[], cb?: any): void;
watch(target: string | SerializedQuery, events: EventType | EventType[], cb: IFirebaseWatchHandler): void;
unWatch(events?: EventType | EventType[], cb?: any): void;
/**

@@ -84,3 +85,3 @@ * Get a Firebase SerializedQuery reference

/** Get a DB reference for a given path in Firebase */
ref(path?: string): rtdb.IReference;
ref(path?: string): import("@firebase/database-types").Reference | import("firemock").Reference<any>;
readonly isMockDb: boolean;

@@ -120,5 +121,5 @@ readonly mock: Mock;

update<T = any>(path: string, value: Partial<T>): Promise<any>;
remove<T = any>(path: string, ignoreMissing?: boolean): Promise<void>;
remove<T = any>(path: string, ignoreMissing?: boolean): Promise<any>;
/** returns the firebase snapshot at a given path in the database */
getSnapshot(path: string | SerializedQuery): Promise<rtdb.IDataSnapshot>;
getSnapshot(path: string | SerializedQuery): Promise<DataSnapshot>;
/** returns the JS value at a given path in the database */

@@ -125,0 +126,0 @@ getValue<T = any>(path: string): Promise<T>;

@@ -5,3 +5,2 @@ export { RealTimeDB, IFirebaseListener, FirebaseBoolean, IFirebaseWatchCoreEvent, IFirebaseWatchEvent, IFirebaseWatchHandler } from "./db";

export { _getFirebaseType } from "./util";
export { rtdb } from "firebase-api-surface";
export declare type DebuggingCallback = (message: string) => void;

@@ -8,0 +7,0 @@ export declare type IFirebaseConfig = IFirebaseClientConfig | IFirebaseAdminConfig;

@@ -5,2 +5,1 @@ export { RealTimeDB, FirebaseBoolean } from "./db";

export { _getFirebaseType } from "./util";
export { rtdb } from "firebase-api-surface";
import { IFirebaseWatchHandler, IFirebaseWatchContext } from "./db";
export declare const WatcherEventWrapper: (context: IFirebaseWatchContext) => (handler: IFirebaseWatchHandler) => (snapshot: import("../../../../../../Users/ken/mine/forest-fire/abstracted-firebase/node_modules/firemock/dist/snapshot").default<any>, previousChildKey?: string) => any;
import { DataSnapshot } from "@firebase/database-types";
export declare const WatcherEventWrapper: (context: IFirebaseWatchContext) => (handler: IFirebaseWatchHandler) => (snapshot: DataSnapshot, previousChildKey?: string) => any;
import { SerializedQuery } from "serialized-query";
import { rtdb } from "firebase-api-surface";
import { FirebaseDatabase, DataSnapshot } from "@firebase/database-types";
import { EventType } from "./types";
declare type Mock = import("firemock").Mock;

@@ -10,3 +11,3 @@ export interface IPathSetter<T = any> {

export interface IFirebaseWatchContext {
eventType: rtdb.EventType;
eventType: EventType;
targetType: "path" | "query";

@@ -58,3 +59,3 @@ }

protected app: any;
protected _database: rtdb.IFirebaseDatabase;
protected _database: FirebaseDatabase;
protected abstract _firestore: any;

@@ -74,4 +75,4 @@ protected abstract _storage: any;

*/
watch(target: string | SerializedQuery, events: rtdb.EventType | rtdb.EventType[], cb: IFirebaseWatchHandler): void;
unWatch(events?: rtdb.EventType | rtdb.EventType[], cb?: any): void;
watch(target: string | SerializedQuery, events: EventType | EventType[], cb: IFirebaseWatchHandler): void;
unWatch(events?: EventType | EventType[], cb?: any): void;
/**

@@ -84,3 +85,3 @@ * Get a Firebase SerializedQuery reference

/** Get a DB reference for a given path in Firebase */
ref(path?: string): rtdb.IReference;
ref(path?: string): import("@firebase/database-types").Reference | import("firemock").Reference<any>;
readonly isMockDb: boolean;

@@ -120,5 +121,5 @@ readonly mock: Mock;

update<T = any>(path: string, value: Partial<T>): Promise<any>;
remove<T = any>(path: string, ignoreMissing?: boolean): Promise<void>;
remove<T = any>(path: string, ignoreMissing?: boolean): Promise<any>;
/** returns the firebase snapshot at a given path in the database */
getSnapshot(path: string | SerializedQuery): Promise<rtdb.IDataSnapshot>;
getSnapshot(path: string | SerializedQuery): Promise<DataSnapshot>;
/** returns the JS value at a given path in the database */

@@ -125,0 +126,0 @@ getValue<T = any>(path: string): Promise<T>;

@@ -5,3 +5,2 @@ export { RealTimeDB, IFirebaseListener, FirebaseBoolean, IFirebaseWatchCoreEvent, IFirebaseWatchEvent, IFirebaseWatchHandler } from "./db";

export { _getFirebaseType } from "./util";
export { rtdb } from "firebase-api-surface";
export declare type DebuggingCallback = (message: string) => void;

@@ -8,0 +7,0 @@ export declare type IFirebaseConfig = IFirebaseClientConfig | IFirebaseAdminConfig;

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./db", "./errors/FileDepthExceeded", "./errors/UndefinedAssignment", "./util", "firebase-api-surface"], factory);
define(["require", "exports", "./db", "./errors/FileDepthExceeded", "./errors/UndefinedAssignment", "./util"], factory);
}

@@ -22,4 +22,2 @@ })(function (require, exports) {

exports._getFirebaseType = util_1._getFirebaseType;
var firebase_api_surface_1 = require("firebase-api-surface");
exports.rtdb = firebase_api_surface_1.rtdb;
});
import { IFirebaseWatchHandler, IFirebaseWatchContext } from "./db";
export declare const WatcherEventWrapper: (context: IFirebaseWatchContext) => (handler: IFirebaseWatchHandler) => (snapshot: import("../../../../../../Users/ken/mine/forest-fire/abstracted-firebase/node_modules/firemock/dist/snapshot").default<any>, previousChildKey?: string) => any;
import { DataSnapshot } from "@firebase/database-types";
export declare const WatcherEventWrapper: (context: IFirebaseWatchContext) => (handler: IFirebaseWatchHandler) => (snapshot: DataSnapshot, previousChildKey?: string) => any;
{
"name": "abstracted-firebase",
"version": "0.14.5",
"version": "0.15.0",
"description": "Core functional library supporting 'abstracted-admin' and 'abstracted-client'",

@@ -30,4 +30,4 @@ "license": "MIT",

"dependencies": {
"common-types": "^1.8.2",
"firebase-api-surface": "^0.8.5",
"@firebase/database-types": "^0.3.5",
"common-types": "^1.9.6",
"serialized-query": "^0.4.5",

@@ -46,21 +46,20 @@ "typed-conversions": "^0.8.9",

"@types/rimraf": "^2.0.1",
"abstracted-admin": "^0.12.1",
"abstracted-client": "^0.12.1",
"abstracted-admin": "^0.14.10",
"abstracted-client": "^0.14.17",
"async-shelljs": "^0.1.2",
"chai": "^4.1.0",
"chance": "^1.0.16",
"coveralls": "^3.0.0",
"chai": "^4.2.0",
"coveralls": "^3.0.3",
"faker": "^4.1.0",
"firemock": "^0.18.0",
"firemock": "^0.19.1",
"js-yaml": "^3.12.0",
"lodash": "^4.17.10",
"mocha": "^5.2.0",
"nyc": "^12.0.2",
"rimraf": "^2.6.2",
"rollup": "^0.60.7",
"rollup-plugin-typescript2": "^0.15.0",
"mocha": "^6.0.2",
"nyc": "^13.3.0",
"rimraf": "^2.6.3",
"rollup": "^1.2.3",
"rollup-plugin-typescript2": "^0.19.3",
"test-console": "^1.1.0",
"ts-node": "^6.1.0",
"tslint": "^5.10.0",
"typescript": "^3.0.0-dev.20180606"
"ts-node": "^8.0.2",
"tslint": "^5.13.0",
"typescript": "^3.3.3"
},

@@ -67,0 +66,0 @@ "engines": {

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