@daaku/firebase-blob-db
Advanced tools
Comparing version 2.0.0 to 2.1.0
import { downloadURL, } from '@daaku/firebase-storage'; | ||
// Resilient uploading of blobs to Firebase Storage. | ||
export class FirebaseBlobDB { | ||
db; | ||
client; | ||
onError; | ||
onComplete; | ||
blobInfoStoreName; | ||
blobCacheStoreName; | ||
blobQueueStoreName; | ||
running = false; | ||
constructor(config) { | ||
this.running = false; | ||
this.client = config.client; | ||
@@ -22,3 +15,4 @@ this.onError = config.onError; | ||
upgradeDB(db) { | ||
[this.blobInfoStoreName, this.blobQueueStoreName].forEach((name) => { | ||
; | ||
[this.blobInfoStoreName, this.blobQueueStoreName].forEach(name => { | ||
if (!db.objectStoreNames.contains(name)) { | ||
@@ -25,0 +19,0 @@ db.createObjectStore(name, { keyPath: 'path' }); |
{ | ||
"name": "@daaku/firebase-blob-db", | ||
"author": "Naitik Shah <n@daaku.org>", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Resilient uploading of blobs to Firebase Storage.", | ||
"repository": "git@github.com:daaku/firebase-blob-db", | ||
"license": "MIT", | ||
"prettier": "prettier-config-daaku", | ||
"type": "module", | ||
@@ -16,14 +15,14 @@ "exports": { | ||
}, | ||
"eslintConfig": { | ||
"extends": "@daaku" | ||
"prettier": { | ||
"arrowParens": "avoid", | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
}, | ||
"scripts": { | ||
"check:types": "tsc --noEmit", | ||
"check:lint": "eslint --fix --ignore-pattern dist .", | ||
"check": "run-p 'check:*' 'test'", | ||
"build:js": "tsc", | ||
"build:test": "esbuild --bundle --sourcemap --define:process.env.NODE_ENV=\\\"production\\\" --outdir=dist/bundle test/tests.ts", | ||
"test": "npm run build:test && TIMEOUT=30000 qunit-puppeteer", | ||
"build": "run-p check:lint test build:js", | ||
"deploy": "npm run build && npm publish --access=public" | ||
"build": "tsc", | ||
"test": "vite build && TIMEOUT=30000 qunit-puppeteer", | ||
"deploy": "npm run test && npm publish --access=public", | ||
"prepare": "npm run build", | ||
"dev": "vite" | ||
}, | ||
@@ -35,13 +34,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"@daaku/eslint-config": "^4.0.0", | ||
"@daaku/firebase-auth": "^2.2.0", | ||
"@daaku/qunit-puppeteer": "^2.0.0", | ||
"@daaku/qunit-puppeteer": "^3.3.0", | ||
"@types/qunit": "^2.11.2", | ||
"esbuild": "^0.14.0", | ||
"eslint": "^8.1.0", | ||
"nanoid": "^4.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier-config-daaku": "^1.0.0", | ||
"nanoid": "^5.0.1", | ||
"qunit": "^2.17.2", | ||
"typescript": "^4.4.4" | ||
"typescript": "^5.0.2", | ||
"vite": "^5.0.2" | ||
}, | ||
@@ -48,0 +43,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
7
15531
194