Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .processcube/nodered/.config.nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
},
"@5minds/node-red-contrib-processcube": {
"name": "@5minds/node-red-contrib-processcube",
"version": "1.15.2",
"version": "1.16.0",
"local": false,
"user": false,
"nodes": {
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ services:
- engine

engine:
#image: 5minds/processcube_engine:2024-1
image: 5minds/processcube_engine:19.0.0-beta.11-extensions-2.3.0-beta.8
image: ghcr.io/5minds/processcube_engine:19.2.1-extensions-2.3.0
ports:
- 8000:8000
volumes:
Expand Down Expand Up @@ -72,7 +71,7 @@ services:


authority:
image: 5minds/processcube_authority:3.0.4
image: ghcr.io/5minds/processcube_authority:3.2.0
ports:
- 11560:11560
volumes:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@5minds/node-red-contrib-processcube",
"version": "1.15.5",
"version": "1.16.0",
"license": "MIT",
"description": "Node-RED nodes for ProcessCube",
"scripts": {
Expand Down
18 changes: 18 additions & 0 deletions processcube-engine-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
clientIdType: { type: 'str' },
clientSecret: { value: '' },
clientSecretType: { type: 'str' },
scope: { value: 'engine_etw engine_read engine_write engine_observer' },
scopeType: { type: 'str' },
},
label: function () {
return this.name || this.url;
Expand All @@ -29,6 +31,11 @@
types: ['str', 'env', 'cred'],
});

$('#node-config-input-scope').typedInput({
default: 'str',
types: ['str', 'env', 'cred'],
});

$('#node-config-input-url').typedInput('value', this.url);
$('#node-config-input-url').typedInput('type', this.urlType);

Expand All @@ -37,6 +44,9 @@

$('#node-config-input-clientSecret').typedInput('value', this.clientSecret);
$('#node-config-input-clientSecret').typedInput('type', this.clientSecretType);

$('#node-config-input-scope').typedInput('value', this.scope);
$('#node-config-input-scope').typedInput('type', this.scopeType);
},
oneditsave: function () {
this.url = $('#node-config-input-url').typedInput('value');
Expand All @@ -47,6 +57,9 @@

this.clientSecret = $('#node-config-input-clientSecret').typedInput('value');
this.clientSecretType = $('#node-config-input-clientSecret').typedInput('type');

this.scope = $('#node-config-input-scope').typedInput('value');
this.scopeType = $('#node-config-input-scope').typedInput('type');
},
});
</script>
Expand All @@ -68,6 +81,10 @@
<label for="node-config-input-clientSecret"><i class="fa fa-bookmark"></i> Client secret</label>
<input type="text" id="node-config-input-clientSecret" />
</div>
<div class="form-row">
<label for="node-config-input-scope"><i class="fa fa-bookmark"></i> Scope</label>
<input type="text" id="node-config-input-scope" />
</div>
</script>

<script type="text/markdown" data-help-name="processcube-engine-config">
Expand All @@ -78,6 +95,7 @@
: url (String) : The URL of the ProcessCube engine.
: clientId (String) : The client id for the ProcessCube engine.
: clientSecret (String) : The client secret for the ProcessCube engine.
: scope (String|Secret|ENV) : The scope for the ProcessCube engine.

### References

Expand Down
7 changes: 6 additions & 1 deletion processcube-engine-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ module.exports = function (RED) {
node.url = RED.util.evaluateNodeProperty(n.url, n.urlType, node);
node.credentials.clientId = RED.util.evaluateNodeProperty(n.clientId, n.clientIdType, node);
node.credentials.clientSecret = RED.util.evaluateNodeProperty(n.clientSecret, n.clientSecretType, node);
node.credentials.scope = RED.util.evaluateNodeProperty(n.scope, n.scopeType, node);

if (!node.credentials.scope) {
node.credentials.scope = 'engine_etw engine_read engine_write engine_observer';
}

try {
if (node.credentials.clientId && node.credentials.clientSecret) {
node.log('Create Client with secrets');
node.engineClient = new engine_client.EngineClient(node.url, {
clientId: node.credentials.clientId,
clientSecret: node.credentials.clientSecret,
scope: 'engine_etw engine_read engine_write engine_observer',
scope: node.credentials.scope,
});
} else {
node.log('Create Client without secrets');
Expand Down