Skip to content

Commit

Permalink
temp commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-rosianu committed Nov 19, 2024
1 parent b71ce71 commit 07f2dfd
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "4.1.2",
"version": "4.1.3",
"packages": [
"packages/*"
],
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-auth",
"version": "4.1.2",
"version": "4.1.3",
"description": "Multiversx SDK Nestjs auth package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-cache",
"version": "4.1.2",
"version": "4.1.3",
"description": "Multiversx SDK Nestjs cache package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
10 changes: 5 additions & 5 deletions packages/cache/src/interceptors/caching.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ export class CachingInterceptor implements NestInterceptor {
if (cacheKey) {
const pendingRequest = this.pendingRequestsDictionary[cacheKey];
if (pendingRequest) {
const result = await pendingRequest;
const [result, error] = await pendingRequest;
this.metricsService.incrementPendingApiHit(apiFunction);

console.log(`result : ${result}. str: ${JSON.stringify(result, null, 2)}. typeof: ${typeof result}`);
if (result instanceof Error) {
return throwError(() => result);
if (result instanceof Error || error != null) {
return throwError(() => error);
} else {
return of(result);
}
Expand All @@ -77,14 +77,14 @@ export class CachingInterceptor implements NestInterceptor {
.pipe(
tap(async (result: any) => {
delete this.pendingRequestsDictionary[cacheKey ?? ''];
pendingRequestResolver(result);
pendingRequestResolver([result, null]);
this.metricsService.setPendingRequestsCount(Object.keys(this.pendingRequestsDictionary).length);

await this.cachingService.setLocal(cacheKey ?? '', result, Constants.oneSecond() * this.cacheDuration);
}),
catchError((err) => {
delete this.pendingRequestsDictionary[cacheKey ?? ''];
pendingRequestResolver(err);
pendingRequestResolver([null, err]);
this.metricsService.setPendingRequestsCount(Object.keys(this.pendingRequestsDictionary).length);

return throwError(() => err);
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-common",
"version": "4.1.2",
"version": "4.1.3",
"description": "Multiversx SDK Nestjs common package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/elastic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-elastic",
"version": "4.1.2",
"version": "4.1.3",
"description": "Multiversx SDK Nestjs elastic package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/http/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-http",
"version": "4.1.2",
"version": "4.1.3",
"description": "Multiversx SDK Nestjs http package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/monitoring/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-monitoring",
"version": "4.1.2",
"version": "4.1.3",
"description": "Multiversx SDK Nestjs monitoring package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/rabbitmq/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-rabbitmq",
"version": "4.1.2",
"version": "4.1.3",
"description": "Multiversx SDK Nestjs rabbitmq client package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/redis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-redis",
"version": "4.1.2",
"version": "4.1.3",
"description": "Multiversx SDK Nestjs redis client package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down

0 comments on commit 07f2dfd

Please sign in to comment.