New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@5minds/processcube_engine_client

Package Overview
Dependencies
Maintainers
0
Versions
660
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@5minds/processcube_engine_client - npm Package Compare versions

Comparing version 5.1.6-hotfix-109794-m5wuvr8z to 5.1.6-hotfix-c47afe-m5zehffo

7

dist/commonjs/ExternalTaskExecution.js

@@ -122,2 +122,9 @@ "use strict";

}
if (error.message?.match(/expired/i) && this.identityAccessor.canIdentityBeRefreshed()) {
this.logger.info('Identity has expired. Refreshing identity to get a new auth token...');
this.identityAccessor
.forceImmediateIdentityRefresh()
.then(() => this.logger.info('Identity refresh completed. Fetch and Lock will continue.'))
.catch((refreshError) => this.logger.error('Identity refresh failed', { err: refreshError }));
}
}

@@ -124,0 +131,0 @@ }

@@ -122,2 +122,7 @@ "use strict";

logger.error('Failed to fetch and lock External Tasks.', { err: error });
if (error.message?.match(/expired/i) && this.identityAccessor.canIdentityBeRefreshed()) {
logger.info('Identity has expired. Refreshing identity to get a new auth token...');
await this.identityAccessor.forceImmediateIdentityRefresh();
logger.info('Identity refresh completed. Fetch and Lock will continue.');
}
errorCount++;

@@ -124,0 +129,0 @@ const timeoutOffset = (Math.floor(Math.random() * 10) + 1) * 30;

10

dist/commonjs/IdentityAccessor.js

@@ -86,3 +86,2 @@ "use strict";

identityAvailableReject;
identityCanBeRefreshed = true;
refreshFailedCritically = false;

@@ -126,3 +125,3 @@ refreshTimeout;

canIdentityBeRefreshed() {
return this.identityCanBeRefreshed;
return this.isDynamicRefreshObject && this.expirationTimeInMs > 0 && !this.refreshFailedCritically && !this.disposed;
}

@@ -134,3 +133,3 @@ async getIdentity() {

async forceImmediateIdentityRefresh() {
if (!this.identityCanBeRefreshed) {
if (!this.isDynamicRefreshObject) {
return;

@@ -180,4 +179,3 @@ }

clearTimeout(this.refreshTimeout);
this.identityCanBeRefreshed = this.isDynamicRefreshObject && this.expirationTimeInMs > 0 && !this.refreshFailedCritically && !this.disposed;
if (this.identityCanBeRefreshed) {
if (this.canIdentityBeRefreshed()) {
const timeUntilNextRefresh = Math.max((this.expirationTimeInMs ?? 0) - Date.now() - this.getBaseMinRefreshTimeInMs(), this.getBaseMinRefreshTimeInMs());

@@ -191,3 +189,3 @@ const timeUntilNextRefresh32Bit = Math.min(timeUntilNextRefresh, 2147483647);

else if (this.refreshFailedCritically) {
this.logger.error('Identity refresh failed critically and wont be refreshed anymore.');
this.logger.error(`Identity refresh failed critically and won't be refreshed anymore.`);
this.identityAvailableReject(new Error('Identity refresh failed critically and wont be refreshed anymore.'));

@@ -194,0 +192,0 @@ }

9

dist/IdentityAccessor.d.ts

@@ -20,7 +20,6 @@ import { Identity, Logger } from '@5minds/processcube_engine_sdk';

private identityAvailableReject;
private identityCanBeRefreshed;
private refreshFailedCritically;
private refreshTimeout;
private disposed;
private isDynamicRefreshObject;
protected refreshFailedCritically: boolean;
protected refreshTimeout: NodeJS.Timeout;
protected disposed: boolean;
protected isDynamicRefreshObject: boolean;
protected logger: Logger;

@@ -27,0 +26,0 @@ private newIdentityCallbacks;

@@ -7,3 +7,3 @@ {

"name": "@5minds/processcube_engine_client",
"version": "5.1.6-hotfix-109794-m5wuvr8z",
"version": "5.1.6-hotfix-c47afe-m5zehffo",
"description": "Contains a typescript based client for accessing the Engine.",

@@ -10,0 +10,0 @@ "main": "dist/commonjs/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc