@wgtechlabs/nuvex 0.1.1

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.
Files changed (70) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +427 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/cjs/core/client.js +981 -0
  5. package/dist/cjs/core/client.js.map +1 -0
  6. package/dist/cjs/core/database.js +297 -0
  7. package/dist/cjs/core/database.js.map +1 -0
  8. package/dist/cjs/core/engine.js +1202 -0
  9. package/dist/cjs/core/engine.js.map +1 -0
  10. package/dist/cjs/core/index.js +35 -0
  11. package/dist/cjs/core/index.js.map +1 -0
  12. package/dist/cjs/index.js +109 -0
  13. package/dist/cjs/index.js.map +1 -0
  14. package/dist/cjs/interfaces/index.js +12 -0
  15. package/dist/cjs/interfaces/index.js.map +1 -0
  16. package/dist/cjs/layers/index.js +22 -0
  17. package/dist/cjs/layers/index.js.map +1 -0
  18. package/dist/cjs/layers/memory.js +388 -0
  19. package/dist/cjs/layers/memory.js.map +1 -0
  20. package/dist/cjs/layers/postgres.js +492 -0
  21. package/dist/cjs/layers/postgres.js.map +1 -0
  22. package/dist/cjs/layers/redis.js +388 -0
  23. package/dist/cjs/layers/redis.js.map +1 -0
  24. package/dist/cjs/types/index.js +52 -0
  25. package/dist/cjs/types/index.js.map +1 -0
  26. package/dist/esm/core/client.js +944 -0
  27. package/dist/esm/core/client.js.map +1 -0
  28. package/dist/esm/core/database.js +289 -0
  29. package/dist/esm/core/database.js.map +1 -0
  30. package/dist/esm/core/engine.js +1198 -0
  31. package/dist/esm/core/engine.js.map +1 -0
  32. package/dist/esm/core/index.js +16 -0
  33. package/dist/esm/core/index.js.map +1 -0
  34. package/dist/esm/index.js +87 -0
  35. package/dist/esm/index.js.map +1 -0
  36. package/dist/esm/interfaces/index.js +11 -0
  37. package/dist/esm/interfaces/index.js.map +1 -0
  38. package/dist/esm/layers/index.js +16 -0
  39. package/dist/esm/layers/index.js.map +1 -0
  40. package/dist/esm/layers/memory.js +384 -0
  41. package/dist/esm/layers/memory.js.map +1 -0
  42. package/dist/esm/layers/postgres.js +485 -0
  43. package/dist/esm/layers/postgres.js.map +1 -0
  44. package/dist/esm/layers/redis.js +384 -0
  45. package/dist/esm/layers/redis.js.map +1 -0
  46. package/dist/esm/types/index.js +49 -0
  47. package/dist/esm/types/index.js.map +1 -0
  48. package/dist/types/core/client.d.ts +561 -0
  49. package/dist/types/core/client.d.ts.map +1 -0
  50. package/dist/types/core/database.d.ts +130 -0
  51. package/dist/types/core/database.d.ts.map +1 -0
  52. package/dist/types/core/engine.d.ts +450 -0
  53. package/dist/types/core/engine.d.ts.map +1 -0
  54. package/dist/types/core/index.d.ts +13 -0
  55. package/dist/types/core/index.d.ts.map +1 -0
  56. package/dist/types/index.d.ts +85 -0
  57. package/dist/types/index.d.ts.map +1 -0
  58. package/dist/types/interfaces/index.d.ts +209 -0
  59. package/dist/types/interfaces/index.d.ts.map +1 -0
  60. package/dist/types/layers/index.d.ts +16 -0
  61. package/dist/types/layers/index.d.ts.map +1 -0
  62. package/dist/types/layers/memory.d.ts +261 -0
  63. package/dist/types/layers/memory.d.ts.map +1 -0
  64. package/dist/types/layers/postgres.d.ts +313 -0
  65. package/dist/types/layers/postgres.d.ts.map +1 -0
  66. package/dist/types/layers/redis.d.ts +248 -0
  67. package/dist/types/layers/redis.d.ts.map +1 -0
  68. package/dist/types/types/index.d.ts +410 -0
  69. package/dist/types/types/index.d.ts.map +1 -0
  70. package/package.json +90 -0
