@yousolution/node-red-contrib-you-sap-service-layer 0.2.3 → 0.2.5

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ # [0.2.5] - 2025-01-16
6
+
7
+ - Bug Fix NextLink Node on Manage Url Value
8
+
9
+ # [0.2.4] - 2024-11-07
10
+
11
+ - Fix compatibility on serviceSap and manipulateEntitySap
12
+
5
13
  # [0.2.3] - 2024-11-01
6
14
 
7
15
  - Upgrade List on CloseSap Node
@@ -1,10 +1,10 @@
1
1
  <script type="text/javascript">
2
- let entities = [];
3
- let entitiesData = {};
2
+ let SAPSLentities = [];
3
+ let SAPSLentitiesData = {};
4
4
  $.getJSON('entities', (data, status) => {
5
5
  for(entity in data) {
6
- entitiesData = data;
7
- entities.push(entity);
6
+ SAPSLentitiesData = data;
7
+ SAPSLentities.push(entity);
8
8
  }
9
9
  });
10
10
  RED.nodes.registerType('manipulateEntitySap',{
@@ -26,7 +26,7 @@
26
26
  },
27
27
  oneditprepare: function() {
28
28
 
29
- entities.forEach((entity) => {
29
+ SAPSLentities.forEach((entity) => {
30
30
  $('#node-input-entity')
31
31
  .append($("<option></option>")
32
32
  .attr("value", entity)
@@ -44,8 +44,8 @@
44
44
 
45
45
  $('#node-input-manipulateMethod').empty();
46
46
 
47
- if(entitiesData[entity]) {
48
- entitiesData[entity].forEach((endpoint) => {
47
+ if(SAPSLentitiesData[entity]) {
48
+ SAPSLentitiesData[entity].forEach((endpoint) => {
49
49
  $('#node-input-manipulateMethod')
50
50
  .append($("<option></option>")
51
51
  .attr("value", endpoint)
@@ -39,7 +39,7 @@ module.exports = function (RED) {
39
39
  }
40
40
 
41
41
  RED.httpAdmin.get('/entities', RED.auth.needsPermission('manipulateEntitySap.read'), (req, res) => {
42
- console.log('entities');
42
+ //console.log('entities');
43
43
  res.json(entities);
44
44
  });
45
45
  RED.nodes.registerType('manipulateEntitySap', ManipulateEntitySap, {});
package/nodes/nextLink.js CHANGED
@@ -6,6 +6,20 @@ module.exports = function (RED) {
6
6
  node.on('input', async (msg) => {
7
7
  const nextLink = msg[config.nextLink];
8
8
 
9
+ if (nextLink) {
10
+ node.log('NextLink Check for SL');
11
+ if (nextLink.includes('/b1s/v2/')) {
12
+ msg.nextLink = nextLink.replace('/b1s/v2/', "").trim();
13
+ node.log('NextLink Replace SL SetUp /b1s/v2/');
14
+ } else if (nextLink.includes('/b1s/v1/')) {
15
+ msg.nextLink = nextLink.replace('/b1s/v1/', "").trim();
16
+ node.log('NextLink Replace SL SetUp /b1s/v1/');
17
+ } else {
18
+ node.log('NextLink OK for SL');
19
+ }
20
+ }
21
+
22
+
9
23
  if (!nextLink) {
10
24
  node.send([null, msg]);
11
25
  return;
@@ -1,10 +1,10 @@
1
1
  <script type="text/javascript">
2
- let servicesName = [];
3
- let servicesData = {};
2
+ let SAPSLservicesName = [];
3
+ let SAPSLservicesData = {};
4
4
  $.getJSON('services', (data, status) => {
5
5
  for(service in data) {
6
- servicesData = data;
7
- servicesName.push(service);
6
+ SAPSLservicesData = data;
7
+ SAPSLservicesName.push(service);
8
8
  }
9
9
  });
10
10
  RED.nodes.registerType('serviceSap',{
@@ -14,12 +14,6 @@
14
14
  name: {value: ''},
15
15
  serviceName: {value: ''},
16
16
  service: {value: ''},
17
- // entity: {value: ''},
18
- // udo: {value: ''},
19
- // udt: {value: ''},
20
- // entityId: {value: ''},
21
- // docEntry: {value: ''},
22
- // code: {value: ''},
23
17
  headers: {value: ''},
24
18
  bodyPost: {value: ''}
25
19
  },
@@ -30,27 +24,7 @@
30
24
  return this.name||"Sap service";
31
25
  },
32
26
  oneditprepare: function() {
33
- // $("#node-input-entityId").typedInput({
34
- // type:"msg",
35
- // types:["msg"],
36
- // typeField: "#node-input-entityId-type",
37
- // value: 'entityId'
38
- // });
39
-
40
- // $("#node-input-docEntry").typedInput({
41
- // type:"msg",
42
- // types:["msg"],
43
- // typeField: "#node-input-docEntry-type",
44
- // value: 'docEntry'
45
- // });
46
-
47
- // $("#node-input-code").typedInput({
48
- // type:"msg",
49
- // types:["msg"],
50
- // typeField: "#node-input-code-type",
51
- // value: 'code'
52
- // });
53
-
27
+
54
28
  $("#node-input-headers").typedInput({
55
29
  type:"msg",
56
30
  types:["msg"],
@@ -65,27 +39,7 @@
65
39
  value: 'bodyPost'
66
40
  });
67
41
 
68
- // jQuery("#node-input-entity").change(function() {
69
- // jQuery('#container-udo').hide();
70
- // jQuery('#container-docEntry').hide();
71
- // jQuery('#container-udt').hide();
72
- // jQuery('#container-code').hide();
73
- // jQuery('#container-entityId').hide();
74
-
75
- // if (jQuery(this).val() === 'UDO'){
76
- // jQuery('#container-udo').show();
77
- // jQuery('#container-docEntry').show();
78
- // }
79
- // if (jQuery(this).val() === 'UDT'){
80
- // jQuery('#container-udt').show();
81
- // jQuery('#container-code').show();
82
- // }
83
- // if(jQuery(this).val() !== 'UDO' && jQuery(this).val() !== 'UDT') {
84
- // jQuery('#container-entityId').show();
85
- // }
86
- // });
87
-
88
- servicesName.forEach((service) => {
42
+ SAPSLservicesName.forEach((service) => {
89
43
  $('#node-input-serviceName')
90
44
  .append($("<option></option>")
91
45
  .attr("value", service)
@@ -103,8 +57,8 @@
103
57
 
104
58
  $('#node-input-service').empty();
105
59
 
106
- if(servicesData[service]) {
107
- servicesData[service].forEach((endpoint) => {
60
+ if(SAPSLservicesData[service]) {
61
+ SAPSLservicesData[service].forEach((endpoint) => {
108
62
  $('#node-input-service')
109
63
  .append($("<option></option>")
110
64
  .attr("value", endpoint)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yousolution/node-red-contrib-you-sap-service-layer",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Unofficial module SAP Service Layer for NODE-RED",
5
5
  "license": "MIT",
6
6
  "scripts": {
package/data/.gitkeep DELETED
File without changes