@5minds/node-red-contrib-processcube 1.7.5-feature-b0ec94-m6q67f5m → 1.7.5-feature-aee9ae-m6q8beg5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,7 @@ module.exports = function (RED) {
28
28
  msg.errorCode = config.error;
29
29
  msg.errorMessage = msgError.message;
30
30
 
31
- node.log(`handle-${flowNodeInstanceId}: *flowNodeInstanceId* '${flowNodeInstanceId}' with *msg._msgid* '${msg._msgid}'`);
31
+ node.log(`handle-${flowNodeInstanceId}: *flowNodeInstanceId* '${flowNodeInstanceId}' with *msg._msgid* '${msg._msgid}'`);
32
32
 
33
33
  etwInputNode.eventEmitter.emit(`handle-${flowNodeInstanceId}`, error, true);
34
34
 
@@ -18,7 +18,6 @@ module.exports = function (RED) {
18
18
 
19
19
  node.started_external_tasks = {};
20
20
 
21
-
22
21
  node.engine = RED.nodes.getNode(config.engine);
23
22
 
24
23
  node.eventEmitter = new EventEmitter();
@@ -6,7 +6,7 @@ module.exports = function (RED) {
6
6
  node.on('input', function (msg) {
7
7
  node.engine = RED.nodes.getNode(config.engine);
8
8
  const client = node.engine.engineClient;
9
- const isUser = !!msg._client?.user
9
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
10
10
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
11
11
 
12
12
  if (!client) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.7.5-feature-b0ec94-m6q67f5m",
3
+ "version": "1.7.5-feature-aee9ae-m6q8beg5",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
package/process-start.js CHANGED
@@ -40,7 +40,7 @@ module.exports = function (RED) {
40
40
  return;
41
41
  }
42
42
 
43
- const isUser = !!msg._client?.user
43
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
44
44
  const identity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
45
45
 
46
46
  client.processDefinitions
@@ -6,7 +6,7 @@ module.exports = function (RED) {
6
6
  node.on('input', function (msg) {
7
7
  node.engine = RED.nodes.getNode(config.engine);
8
8
  const client = node.engine.engineClient;
9
- const isUser = !!msg._client?.user
9
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
10
10
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
11
11
 
12
12
  if (!client) {
@@ -6,7 +6,7 @@ module.exports = function (RED) {
6
6
  node.on('input', function (msg) {
7
7
  node.engine = RED.nodes.getNode(config.engine);
8
8
  const client = node.engine.engineClient;
9
- const isUser = !!msg._client?.user
9
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
10
10
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
11
11
 
12
12
  if (!client) {
@@ -16,7 +16,7 @@ module.exports = function (RED) {
16
16
 
17
17
  node.log(`Querying process definitions with query: ${JSON.stringify(query)}`);
18
18
 
19
- const isUser = !!msg._client?.user
19
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
20
20
  const identity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
21
21
  query.identity = identity;
22
22
 
@@ -7,7 +7,7 @@ module.exports = function (RED) {
7
7
  node.engine = RED.nodes.getNode(config.engine);
8
8
  const client = node.engine ? node.engine.engineClient : null;
9
9
 
10
- const isUser = !!msg._client?.user
10
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
11
11
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
12
12
 
13
13
  if (!client || !client.processInstances) {
@@ -8,7 +8,7 @@ module.exports = function (RED) {
8
8
 
9
9
  node.engine = RED.nodes.getNode(config.engine);
10
10
  const client = node.engine.engineClient;
11
- const isUser = !!msg._client?.user
11
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
12
12
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
13
13
 
14
14
  if (!client) {
@@ -7,7 +7,7 @@ module.exports = function (RED) {
7
7
  node.engine = RED.nodes.getNode(config.engine);
8
8
 
9
9
  const client = node.engine.engineClient;
10
- const isUser = !!msg._client?.user
10
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
11
11
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
12
12
 
13
13
  if (!client) {
package/usertask-input.js CHANGED
@@ -7,7 +7,7 @@ module.exports = function (RED) {
7
7
  node.engine = RED.nodes.getNode(config.engine);
8
8
 
9
9
  const client = node.engine.engineClient;
10
- const isUser = !!msg._client?.user
10
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
11
11
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
12
12
 
13
13
  if (!client) {
@@ -17,7 +17,7 @@ module.exports = function (RED) {
17
17
  node.engine = RED.nodes.getNode(config.engine);
18
18
 
19
19
  const client = node.engine.engineClient;
20
- const isUser = !!msg._client?.user
20
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
21
21
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
22
22
 
23
23
  if (!client) {
@@ -10,7 +10,7 @@ module.exports = function (RED) {
10
10
 
11
11
  node.on('input', async function (msg) {
12
12
  const client = node.engine.engineClient;
13
- const isUser = !!msg._client?.user
13
+ const isUser = !!msg._client?.user && !!msg._client.user.accessToken;
14
14
  const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
15
15
  subscribe = async () => {
16
16
  if (!client) {
@@ -81,7 +81,7 @@ module.exports = function (RED) {
81
81
 
82
82
  node.on('close', () => {
83
83
  if (client != null && subscription != null) {
84
- client.userTasks.removeSubscription(subscription, );
84
+ client.userTasks.removeSubscription(subscription);
85
85
  }
86
86
  });
87
87
  }