@@ -0,0 +1,410 @@
1
+ /**
2
+ * Nuvex - Type Definitions
3
+ * Next-gen Unified Vault Experience
4
+ *
5
+ * Comprehensive type definitions for the multi-layer storage SDK.
6
+ * Provides type safety and IntelliSense support for all storage operations,
7
+ * configurations, and data structures.
8
+ *
9
+ * @author Waren Gonzaga, WG Technology Labs
10
+ * @since 2025
11
+ */
12
+ import type { Logger } from '../interfaces/index.js';
13
+ /**
14
+ * PostgreSQL schema configuration
15
+ *
16
+ * Configurable table and column names for PostgreSQL storage layer.
17
+ * Enables backwards compatibility with existing applications and custom naming conventions.
18
+ *
19
+ * @interface PostgresSchemaConfig
20
+ */
21
+ export interface PostgresSchemaConfig {
22
+ /** Table name for storage (default: 'nuvex_storage') */
23
+ tableName?: string;
24
+ /** Column names configuration */
25
+ columns?: {
26
+ /** Key column name (default: 'nuvex_key') */
27
+ key?: string;
28
+ /** Data/value column name (default: 'nuvex_data') */
29
+ value?: string;
30
+ };
31
+ }
32
+ /**
33
+ * PostgreSQL database configuration
34
+ *
35
+ * Configuration options for the PostgreSQL storage layer, which serves as
36
+ * the persistent storage tier in the multi-layer architecture.
37
+ *
38
+ * @interface PostgresConfig
39
+ */
40
+ export interface PostgresConfig {
41
+ /** Database server hostname or IP address */
42
+ host: string;
43
+ /** Database server port number (typically 5432) */
44
+ port: number;
45
+ /** Name of the database to connect to */
46
+ database: string;
47
+ /** Database username for authentication */
48
+ user: string;
49
+ /** Database password for authentication */
50
+ password: string;
51
+ /** SSL/TLS configuration - boolean for default or object for custom settings */
52
+ ssl?: boolean | object;
53
+ /** Maximum number of connections in the pool (default: 10) */
54
+ max?: number;
55
+ /** Time to wait before timing out idle connections (ms) */
56
+ idleTimeoutMillis?: number;
57
+ /** Time to wait for connection establishment (ms) */
58
+ connectionTimeoutMillis?: number;
59
+ /** Schema configuration for table and column names (optional) */
60
+ schema?: PostgresSchemaConfig;
61
+ }
62
+ /**
63
+ * Redis cache configuration
64
+ *
65
+ * Configuration options for the Redis storage layer, which serves as
66
+ * the distributed cache tier for improved performance.
67
+ *
68
+ * @interface RedisConfig
69
+ */
70
+ export interface RedisConfig {
71
+ /** Redis connection URL (e.g., redis://localhost:6379) */
72
+ url: string;
73
+ /** Default time to live for Redis entries in seconds (default: 3 days) */
74
+ ttl?: number;
75
+ /** Delay between retry attempts on failover (ms) */
76
+ retryDelayOnFailover?: number;
77
+ /** Maximum number of retry attempts per request */
78
+ maxRetriesPerRequest?: number;
79
+ }
80
+ /**
81
+ * Memory cache configuration
82
+ *
83
+ * Configuration options for the in-memory storage layer, which provides
84
+ * the fastest access tier in the multi-layer architecture.
85
+ *
86
+ * @interface MemoryConfig
87
+ */
88
+ export interface MemoryConfig {
89
+ /** Default time to live for memory entries in milliseconds (default: 24 hours) */
90
+ ttl?: number;
91
+ /** Maximum number of entries to store in memory (default: 10,000) */
92
+ maxSize?: number;
93
+ /** Interval for cleaning up expired entries in milliseconds */
94
+ cleanupInterval?: number;
95
+ }
96
+ /**
97
+ * Logging configuration
98
+ *
99
+ * Configuration options for logging and monitoring throughout the storage system.
100
+ *
101
+ * @interface LoggingConfig
102
+ */
103
+ export interface LoggingConfig {
104
+ /** Whether logging is enabled */
105
+ enabled?: boolean;
106
+ /** Custom logger implementation (must implement Logger interface) */
107
+ logger?: Logger;
108
+ /** Minimum log level to output */
109
+ level?: LogLevel;
110
+ /** Include performance metrics in log output */
111
+ includeMetrics?: boolean;
112
+ /** Include operation performance data in logs */
113
+ includePerformance?: boolean;
114
+ /** Include stack traces in error logs */
115
+ includeStackTrace?: boolean;
116
+ }
117
+ /**
118
+ * Main Nuvex configuration
119
+ *
120
+ * Root configuration object that defines all storage layers and system behavior.
121
+ * Only PostgreSQL configuration is required - Redis and memory layers are optional
122
+ * but highly recommended for optimal performance.
123
+ *
124
+ * @interface NuvexConfig
125
+ */
126
+ export interface NuvexConfig {
127
+ /** PostgreSQL configuration (required) - persistent storage layer */
128
+ postgres: PostgresConfig;
129
+ /** Redis configuration (optional) - distributed cache layer */
130
+ redis?: RedisConfig;
131
+ /** Memory configuration (optional) - in-memory cache layer */
132
+ memory?: MemoryConfig;
133
+ /** Logging configuration (optional) - monitoring and debugging */
134
+ logging?: LoggingConfig;
135
+ }
136
+ /**
137
+ * Storage operation options
138
+ *
139
+ * Configuration options that can be applied to individual storage operations
140
+ * to customize behavior, targeting, and performance characteristics.
141
+ *
142
+ * @interface StorageOptions
143
+ */
144
+ export interface StorageOptions {
145
+ /** Custom time to live override for this operation (seconds) */
146
+ ttl?: number;
147
+ /** Target a specific storage layer instead of using the default multi-layer approach */
148
+ layer?: StorageLayer;
149
+ /** Skip cache layers and go directly to persistent storage */
150
+ skipCache?: boolean;
151
+ }
152
+ /**
153
+ * Storage performance metrics
154
+ *
155
+ * Comprehensive metrics about storage operations and performance across
156
+ * all layers. Used for monitoring, optimization, and debugging.
157
+ *
158
+ * @interface StorageMetrics
159
+ */
160
+ export interface StorageMetrics {
161
+ /** Number of successful cache hits in memory layer */
162
+ memoryHits: number;
163
+ /** Number of cache misses in memory layer */
164
+ memoryMisses: number;
165
+ /** Number of successful cache hits in Redis layer */
166
+ redisHits: number;
167
+ /** Number of cache misses in Redis layer */
168
+ redisMisses: number;
169
+ /** Number of successful reads from PostgreSQL layer */
170
+ postgresHits: number;
171
+ /** Number of failed reads from PostgreSQL layer */
172
+ postgresMisses: number;
173
+ /** Total number of operations performed */
174
+ totalOperations: number;
175
+ /** Average response time across all operations (milliseconds) */
176
+ averageResponseTime: number;
177
+ }
178
+ /**
179
+ * Memory layer specific metrics
180
+ *
181
+ * @interface MemoryMetrics
182
+ */
183
+ export interface MemoryMetrics {
184
+ /** Number of successful cache hits in memory layer */
185
+ memoryHits: number;
186
+ /** Number of cache misses in memory layer */
187
+ memoryMisses: number;
188
+ /** Current number of entries in memory cache */
189
+ memorySize: number;
190
+ /** Maximum number of entries allowed in memory cache */
191
+ memoryMaxSize: number;
192
+ }
193
+ /**
194
+ * Redis layer specific metrics
195
+ *
196
+ * @interface RedisMetrics
197
+ */
198
+ export interface RedisMetrics {
199
+ /** Number of successful cache hits in Redis layer */
200
+ redisHits: number;
201
+ /** Number of cache misses in Redis layer */
202
+ redisMisses: number;
203
+ }
204
+ /**
205
+ * PostgreSQL layer specific metrics
206
+ *
207
+ * @interface PostgresMetrics
208
+ */
209
+ export interface PostgresMetrics {
210
+ /** Number of successful reads from PostgreSQL layer */
211
+ postgresHits: number;
212
+ /** Number of failed reads from PostgreSQL layer */
213
+ postgresMisses: number;
214
+ }
215
+ /**
216
+ * All metrics including layer-specific and overall metrics
217
+ *
218
+ * @interface AllMetrics
219
+ */
220
+ export interface AllMetrics extends StorageMetrics {
221
+ /** Current number of entries in memory cache */
222
+ memorySize: number;
223
+ /** Maximum number of entries allowed in memory cache */
224
+ memoryMaxSize: number;
225
+ /** Cache hit ratio across all layers (0-1) */
226
+ cacheHitRatio: number;
227
+ }
228
+ /**
229
+ * Layer-specific metrics union type
230
+ *
231
+ * @type LayerMetrics
232
+ */
233
+ export type LayerMetrics = MemoryMetrics | RedisMetrics | PostgresMetrics | AllMetrics;
234
+ /**
235
+ * Health check result for all layers
236
+ *
237
+ * @interface AllLayersHealth
238
+ */
239
+ export interface AllLayersHealth {
240
+ /** Memory layer health status */
241
+ memory: boolean;
242
+ /** Redis layer health status */
243
+ redis: boolean;
244
+ /** PostgreSQL layer health status */
245
+ postgres: boolean;
246
+ }
247
+ /**
248
+ * Health check result for memory layer only
249
+ *
250
+ * @interface MemoryHealth
251
+ */
252
+ export interface MemoryHealth {
253
+ /** Memory layer health status */
254
+ memory: boolean;
255
+ }
256
+ /**
257
+ * Health check result for Redis layer only
258
+ *
259
+ * @interface RedisHealth
260
+ */
261
+ export interface RedisHealth {
262
+ /** Redis layer health status */
263
+ redis: boolean;
264
+ }
265
+ /**
266
+ * Health check result for PostgreSQL layer only
267
+ *
268
+ * @interface PostgresHealth
269
+ */
270
+ export interface PostgresHealth {
271
+ /** PostgreSQL layer health status */
272
+ postgres: boolean;
273
+ }
274
+ /**
275
+ * Layer-specific health union type
276
+ *
277
+ * @type LayerHealth
278
+ */
279
+ export type LayerHealth = MemoryHealth | RedisHealth | PostgresHealth | AllLayersHealth;
280
+ /**
281
+ * Storage item metadata
282
+ *
283
+ * Metadata associated with a stored item, including lifecycle information
284
+ * and layer-specific details.
285
+ *
286
+ * @template T - The type of the stored value
287
+ * @interface StorageItem
288
+ */
289
+ export interface StorageItem<T = unknown> {
290
+ /** The actual stored value */
291
+ value: T;
292
+ /** When the item was first created */
293
+ createdAt: Date;
294
+ /** When the item will expire (if applicable) */
295
+ expiresAt?: Date;
296
+ /** Which storage layer currently holds this item */
297
+ layer: StorageLayer;
298
+ }
299
+ /**
300
+ * Batch operation definition
301
+ *
302
+ * Defines a single operation within a batch request. Supports set, get,
303
+ * and delete operations with optional per-operation configuration.
304
+ *
305
+ * @interface BatchOperation
306
+ */
307
+ export interface BatchOperation {
308
+ /** Type of operation to perform */
309
+ operation: 'set' | 'get' | 'delete';
310
+ /** Key for the operation */
311
+ key: string;
312
+ /** Value to store (required for 'set' operations) */
313
+ value?: unknown;
314
+ /** Optional configuration for this specific operation */
315
+ options?: StorageOptions;
316
+ }
317
+ /**
318
+ * Batch operation result
319
+ *
320
+ * Result of a single operation within a batch request, including
321
+ * success status and any returned data or error information.
322
+ *
323
+ * @template T - The type of the returned value
324
+ * @interface BatchResult
325
+ */
326
+ export interface BatchResult<T = unknown> {
327
+ /** Key that was operated on */
328
+ key: string;
329
+ /** Whether the operation completed successfully */
330
+ success: boolean;
331
+ /** Returned value (for successful get operations) */
332
+ value?: T;
333
+ /** Error message (for failed operations) */
334
+ error?: string;
335
+ }
336
+ /**
337
+ * Query operation options
338
+ *
339
+ * Configuration for advanced query operations that can search across
340
+ * multiple keys and return filtered, sorted, and paginated results.
341
+ *
342
+ * @interface QueryOptions
343
+ */
344
+ export interface QueryOptions {
345
+ /** Glob pattern for key matching (e.g., 'user:*', 'session:?????') */
346
+ pattern?: string;
347
+ /** Maximum number of results to return */
348
+ limit?: number;
349
+ /** Number of results to skip (for pagination) */
350
+ offset?: number;
351
+ /** Field to sort results by */
352
+ sortBy?: 'key' | 'createdAt' | 'expiresAt';
353
+ /** Sort order direction */
354
+ sortOrder?: 'asc' | 'desc';
355
+ }
356
+ /**
357
+ * Query operation result
358
+ *
359
+ * Results from a query operation, including the matching items,
360
+ * pagination information, and metadata.
361
+ *
362
+ * @template T - The type of the stored values
363
+ * @interface QueryResult
364
+ */
365
+ export interface QueryResult<T = unknown> {
366
+ /** Array of matching items with their metadata */
367
+ items: Array<{
368
+ key: string;
369
+ value: T;
370
+ metadata: StorageItem<T>;
371
+ }>;
372
+ /** Total number of matching items (before pagination) */
373
+ total: number;
374
+ /** Whether there are more results available */
375
+ hasMore: boolean;
376
+ }
377
+ /**
378
+ * Storage layer enumeration
379
+ *
380
+ * Defines the available storage layers in the multi-tier architecture.
381
+ * Each layer has different performance characteristics and use cases.
382
+ *
383
+ * @enum {string}
384
+ */
385
+ export declare enum StorageLayer {
386
+ /** In-memory cache layer - fastest access, volatile storage */
387
+ MEMORY = "memory",
388
+ /** Redis cache layer - fast distributed cache, configurable persistence */
389
+ REDIS = "redis",
390
+ /** PostgreSQL layer - persistent storage, ACID compliance */
391
+ POSTGRES = "postgres"
392
+ }
393
+ /**
394
+ * Logging level enumeration
395
+ *
396
+ * Defines the available logging levels for the system logger.
397
+ *
398
+ * @enum {string}
399
+ */
400
+ export declare enum LogLevel {
401
+ /** Detailed debug information */
402
+ DEBUG = "debug",
403
+ /** General information messages */
404
+ INFO = "info",
405
+ /** Warning messages for non-critical issues */
406
+ WARN = "warn",
407
+ /** Error messages for failures and exceptions */
408
+ ERROR = "error"
409
+ }
410
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAIrD;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,OAAO,CAAC,EAAE;QACR,6CAA6C;QAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,qDAAqD;QACrD,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,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C/C,OAAO,EAAE,OAAO,CAAC;CAClB;AAID;;;;;;;GAOG;AACH,oBAAY,YAAY;IACtB,+DAA+D;IAC/D,MAAM,WAAW;IACjB,2EAA2E;IAC3E,KAAK,UAAU;IACf,6DAA6D;IAC7D,QAAQ,aAAa;CACtB;AAED;;;;;;GAMG;AACH,oBAAY,QAAQ;IAClB,iCAAiC;IACjC,KAAK,UAAU;IACf,mCAAmC;IACnC,IAAI,SAAS;IACb,+CAA+C;IAC/C,IAAI,SAAS;IACb,iDAAiD;IACjD,KAAK,UAAU;CAChB"}
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "@wgtechlabs/nuvex",
3
+ "version": "0.1.1",
4
+ "description": "Next-gen Unified Vault Experience - A minimalist SDK for structured memory layering in Redis and PostgreSQL",
5
+ "type": "module",
6
+ "main": "dist/cjs/index.js",
7
+ "module": "dist/esm/index.js",
8
+ "types": "dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/esm/index.js",
12
+ "require": "./dist/cjs/index.js",
13
+ "types": "./dist/types/index.d.ts"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist/**/*",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "scripts": {
22
+ "build": "bun run clean && bun run build:cjs && bun run build:esm && bun run build:types",
23
+ "build:cjs": "tsc -p tsconfig.cjs.json",
24
+ "build:esm": "tsc -p tsconfig.esm.json",
25
+ "build:types": "tsc -p tsconfig.types.json",
26
+ "build:docs": "typedoc src/index.ts --out docs --excludePrivate --readme README.md",
27
+ "clean": "rimraf dist docs",
28
+ "dev": "tsc --watch",
29
+ "test": "bun test",
30
+ "test:watch": "bun test --watch",
31
+ "test:coverage": "bun test --coverage",
32
+ "lint": "eslint src/**/*.ts",
33
+ "lint:fix": "eslint src/**/*.ts --fix",
34
+ "lint:security": "eslint src/**/*.ts --config eslint.security.config.js",
35
+ "secure:code": "snyk code test --org=wgtechlabs",
36
+ "secure:scan": "snyk test --org=wgtechlabs",
37
+ "secure": "bun run lint:security && bun run secure:scan",
38
+ "docs": "bun run build:docs && echo 'Documentation generated in ./docs/'",
39
+ "validate": "bun run lint && bun test && bun run build",
40
+ "validate:full": "bun install && bun run lint && bun run test:coverage && bun run build && bun run docs",
41
+ "prepublishOnly": "bun run validate"
42
+ },
43
+ "keywords": [
44
+ "storage",
45
+ "cache",
46
+ "redis",
47
+ "postgresql",
48
+ "memory",
49
+ "multi-layer",
50
+ "vault",
51
+ "sdk",
52
+ "typescript",
53
+ "node",
54
+ "bun"
55
+ ],
56
+ "author": "Waren Gonzaga <waren@wgtechlabs.com> (https://wgtechlabs.com)",
57
+ "license": "MIT",
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "git+https://github.com/wgtechlabs/nuvex.git"
61
+ },
62
+ "bugs": {
63
+ "url": "https://github.com/wgtechlabs/nuvex/issues"
64
+ },
65
+ "homepage": "https://github.com/wgtechlabs/nuvex#readme",
66
+ "packageManager": "bun@1.3.9",
67
+ "engines": {
68
+ "bun": ">=1.0.0",
69
+ "node": ">=20.0.0"
70
+ },
71
+ "dependencies": {
72
+ "pg": "^8.13.0",
73
+ "redis": "^4.7.0"
74
+ },
75
+ "devDependencies": {
76
+ "@types/bun": "^1.0.0",
77
+ "@types/eslint-plugin-security": "^3",
78
+ "@types/node": "^20.0.0",
79
+ "@types/pg": "^8.10.0",
80
+ "@typescript-eslint/eslint-plugin": "^8.34.1",
81
+ "@typescript-eslint/parser": "^8.34.1",
82
+ "eslint": "^9.29.0",
83
+ "eslint-plugin-security": "^3.0.1",
84
+ "eslint-plugin-security-node": "^1.1.4",
85
+ "rimraf": "^6.0.0",
86
+ "snyk": "^1.1297.3",
87
+ "typedoc": "^0.25.13",
88
+ "typescript": "^5.1.0"
89
+ }
90
+ }