trm-core 6.9.0 → 6.9.1

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.txt CHANGED
@@ -8,6 +8,11 @@ Legend
8
8
  + : added
9
9
  - : removed
10
10
 
11
+ 2025-05-29 v6.9.1
12
+ -------------------
13
+ * remote function for updating server
14
+ + confirm if objects exists but no root sap package found
15
+
11
16
  2025-05-29 v6.9.0
12
17
  -------------------
13
18
  ! check server api auth before install and publish
@@ -35,23 +35,41 @@ exports.readTadir = {
35
35
  const rootPackage = context.rawInput.contextData.systemPackages.find(o => o.packageName === context.rawInput.packageData.name);
36
36
  if (rootPackage) {
37
37
  const rootDevclass = rootPackage.getDevclass();
38
- const subpackages = (yield systemConnector_1.SystemConnector.getSubpackages(rootDevclass)).map(o => o.devclass);
39
- existingObjects.find(o => {
40
- if (subpackages.includes(o.devclass) || rootDevclass === o.devclass) {
41
- trm_commons_1.Logger.log(`${o.pgmid} ${o.object} ${o.objName} already in system but devclass ${o.devclass} is part of the same trm package in update`, true);
42
- }
43
- else {
44
- if (context.rawInput.installData.checks.noExistingObjects) {
45
- trm_commons_1.Logger.warning(`${o.pgmid} ${o.object} ${o.objName} already exist on target system ${systemConnector_1.SystemConnector.getDest()}`);
38
+ if (rootDevclass) {
39
+ const subpackages = (yield systemConnector_1.SystemConnector.getSubpackages(rootDevclass)).map(o => o.devclass);
40
+ existingObjects.find(o => {
41
+ if (subpackages.includes(o.devclass) || rootDevclass === o.devclass) {
42
+ trm_commons_1.Logger.log(`${o.pgmid} ${o.object} ${o.objName} already in system but devclass ${o.devclass} is part of the same trm package in update`, true);
46
43
  }
47
44
  else {
48
- trm_commons_1.Logger.error(`${o.pgmid} ${o.object} ${o.objName} already exist on target system ${systemConnector_1.SystemConnector.getDest()}`);
45
+ if (context.rawInput.installData.checks.noExistingObjects) {
46
+ trm_commons_1.Logger.warning(`${o.pgmid} ${o.object} ${o.objName} already exist on target system ${systemConnector_1.SystemConnector.getDest()}`);
47
+ }
48
+ else {
49
+ trm_commons_1.Logger.error(`${o.pgmid} ${o.object} ${o.objName} already exist on target system ${systemConnector_1.SystemConnector.getDest()}`);
50
+ }
51
+ throwExistingObjectsError = true;
52
+ }
53
+ });
54
+ if (throwExistingObjectsError && !context.rawInput.installData.checks.noExistingObjects) {
55
+ throw new Error(`Cannot overwrite existing objects.`);
56
+ }
57
+ }
58
+ else {
59
+ if (context.rawInput.installData.checks.noExistingObjects || context.rawInput.contextData.noInquirer) {
60
+ trm_commons_1.Logger.warning(`${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}:\n${sObjs}`);
61
+ }
62
+ else {
63
+ const ow = (yield trm_commons_1.Inquirer.prompt({
64
+ message: `Couldn't determine root SAP package for "${rootPackage.packageName}", ${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}. Continue?`,
65
+ type: 'confirm',
66
+ name: 'ow',
67
+ default: true
68
+ })).ow;
69
+ if (!ow) {
70
+ throw new Error(`${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}:\n${sObjs}`);
49
71
  }
50
- throwExistingObjectsError = true;
51
72
  }
52
- });
53
- if (throwExistingObjectsError && !context.rawInput.installData.checks.noExistingObjects) {
54
- throw new Error(`Cannot overwrite existing objects.`);
55
73
  }
56
74
  }
57
75
  else {
@@ -668,7 +668,12 @@ class RFCClient {
668
668
  return true;
669
669
  }
670
670
  catch (e) {
671
- return e;
671
+ if (e.exceptionType !== 'CALL_FUNCTION_NOT_REMOTE') {
672
+ return e;
673
+ }
674
+ else {
675
+ return true;
676
+ }
672
677
  }
673
678
  });
674
679
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trm-core",
3
- "version": "6.9.0",
3
+ "version": "6.9.1",
4
4
  "description": "TRM (Transport Request Manager) Core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",