@vercube/storage 0.0.1-beta.7 → 0.0.2-beta.0
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.
- package/dist/index.cjs +25 -2
- package/dist/index.mjs +24 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -27,8 +27,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
const __vercube_di = __toESM(require("@vercube/di"));
|
|
28
28
|
const __vercube_logger = __toESM(require("@vercube/logger"));
|
|
29
29
|
|
|
30
|
-
//#region node_modules/.pnpm/@oxc-project+runtime@0.
|
|
31
|
-
var require_decorate = __commonJS({ "node_modules/.pnpm/@oxc-project+runtime@0.
|
|
30
|
+
//#region node_modules/.pnpm/@oxc-project+runtime@0.65.0/node_modules/@oxc-project/runtime/src/helpers/decorate.js
|
|
31
|
+
var require_decorate = __commonJS({ "node_modules/.pnpm/@oxc-project+runtime@0.65.0/node_modules/@oxc-project/runtime/src/helpers/decorate.js"(exports, module) {
|
|
32
32
|
function __decorate(decorators, target, key, desc) {
|
|
33
33
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
34
34
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -41,6 +41,11 @@ var import_decorate = __toESM(require_decorate(), 1);
|
|
|
41
41
|
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region packages/storage/src/Service/StorageManager.ts
|
|
44
|
+
/**
|
|
45
|
+
* Manages multiple storage instances and provides a unified interface for storage operations.
|
|
46
|
+
* Each storage instance is identified by a unique name and implements the Storage interface.
|
|
47
|
+
* This class handles initialization, registration, and delegation of storage operations.
|
|
48
|
+
*/
|
|
44
49
|
var StorageManager = class {
|
|
45
50
|
gContainer;
|
|
46
51
|
gLogger;
|
|
@@ -165,10 +170,28 @@ var StorageManager = class {
|
|
|
165
170
|
|
|
166
171
|
//#endregion
|
|
167
172
|
//#region packages/storage/src/Service/Storage.ts
|
|
173
|
+
/**
|
|
174
|
+
* Abstract base class for storage implementations
|
|
175
|
+
* Provides a common interface for different storage providers
|
|
176
|
+
*
|
|
177
|
+
* @abstract
|
|
178
|
+
* @class Storage
|
|
179
|
+
* @description
|
|
180
|
+
* The Storage class defines a standard interface for storing and retrieving data.
|
|
181
|
+
* It supports basic operations like get, set, delete, and querying storage state.
|
|
182
|
+
* Concrete implementations must provide the actual storage mechanism.
|
|
183
|
+
*/
|
|
168
184
|
var Storage = class {};
|
|
169
185
|
|
|
170
186
|
//#endregion
|
|
171
187
|
//#region packages/storage/src/Storages/MemoryStorage.ts
|
|
188
|
+
/**
|
|
189
|
+
* In-memory storage implementation of the Storage interface
|
|
190
|
+
* Provides a simple key-value store that persists only for the duration of the application runtime
|
|
191
|
+
* Useful for testing, caching, and scenarios where temporary storage is needed
|
|
192
|
+
*
|
|
193
|
+
* @implements {Storage}
|
|
194
|
+
*/
|
|
172
195
|
var MemoryStorage = class {
|
|
173
196
|
/** Internal storage map to hold key-value pairs */
|
|
174
197
|
storage = new Map();
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Container, Init, Inject, InjectOptional } from "@vercube/di";
|
|
2
2
|
import { Logger } from "@vercube/logger";
|
|
3
3
|
|
|
4
|
-
//#region node_modules/.pnpm/@oxc-project+runtime@0.
|
|
4
|
+
//#region node_modules/.pnpm/@oxc-project+runtime@0.65.0/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js
|
|
5
5
|
function __decorate(decorators, target, key, desc) {
|
|
6
6
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
7
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11,6 +11,11 @@ function __decorate(decorators, target, key, desc) {
|
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region packages/storage/src/Service/StorageManager.ts
|
|
14
|
+
/**
|
|
15
|
+
* Manages multiple storage instances and provides a unified interface for storage operations.
|
|
16
|
+
* Each storage instance is identified by a unique name and implements the Storage interface.
|
|
17
|
+
* This class handles initialization, registration, and delegation of storage operations.
|
|
18
|
+
*/
|
|
14
19
|
var StorageManager = class {
|
|
15
20
|
gContainer;
|
|
16
21
|
gLogger;
|
|
@@ -135,10 +140,28 @@ __decorate([Init()], StorageManager.prototype, "init", null);
|
|
|
135
140
|
|
|
136
141
|
//#endregion
|
|
137
142
|
//#region packages/storage/src/Service/Storage.ts
|
|
143
|
+
/**
|
|
144
|
+
* Abstract base class for storage implementations
|
|
145
|
+
* Provides a common interface for different storage providers
|
|
146
|
+
*
|
|
147
|
+
* @abstract
|
|
148
|
+
* @class Storage
|
|
149
|
+
* @description
|
|
150
|
+
* The Storage class defines a standard interface for storing and retrieving data.
|
|
151
|
+
* It supports basic operations like get, set, delete, and querying storage state.
|
|
152
|
+
* Concrete implementations must provide the actual storage mechanism.
|
|
153
|
+
*/
|
|
138
154
|
var Storage = class {};
|
|
139
155
|
|
|
140
156
|
//#endregion
|
|
141
157
|
//#region packages/storage/src/Storages/MemoryStorage.ts
|
|
158
|
+
/**
|
|
159
|
+
* In-memory storage implementation of the Storage interface
|
|
160
|
+
* Provides a simple key-value store that persists only for the duration of the application runtime
|
|
161
|
+
* Useful for testing, caching, and scenarios where temporary storage is needed
|
|
162
|
+
*
|
|
163
|
+
* @implements {Storage}
|
|
164
|
+
*/
|
|
142
165
|
var MemoryStorage = class {
|
|
143
166
|
/** Internal storage map to hold key-value pairs */
|
|
144
167
|
storage = new Map();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/storage",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-beta.0",
|
|
4
4
|
"description": "Storage module for Vercube framework",
|
|
5
5
|
"repository": "@vercube/storage",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"README.md"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vercube/
|
|
25
|
-
"@vercube/
|
|
24
|
+
"@vercube/di": "0.0.2-beta.0",
|
|
25
|
+
"@vercube/logger": "0.0.2-beta.0"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|