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

firemock

Package Overview
Dependencies
Maintainers
1
Versions
268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firemock - npm Package Compare versions

Comparing version 0.17.3 to 0.17.4

2

dist/esnext/database.d.ts
import { IDictionary } from "common-types";
import { rtdb } from "firebase-api-surface";
import { IListener } from "./query";
import { SnapShot } from ".";
import { SnapShot } from "./index";
export declare let db: IDictionary;

@@ -6,0 +6,0 @@ export declare function clearDatabase(): void;

import { set, get } from "lodash";
import { key as fbKey } from "firebase-key";
import { join, pathDiff, getParent, getKey, keyAndParent } from "./util";
import { SnapShot } from ".";
import { SnapShot } from "./index";
export let db = [];

@@ -6,0 +6,0 @@ let _listeners = [];

import { IDictionary } from "common-types";
import { Schema, SchemaHelper, Reference, Deployment } from ".";
import { Schema, SchemaHelper, Reference, Deployment } from "./index";
import { DelayType } from "./util";

@@ -4,0 +4,0 @@ export interface ISchema {

@@ -1,2 +0,2 @@

import { Queue, Schema, Reference, Deployment } from ".";
import { Queue, Schema, Reference, Deployment } from "./index";
import { db, clearDatabase, updateDatabase } from "./database";

@@ -3,0 +3,0 @@ import { setNetworkDelay } from "./util";

@@ -7,3 +7,2 @@ 'use strict';

var fbKey = require('firebase-key');
var _ = require('.');
var convert = require('typed-conversions');

@@ -220,3 +219,3 @@

}
return l.callback(new _.SnapShot(join(l.path), result));
return l.callback(new SnapShot(join(l.path), result));
});

@@ -226,3 +225,3 @@ if (newValue === undefined) {

findChildListeners(parent, "child_removed", "child_changed").forEach(l => {
return l.callback(new _.SnapShot(key, newValue));
return l.callback(new SnapShot(key, newValue));
});

@@ -233,3 +232,3 @@ }

findChildListeners(parent, "child_added", "child_changed").forEach(l => {
return l.callback(new _.SnapShot(key, newValue));
return l.callback(new SnapShot(key, newValue));
});

@@ -263,3 +262,3 @@ }

/** Clears the DB and removes all listeners */
function reset() {
function reset$$1() {
removeAllListeners();

@@ -270,8 +269,8 @@ clearDatabase();

/* tslint:disable:max-classes-per-file */
class Mock {
class Mock$$1 {
constructor(raw) {
this._schemas = new _.Queue("schemas").clear();
this._relationships = new _.Queue("relationships").clear();
this._queues = new _.Queue("queues").clear();
_.Queue.clearAll();
this._schemas = new Queue("schemas").clear();
this._relationships = new Queue("relationships").clear();
this._queues = new Queue("queues").clear();
Queue.clearAll();
clearDatabase();

@@ -292,7 +291,7 @@ if (raw) {

addSchema(schema, mock) {
const s = new _.Schema(schema);
const s = new Schema(schema);
if (mock) {
s.mock(mock);
}
return new _.Schema(schema);
return new Schema(schema);
}

@@ -304,6 +303,6 @@ /** Set the network delay for queries with "once" */

get deploy() {
return new _.Deployment();
return new Deployment();
}
queueSchema(schemaId, quantity = 1, overrides = {}) {
const d = new _.Deployment();
const d = new Deployment();
d.queueSchema(schemaId, quantity, overrides);

@@ -313,6 +312,6 @@ return d;

generate() {
return new _.Deployment().generate();
return new Deployment().generate();
}
ref(dbPath) {
return new _.Reference(dbPath);
return new Reference(dbPath);
}

@@ -1152,3 +1151,3 @@ }

exports.Mock = Mock;
exports.Mock = Mock$$1;
exports.SchemaHelper = SchemaHelper;

@@ -1161,3 +1160,3 @@ exports.Reference = Reference;

exports.Deployment = Deployment;
exports.resetDatabase = reset;
exports.resetDatabase = reset$$1;
//# sourceMappingURL=firemock.cjs.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('firebase-key'), require('.'), require('typed-conversions')) :
typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'firebase-key', '.', 'typed-conversions'], factory) :
(factory((global.FireMock = {}),global.lodash,global.fbKey,global._,global.convert));
}(this, (function (exports,lodash,fbKey,_,convert) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('firebase-key'), require('typed-conversions')) :
typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'firebase-key', 'typed-conversions'], factory) :
(factory((global.FireMock = {}),global.lodash,global.fbKey,global.convert));
}(this, (function (exports,lodash,fbKey,convert) { 'use strict';

@@ -216,3 +216,3 @@ function normalizeRef(r) {

}
return l.callback(new _.SnapShot(join(l.path), result));
return l.callback(new SnapShot(join(l.path), result));
});

@@ -222,3 +222,3 @@ if (newValue === undefined) {

findChildListeners(parent, "child_removed", "child_changed").forEach(l => {
return l.callback(new _.SnapShot(key, newValue));
return l.callback(new SnapShot(key, newValue));
});

@@ -229,3 +229,3 @@ }

findChildListeners(parent, "child_added", "child_changed").forEach(l => {
return l.callback(new _.SnapShot(key, newValue));
return l.callback(new SnapShot(key, newValue));
});

@@ -259,3 +259,3 @@ }

/** Clears the DB and removes all listeners */
function reset() {
function reset$$1() {
removeAllListeners();

@@ -266,8 +266,8 @@ clearDatabase();

/* tslint:disable:max-classes-per-file */
class Mock {
class Mock$$1 {
constructor(raw) {
this._schemas = new _.Queue("schemas").clear();
this._relationships = new _.Queue("relationships").clear();
this._queues = new _.Queue("queues").clear();
_.Queue.clearAll();
this._schemas = new Queue("schemas").clear();
this._relationships = new Queue("relationships").clear();
this._queues = new Queue("queues").clear();
Queue.clearAll();
clearDatabase();

@@ -288,7 +288,7 @@ if (raw) {

addSchema(schema, mock) {
const s = new _.Schema(schema);
const s = new Schema(schema);
if (mock) {
s.mock(mock);
}
return new _.Schema(schema);
return new Schema(schema);
}

@@ -300,6 +300,6 @@ /** Set the network delay for queries with "once" */

get deploy() {
return new _.Deployment();
return new Deployment();
}
queueSchema(schemaId, quantity = 1, overrides = {}) {
const d = new _.Deployment();
const d = new Deployment();
d.queueSchema(schemaId, quantity, overrides);

@@ -309,6 +309,6 @@ return d;

generate() {
return new _.Deployment().generate();
return new Deployment().generate();
}
ref(dbPath) {
return new _.Reference(dbPath);
return new Reference(dbPath);
}

@@ -1148,3 +1148,3 @@ }

exports.Mock = Mock;
exports.Mock = Mock$$1;
exports.SchemaHelper = SchemaHelper;

@@ -1157,3 +1157,3 @@ exports.Reference = Reference;

exports.Deployment = Deployment;
exports.resetDatabase = reset;
exports.resetDatabase = reset$$1;

@@ -1160,0 +1160,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

{
"name": "firemock",
"version": "0.17.3",
"version": "0.17.4",
"description": "firemock",

@@ -5,0 +5,0 @@ "license": "MIT",

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