firebase-auth-cloudflare-workers
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -39,5 +39,11 @@ "use strict"; | ||
if (!WorkersKVStoreSingle.instance) { | ||
WorkersKVStoreSingle.instance = new WorkersKVStoreSingle(cacheKey, cfKVNamespace); | ||
WorkersKVStoreSingle.instance = new Map(); | ||
} | ||
return WorkersKVStoreSingle.instance; | ||
const instance = WorkersKVStoreSingle.instance.get(cacheKey); | ||
if (instance) { | ||
return instance; | ||
} | ||
const newInstance = new WorkersKVStoreSingle(cacheKey, cfKVNamespace); | ||
WorkersKVStoreSingle.instance.set(cacheKey, newInstance); | ||
return newInstance; | ||
} | ||
@@ -44,0 +50,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export declare const version = "2.0.0"; | ||
export declare const version = "2.0.1"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '2.0.0'; | ||
exports.version = '2.0.1'; |
@@ -32,5 +32,11 @@ import { BaseAuth } from './auth'; | ||
if (!WorkersKVStoreSingle.instance) { | ||
WorkersKVStoreSingle.instance = new WorkersKVStoreSingle(cacheKey, cfKVNamespace); | ||
WorkersKVStoreSingle.instance = new Map(); | ||
} | ||
return WorkersKVStoreSingle.instance; | ||
const instance = WorkersKVStoreSingle.instance.get(cacheKey); | ||
if (instance) { | ||
return instance; | ||
} | ||
const newInstance = new WorkersKVStoreSingle(cacheKey, cfKVNamespace); | ||
WorkersKVStoreSingle.instance.set(cacheKey, newInstance); | ||
return newInstance; | ||
} | ||
@@ -37,0 +43,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export const version = '2.0.0'; | ||
export const version = '2.0.1'; |
{ | ||
"name": "firebase-auth-cloudflare-workers", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Zero-dependencies firebase auth library for Cloudflare Workers.", | ||
@@ -5,0 +5,0 @@ "author": "codehex", |
275029
6481