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

@5minds/processcube_engine_sdk

Package Overview
Dependencies
Maintainers
29
Versions
1040
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@5minds/processcube_engine_sdk - npm Package Compare versions

Comparing version 6.1.0-feature-c2a4d6-m6gbv9sb to 6.1.0-feature-c89255-m7iylgnc

dist/commonjs/ExtensionAdapter/ClusterExtensionAdapter.js

1

dist/commonjs/DataModels/Iam/Claims.js

@@ -14,3 +14,4 @@ "use strict";

canWriteProcessModel: 'can_write_process_model',
canObserveEngine: 'can_observe_engine',
};
//# sourceMappingURL=Claims.js.map

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

changeCorrelationMetadata: `change_correlation_metadata/${messageParams.correlationId}`,
clusterSetupFinished: 'cluster_setup_finished',
correlationMetadataChanged: 'correlation_metadata_changed',

@@ -33,2 +34,3 @@ cronjobCreated: 'cronjob_created',

endEventFinished: 'end_event_finished',
engineDied: 'engine_died',
externalTaskCreated: 'external_task_created',

@@ -45,2 +47,3 @@ externalTaskExpired: `external_task_expired`,

killProcessInstance: 'kill_process_instance',
livenessProbe: 'engine_liveness_probe',
manualTaskReached: 'manual_task_reached',

@@ -53,2 +56,3 @@ manualTaskFinished: 'manual_task_finished',

processExecutableChanged: 'process_executable_changed',
selectLeader: 'select_leader',
startEventFinished: 'start_event_finished',

@@ -55,0 +59,0 @@ terminateProcessInstance: 'terminate_process_instance',

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

__exportStar(require("./ApplicationInfoExtensionAdapter"), exports);
__exportStar(require("./ClusterExtensionAdapter"), exports);
__exportStar(require("./CorrelationExtensionAdapter"), exports);

@@ -20,0 +21,0 @@ __exportStar(require("./CronjobExtensionAdapter"), exports);

31

dist/commonjs/ProcessModel/ProcessModelParser/BpmnParserService.js

@@ -27,2 +27,4 @@ "use strict";

* A service that parses, validates and filters ProcessDefinitions and ProcessModels.
*
* @deprecated This service has been decommissioned and will be removed in a future major release.
*/

