fiberx-backend-toolkit 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,6 +7,10 @@ declare class StorageDriverUtil {
|
|
|
7
7
|
* Get initialized storage driver (singleton)
|
|
8
8
|
*/
|
|
9
9
|
static getDriver(): Promise<BaseStorageDriver>;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve driver synchronously based on env
|
|
12
|
+
*/
|
|
13
|
+
static getDriverSync(): BaseStorageDriver;
|
|
10
14
|
/**
|
|
11
15
|
* Initialize driver based on environment
|
|
12
16
|
*/
|
|
@@ -22,6 +22,15 @@ class StorageDriverUtil {
|
|
|
22
22
|
this.instance = driver;
|
|
23
23
|
return driver;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Resolve driver synchronously based on env
|
|
27
|
+
*/
|
|
28
|
+
static getDriverSync() {
|
|
29
|
+
if (this.instance) {
|
|
30
|
+
return this.instance;
|
|
31
|
+
}
|
|
32
|
+
throw new Error("Storage driver not initialized yet. Call getDriver() first to initialize.");
|
|
33
|
+
}
|
|
25
34
|
/**
|
|
26
35
|
* Initialize driver based on environment
|
|
27
36
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fiberx-backend-toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "A TypeScript backend toolkit providing shared domain logic, infrastructure helpers, and utilities for FiberX server-side applications and services.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|