abstracted-firebase
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -42,4 +42,5 @@ import { SerializedQuery } from "serialized-query"; | ||
set<T = T>(path: string, value: T): Promise<void>; | ||
multiPathSet(): { | ||
basePath: string; | ||
multiPathSet(base?: string): { | ||
_basePath: string; | ||
basePath(path?: string): string | any; | ||
add<X = any>(pathValue: IPathSetter<X>): any; | ||
@@ -51,11 +52,11 @@ readonly paths: string[]; | ||
update<T = any>(path: string, value: Partial<T>): Promise<any>; | ||
remove<T = T>(path: string, ignoreMissing?: boolean): Promise<void>; | ||
remove<T = any>(path: string, ignoreMissing?: boolean): Promise<void>; | ||
getSnapshot(path: string | SerializedQuery): Promise<rtdb.IDataSnapshot>; | ||
getValue<T = T>(path: string): Promise<T>; | ||
getRecord<T = T>(path: string | SerializedQuery<T>, idProp?: string): Promise<T>; | ||
getList<T = T>(path: string | SerializedQuery<T>, idProp?: string): Promise<T[]>; | ||
getSortedList<T = T>(query: any, idProp?: string): Promise<T[]>; | ||
push<T = T>(path: string, value: T): Promise<void>; | ||
getValue<T = any>(path: string): Promise<T>; | ||
getRecord<T = any>(path: string | SerializedQuery<T>, idProp?: string): Promise<T>; | ||
getList<T = any>(path: string | SerializedQuery<T>, idProp?: string): Promise<T[]>; | ||
getSortedList<T = any>(query: any, idProp?: string): Promise<T[]>; | ||
push<T = any>(path: string, value: T): Promise<void>; | ||
exists(path: string): Promise<boolean>; | ||
protected handleError(e: any, name: string, message?: string): Promise<never>; | ||
} |
@@ -96,3 +96,3 @@ "use strict"; | ||
} | ||
multiPathSet() { | ||
multiPathSet(base) { | ||
const mps = []; | ||
@@ -102,3 +102,10 @@ const ref = this.ref.bind(this); | ||
const api = { | ||
basePath: "/", | ||
_basePath: base || "/", | ||
basePath(path) { | ||
if (path === undefined) { | ||
return api._basePath; | ||
} | ||
api._basePath = path; | ||
return api; | ||
}, | ||
add(pathValue) { | ||
@@ -158,3 +165,4 @@ const exists = new Set(api.paths); | ||
} | ||
if (e.message.indexOf("First argument path specified exceeds the maximum depth") !== -1) { | ||
if (e.message.indexOf("First argument path specified exceeds the maximum depth") !== | ||
-1) { | ||
e.name = "AbstractedFirebaseUpdateDepthError"; | ||
@@ -161,0 +169,0 @@ } |
{ | ||
"name": "abstracted-firebase", | ||
"version": "0.5.1", | ||
"description": "Core library supporting 'abstracted-admin' and 'abstracted-client' libraries", | ||
"version": "0.5.2", | ||
"description": | ||
"Core library supporting 'abstracted-admin' and 'abstracted-client' libraries", | ||
"license": "MIT", | ||
@@ -11,2 +12,4 @@ "repository": "https://github.com/forest-fire/abstracted-firebase", | ||
"main": "lib/index.js", | ||
"module": "dist/abstracted-firebase.es.js", | ||
"browser": "dist/abstracted-firebase.min.js", | ||
"typings": "lib/index.d.ts", | ||
@@ -25,3 +28,3 @@ "scripts": { | ||
"dependencies": { | ||
"common-types": "^1.5.4", | ||
"common-types": "^1.7.27", | ||
"firebase-api-surface": "^0.7.11", | ||
@@ -31,9 +34,9 @@ "lodash.first": "^3.0.0", | ||
"moment": "^2.20.1", | ||
"serialized-query": "^0.3.3", | ||
"serialized-query": "^0.3.8", | ||
"typed-conversions": "^0.7.3" | ||
}, | ||
"peerDependencies": { | ||
"chance": "^1.0.13", | ||
"chance": "^1.0.16", | ||
"faker": "^4.1.0", | ||
"firemock": "^0.15.11" | ||
"firemock": "^0.15.15" | ||
}, | ||
@@ -40,0 +43,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17448
353
Updatedcommon-types@^1.7.27
Updatedserialized-query@^0.3.8