@worldsibu/convector-core-storage
Advanced tools
Comparing version 1.3.10-0-alpha.74462599 to 1.3.10-0-alpha.68696fd6
@@ -0,2 +1,5 @@ | ||
import { Namespace } from 'cls-hooked'; | ||
export declare const BaseStorageNamespace: Namespace; | ||
export declare abstract class BaseStorage { | ||
private static _currentStorage; | ||
static current: BaseStorage; | ||
@@ -3,0 +6,0 @@ abstract get(id: string, storageOptions?: any): Promise<any>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var g = require("window-or-global"); | ||
var cls_hooked_1 = require("cls-hooked"); | ||
exports.BaseStorageNamespace = g.BaseStorageNamespace || cls_hooked_1.createNamespace('@worldsibu/convector-core-storage'); | ||
g.BaseStorageNamespace = exports.BaseStorageNamespace; | ||
var BaseStorage = (function () { | ||
@@ -9,6 +12,11 @@ function BaseStorage() { | ||
get: function () { | ||
return g.ConvectorBaseStorageCurrent; | ||
return exports.BaseStorageNamespace.active ? exports.BaseStorageNamespace.get('current') : this._currentStorage; | ||
}, | ||
set: function (storage) { | ||
g.ConvectorBaseStorageCurrent = storage; | ||
if (exports.BaseStorageNamespace.active) { | ||
exports.BaseStorageNamespace.set('current', storage); | ||
} | ||
else { | ||
this._currentStorage = storage; | ||
} | ||
}, | ||
@@ -15,0 +23,0 @@ enumerable: true, |
{ | ||
"name": "@worldsibu/convector-core-storage", | ||
"version": "1.3.10-0-alpha.74462599", | ||
"version": "1.3.10-0-alpha.68696fd6", | ||
"description": "Convector Core Storage class. This is not intended to be used as a provider but as an abstract interface of one", | ||
@@ -43,3 +43,5 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@worldsibu/convector-core-errors": "1.3.10-0-alpha.74462599", | ||
"@types/cls-hooked": "^4.3.1", | ||
"@worldsibu/convector-core-errors": "1.3.10-0-alpha.68696fd6", | ||
"cls-hooked": "git+https://github.com/rodolfoleal/cls-hooked.git", | ||
"tslib": "^1.9.0", | ||
@@ -46,0 +48,0 @@ "window-or-global": "^1.0.1" |
Sorry, the diff of this file is not supported yet
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
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
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
16305
43
5
1
+ Added@types/cls-hooked@^4.3.1
+ Addedcls-hooked@git+https://github.com/rodolfoleal/cls-hooked.git
+ Added@types/cls-hooked@4.3.8(transitive)
+ Added@types/node@22.7.4(transitive)
+ Added@worldsibu/convector-core-errors@1.3.10-0-alpha.68696fd6(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removed@worldsibu/convector-core-errors@1.3.10-0-alpha.74462599(transitive)
Updated@worldsibu/convector-core-errors@1.3.10-0-alpha.68696fd6