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

@5minds/node-red-contrib-processcube

Package Overview
Dependencies
Maintainers
29
Versions
404
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@5minds/node-red-contrib-processcube - npm Package Compare versions

Comparing version 1.7.5-feature-f9d61e-m6l18es1 to 1.7.5-feature-fcb345-m6q65syg

5

.processcube/nodered/config.js

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

// let cause of merge custom settings

@@ -8,3 +9,3 @@

} catch (e) {
console.log('>>>', e);
console.log(">>>", e);
}

@@ -18,4 +19,4 @@

console.error(`Unhandled Rejection at ${promise} reason: ${reason}`, {});
});
});
module.exports = config;

2

.processcube/nodered/settings.js

@@ -386,3 +386,3 @@ /**

title: ' powers by Node-RED',
image: '/data/static/ProcessCube_Logo.svg',
image: "/data/static/ProcessCube_Logo.svg",
url: 'https://processcube.io', // optional url to make the header text/image a link to this url

@@ -389,0 +389,0 @@ },

@@ -9,84 +9,82 @@ const Mustache = require('mustache');

SwaggerParser.dereference('http://localhost:56100/atlas_engine/api/v1/swagger')
//SwaggerParser.dereference(swaggerFilename)
.then((swaggerJson) => {
console.log('Dereferenced API:', swaggerJson);
const apiPaths = [
{
'ProcessInstance Query': {
path: '/process_instances/query',
method: 'get',
},
'UserTasks Input': {
path: '/process_instances/query',
method: 'get',
},
'Wait for UserTask': {
path: '/process_instances/query',
method: 'get',
},
'UserTask Event Listener': {
path: '/process_instances/query',
method: 'get',
},
},
];
SwaggerParser.dereference("http://localhost:56100/atlas_engine/api/v1/swagger")
//SwaggerParser.dereference(swaggerFilename)
.then(swaggerJson => {
console.log('Dereferenced API:', swaggerJson);
apiPaths.forEach((apiEntry) => {
console.log('API Entry:', apiEntry);
console.log('API Entry Keys:', Object.keys(apiEntry));
const apiPaths = [{
"ProcessInstance Query": {
"path": "/process_instances/query",
"method": "get"
},
"UserTasks Input": {
"path": "/process_instances/query",
"method": "get"
},
"Wait for UserTask": {
"path": "/process_instances/query",
"method": "get"
},
"UserTask Event Listener": {
"path": "/process_instances/query",
"method": "get"
}
}];
Object.keys(apiEntry).forEach((apiName) => {
console.log('API Name:', apiName);
console.log('API Data:', apiEntry[apiName]);
apiPaths.forEach(apiEntry => {
console.log('API Entry:', apiEntry);
console.log('API Entry Keys:', Object.keys(apiEntry));
let apiPath = apiEntry[apiName].path; // Die API-Route, die du dokumentieren möchtest
Object.keys(apiEntry).forEach(apiName => {
console.log('API Name:', apiName);
console.log('API Data:', apiEntry[apiName]);
//let apiPath = '/process_instances/query'; // Die API-Route, die du dokumentieren möchtest
const routeData = swaggerJson.paths[apiPath];
let apiPath = apiEntry[apiName].path; // Die API-Route, die du dokumentieren möchtest
if (routeData) {
console.log(`Details for ${apiPath}:`, routeData);
} else {
console.error(`Route ${apiPath} not found in Swagger documentation.`);
}
//let apiPath = '/process_instances/query'; // Die API-Route, die du dokumentieren möchtest
const routeData = swaggerJson.paths[apiPath];
if (routeData) {
console.log(`Details for ${apiPath}:`, routeData);
} else {
console.error(`Route ${apiPath} not found in Swagger documentation.`);
}
let description = routeData[Object.keys(routeData)[0]].description;
let description = routeData[Object.keys(routeData)[0]].description;
description = `Filter result for '${apiName}'`;
description = `Filter result for '${apiName}'`;
// API-Route-Information vorbereiten
const apiRouteData = {
path: apiPath,
method: Object.keys(routeData)[0], // z.B. GET, POST, etc.
summary: routeData[Object.keys(routeData)[0]].summary,
description: description,
parameters: routeData[Object.keys(routeData)[0]].parameters || [],
responses: Object.entries(routeData[Object.keys(routeData)[0]].responses).map(
([status, response]) => ({
status,
description: response.description,
}),
),
};
// Mustache-Template einlesen
const template = fs.readFileSync('query_template.mustache', 'utf-8');
// Mustache-Rendering
const output = Mustache.render(template, apiRouteData);
// Ausgabe in eine Datei schreiben oder anzeigen
//console.log(output);
const outputFilename = apiName.replace(/\/ /g, '_') + '.md';
console.log(`Writing output to ${outputFilename}`);
fs.writeFileSync(`outputs/${outputFilename}`, output);
});
// API-Route-Information vorbereiten
const apiRouteData = {
path: apiPath,
method: Object.keys(routeData)[0], // z.B. GET, POST, etc.
summary: routeData[Object.keys(routeData)[0]].summary,
description: description,
parameters: routeData[Object.keys(routeData)[0]].parameters || [],
responses: Object.entries(routeData[Object.keys(routeData)[0]].responses).map(([status, response]) => ({
status,
description: response.description
}))
};
// Mustache-Template einlesen
const template = fs.readFileSync('query_template.mustache', 'utf-8');
// Mustache-Rendering
const output = Mustache.render(template, apiRouteData);
// Ausgabe in eine Datei schreiben oder anzeigen
//console.log(output);
const outputFilename = apiName.replace(/\/ /g, '_') + '.md';
console.log(`Writing output to ${outputFilename}`);
fs.writeFileSync(`outputs/${outputFilename}`, output);
});
})
.catch((err) => {
console.error('Dereferencing failed:', err);
});
})
.catch(err => {
console.error('Dereferencing failed:', err);
});
const Mustache = require('mustache');
const fs = require('fs');
const swaggerFilename = '../../ProcessCube.Engine/docs/swagger/swagger.json'; // Dateiname der Swagger-Datei
const swaggerFilename = '../../ProcessCube.Engine/docs/swagger/swagger.json'; // Dateiname der Swagger-Datei

@@ -11,3 +11,3 @@ const swaggerJson = JSON.parse(fs.readFileSync(swaggerFilename, 'utf-8'));

const apiPath = '/process_instances/query'; // Die API-Route, die du dokumentieren möchtest
const apiPath = '/process_instances/query'; // Die API-Route, die du dokumentieren möchtest
const routeData = swaggerJson.paths[apiPath];

@@ -24,3 +24,3 @@

path: apiPath,
method: Object.keys(routeData)[0], // z.B. GET, POST, etc.
method: Object.keys(routeData)[0], // z.B. GET, POST, etc.
summary: routeData[Object.keys(routeData)[0]].summary,

@@ -31,4 +31,4 @@ description: routeData[Object.keys(routeData)[0]].description,

status,
description: response.description,
})),
description: response.description
}))
};

@@ -35,0 +35,0 @@

@@ -31,5 +31,3 @@ module.exports = function (RED) {

node.log(
`handle-${flowNodeInstanceId}: *flowNodeInstanceId* '${flowNodeInstanceId}' with *msg._msgid* '${msg._msgid}'`,
);
node.log(`handle-${flowNodeInstanceId}: *flowNodeInstanceId* '${flowNodeInstanceId}' with *msg._msgid* '${msg._msgid}'`);

@@ -36,0 +34,0 @@ etwInputNode.eventEmitter.emit(`handle-${flowNodeInstanceId}`, error, true);

@@ -13,2 +13,3 @@ const EventEmitter = require('node:events');

module.exports = function (RED) {

@@ -21,2 +22,3 @@ function ExternalTaskInput(config) {

node.engine = RED.nodes.getNode(config.engine);

@@ -59,3 +61,3 @@

node.log(
`handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* ${externalTask.processInstanceId} with result ${JSON.stringify(result)} on msg._msgid ${msg._msgid}.`,
`handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* ${externalTask.processInstanceId} with result ${JSON.stringify(result)} on msg._msgid ${msg._msgid}.`
);

@@ -75,3 +77,3 @@

node.log(
`handle error event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' on *msg._msgid* '${msg._msgid}'.`,
`handle error event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' on *msg._msgid* '${msg._msgid}'.`
);

@@ -94,3 +96,3 @@

node.log(
`handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}' and *isError* '${isError}'`,
`handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}' and *isError* '${isError}'`
);

@@ -119,3 +121,3 @@

node.log(
`Received *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}'`,
`Received *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}'`
);

@@ -128,3 +130,3 @@

let options = RED.util.evaluateNodeProperty(config.workerConfig, config.workerConfigType, node);
let topic = RED.util.evaluateNodeProperty(config.topic, config.topicType, node);
let topic = RED.util.evaluateNodeProperty(config.topic, config.topicType, node)

@@ -149,3 +151,3 @@ client.externalTasks

`Worker error ${errorType} for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}': ${error.message}`,
{},
{}
);

@@ -152,0 +154,0 @@

@@ -9,3 +9,3 @@ module.exports = function (RED) {

const client = node.engine.engineClient;
const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -22,3 +22,3 @@

payload: msg.payload,
identity: userIdentity,
identity: userIdentity
})

@@ -25,0 +25,0 @@ .then((result) => {

{
"name": "@5minds/node-red-contrib-processcube",
"version": "1.7.5-feature-f9d61e-m6l18es1",
"version": "1.7.5-feature-fcb345-m6q65syg",
"license": "MIT",

@@ -71,6 +71,3 @@ "description": "Node-RED nodes for ProcessCube",

"low-code"
],
"devDependencies": {
"prettier": "^3.4.2"
}
]
}

@@ -56,2 +56,3 @@ module.exports = function (RED) {

}
});

@@ -295,3 +296,3 @@ case 'started':

node.log(
'processNotification (is-executable-changed): ' + JSON.stringify(processNotification),
'processNotification (is-executable-changed): ' + JSON.stringify(processNotification)
);

@@ -298,0 +299,0 @@

@@ -15,5 +15,5 @@ module.exports = function (RED) {

delete initialToken.msg;
delete initialToken.format;
delete initialToken.format;
}
}
}

@@ -44,3 +44,3 @@ const startParameters = {

const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const identity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -47,0 +47,0 @@

@@ -9,3 +9,3 @@ module.exports = function (RED) {

const client = node.engine.engineClient;
const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -12,0 +12,0 @@

@@ -9,3 +9,3 @@ module.exports = function (RED) {

const client = node.engine.engineClient;
const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -17,3 +17,3 @@

}
client.processDefinitions

@@ -20,0 +20,0 @@ .persistProcessDefinitions(msg.payload, { overwriteExisting: true, identity: userIdentity })

@@ -19,3 +19,3 @@ module.exports = function (RED) {

const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const identity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -22,0 +22,0 @@ query.identity = identity;

@@ -10,3 +10,3 @@ module.exports = function (RED) {

const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -41,3 +41,3 @@

const deletionDate = new Date(Date.now() - timeToUse * multiplier * 60 * 60 * 1000);
const deletionDate = new Date(Date.now() - timeToUse * multiplier * 60 * 60 * 1000);

@@ -72,6 +72,6 @@ const modelId = msg.payload.processModelId?.trim() || config.modelid?.trim();

},
{
{
includeXml: false,
identity: userIdentity,
},
identity: userIdentity
}
);

@@ -81,6 +81,3 @@

if (processInstances.length === 0) {
node.log(
`No more process instances to delete for Model-ID: ${modelId} with Date: ${deletionDate.toISOString()}`,
msg,
);
node.log(`No more process instances to delete for Model-ID: ${modelId} with Date: ${deletionDate.toISOString()}`, msg);
hasMoreResults = false;

@@ -95,3 +92,3 @@ continue;

msg.payload.successfulDeletions.push(...ids);
sumSuccessful += ids.length;
sumSuccessful += ids.length;
} catch (deleteError) {

@@ -103,17 +100,11 @@ var message = JSON.stringify(deleteError);

});
node.warn(
`Failed to delete some process instances for Model-ID: ${modelId}. Error: ${message}`,
);
node.warn(`Failed to delete some process instances for Model-ID: ${modelId}. Error: ${message}`);
}
}
node.log(
`Successfully deleted ${sumSuccessful} process instances and ${sumFailed} failed to delete process instances for Model-ID: ${modelId}.`,
);
node.log(`Successfully deleted ${sumSuccessful} process instances and ${sumFailed} failed to delete process instances for Model-ID: ${modelId}.`);
node.send(msg);
} catch (queryError) {
node.error(
`Failed to query process instances for Model-ID: ${modelId}. Error: ${queryError.message}`,
msg,
);
node.error(`Failed to query process instances for Model-ID: ${modelId}. Error: ${queryError.message}`, msg);
}

@@ -120,0 +111,0 @@ });

@@ -11,3 +11,3 @@ module.exports = function (RED) {

const client = node.engine.engineClient;
const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -21,3 +21,3 @@

client.processInstances
.query(query, { identity: userIdentity })
.query(query, { identity: userIdentity })
.then((matchingInstances) => {

@@ -24,0 +24,0 @@ msg.payload = matchingInstances;

@@ -10,3 +10,3 @@ module.exports = function (RED) {

const client = node.engine.engineClient;
const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -23,3 +23,3 @@

payload: msg.payload,
identity: userIdentity,
identity: userIdentity
})

@@ -26,0 +26,0 @@ .then((result) => {

@@ -10,3 +10,3 @@ module.exports = function (RED) {

const client = node.engine.engineClient;
const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -22,3 +22,3 @@

client.userTasks
.query(query, { identity: userIdentity })
.query(query, {identity: userIdentity})
.then((matchingFlowNodes) => {

@@ -25,0 +25,0 @@ if (config.sendtype === 'array') {

@@ -16,9 +16,8 @@ module.exports = function (RED) {

node.engine = RED.nodes.getNode(config.engine);
const client = node.engine.engineClient;
const isUser = !!msg._client?.user;
const userIdentity = isUser
? { userId: msg._client.user.id, token: msg._client.user.accessToken }
: null;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -25,0 +24,0 @@ if (!client) {

@@ -13,3 +13,3 @@ module.exports = function (RED) {

const client = node.engine.engineClient;
const isUser = !!msg._client?.user;
const isUser = !!msg._client?.user
const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;

@@ -24,33 +24,28 @@ subscribe = async () => {

subscription = await client.userTasks.onUserTaskWaiting(
async (userTaskWaitingNotification) => {
const newQuery = {
flowNodeInstanceId: userTaskWaitingNotification.flowNodeInstanceId,
...query,
};
subscription = await client.userTasks.onUserTaskWaiting(async (userTaskWaitingNotification) => {
const newQuery = {
flowNodeInstanceId: userTaskWaitingNotification.flowNodeInstanceId,
...query,
};
try {
const matchingFlowNodes = await client.userTasks.query(newQuery, {
identity: userIdentity,
});
try {
const matchingFlowNodes = await client.userTasks.query(newQuery, {identity: userIdentity});
if (matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
// remove subscription
client.userTasks.removeSubscription(subscription, userIdentity);
if (matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
// remove subscription
client.userTasks.removeSubscription(subscription, userIdentity);
const userTask = matchingFlowNodes.userTasks[0];
const userTask = matchingFlowNodes.userTasks[0];
msg.payload = { userTask: userTask };
node.send(msg);
} else {
// nothing todo - wait for next notification
}
} catch (error) {
node.error(error, msg);
msg.payload = { userTask: userTask };
node.send(msg);
} else {
// nothing todo - wait for next notification
}
},
{
identity: userIdentity,
},
);
} catch (error) {
node.error(error, msg);
}
},{
identity: userIdentity,
});

@@ -67,5 +62,3 @@ node.log({ 'Handling old userTasks config.only_for_new': config.only_for_new });

try {
const matchingFlowNodes = await client.userTasks.query(suspendedQuery, {
identity: userIdentity,
});
const matchingFlowNodes = await client.userTasks.query(suspendedQuery, {identity: userIdentity});

@@ -94,3 +87,3 @@ if (matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length >= 1) {

if (client != null && subscription != null) {
client.userTasks.removeSubscription(subscription);
client.userTasks.removeSubscription(subscription, );
}

@@ -97,0 +90,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

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