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
0
Versions
374
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.5.10-feature-350169-m4jpqvzq to 1.5.10-feature-3c16da-m4mjc6ms

4

package.json
{
"name": "@5minds/node-red-contrib-processcube",
"version": "1.5.10-feature-350169-m4jpqvzq",
"version": "1.5.10-feature-3c16da-m4mjc6ms",
"license": "MIT",

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

"dependencies": {
"@5minds/processcube_engine_client": "5.1.0-hotfix-a73235-m346kg1n",
"@5minds/processcube_engine_client": "5.1.1",
"jwt-decode": "^4.0.0",

@@ -63,0 +63,0 @@ "openid-client": "^5.5.0"

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

client.processDefinitions
.startProcessInstance(startParameters, node.engine.identity)
.startProcessInstance(startParameters)
.then((result) => {

@@ -47,3 +47,4 @@ msg.payload = result;

.catch((error) => {
node.error(error);
node.log("luis888")
node.error(JSON.stringify(error));
});

@@ -50,0 +51,0 @@ });

@@ -12,2 +12,4 @@ const engine_client = require('@5minds/processcube_engine_client');

node.url = RED.util.evaluateNodeProperty(n.url, n.urlType, node);
node.credentials.clientId = RED.util.evaluateNodeProperty(n.clientId, n.clientIdType, node);

@@ -37,58 +39,16 @@ node.credentials.clientSecret = RED.util.evaluateNodeProperty(n.clientSecret, n.clientSecretType, node);

node.log(`luis555: ${node.url}`)
if (node.credentials.clientId && node.credentials.clientSecret) {
node.log("luis777")
node.engineClient = new engine_client.EngineClient(node.url, {
clientId: node.credentials.clientId,
clientSecret: node.credentials.clientSecret,
scope: 'engine_etw engine_read engine_write'
});
} else {
node.log("luis999")
node.engineClient = new engine_client.EngineClient(node.url);
}
// async function getFreshIdentity(url, node) {
// try {
// if (
// !RED.util.evaluateNodeProperty(n.clientId, n.clientIdType, node) ||
// !RED.util.evaluateNodeProperty(n.clientSecret, n.clientSecretType, node)
// ) {
// return null;
// }
// const res = await fetch(url + '/atlas_engine/api/v1/authority', {
// method: 'GET',
// headers: {
// Authorization: `Bearer ZHVtbXlfdG9rZW4=`,
// 'Content-Type': 'application/json',
// },
// });
// const body = await res.json();
// const issuer = await oidc.Issuer.discover(body);
// const client = new issuer.Client({
// client_id: RED.util.evaluateNodeProperty(n.clientId, n.clientIdType, node),
// client_secret: RED.util.evaluateNodeProperty(n.clientSecret, n.clientSecretType, node),
// });
// const tokenSet = await client.grant({
// grant_type: 'client_credentials',
// scope: 'engine_etw engine_read engine_write',
// });
// const accessToken = tokenSet.access_token;
// const decodedToken = jwt.jwtDecode(accessToken);
// const freshIdentity = {
// token: tokenSet.access_token,
// userId: decodedToken.sub,
// };
// node.setIdentity(freshIdentity);
// return freshIdentity;
// } catch (e) {
// node.error(`Could not get fresh identity: ${e}`);
// }
// }
node.on('close', async () => {

@@ -101,2 +61,3 @@ if (node.engineClient) {

}
RED.nodes.registerType('processcube-engine-config', ProcessCubeEngineNode, {

@@ -103,0 +64,0 @@ credentials: {

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