trm-core 10.0.0 → 10.1.0

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.
Files changed (35) hide show
  1. package/changelog.txt +27 -3
  2. package/dist/actions/checkEngines/analyze.js +6 -0
  3. package/dist/actions/checkSapEntries/analyze.d.ts +2 -0
  4. package/dist/actions/checkSapEntries/analyze.js +100 -18
  5. package/dist/actions/commons/setSystemPackages.js +1 -1
  6. package/dist/actions/commons/utils/actionLocks.d.ts +2 -1
  7. package/dist/actions/commons/utils/actionLocks.js +8 -1
  8. package/dist/actions/commons/utils/index.d.ts +1 -0
  9. package/dist/actions/commons/utils/index.js +1 -0
  10. package/dist/actions/commons/utils/packageCleanup.d.ts +8 -0
  11. package/dist/actions/commons/utils/packageCleanup.js +59 -10
  12. package/dist/actions/commons/utils/releaseDeletionTransport.js +11 -4
  13. package/dist/actions/commons/utils/trmBackend.d.ts +20 -0
  14. package/dist/actions/commons/utils/trmBackend.js +64 -0
  15. package/dist/actions/install/checkSapEntries.js +1 -1
  16. package/dist/actions/install/checkTransports.js +40 -1
  17. package/dist/actions/install/generateLandscapeTransport.js +4 -1
  18. package/dist/actions/install/generateUpdateTransport.d.ts +7 -0
  19. package/dist/actions/install/generateUpdateTransport.js +75 -8
  20. package/dist/actions/install/importBatch.js +0 -0
  21. package/dist/actions/install/index.d.ts +10 -0
  22. package/dist/actions/install/index.js +6 -3
  23. package/dist/actions/install/init.js +12 -2
  24. package/dist/actions/install/prepareCust.js +9 -4
  25. package/dist/actions/install/prepareDevc.js +9 -4
  26. package/dist/actions/install/prepareLang.js +9 -4
  27. package/dist/actions/install/prepareTadir.js +9 -4
  28. package/dist/actions/install/setInstallDevclass.js +17 -3
  29. package/dist/actions/install/updatePackageData.d.ts +5 -0
  30. package/dist/actions/install/updatePackageData.js +37 -18
  31. package/dist/client/RESTClient.js +6 -5
  32. package/dist/client/RFCClient.js +3 -5
  33. package/dist/systemConnector/SystemConnectorBase.js +25 -3
  34. package/dist/transport/Transport.js +17 -3
  35. package/package.json +1 -1
@@ -623,6 +623,7 @@ class Transport {
623
623
  var lastCheck;
624
624
  if (this._trTarget) {
625
625
  var inQueueAttempts = 0;
626
+ var queueReadFailures = 0;
626
627
  trm_commons_1.Logger.loading(`Checking ${this.trkorr} status...`, skipLog);
627
628
  while (!inQueue) {
628
629
  inQueueAttempts++;
@@ -644,15 +645,28 @@ class Transport {
644
645
  }
645
646
  }
646
647
  catch (e) {
647
- trm_commons_1.Logger.loading(`Last check ${lastCheck.toISOString().split("T")[0]} ${lastCheck.toTimeString().split(" ")[0]}, last update /: Unable to read status`, skipLog);
648
- trm_commons_1.Logger.error(`Unable to read status!`, true);
648
+ trm_commons_1.Logger.loading(`Last check ${lastCheck.toISOString().split("T")[0]} ${lastCheck.toTimeString().split(" ")[0]}...`, skipLog);
649
+ trm_commons_1.Logger.warning(`Unable to read status: check continues, this error can be ignored`, true);
649
650
  trm_commons_1.Logger.error(e.toString(), true);
650
651
  }
651
652
  }
652
653
  //reading the queue is outdated now and getTransportImportStatus should be used
653
654
  //HOWEVER it doesn't work for VIRTUAL TARGETS!
654
655
  //for now, keep it like this
655
- var tmsQueue = yield systemConnector_1.SystemConnector.readTmsQueue(this._trTarget);
656
+ var tmsQueue;
657
+ try {
658
+ tmsQueue = yield systemConnector_1.SystemConnector.readTmsQueue(this._trTarget);
659
+ queueReadFailures = 0;
660
+ }
661
+ catch (e) {
662
+ // an import can replace the TRM backend itself (trm-server upgrade): its API can
663
+ // fail while it's being imported and activated
664
+ if (++queueReadFailures > 10) {
665
+ throw e;
666
+ }
667
+ trm_commons_1.Logger.log(`Unable to read ${this._trTarget} import queue (attempt ${queueReadFailures}), retrying: ${e}`, true);
668
+ continue;
669
+ }
656
670
  tmsQueue = tmsQueue.filter(o => o.trkorr === this.trkorr);
657
671
  tmsQueue = tmsQueue.sort((a, b) => parseInt(b.bufpos) - parseInt(a.bufpos));
658
672
  if (!checkImpSing) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trm-core",
3
- "version": "10.0.0",
3
+ "version": "10.1.0",
4
4
  "description": "TRM (Transport Request Manager) Core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",