Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@5minds/node-red-contrib-processcube

Package Overview
Dependencies
Maintainers
0
Versions
352
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.6.0-process-instance-delete-hotfix-120ac3-m4vdm2ls to 1.6.0-process-instance-delete-hotfix-31cc24-m4vf42in

2

package.json
{
"name": "@5minds/node-red-contrib-processcube",
"version": "1.6.0-process-instance-delete-hotfix-120ac3-m4vdm2ls",
"version": "1.6.0-process-instance-delete-hotfix-31cc24-m4vf42in",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Node-RED nodes for ProcessCube",

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

const isHours = msg.payload.time_unit
? msg.payload.time_unit.toLowerCase() === 'hours'
: config.time_unit.toLowerCase() === 'hours';
const multiplier = isHours ? 1 : 24;
// Gültige Werte für time_type
const validTimeTypes = ['days', 'hours'];
const timeType = msg.payload.time_type
? msg.payload.time_type.toLowerCase()
: config.time_type?.toLowerCase();
// time_type validieren
if (!timeType || !validTimeTypes.includes(timeType)) {
node.error(`Invalid time_type provided: ${timeType}. Allowed values are 'days' or 'hours'.`);
return;
}
// Zeitmultiplikator berechnen
const multiplier = timeType === 'hours' ? 1 : 24;
node.log(`Time type: ${timeType}, multiplier: ${multiplier}`);
const deletionDate = new Date(Date.now() - timeToUse * multiplier * 60 * 60 * 1000);
node.log(`Errechnetes Datum: ${deletionDate}`);
const modelId = msg.payload.processModelId?.trim() || config.modelid?.trim();
if (!modelId) {

@@ -31,0 +43,0 @@ node.error('processModelId is not defined or empty.');

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