@@ -133,3 +135,2 @@ class BpmnParserService {

*
* @async
* @param identity The identity for which to filter out inaccessible elements.

@@ -139,3 +140,3 @@ * @param processModel The ProcessModel to filter.

*/
async filterInaccessibleProcessModelElements(identity, processModel) {
filterInaccessibleProcessModelElements(identity, processModel) {
const processModelCopy = (0, lodash_clonedeep_1.default)(processModel);

@@ -146,3 +147,3 @@ const processModelHasNoLanes = !(processModel?.laneSet?.lanes?.length > 0);

}
processModelCopy.laneSet = await this.filterOutInaccessibleLanes(processModelCopy.laneSet, identity);
processModelCopy.laneSet = this.filterOutInaccessibleLanes(processModelCopy.laneSet, identity);
processModelCopy.flowNodes = this.getFlowNodesForLaneSet(processModelCopy.laneSet, processModel.flowNodes);

@@ -165,5 +166,4 @@ const userCannotAccessAnyStartEvents = !this.checkIfProcessModelHasAccessibleStartEvents(processModelCopy);

*/
async filterOutInaccessibleLanes(laneSet, identity) {
const userHasAdminPrivileges = await this.checkifUserHasAdminPrivileges(identity);
if (userHasAdminPrivileges) {
filterOutInaccessibleLanes(laneSet, identity) {
if (this.isUserAnAdminOrObserver(identity)) {
return laneSet;

@@ -173,3 +173,3 @@ }

filteredLaneSet.lanes = [];
const checkIfUserHasLaneClaim = async (laneName) => {
const checkIfUserHasLaneClaim = (laneName) => {
try {

@@ -179,3 +179,3 @@ if (!laneName) {

}
await this.iamService.ensureHasClaim(identity, laneName);
this.iamService.ensureHasClaim(identity, laneName);
return true;

@@ -189,3 +189,3 @@ }

const filteredLane = (0, lodash_clonedeep_1.default)(lane);
const userCanNotAccessLane = !(await checkIfUserHasLaneClaim(lane.name));
const userCanNotAccessLane = !checkIfUserHasLaneClaim(lane.name);
if (userCanNotAccessLane) {

@@ -197,3 +197,3 @@ filteredLane.flowNodeReferences = [];

if (laneHasChildLanes) {
filteredLane.childLaneSet = await this.filterOutInaccessibleLanes(filteredLane.childLaneSet, identity);
filteredLane.childLaneSet = this.filterOutInaccessibleLanes(filteredLane.childLaneSet, identity);
}

@@ -251,9 +251,12 @@ filteredLaneSet.lanes.push(filteredLane);

}
async checkifUserHasAdminPrivileges(identity) {
isUserAnAdminOrObserver(identity) {
try {
const userIsRoot = this.iamService.checkIfTokenIsRootAccessToken(identity.token);
if (userIsRoot) {
if (this.iamService.checkIfUserIsSuperAdmin(identity)) {
return true;
}
return this.iamService.checkIfUserIsSuperAdmin(identity);
// This function was only added with Engine v19.
if (typeof this.iamService.checkIfUserIsObserver === 'function') {
return this.iamService.checkIfUserIsObserver(identity);
}
return false;
}

@@ -260,0 +263,0 @@ catch (error) {

@@ -13,4 +13,2 @@ "use strict";

condition;
messageChannel;
signalChannel;
constructor(boundaryEvent, processModel) {

@@ -17,0 +15,0 @@ super(boundaryEvent, processModel);

@@ -35,4 +35,2 @@ "use strict";

errorMessage;
messageChannel;
signalChannel;
constructor(endEvent, processModel) {

@@ -39,0 +37,0 @@ super(endEvent, processModel);

@@ -18,4 +18,6 @@ "use strict";

messageId;
messageChannel;
signalName;
signalId;
signalChannel;
constructor(event, processModel) {

@@ -25,4 +27,6 @@ super(event, processModel);

this.messageId = event.messageEventDefinition?.id;
this.messageChannel = event.messageChannel;
this.signalName = event.signalEventDefinition?.name;
this.signalId = event.signalEventDefinition?.id;
this.signalChannel = event.signalChannel;
}

@@ -29,0 +33,0 @@ }

@@ -11,4 +11,2 @@ "use strict";

condition;
messageChannel;
signalChannel;
constructor(intermediateCatchEvent, processModel) {

@@ -15,0 +13,0 @@ super(intermediateCatchEvent, processModel);

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

linkName;
messageChannel;
signalChannel;
constructor(intermediateThrowEvent, processModel) {

@@ -11,0 +9,0 @@ super(intermediateThrowEvent, processModel);

@@ -32,4 +32,2 @@ "use strict";

timerValue;
messageChannel;
signalChannel;
constructor(startEvent, processModel) {

@@ -36,0 +34,0 @@ super(startEvent, processModel);

@@ -11,2 +11,3 @@ export declare const claims: {

canWriteProcessModel: string;
canObserveEngine: string;
};

@@ -18,5 +18,2 @@ /**

* type: string
* anonymousSessionId:
* description: The ID of an anonymous session.
* type: string
*/

@@ -38,4 +35,5 @@ /**

* Should be set, when the auth token belongs to an anonymous user.
* @deprecated As of v18, Anonymous Sessions are no longer handled by the Engine, but by the authority.
*/
anonymousSessionId?: string;
};
import { Identity } from './Identity';
export interface IIamService {
getAuthorityAddress(): string;
ensureHasClaim(identity: Identity, claimName: string, claimValue?: string): Promise<void>;
checkIfUserIsSuperAdmin(identity: Identity): Promise<boolean>;
ensureHasClaim(identity: Identity, claimName: string, claimValue?: string): void | Promise<void>;
checkIfUserIsSuperAdmin(identity: Identity): boolean | Promise<boolean>;
checkIfUserIsObserver(identity: Identity): boolean;
checkIfTokenIsInternalToken(token: string): boolean;
checkIfTokenIsRootAccessToken(token: string): boolean;
}

@@ -164,2 +164,3 @@ import { EventType } from '../../ProcessModel/index';

triggeredByFlowNodeInstance?: FlowNodeInstance;
engineId?: string;
};

@@ -166,0 +167,0 @@ /**

@@ -6,3 +6,3 @@ import * as express from 'express';

import { EngineEventType, MiddlewareCallback } from './EngineEvents/index';
import { IApplicationInfoExtensionAdapter, ICorrelationExtensionAdapter, ICronjobExtensionAdapter, IDataObjectInstanceExtensionAdapter, IEventExtensionAdapter, IExternalTaskExtensionAdapter, IFlowNodeInstanceExtensionAdapter, IIamExtensionAdapter, IManualTaskExtensionAdapter, IMessageEventExtensionAdapter, INotificationExtensionAdapter, IProcessDefinitionExtensionAdapter, IProcessInstanceExtensionAdapter, IProcessModelExtensionAdapter, ISignalEventExtensionAdapter, IUntypedTaskExtensionAdapter, IUserTaskExtensionAdapter } from './ExtensionAdapter';
import { IApplicationInfoExtensionAdapter, IClusterExtensionAdapter, ICorrelationExtensionAdapter, ICronjobExtensionAdapter, IDataObjectInstanceExtensionAdapter, IEventExtensionAdapter, IExternalTaskExtensionAdapter, IFlowNodeInstanceExtensionAdapter, IIamExtensionAdapter, IManualTaskExtensionAdapter, IMessageEventExtensionAdapter, INotificationExtensionAdapter, IProcessDefinitionExtensionAdapter, IProcessInstanceExtensionAdapter, IProcessModelExtensionAdapter, ISignalEventExtensionAdapter, IUntypedTaskExtensionAdapter, IUserTaskExtensionAdapter } from './ExtensionAdapter';
import { EventViewModel, FlowNodeViewModel } from './ProcessModel/index';

@@ -80,2 +80,3 @@ /**

xhr: boolean;
nonce?: string;
};

@@ -361,2 +362,3 @@ export declare enum HttpResponseActionType {

applicationInfo: IApplicationInfoExtensionAdapter;
cluster: IClusterExtensionAdapter;
correlations: ICorrelationExtensionAdapter;

@@ -363,0 +365,0 @@ cronjobs: ICronjobExtensionAdapter;

@@ -90,2 +90,3 @@ import { LogLevel } from './EngineEvents';

baseUrl: string;
internalUrl?: string;
allowAnonymousRootAccess?: boolean;

@@ -92,0 +93,0 @@ rootAccessToken?: string;

@@ -20,2 +20,3 @@ export declare const EngineEventBusSettings: {

changeCorrelationMetadata: string;
clusterSetupFinished: string;
correlationMetadataChanged: string;

@@ -31,2 +32,3 @@ cronjobCreated: string;

endEventFinished: string;
engineDied: string;
externalTaskCreated: string;

@@ -43,2 +45,3 @@ externalTaskExpired: string;

killProcessInstance: string;
livenessProbe: string;
manualTaskReached: string;

@@ -51,2 +54,3 @@ manualTaskFinished: string;

processExecutableChanged: string;
selectLeader: string;
startEventFinished: string;

@@ -53,0 +57,0 @@ terminateProcessInstance: string;

@@ -11,4 +11,2 @@ import { CronjobQuery, CronjobSortSettings, DeployedCronjobList, Identity } from '../index';

disableCronjob(processModelId: string, flowNodeId: string, identity?: Identity): Promise<void>;
startCronjobService(): Promise<void>;
stopCronjobService(): Promise<void>;
}

@@ -22,3 +22,2 @@ import { DataModels, Identity } from '../index';

}): Promise<void>;
cleanUpOrphanedFlowNodeInstances(identity?: Identity): Promise<void>;
}
export * from './ApplicationInfoExtensionAdapter';
export * from './ClusterExtensionAdapter';
export * from './CorrelationExtensionAdapter';

@@ -3,0 +4,0 @@ export * from './CronjobExtensionAdapter';

@@ -1,2 +0,2 @@

import { DataModels, Identity, ProcessInstanceState } from '../index';
import { DataModels, Identity } from '../index';
export interface IProcessInstanceExtensionAdapter {

@@ -12,5 +12,2 @@ query(query: DataModels.ProcessInstances.ProcessInstanceQuery, options?: {

getProcessModel(processInstanceId: string, identity?: Identity): Promise<DataModels.ProcessDefinitions.ProcessModel>;
getRunningProcessInstanceIds(engineId?: string, identity?: Identity): Promise<Array<string>>;
getProcessInstanceCountByEngineId(engineId: string, state?: ProcessInstanceState): Promise<number>;
getDistinctEngineIds(): Promise<Array<string>>;
transferOwnership(processInstanceId: string, newOwner: Identity, identity?: Identity): Promise<void>;

@@ -24,3 +21,2 @@ terminateProcessInstance(processInstanceId: string, identity?: Identity): Promise<void>;

deleteProcessInstances(processInstanceIds: Array<string>, deleteAllRelatedData: boolean, identity?: Identity): Promise<void>;
killProcessInstance(processInstanceId: string, identity?: Identity): Promise<void>;
}

@@ -16,2 +16,4 @@ import { IIamService, Identity } from '../../DataModels/Iam/index';

* A service that parses, validates and filters ProcessDefinitions and ProcessModels.
*
* @deprecated This service has been decommissioned and will be removed in a future major release.
*/

@@ -70,3 +72,2 @@ export declare class BpmnParserService {

*
* @async
* @param identity The identity for which to filter out inaccessible elements.

@@ -76,3 +77,3 @@ * @param processModel The ProcessModel to filter.

*/
filterInaccessibleProcessModelElements(identity: Identity, processModel: Model.Process): Promise<Model.Process>;
filterInaccessibleProcessModelElements(identity: Identity, processModel: Model.Process): Model.Process;
/**

@@ -85,3 +86,3 @@ * Takes a laneSet and filters out all lanes that the given identity is not allowed to access.

*/
filterOutInaccessibleLanes(laneSet: Model.ProcessElements.LaneSet, identity: Identity): Promise<Model.ProcessElements.LaneSet>;
filterOutInaccessibleLanes(laneSet: Model.ProcessElements.LaneSet, identity: Identity): Model.ProcessElements.LaneSet;
/**

@@ -103,3 +104,3 @@ * Compares a laneSet against a list of FlowNodes and returns all FlowNodes that are on any of the given lanes.

checkIfProcessModelHasAccessibleStartEvents(processModel: Model.Process): boolean;
private checkifUserHasAdminPrivileges;
private isUserAnAdminOrObserver;
}

@@ -11,5 +11,3 @@ import { BoundaryEvent } from '../../Model/Events/index';

condition?: string;
messageChannel?: string;
signalChannel?: string;
constructor(boundaryEvent: BoundaryEvent, processModel: ProcessModelLike);
}

@@ -34,5 +34,3 @@ import { EndEvent } from '../../Model/Events/index';

errorMessage?: string;
messageChannel?: string;
signalChannel?: string;
constructor(endEvent: EndEvent, processModel: ProcessModelLike);
}

@@ -17,5 +17,7 @@ import { Event } from '../../Model/Events/index';

messageId?: string;
messageChannel?: string;
signalName?: string;
signalId?: string;
signalChannel?: string;
constructor(event: Event, processModel: ProcessModelLike);
}

@@ -9,5 +9,3 @@ import { IntermediateCatchEvent } from '../../Model/Events/index';

condition?: string;
messageChannel?: string;
signalChannel?: string;
constructor(intermediateCatchEvent: IntermediateCatchEvent, processModel: ProcessModelLike);
}

@@ -6,5 +6,3 @@ import { IntermediateThrowEvent } from '../../Model/Events/index';

linkName?: string;
messageChannel?: string;
signalChannel?: string;
constructor(intermediateThrowEvent: IntermediateThrowEvent, processModel: ProcessModelLike);
}

@@ -30,5 +30,3 @@ import { StartEvent } from '../../Model/Events/index';

timerValue?: string;
messageChannel?: string;
signalChannel?: string;
constructor(startEvent: StartEvent, processModel: ProcessModelLike);
}
{
"name": "@5minds/processcube_engine_sdk",
"version": "6.1.0-feature-c2a4d6-m6gbv9sb",
"version": "6.1.0-feature-c89255-m7iylgnc",
"description": "Software development kit for the Engine.",

@@ -45,9 +45,9 @@ "main": "dist/commonjs/index.js",

"@types/node": "^22.7.4",
"mocha": "^10.6.0",
"mocha": "^11.0.0",
"prettier": "^3.3.2",
"reflect-metadata": "^0.2.0",
"should": "^13.2.3",
"ts-mocha": "^10.0.0",
"ts-mocha": "^11.0.0",
"typescript": "~5.7.0"
}
}

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

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

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

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