@common-stack/store-mongo 7.2.1-alpha.71 โ 7.2.1-alpha.79
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/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{generateMongo}from'./helpers/mongoose-connection.js';export{BaseService2}from'./services/BaseService.js';export{BaseProxyService2}from'./services/BaseProxyService.js';export{BaseService}from'./services/base-service.js';export{BaseProxyService}from'./services/base-proxy-service.js';export{addIdVirtualFields2,commonModelSchemaOptions2}from'./store/models/common-options-v2.js';export{addIdVirtualFields,commonModeSchemaOptions}from'./store/models/common-options.js';export{BaseMongoRepository}from'./store/repositories/BaseMongoRepository.js';export{BaseRepository}from'./store/repositories/base-repository.js';export{BulkDataLoader2}from'./dataloaders/bulk-dataloader-v2.js';export{BulkDataLoader}from'./dataloaders/bulk-dataloader.js';export{BaseServiceMixin as BaseServiceMixin2}from'./mixins/BaseServiceMixin.js';export{BaseServiceMixin}from'./mixins/base-service-mixin.js';export{PAGINATION_OPTIONS}from'./interfaces/getAllArgs.js';//# sourceMappingURL=index.js.map
|
|
1
|
+
export{generateMongo}from'./helpers/mongoose-connection.js';export{BaseService2}from'./services/BaseService.js';export{BaseProxyService2}from'./services/BaseProxyService.js';export{ConnectionPoolManager}from'./services/ConnectionPoolManager.js';export{BaseService}from'./services/base-service.js';export{BaseProxyService}from'./services/base-proxy-service.js';export{addIdVirtualFields2,commonModelSchemaOptions2}from'./store/models/common-options-v2.js';export{addIdVirtualFields,commonModeSchemaOptions}from'./store/models/common-options.js';export{BaseMongoRepository}from'./store/repositories/BaseMongoRepository.js';export{BaseRepository}from'./store/repositories/base-repository.js';export{BulkDataLoader2}from'./dataloaders/bulk-dataloader-v2.js';export{BulkDataLoader}from'./dataloaders/bulk-dataloader.js';export{BaseServiceMixin as BaseServiceMixin2}from'./mixins/BaseServiceMixin.js';export{BaseServiceMixin}from'./mixins/base-service-mixin.js';export{PAGINATION_OPTIONS}from'./interfaces/getAllArgs.js';//# sourceMappingURL=index.js.map
|
package/lib/module.d.ts
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface Client<T> {
|
|
2
|
+
connection: T;
|
|
3
|
+
connect(): Promise<unknown>;
|
|
4
|
+
disconnect(): Promise<unknown>;
|
|
5
|
+
}
|
|
6
|
+
export type ConnectionFactory<T, K> = (config: K) => Promise<Client<T>>;
|
|
7
|
+
export interface Connection<T> {
|
|
8
|
+
client: Client<T>;
|
|
9
|
+
ttl: number;
|
|
10
|
+
lastUsed: number;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
requestCount: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PoolConfig {
|
|
15
|
+
ttlMs: number;
|
|
16
|
+
cleanupIntervalMs: number;
|
|
17
|
+
}
|
|
18
|
+
export declare class ConnectionPoolManager<T, K> {
|
|
19
|
+
name: string;
|
|
20
|
+
private connectionFactory;
|
|
21
|
+
private readonly config;
|
|
22
|
+
private pool;
|
|
23
|
+
private pendingConnections;
|
|
24
|
+
private cleanupTimer;
|
|
25
|
+
private totalRequests;
|
|
26
|
+
private cacheHits;
|
|
27
|
+
constructor(name: string, connectionFactory: ConnectionFactory<T, K>, config: PoolConfig);
|
|
28
|
+
private logger;
|
|
29
|
+
private getExistingConnection;
|
|
30
|
+
private removeConnection;
|
|
31
|
+
private isConnectionHealthy;
|
|
32
|
+
private refreshConnection;
|
|
33
|
+
getConnection(tenantId: string, config: K): Promise<T>;
|
|
34
|
+
private createNewConnection;
|
|
35
|
+
private storeConnection;
|
|
36
|
+
private startCleanupTask;
|
|
37
|
+
private stopCleanupTask;
|
|
38
|
+
private cleanupExpiredConnections;
|
|
39
|
+
shutdown(): Promise<void>;
|
|
40
|
+
getStats(): {
|
|
41
|
+
totalConnections: number;
|
|
42
|
+
activeConnections: number;
|
|
43
|
+
tenantCount: number;
|
|
44
|
+
totalRequests: number;
|
|
45
|
+
cacheHitRate: number;
|
|
46
|
+
connections: {
|
|
47
|
+
tenantId: string;
|
|
48
|
+
lastUsed: number;
|
|
49
|
+
ttlRemaining: number;
|
|
50
|
+
requestCount: number;
|
|
51
|
+
isHealthy: boolean;
|
|
52
|
+
}[];
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
class ConnectionPoolManager {
|
|
2
|
+
name;
|
|
3
|
+
connectionFactory;
|
|
4
|
+
config;
|
|
5
|
+
pool;
|
|
6
|
+
pendingConnections = new Map();
|
|
7
|
+
cleanupTimer = null;
|
|
8
|
+
totalRequests = 0;
|
|
9
|
+
cacheHits = 0;
|
|
10
|
+
constructor(name, connectionFactory, config) {
|
|
11
|
+
this.name = name;
|
|
12
|
+
this.connectionFactory = connectionFactory;
|
|
13
|
+
this.config = config;
|
|
14
|
+
this.pool = new Map();
|
|
15
|
+
}
|
|
16
|
+
// TODO: Use CDM logger
|
|
17
|
+
logger(level, message, ...params) {
|
|
18
|
+
console[level](`[${this.name} Pool] ${message}`, ...params);
|
|
19
|
+
}
|
|
20
|
+
async getExistingConnection(tenantId) {
|
|
21
|
+
const connection = this.pool.get(tenantId);
|
|
22
|
+
if (!connection) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
// Refresh connection TTL and last used time
|
|
26
|
+
this.refreshConnection(tenantId);
|
|
27
|
+
return connection;
|
|
28
|
+
}
|
|
29
|
+
async removeConnection(tenantId) {
|
|
30
|
+
const connection = this.pool.get(tenantId);
|
|
31
|
+
if (!connection)
|
|
32
|
+
return;
|
|
33
|
+
try {
|
|
34
|
+
await connection.client.disconnect();
|
|
35
|
+
this.pool.delete(tenantId);
|
|
36
|
+
this.logger('log', `๐๏ธ Removed connection for tenant: ${tenantId}`);
|
|
37
|
+
if (this.pool.size === 0) {
|
|
38
|
+
this.stopCleanupTask(); // Stop cleanup task if no connections are left
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
this.logger('error', `โ Failed to disconnect connection for tenant: ${tenantId}`, error);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// eslint-disable-next-line class-methods-use-this
|
|
46
|
+
isConnectionHealthy(connection) {
|
|
47
|
+
const now = Date.now();
|
|
48
|
+
const age = now - connection.createdAt.getTime();
|
|
49
|
+
return age < connection.ttl;
|
|
50
|
+
}
|
|
51
|
+
refreshConnection(tenantId) {
|
|
52
|
+
const connection = this.pool.get(tenantId);
|
|
53
|
+
if (!connection)
|
|
54
|
+
return;
|
|
55
|
+
connection.lastUsed = Date.now();
|
|
56
|
+
connection.requestCount += 1;
|
|
57
|
+
connection.ttl = Date.now() + this.config.ttlMs;
|
|
58
|
+
}
|
|
59
|
+
async getConnection(tenantId, config) {
|
|
60
|
+
this.totalRequests += 1;
|
|
61
|
+
try {
|
|
62
|
+
// Check if there's an existing connection for the tenant
|
|
63
|
+
const existingConnection = await this.getExistingConnection(tenantId);
|
|
64
|
+
if (existingConnection) {
|
|
65
|
+
this.logger('log', `โป๏ธ Reusing existing connection for tenant: ${tenantId}`);
|
|
66
|
+
this.cacheHits += 1;
|
|
67
|
+
return existingConnection.client.connection;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
this.logger('error', `โ Error checking existing connection for ${tenantId}:`, error);
|
|
72
|
+
}
|
|
73
|
+
// If connection is already being created โ wait for it
|
|
74
|
+
if (this.pendingConnections.has(tenantId)) {
|
|
75
|
+
this.logger('log', `โณ Waiting for pending connection for tenant: ${tenantId}`);
|
|
76
|
+
return (await this.pendingConnections.get(tenantId))?.connection;
|
|
77
|
+
}
|
|
78
|
+
// Create a new connection for the tenant
|
|
79
|
+
this.logger('log', `๐ง Creating new connection for tenant: ${tenantId}`);
|
|
80
|
+
const connectionPromise = this.createNewConnection(config)
|
|
81
|
+
.then((connection) => {
|
|
82
|
+
this.logger('log', `โ
Connection created for tenant: ${tenantId}`);
|
|
83
|
+
this.storeConnection(tenantId, connection);
|
|
84
|
+
return connection;
|
|
85
|
+
})
|
|
86
|
+
.catch((error) => {
|
|
87
|
+
this.logger('error', `โ Failed to create connection for tenant ${tenantId}:`, error);
|
|
88
|
+
throw error;
|
|
89
|
+
})
|
|
90
|
+
.finally(() => {
|
|
91
|
+
this.pendingConnections.delete(tenantId);
|
|
92
|
+
});
|
|
93
|
+
this.pendingConnections.set(tenantId, connectionPromise);
|
|
94
|
+
return (await connectionPromise).connection;
|
|
95
|
+
}
|
|
96
|
+
async createNewConnection(config) {
|
|
97
|
+
const dbConnection = await this.connectionFactory(config);
|
|
98
|
+
await dbConnection.connect();
|
|
99
|
+
return dbConnection;
|
|
100
|
+
}
|
|
101
|
+
storeConnection(tenantId, client) {
|
|
102
|
+
const now = new Date();
|
|
103
|
+
const connection = {
|
|
104
|
+
client,
|
|
105
|
+
ttl: now.getTime() + this.config.ttlMs,
|
|
106
|
+
lastUsed: now.getTime(),
|
|
107
|
+
createdAt: now,
|
|
108
|
+
requestCount: 1,
|
|
109
|
+
};
|
|
110
|
+
this.pool.set(tenantId, connection);
|
|
111
|
+
this.logger('log', `๐ฆ Stored connection for tenant: ${tenantId}`);
|
|
112
|
+
this.startCleanupTask(); // Start cleanup task when a new connection is stored
|
|
113
|
+
}
|
|
114
|
+
startCleanupTask() {
|
|
115
|
+
if (this.cleanupTimer) {
|
|
116
|
+
return; // Cleanup task already running
|
|
117
|
+
}
|
|
118
|
+
this.cleanupTimer = setInterval(() => {
|
|
119
|
+
this.cleanupExpiredConnections();
|
|
120
|
+
}, this.config.cleanupIntervalMs);
|
|
121
|
+
}
|
|
122
|
+
stopCleanupTask() {
|
|
123
|
+
if (this.cleanupTimer) {
|
|
124
|
+
clearInterval(this.cleanupTimer);
|
|
125
|
+
this.cleanupTimer = null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
cleanupExpiredConnections() {
|
|
129
|
+
const expiredConnections = Array.from(this.pool.entries())
|
|
130
|
+
.filter(
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
132
|
+
([_, connection]) => () => !this.isConnectionHealthy(connection))
|
|
133
|
+
.map(([key]) => key);
|
|
134
|
+
this.logger('log', `๐งน Cleaning up ${expiredConnections.length} expired connections`);
|
|
135
|
+
expiredConnections.map(this.removeConnection.bind(this));
|
|
136
|
+
}
|
|
137
|
+
async shutdown() {
|
|
138
|
+
this.logger('log', '๐ Shutting down ConnectionPoolManager...');
|
|
139
|
+
// Stop timers
|
|
140
|
+
this.stopCleanupTask();
|
|
141
|
+
// Close all connections
|
|
142
|
+
await Promise.allSettled(Array.from(this.pool.keys()).map(this.removeConnection.bind(this)));
|
|
143
|
+
this.logger('log', 'โ
ConnectionPoolManager shutdown complete');
|
|
144
|
+
}
|
|
145
|
+
getStats() {
|
|
146
|
+
const now = Date.now();
|
|
147
|
+
const connections = Array.from(this.pool.entries()).map(([tenantId, conn]) => ({
|
|
148
|
+
tenantId,
|
|
149
|
+
lastUsed: conn.lastUsed,
|
|
150
|
+
ttlRemaining: Math.max(0, conn.ttl - now),
|
|
151
|
+
requestCount: conn.requestCount,
|
|
152
|
+
isHealthy: this.isConnectionHealthy(conn),
|
|
153
|
+
}));
|
|
154
|
+
return {
|
|
155
|
+
totalConnections: this.pool.size,
|
|
156
|
+
activeConnections: connections.filter((c) => c.isHealthy).length,
|
|
157
|
+
tenantCount: new Set(connections.map((c) => c.tenantId)).size,
|
|
158
|
+
totalRequests: this.totalRequests,
|
|
159
|
+
cacheHitRate: this.totalRequests > 0 ? (this.cacheHits / this.totalRequests) * 100 : 0,
|
|
160
|
+
connections,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}export{ConnectionPoolManager};//# sourceMappingURL=ConnectionPoolManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionPoolManager.js","sources":["../../src/services/ConnectionPoolManager.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport interface Client<T> {\n connection: T; // The actual client/connection object\n connect(): Promise<unknown>;\n disconnect(): Promise<unknown>;\n}\n\nexport type ConnectionFactory<T, K> = (config: K) => Promise<Client<T>>;\n\nexport interface Connection<T> {\n client: Client<T>;\n ttl: number;\n lastUsed: number;\n createdAt: Date;\n requestCount: number;\n}\n\nexport interface PoolConfig {\n ttlMs: number;\n cleanupIntervalMs: number;\n}\n\nexport class ConnectionPoolManager<T, K> {\n private pool: Map<string, Connection<T>>;\n\n private pendingConnections: Map<string, Promise<Client<T>>> = new Map();\n\n private cleanupTimer: NodeJS.Timer | null = null;\n\n private totalRequests: number = 0;\n\n private cacheHits: number = 0;\n\n constructor(\n public name: string,\n private connectionFactory: ConnectionFactory<T, K>,\n private readonly config: PoolConfig,\n ) {\n this.pool = new Map();\n }\n\n // TODO: Use CDM logger\n private logger(level: 'log' | 'error', message: string, ...params): void {\n console[level](`[${this.name} Pool] ${message}`, ...params);\n }\n\n private async getExistingConnection(tenantId: string): Promise<Connection<T> | null> {\n const connection = this.pool.get(tenantId);\n\n if (!connection) {\n return null;\n }\n\n // Refresh connection TTL and last used time\n this.refreshConnection(tenantId);\n return connection;\n }\n\n private async removeConnection(tenantId: string): Promise<void> {\n const connection = this.pool.get(tenantId);\n\n if (!connection) return;\n\n try {\n await connection.client.disconnect();\n this.pool.delete(tenantId);\n this.logger('log', `๐๏ธ Removed connection for tenant: ${tenantId}`);\n\n if (this.pool.size === 0) {\n this.stopCleanupTask(); // Stop cleanup task if no connections are left\n }\n } catch (error) {\n this.logger('error', `โ Failed to disconnect connection for tenant: ${tenantId}`, error);\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n private isConnectionHealthy(connection: Connection<T>): boolean {\n const now = Date.now();\n const age = now - connection.createdAt.getTime();\n return age < connection.ttl;\n }\n\n private refreshConnection(tenantId: string): void {\n const connection = this.pool.get(tenantId);\n\n if (!connection) return;\n\n connection.lastUsed = Date.now();\n connection.requestCount += 1;\n connection.ttl = Date.now() + this.config.ttlMs;\n }\n\n public async getConnection(tenantId: string, config: K): Promise<T> {\n this.totalRequests += 1;\n\n try {\n // Check if there's an existing connection for the tenant\n const existingConnection = await this.getExistingConnection(tenantId);\n\n if (existingConnection) {\n this.logger('log', `โป๏ธ Reusing existing connection for tenant: ${tenantId}`);\n this.cacheHits += 1;\n return existingConnection.client.connection;\n }\n } catch (error) {\n this.logger('error', `โ Error checking existing connection for ${tenantId}:`, error);\n }\n\n // If connection is already being created โ wait for it\n if (this.pendingConnections.has(tenantId)) {\n this.logger('log', `โณ Waiting for pending connection for tenant: ${tenantId}`);\n return (await this.pendingConnections.get(tenantId))?.connection;\n }\n\n // Create a new connection for the tenant\n this.logger('log', `๐ง Creating new connection for tenant: ${tenantId}`);\n\n const connectionPromise = this.createNewConnection(config)\n .then((connection: Client<T>) => {\n this.logger('log', `โ
Connection created for tenant: ${tenantId}`);\n this.storeConnection(tenantId, connection);\n return connection;\n })\n .catch((error) => {\n this.logger('error', `โ Failed to create connection for tenant ${tenantId}:`, error);\n throw error;\n })\n .finally(() => {\n this.pendingConnections.delete(tenantId);\n });\n\n this.pendingConnections.set(tenantId, connectionPromise);\n return (await connectionPromise).connection;\n }\n\n private async createNewConnection(config: K): Promise<Client<T>> {\n const dbConnection = await this.connectionFactory(config);\n await dbConnection.connect();\n return dbConnection;\n }\n\n private storeConnection(tenantId: string, client: Client<T>): void {\n const now = new Date();\n const connection: Connection<T> = {\n client,\n ttl: now.getTime() + this.config.ttlMs,\n lastUsed: now.getTime(),\n createdAt: now,\n requestCount: 1,\n };\n\n this.pool.set(tenantId, connection);\n this.logger('log', `๐ฆ Stored connection for tenant: ${tenantId}`);\n this.startCleanupTask(); // Start cleanup task when a new connection is stored\n }\n\n private startCleanupTask(): void {\n if (this.cleanupTimer) {\n return; // Cleanup task already running\n }\n\n this.cleanupTimer = setInterval(() => {\n this.cleanupExpiredConnections();\n }, this.config.cleanupIntervalMs);\n }\n\n private stopCleanupTask(): void {\n if (this.cleanupTimer) {\n clearInterval(this.cleanupTimer);\n this.cleanupTimer = null;\n }\n }\n\n private cleanupExpiredConnections(): void {\n const expiredConnections: string[] = Array.from(this.pool.entries())\n .filter(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ([_, connection]) =>\n () =>\n !this.isConnectionHealthy(connection),\n )\n .map(([key]) => key);\n\n this.logger('log', `๐งน Cleaning up ${expiredConnections.length} expired connections`);\n expiredConnections.map(this.removeConnection.bind(this));\n }\n\n public async shutdown(): Promise<void> {\n this.logger('log', '๐ Shutting down ConnectionPoolManager...');\n\n // Stop timers\n this.stopCleanupTask();\n\n // Close all connections\n await Promise.allSettled(Array.from(this.pool.keys()).map(this.removeConnection.bind(this)));\n this.logger('log', 'โ
ConnectionPoolManager shutdown complete');\n }\n\n getStats() {\n const now = Date.now();\n const connections = Array.from(this.pool.entries()).map(([tenantId, conn]) => ({\n tenantId,\n lastUsed: conn.lastUsed,\n ttlRemaining: Math.max(0, conn.ttl - now),\n requestCount: conn.requestCount,\n isHealthy: this.isConnectionHealthy(conn),\n }));\n\n return {\n totalConnections: this.pool.size,\n activeConnections: connections.filter((c) => c.isHealthy).length,\n tenantCount: new Set(connections.map((c) => c.tenantId)).size,\n totalRequests: this.totalRequests,\n cacheHitRate: this.totalRequests > 0 ? (this.cacheHits / this.totalRequests) * 100 : 0,\n connections,\n };\n }\n}\n"],"names":[],"mappings":"MAsBa,qBAAqB,CAAA;AAYnB,IAAA,IAAA,CAAA;AACC,IAAA,iBAAA,CAAA;AACS,IAAA,MAAA,CAAA;AAbb,IAAA,IAAI,CAA6B;AAEjC,IAAA,kBAAkB,GAAoC,IAAI,GAAG,EAAE,CAAC;IAEhE,YAAY,GAAwB,IAAI,CAAC;IAEzC,aAAa,GAAW,CAAC,CAAC;IAE1B,SAAS,GAAW,CAAC,CAAC;AAE9B,IAAA,WAAA,CACW,IAAY,EACX,iBAA0C,EACjC,MAAkB,EAAA;QAF5B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAQ;QACX,IAAiB,CAAA,iBAAA,GAAjB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EAAE,IAAI,CAAC,YAAY;AAC/B,YAAA,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC;AAC5C,SAAA,CAAC,CAAC,CAAC;QAEJ,OAAO;AACH,YAAA,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;AAChC,YAAA,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM;AAChE,YAAA,WAAW,EAAE,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;YAC7D,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,YAAY,EAAE,IAAI,CAAC,aAAa,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,IAAI,GAAG,GAAG,CAAC;YACtF,WAAW;SACd,CAAC;KACL;AACJ"}
|
package/lib/services/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@common-stack/store-mongo",
|
|
3
|
-
"version": "7.2.1-alpha.
|
|
3
|
+
"version": "7.2.1-alpha.79",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "f4c21558d074be98f166d4aef64f03aa9944f59d",
|
|
59
59
|
"typescript": {
|
|
60
60
|
"definition": "lib/index.d.ts"
|
|
61
61
|
}
|