trm-core 8.5.0 → 8.5.2
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/README.md +1 -1
- package/changelog.txt +8 -0
- package/dist/actions/cg3y/download.js +6 -0
- package/dist/systemConnector/ISystemConnector.d.ts +1 -0
- package/dist/systemConnector/RESTSystemConnector.d.ts +1 -0
- package/dist/systemConnector/RESTSystemConnector.js +2 -1
- package/dist/systemConnector/RFCSystemConnector.d.ts +1 -0
- package/dist/systemConnector/RFCSystemConnector.js +1 -0
- package/dist/systemConnector/SystemConnector.d.ts +1 -0
- package/dist/systemConnector/SystemConnector.js +5 -0
- package/dist/systemConnector/SystemConnectorBase.js +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# <a href="https://docs.trmregistry.com/"><img src="https://docs.trmregistry.com/
|
|
1
|
+
# <a href="https://docs.trmregistry.com/"><img src="https://docs.trmregistry.com/logo.png" height="40" alt="TRM"></a>
|
|
2
2
|
|
|
3
3
|
[](https://github.com/RegestaItalia/trm-docs/blob/main/CODE_OF_CONDUCT.md)
|
|
4
4
|
[](https://github.com/RegestaItalia/trm-core)
|
package/changelog.txt
CHANGED
|
@@ -8,6 +8,14 @@ Legend
|
|
|
8
8
|
+ : added
|
|
9
9
|
- : removed
|
|
10
10
|
|
|
11
|
+
2026-03-11 v8.5.2
|
|
12
|
+
-------------------
|
|
13
|
+
+ check transport existance in cg3y
|
|
14
|
+
|
|
15
|
+
2026-03-10 v8.5.1
|
|
16
|
+
-------------------
|
|
17
|
+
+ stateless indicator in system connector
|
|
18
|
+
|
|
11
19
|
2026-03-09 v8.5.0
|
|
12
20
|
-------------------
|
|
13
21
|
+ cg3z/cg3y actions
|
|
@@ -46,11 +46,17 @@ exports.download = void 0;
|
|
|
46
46
|
const transport_1 = require("../../transport");
|
|
47
47
|
const trm_commons_1 = require("trm-commons");
|
|
48
48
|
const AdmZip = __importStar(require("adm-zip"));
|
|
49
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
49
50
|
exports.download = {
|
|
50
51
|
name: 'download',
|
|
51
52
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
53
|
trm_commons_1.Logger.log('Download step', true);
|
|
53
54
|
const transport = new transport_1.Transport(context.rawInput.trkorr);
|
|
55
|
+
trm_commons_1.Logger.loading(`Checking "${transport.trkorr}"...`);
|
|
56
|
+
const exists = !!(yield transport.getE070());
|
|
57
|
+
if (!exists) {
|
|
58
|
+
throw new Error(`Transport "${transport.trkorr}" was not found in ${systemConnector_1.SystemConnector.getDest()}.`);
|
|
59
|
+
}
|
|
54
60
|
const isReleased = yield transport.isReleased();
|
|
55
61
|
if (!isReleased) {
|
|
56
62
|
throw new Error(`Transport "${transport.trkorr}" is not released. To download, release it first.`);
|
|
@@ -7,6 +7,7 @@ import { RFCConnection } from "./RFCConnection";
|
|
|
7
7
|
import { SystemConnectorSupportedBulk } from "./SystemConnectorSupportedBulk";
|
|
8
8
|
export interface ISystemConnector extends ISystemConnectorBase {
|
|
9
9
|
supportedBulk: SystemConnectorSupportedBulk;
|
|
10
|
+
isStateless: boolean;
|
|
10
11
|
getNewConnection(): ISystemConnector;
|
|
11
12
|
getConnectionData: () => RFCConnection | RESTConnection;
|
|
12
13
|
getDest: () => string;
|
|
@@ -18,6 +18,7 @@ export declare class RESTSystemConnector extends SystemConnectorBase implements
|
|
|
18
18
|
protected _client: RESTClient;
|
|
19
19
|
private _isServerApisAllowed;
|
|
20
20
|
supportedBulk: SystemConnectorSupportedBulk;
|
|
21
|
+
isStateless: boolean;
|
|
21
22
|
constructor(_connection: RESTConnection, _login: Login, _normalizeEndpoint?: boolean);
|
|
22
23
|
getNewConnection(): ISystemConnector;
|
|
23
24
|
protected getSysname(): string;
|
|
@@ -25,6 +25,7 @@ class RESTSystemConnector extends SystemConnectorBase_1.SystemConnectorBase {
|
|
|
25
25
|
this._connection = _connection;
|
|
26
26
|
this._login = _login;
|
|
27
27
|
this._normalizeEndpoint = _normalizeEndpoint;
|
|
28
|
+
this.isStateless = true;
|
|
28
29
|
this.supportedBulk = {
|
|
29
30
|
getTransportObjects: true,
|
|
30
31
|
getExistingObjects: true
|
|
@@ -119,7 +120,7 @@ class RESTSystemConnector extends SystemConnectorBase_1.SystemConnectorBase {
|
|
|
119
120
|
}
|
|
120
121
|
connect() {
|
|
121
122
|
return __awaiter(this, arguments, void 0, function* (silent = false) {
|
|
122
|
-
trm_commons_1.Logger.loading(`Connecting to ${this.getDest()}
|
|
123
|
+
trm_commons_1.Logger.loading(`Connecting to ${this.getDest()}...`, silent);
|
|
123
124
|
try {
|
|
124
125
|
yield this._client.open();
|
|
125
126
|
this._dest = yield this._client.getDest();
|
|
@@ -18,6 +18,7 @@ export declare class RFCSystemConnector extends SystemConnectorBase implements I
|
|
|
18
18
|
protected _client: RFCClient;
|
|
19
19
|
private _isServerApisAllowed;
|
|
20
20
|
supportedBulk: SystemConnectorSupportedBulk;
|
|
21
|
+
isStateless: boolean;
|
|
21
22
|
constructor(_connection: RFCConnection, _login: Login, _traceDir?: string, _globalNodeModulesPath?: string);
|
|
22
23
|
getNewConnection(): ISystemConnector;
|
|
23
24
|
protected getSysname(): string;
|
|
@@ -24,6 +24,7 @@ class RFCSystemConnector extends SystemConnectorBase_1.SystemConnectorBase {
|
|
|
24
24
|
getTransportObjects: false,
|
|
25
25
|
getExistingObjects: false
|
|
26
26
|
};
|
|
27
|
+
this.isStateless = false;
|
|
27
28
|
this._login.user = this._login.user.toUpperCase();
|
|
28
29
|
this._lang = this._login.lang;
|
|
29
30
|
this._user = this._login.user;
|
|
@@ -13,6 +13,7 @@ export declare namespace SystemConnector {
|
|
|
13
13
|
var systemConnector: ISystemConnector;
|
|
14
14
|
function getNewConnection(): ISystemConnector;
|
|
15
15
|
function getSupportedBulk(): SystemConnectorSupportedBulk;
|
|
16
|
+
function isStateless(): boolean;
|
|
16
17
|
function getConnectionData(): any;
|
|
17
18
|
function getDest(): string;
|
|
18
19
|
function getLogonLanguage(c: boolean): string;
|
|
@@ -36,6 +36,11 @@ var SystemConnector;
|
|
|
36
36
|
return SystemConnector.systemConnector.supportedBulk;
|
|
37
37
|
}
|
|
38
38
|
SystemConnector.getSupportedBulk = getSupportedBulk;
|
|
39
|
+
function isStateless() {
|
|
40
|
+
checkSystemConnector();
|
|
41
|
+
return SystemConnector.systemConnector.isStateless;
|
|
42
|
+
}
|
|
43
|
+
SystemConnector.isStateless = isStateless;
|
|
39
44
|
function getConnectionData() {
|
|
40
45
|
checkSystemConnector();
|
|
41
46
|
return SystemConnector.systemConnector.getConnectionData();
|
|
@@ -610,8 +610,11 @@ class SystemConnectorBase {
|
|
|
610
610
|
barGlue: '>'
|
|
611
611
|
}, cliProgress.Presets.legacy);
|
|
612
612
|
logProgress.start(100, 0);
|
|
613
|
-
const
|
|
614
|
-
|
|
613
|
+
const isStateless = SystemConnector_1.SystemConnector.isStateless();
|
|
614
|
+
const newConnection = isStateless ? SystemConnector_1.SystemConnector.systemConnector : SystemConnector_1.SystemConnector.getNewConnection();
|
|
615
|
+
if (!isStateless) {
|
|
616
|
+
yield newConnection.connect(true);
|
|
617
|
+
}
|
|
615
618
|
const logId = yield newConnection.createLogPolling('DEVCLASS_D');
|
|
616
619
|
const job = this.getPackageDependenciesInternal(devclass, includeSubPackages, logId);
|
|
617
620
|
var stopped = false;
|
|
@@ -645,7 +648,9 @@ class SystemConnectorBase {
|
|
|
645
648
|
logProgress.update(100);
|
|
646
649
|
try {
|
|
647
650
|
yield newConnection.deleteLogPolling(logId);
|
|
648
|
-
|
|
651
|
+
if (!isStateless) {
|
|
652
|
+
yield newConnection.closeConnection();
|
|
653
|
+
}
|
|
649
654
|
}
|
|
650
655
|
catch (_b) { }
|
|
651
656
|
logProgress.stop();
|