trm-client 4.1.1 → 4.2.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 +22 -0
- package/dist/commands/addRegistry.js +5 -2
- package/dist/commands/arguments/ContentArguments.d.ts +6 -0
- package/dist/commands/arguments/ContentArguments.js +2 -0
- package/dist/commands/arguments/ImportArguments.d.ts +19 -0
- package/dist/commands/arguments/ImportArguments.js +2 -0
- package/dist/commands/arguments/ListArguments.d.ts +3 -1
- package/dist/commands/arguments/PackArguments.d.ts +22 -0
- package/dist/commands/arguments/PackArguments.js +2 -0
- package/dist/commands/arguments/index.d.ts +2 -0
- package/dist/commands/arguments/index.js +2 -0
- package/dist/commands/commons/CommandContext.d.ts +3 -3
- package/dist/commands/commons/CommandContext.js +2 -1
- package/dist/commands/commons/viewRegistryPackage.js +1 -1
- package/dist/commands/content.d.ts +2 -0
- package/dist/commands/content.js +179 -0
- package/dist/commands/import.d.ts +2 -0
- package/dist/commands/import.js +82 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.js +3 -0
- package/dist/commands/info.js +11 -4
- package/dist/commands/list.js +17 -4
- package/dist/commands/pack.d.ts +2 -0
- package/dist/commands/pack.js +95 -0
- package/dist/commands/view.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +59 -2
- package/dist/registryAlias/RegistryAlias.d.ts +3 -2
- package/dist/registryAlias/RegistryAlias.js +9 -6
- package/dist/utils/NoConnection.d.ts +53 -46
- package/dist/utils/NoConnection.js +50 -41
- package/dist/utils/checkTrmDependencies.js +21 -34
- package/dist/utils/executeCommand.js +25 -8
- package/dist/utils/getClientNodeDependencies.d.ts +3 -0
- package/dist/utils/getClientNodeDependencies.js +9 -0
- package/dist/utils/getClientVersion.js +2 -2
- package/dist/utils/getNodePackage.d.ts +1 -0
- package/dist/utils/{getClientPackage.js → getNodePackage.js} +3 -3
- package/dist/utils/index.d.ts +2 -3
- package/dist/utils/index.js +2 -3
- package/dist/utils/registerCommand.js +2 -0
- package/package.json +10 -9
- package/dist/utils/getClientDependencies.d.ts +0 -1
- package/dist/utils/getClientDependencies.js +0 -9
- package/dist/utils/getClientPackage.d.ts +0 -1
- package/dist/utils/getTrmDependencies.d.ts +0 -1
- package/dist/utils/getTrmDependencies.js +0 -9
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
require("dotenv/config");
|
|
5
4
|
const commander_1 = require("commander");
|
|
6
5
|
const utils_1 = require("./utils");
|
|
7
6
|
const trm_registry_types_1 = require("trm-registry-types");
|
|
@@ -95,6 +94,34 @@ If a default manifest with dependencies is provided in conjunction with the auto
|
|
|
95
94
|
requiresRegistry: true,
|
|
96
95
|
requiresTrmDependencies: true
|
|
97
96
|
});
|
|
97
|
+
const pack = program.command(`pack <package> [version]`)
|
|
98
|
+
.description(`Save package locally.`)
|
|
99
|
+
.addHelpText(`before`, `When no version is defined, it will automatically set to 1.0.0.
|
|
100
|
+
Translation transport is only generated for packages that contain one or more objects with translations (unless skipped by flag).
|
|
101
|
+
Customizing transport is only generated if a valid list of customizing transports is provided (unless skipped by flag).
|
|
102
|
+
If a default manifest with dependencies is provided in conjunction with the automatic dependency generation, results will be merged.`)
|
|
103
|
+
.option(`-o, --output <<outputPath>>`, `Output path.`)
|
|
104
|
+
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false)
|
|
105
|
+
.option(`-nl, --noLanguageTransport`, `Skip language (translations) transport publish.`, false)
|
|
106
|
+
.option(`-nd, --noDependenciesDetection`, `Skip automatic dependencies detection.`, false)
|
|
107
|
+
.option(`-sc, --skipCustomizingTransports`, `Skip customizing transports input.`, false)
|
|
108
|
+
.option(`-to, --releaseTimeout <timeout>`, `Publish transports release timeout (in seconds).`, '180')
|
|
109
|
+
.option(`-d, --devclass <devclass>`, `ABAP package to publish.`)
|
|
110
|
+
.option(`-cust, --customizingTransports <customizingTransports>`, `Customizing transports (separated by comma).`)
|
|
111
|
+
.option(`-tt, --transportTarget <transportTarget>`, `Publish transports target.`)
|
|
112
|
+
.option(`-bc, --backwardsCompatible`, `Indicates backwards compatibility with older releases.`, true)
|
|
113
|
+
.option(`-sd, --description`, `Short description of the package.`)
|
|
114
|
+
.option(`-gl, --git <link>`, `Git link.`)
|
|
115
|
+
.option(`-wl, --website <link>`, `Website link.`)
|
|
116
|
+
.option(`-pl, --license <license>`, `Package license.`)
|
|
117
|
+
.option(`-pa, --authors <authors>`, `Package authors (separated by comma).`)
|
|
118
|
+
.option(`-pk, --keywords <keywords>`, `Package keywords (separated by comma).`)
|
|
119
|
+
.option(`-pd, --dependencies <JSON>`, `Package dependencies (in JSON format).`)
|
|
120
|
+
.option(`-ps, --sapEntries <JSON>`, `Package SAP entries (in JSON format).`);
|
|
121
|
+
(0, utils_1.registerCommand)(pack, {
|
|
122
|
+
requiresConnection: true,
|
|
123
|
+
requiresTrmDependencies: true
|
|
124
|
+
});
|
|
98
125
|
const unpublish = program.command(`unpublish <package> [version]`)
|
|
99
126
|
.description(`Unpublish a package release from registry.`);
|
|
100
127
|
(0, utils_1.registerCommand)(unpublish, {
|
|
@@ -148,6 +175,28 @@ const update = program.command(`update <package> [version]`)
|
|
|
148
175
|
requiresRegistry: true,
|
|
149
176
|
requiresTrmDependencies: true
|
|
150
177
|
});
|
|
178
|
+
const _import = program.command(`import <file>`)
|
|
179
|
+
.description(`Import a package (as a file) into system.`)
|
|
180
|
+
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false)
|
|
181
|
+
.option(`-ow, --overwrite`, `Overwrite installation (allow re-install).`, false)
|
|
182
|
+
.option(`-sf, --safe`, `Safe install (needs package integrity).`, false)
|
|
183
|
+
.option(`-nd, --noDependencies`, `Skip check/install of package dependencies.`, false)
|
|
184
|
+
.option(`-no, --noObjectTypes`, `Skip check of package object types.`, false)
|
|
185
|
+
.option(`-ns, --noSapEntries`, `Skip check of package SAP entries/objects.`, false)
|
|
186
|
+
.option(`-nl, --noLanguageTransport`, `Skip install of language (translations) transport (if exists).`, false)
|
|
187
|
+
.option(`-nc, --noCustomizingTransport`, `Skip install of customizing transport (if exists).`, false)
|
|
188
|
+
.option(`-to, --importTimeout <timeout>`, `Install transports import timeout (in seconds).`, '180')
|
|
189
|
+
.option(`-kd, --keepOriginalPackages`, `Keep original ABAP packages names.`, false)
|
|
190
|
+
.option(`-it, --createInstallTransport`, `Create/update install transport (used for landscape transports).`, true)
|
|
191
|
+
.option(`-r3, --r3transPath <path>`, `R3trans program path. (default: Environment variable R3TRANS_HOME)`)
|
|
192
|
+
.option(`-sha, --integrity <sha>`, `Package integrity.`)
|
|
193
|
+
.option(`-tl, --transportLayer <transportLayer>`, `ABAP packages transport layer. (default: System default)`)
|
|
194
|
+
.option(`-tl, --packageReplacements <JSON>`, `ABAP package replacements in JSON format.`)
|
|
195
|
+
.option(`-itt, --installTransportTargetSys <transportTarget>`, `Install transport target system.`);
|
|
196
|
+
(0, utils_1.registerCommand)(_import, {
|
|
197
|
+
requiresConnection: true,
|
|
198
|
+
requiresTrmDependencies: true
|
|
199
|
+
});
|
|
151
200
|
const view = program.command(`view <package>`)
|
|
152
201
|
.description(`View package.`)
|
|
153
202
|
.addHelpText(`before`, `Shows package details.
|
|
@@ -165,8 +214,16 @@ const compare = program.command(`compare <package>`)
|
|
|
165
214
|
requiresRegistry: true,
|
|
166
215
|
ignoreRegistryUnreachable: true
|
|
167
216
|
});
|
|
217
|
+
const content = program.command(`content <package> [version]`)
|
|
218
|
+
.description(`List content of a package.`)
|
|
219
|
+
.option(`-a, --all`, `List all content`, false)
|
|
220
|
+
.option(`-r3, --r3transPath <path>`, `R3trans program path. (default: Environment variable R3TRANS_HOME)`);
|
|
221
|
+
(0, utils_1.registerCommand)(content, {
|
|
222
|
+
requiresRegistry: true
|
|
223
|
+
});
|
|
168
224
|
const list = program.command(`list`)
|
|
169
|
-
.description(`List packages installed on a system.`)
|
|
225
|
+
.description(`List packages installed on a system.`)
|
|
226
|
+
.option(`-l, --locals`, `List imported/exported local packages`, false);
|
|
170
227
|
(0, utils_1.registerCommand)(list, {
|
|
171
228
|
requiresConnection: true
|
|
172
229
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RegistryAliasData } from "./RegistryAliasData";
|
|
2
|
-
import {
|
|
2
|
+
import { AbstractRegistry } from "trm-core";
|
|
3
3
|
export declare class RegistryAlias {
|
|
4
4
|
private _endpoint;
|
|
5
5
|
private _name;
|
|
6
6
|
authData: any;
|
|
7
7
|
constructor(_endpoint: string, _name: string);
|
|
8
8
|
private setAuthData;
|
|
9
|
-
getRegistry():
|
|
9
|
+
getRegistry(): AbstractRegistry;
|
|
10
10
|
private static generateFile;
|
|
11
11
|
private static getSystemAliasFilePath;
|
|
12
12
|
static getAll(): RegistryAliasData[];
|
|
@@ -15,4 +15,5 @@ export declare class RegistryAlias {
|
|
|
15
15
|
static delete(name: string): void;
|
|
16
16
|
static update(name: string, auth?: any): void;
|
|
17
17
|
static generatePublicRegistryAlias(): void;
|
|
18
|
+
static getTemporaryInstance(endpoint: string, auth?: any): RegistryAlias;
|
|
18
19
|
}
|
|
@@ -101,9 +101,9 @@ class RegistryAlias {
|
|
|
101
101
|
const aAlias = this.getAll();
|
|
102
102
|
var alias = aAlias.find(o => o.alias.trim().toUpperCase() === name.trim().toUpperCase());
|
|
103
103
|
if (alias) {
|
|
104
|
-
if (name.trim().toLowerCase() ===
|
|
105
|
-
alias.endpointUrl =
|
|
106
|
-
alias.alias =
|
|
104
|
+
if (name.trim().toLowerCase() === trm_core_1.PUBLIC_RESERVED_KEYWORD) {
|
|
105
|
+
alias.endpointUrl = trm_core_1.PUBLIC_RESERVED_KEYWORD;
|
|
106
|
+
alias.alias = trm_core_1.PUBLIC_RESERVED_KEYWORD;
|
|
107
107
|
}
|
|
108
108
|
return new RegistryAlias(alias.endpointUrl, alias.alias).setAuthData(alias.auth);
|
|
109
109
|
}
|
|
@@ -120,7 +120,7 @@ class RegistryAlias {
|
|
|
120
120
|
else {
|
|
121
121
|
aAlias.push({
|
|
122
122
|
alias: name,
|
|
123
|
-
endpointUrl: endpointUrl.trim().toLowerCase() ===
|
|
123
|
+
endpointUrl: endpointUrl.trim().toLowerCase() === trm_core_1.PUBLIC_RESERVED_KEYWORD ? null : endpointUrl,
|
|
124
124
|
auth
|
|
125
125
|
});
|
|
126
126
|
this.generateFile(aAlias);
|
|
@@ -145,9 +145,12 @@ class RegistryAlias {
|
|
|
145
145
|
}
|
|
146
146
|
static generatePublicRegistryAlias() {
|
|
147
147
|
const allRegistries = this.getAll();
|
|
148
|
-
if (!allRegistries.find(o => o.alias.trim().toLowerCase() ===
|
|
149
|
-
RegistryAlias.create(
|
|
148
|
+
if (!allRegistries.find(o => o.alias.trim().toLowerCase() === trm_core_1.PUBLIC_RESERVED_KEYWORD)) {
|
|
149
|
+
RegistryAlias.create(trm_core_1.PUBLIC_RESERVED_KEYWORD, trm_core_1.PUBLIC_RESERVED_KEYWORD, null);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
static getTemporaryInstance(endpoint, auth) {
|
|
153
|
+
return new RegistryAlias(endpoint, endpoint).setAuthData(auth);
|
|
154
|
+
}
|
|
152
155
|
}
|
|
153
156
|
exports.RegistryAlias = RegistryAlias;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { AS4TEXT, DEVCLASS, DEVLAYER, E071, ISystemConnector, LXE_TT_PACKG_LINE, NAMESPACE, PGMID, Registry, RS38L_FNAME, SapMessage, SCOMPKDTLN, SEU_OBJ, SOBJ_NAME, SystemConnectorSupportedBulk, TADIR, TLINE, TMSSYSNAM, TR_TARGET, TRKORR, TrmPackage, TRNLICENSE, TRNSPACETT, TROBJTYPE, ZTRM_INSTALLDEVC, ZTRM_INTEGRITY } from "trm-core";
|
|
1
|
+
import { ISystemConnector, SystemConnectorSupportedBulk, TADIR } from "trm-core";
|
|
4
2
|
export declare class NoConnection implements ISystemConnector {
|
|
5
3
|
_throw(): any;
|
|
6
4
|
supportedBulk: SystemConnectorSupportedBulk;
|
|
@@ -13,56 +11,65 @@ export declare class NoConnection implements ISystemConnector {
|
|
|
13
11
|
ping: () => Promise<string>;
|
|
14
12
|
getFileSystem: () => Promise<any>;
|
|
15
13
|
getDirTrans: () => Promise<any>;
|
|
16
|
-
getBinaryFile: (
|
|
17
|
-
writeBinaryFile: (
|
|
18
|
-
createTocTransport: (
|
|
19
|
-
createWbTransport: (
|
|
20
|
-
setTransportDoc: (
|
|
21
|
-
addToTransportRequest: (
|
|
22
|
-
repositoryEnvironment: (
|
|
23
|
-
deleteTrkorr: (
|
|
24
|
-
releaseTrkorr: (
|
|
25
|
-
addSkipTrkorr: (
|
|
26
|
-
addSrcTrkorr: (
|
|
27
|
-
readTmsQueue: (
|
|
28
|
-
createPackage: (
|
|
14
|
+
getBinaryFile: () => Promise<any>;
|
|
15
|
+
writeBinaryFile: () => Promise<any>;
|
|
16
|
+
createTocTransport: () => Promise<any>;
|
|
17
|
+
createWbTransport: () => Promise<any>;
|
|
18
|
+
setTransportDoc: () => Promise<any>;
|
|
19
|
+
addToTransportRequest: () => Promise<any>;
|
|
20
|
+
repositoryEnvironment: () => Promise<any>;
|
|
21
|
+
deleteTrkorr: () => Promise<any>;
|
|
22
|
+
releaseTrkorr: () => Promise<any>;
|
|
23
|
+
addSkipTrkorr: () => Promise<any>;
|
|
24
|
+
addSrcTrkorr: () => Promise<any>;
|
|
25
|
+
readTmsQueue: () => Promise<any>;
|
|
26
|
+
createPackage: () => Promise<any>;
|
|
29
27
|
getDefaultTransportLayer: () => Promise<string>;
|
|
30
|
-
tadirInterface: (
|
|
31
|
-
dequeueTransport: (
|
|
32
|
-
forwardTransport: (
|
|
33
|
-
importTransport: (
|
|
34
|
-
setInstallDevc: (
|
|
28
|
+
tadirInterface: () => Promise<any>;
|
|
29
|
+
dequeueTransport: () => Promise<any>;
|
|
30
|
+
forwardTransport: () => Promise<any>;
|
|
31
|
+
importTransport: () => Promise<any>;
|
|
32
|
+
setInstallDevc: () => Promise<any>;
|
|
35
33
|
getObjectsList: () => Promise<any>;
|
|
36
|
-
renameTransportRequest: (
|
|
37
|
-
setPackageIntegrity: (
|
|
38
|
-
addTranslationToTr: (
|
|
39
|
-
trCopy: (
|
|
40
|
-
getTransportObjectsBulk?: (
|
|
41
|
-
getExistingObjectsBulk?: (
|
|
42
|
-
addNamespace: (
|
|
43
|
-
getMessage: (
|
|
44
|
-
getTransportStatus: (
|
|
45
|
-
getPackageWorkbenchTransport: (
|
|
34
|
+
renameTransportRequest: () => Promise<any>;
|
|
35
|
+
setPackageIntegrity: () => Promise<any>;
|
|
36
|
+
addTranslationToTr: () => Promise<any>;
|
|
37
|
+
trCopy: () => Promise<any>;
|
|
38
|
+
getTransportObjectsBulk?: () => Promise<TADIR[]>;
|
|
39
|
+
getExistingObjectsBulk?: () => Promise<TADIR[]>;
|
|
40
|
+
addNamespace: () => Promise<any>;
|
|
41
|
+
getMessage: () => Promise<any>;
|
|
42
|
+
getTransportStatus: () => Promise<any>;
|
|
43
|
+
getPackageWorkbenchTransport: () => Promise<any>;
|
|
46
44
|
getSourceTrkorr: () => Promise<any>;
|
|
47
45
|
getIgnoredTrkorr: () => Promise<any>;
|
|
48
|
-
getObject: (
|
|
49
|
-
getInstalledPackages: (
|
|
50
|
-
getDevclass: (
|
|
46
|
+
getObject: () => Promise<any>;
|
|
47
|
+
getInstalledPackages: () => Promise<any[]>;
|
|
48
|
+
getDevclass: () => Promise<any>;
|
|
51
49
|
getTransportTargets: () => Promise<any>;
|
|
52
|
-
getSubpackages: (
|
|
53
|
-
getDevclassObjects: (
|
|
54
|
-
getInstallPackages: (
|
|
55
|
-
setPackageSuperpackage: (
|
|
56
|
-
clearPackageSuperpackage: (
|
|
57
|
-
setPackageTransportLayer: (
|
|
58
|
-
checkSapEntryExists: (
|
|
59
|
-
getPackageIntegrity: (
|
|
60
|
-
getFunctionModule: (
|
|
61
|
-
getExistingObjects: (
|
|
62
|
-
getNamespace: (
|
|
50
|
+
getSubpackages: () => Promise<any>;
|
|
51
|
+
getDevclassObjects: () => Promise<any>;
|
|
52
|
+
getInstallPackages: () => Promise<any>;
|
|
53
|
+
setPackageSuperpackage: () => Promise<any>;
|
|
54
|
+
clearPackageSuperpackage: () => Promise<any>;
|
|
55
|
+
setPackageTransportLayer: () => Promise<any>;
|
|
56
|
+
checkSapEntryExists: () => Promise<any>;
|
|
57
|
+
getPackageIntegrity: () => Promise<any>;
|
|
58
|
+
getFunctionModule: () => Promise<any>;
|
|
59
|
+
getExistingObjects: () => Promise<any>;
|
|
60
|
+
getNamespace: () => Promise<any>;
|
|
63
61
|
getR3transVersion: () => Promise<any>;
|
|
64
62
|
getR3transUnicode: () => Promise<any>;
|
|
65
|
-
isTransportLayerExist: (
|
|
63
|
+
isTransportLayerExist: () => Promise<any>;
|
|
66
64
|
getTrmServerPackage: () => Promise<any>;
|
|
67
65
|
getTrmRestPackage: () => Promise<any>;
|
|
66
|
+
removeComments: () => Promise<any>;
|
|
67
|
+
removeSkipTrkorr: () => Promise<any>;
|
|
68
|
+
migrateTransport: () => Promise<any>;
|
|
69
|
+
deleteTmsTransport: () => Promise<any>;
|
|
70
|
+
refreshTransportTmsTxt: () => Promise<any>;
|
|
71
|
+
getDotAbapgit: () => Promise<any>;
|
|
72
|
+
getAbapgitSource: () => Promise<any>;
|
|
73
|
+
executePostActivity: () => Promise<any>;
|
|
74
|
+
readClassDescriptions: () => Promise<any>;
|
|
68
75
|
}
|
|
@@ -34,60 +34,69 @@ class NoConnection {
|
|
|
34
34
|
this.ping = () => __awaiter(this, void 0, void 0, function* () { return 'PONG'; });
|
|
35
35
|
this.getFileSystem = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
36
36
|
this.getDirTrans = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
37
|
-
this.getBinaryFile = (
|
|
38
|
-
this.writeBinaryFile = (
|
|
39
|
-
this.createTocTransport = (
|
|
40
|
-
this.createWbTransport = (
|
|
41
|
-
this.setTransportDoc = (
|
|
42
|
-
this.addToTransportRequest = (
|
|
43
|
-
this.repositoryEnvironment = (
|
|
44
|
-
this.deleteTrkorr = (
|
|
45
|
-
this.releaseTrkorr = (
|
|
46
|
-
this.addSkipTrkorr = (
|
|
47
|
-
this.addSrcTrkorr = (
|
|
48
|
-
this.readTmsQueue = (
|
|
49
|
-
this.createPackage = (
|
|
37
|
+
this.getBinaryFile = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
38
|
+
this.writeBinaryFile = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
39
|
+
this.createTocTransport = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
40
|
+
this.createWbTransport = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
41
|
+
this.setTransportDoc = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
42
|
+
this.addToTransportRequest = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
43
|
+
this.repositoryEnvironment = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
44
|
+
this.deleteTrkorr = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
45
|
+
this.releaseTrkorr = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
46
|
+
this.addSkipTrkorr = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
47
|
+
this.addSrcTrkorr = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
48
|
+
this.readTmsQueue = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
49
|
+
this.createPackage = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
50
50
|
this.getDefaultTransportLayer = () => __awaiter(this, void 0, void 0, function* () { return 'NONE'; });
|
|
51
|
-
this.tadirInterface = (
|
|
52
|
-
this.dequeueTransport = (
|
|
53
|
-
this.forwardTransport = (
|
|
54
|
-
this.importTransport = (
|
|
55
|
-
this.setInstallDevc = (
|
|
51
|
+
this.tadirInterface = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
52
|
+
this.dequeueTransport = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
53
|
+
this.forwardTransport = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
54
|
+
this.importTransport = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
55
|
+
this.setInstallDevc = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
56
56
|
this.getObjectsList = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
57
|
-
this.renameTransportRequest = (
|
|
58
|
-
this.setPackageIntegrity = (
|
|
59
|
-
this.addTranslationToTr = (
|
|
60
|
-
this.trCopy = (
|
|
57
|
+
this.renameTransportRequest = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
58
|
+
this.setPackageIntegrity = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
59
|
+
this.addTranslationToTr = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
60
|
+
this.trCopy = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
61
61
|
this.getTransportObjectsBulk = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
62
62
|
this.getExistingObjectsBulk = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
63
|
-
this.addNamespace = (
|
|
64
|
-
this.getMessage = (
|
|
65
|
-
this.getTransportStatus = (
|
|
66
|
-
this.getPackageWorkbenchTransport = (
|
|
63
|
+
this.addNamespace = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
64
|
+
this.getMessage = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
65
|
+
this.getTransportStatus = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
66
|
+
this.getPackageWorkbenchTransport = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
67
67
|
this.getSourceTrkorr = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
68
68
|
this.getIgnoredTrkorr = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
69
|
-
this.getObject = (
|
|
70
|
-
this.getInstalledPackages = (
|
|
69
|
+
this.getObject = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
70
|
+
this.getInstalledPackages = () => __awaiter(this, void 0, void 0, function* () {
|
|
71
71
|
return [];
|
|
72
72
|
});
|
|
73
|
-
this.getDevclass = (
|
|
73
|
+
this.getDevclass = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
74
74
|
this.getTransportTargets = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
75
|
-
this.getSubpackages = (
|
|
76
|
-
this.getDevclassObjects = (
|
|
77
|
-
this.getInstallPackages = (
|
|
78
|
-
this.setPackageSuperpackage = (
|
|
79
|
-
this.clearPackageSuperpackage = (
|
|
80
|
-
this.setPackageTransportLayer = (
|
|
81
|
-
this.checkSapEntryExists = (
|
|
82
|
-
this.getPackageIntegrity = (
|
|
83
|
-
this.getFunctionModule = (
|
|
84
|
-
this.getExistingObjects = (
|
|
85
|
-
this.getNamespace = (
|
|
75
|
+
this.getSubpackages = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
76
|
+
this.getDevclassObjects = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
77
|
+
this.getInstallPackages = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
78
|
+
this.setPackageSuperpackage = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
79
|
+
this.clearPackageSuperpackage = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
80
|
+
this.setPackageTransportLayer = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
81
|
+
this.checkSapEntryExists = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
82
|
+
this.getPackageIntegrity = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
83
|
+
this.getFunctionModule = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
84
|
+
this.getExistingObjects = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
85
|
+
this.getNamespace = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
86
86
|
this.getR3transVersion = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
87
87
|
this.getR3transUnicode = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
88
|
-
this.isTransportLayerExist = (
|
|
88
|
+
this.isTransportLayerExist = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
89
89
|
this.getTrmServerPackage = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
90
90
|
this.getTrmRestPackage = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
91
|
+
this.removeComments = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
92
|
+
this.removeSkipTrkorr = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
93
|
+
this.migrateTransport = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
94
|
+
this.deleteTmsTransport = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
95
|
+
this.refreshTransportTmsTxt = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
96
|
+
this.getDotAbapgit = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
97
|
+
this.getAbapgitSource = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
98
|
+
this.executePostActivity = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
99
|
+
this.readClassDescriptions = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
91
100
|
}
|
|
92
101
|
_throw() {
|
|
93
102
|
throw new Error(`No connection to SAP server.`);
|
|
@@ -14,44 +14,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.checkTrmDependencies = void 0;
|
|
16
16
|
const trm_core_1 = require("trm-core");
|
|
17
|
-
const semver_1 = require("semver");
|
|
18
|
-
const getTrmDependencies_1 = require("./getTrmDependencies");
|
|
19
17
|
const commons_1 = require("../commands/commons");
|
|
20
18
|
const chalk_1 = __importDefault(require("chalk"));
|
|
21
19
|
function checkTrmDependencies(commandArgs) {
|
|
22
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
else if (!((commandArgs.command === 'install' || commandArgs.command === 'update') && commandArgs.package === packageName)) {
|
|
46
|
-
throw new Error(`Package "${packageName}" version ${installedVersion} is installed on ${trm_core_1.SystemConnector.getDest()}, but does not satisfy dependency version ${versionRange}. Update with command ${chalk_1.default.italic('trm update ' + packageName)}`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
commons_1.CommandContext.trmDependencies.push(installedPackage);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
21
|
+
const packages = yield commons_1.CommandContext.getSystemPackages();
|
|
22
|
+
const dependenciesCheck = yield (0, trm_core_1.checkCoreTrmDependencies)(packages);
|
|
23
|
+
const trmDependencies = (0, trm_core_1.getCoreTrmDependencies)();
|
|
24
|
+
commons_1.CommandContext.trmDependencies = commons_1.CommandContext.trmDependencies.concat(dependenciesCheck.dependencies);
|
|
25
|
+
dependenciesCheck.missingDependencies.forEach(missingDependency => {
|
|
26
|
+
if (commandArgs.command === 'info') {
|
|
27
|
+
commons_1.CommandContext.missingTrmDependencies.push(missingDependency);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
throw new Error(`Package "${missingDependency}" is not installed on ${trm_core_1.SystemConnector.getDest()}.`);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
dependenciesCheck.versionNotSatisfiedDependencies.forEach(dependency => {
|
|
34
|
+
if (commandArgs.command === 'info') {
|
|
35
|
+
commons_1.CommandContext.missingTrmDependencies.push(dependency);
|
|
36
|
+
}
|
|
37
|
+
else if (!((commandArgs.command === 'install' || commandArgs.command === 'update') && commandArgs.package === dependency.packageName)) {
|
|
38
|
+
const versionRange = trmDependencies[dependency.packageName];
|
|
39
|
+
throw new Error(`Package "${dependency.packageName}" version ${dependency.manifest.get().version} is installed on ${trm_core_1.SystemConnector.getDest()}, but does not satisfy dependency version ${versionRange}. Update with command ${chalk_1.default.italic('trm update ' + dependency.packageName)}`);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
55
42
|
});
|
|
56
43
|
}
|
|
57
44
|
exports.checkTrmDependencies = checkTrmDependencies;
|
|
@@ -87,9 +87,8 @@ function executeCommand(args) {
|
|
|
87
87
|
const registryAuthBlacklist = args.registryAuthBlacklist;
|
|
88
88
|
const ignoreRegistryUnreachable = args.ignoreRegistryUnreachable;
|
|
89
89
|
yield (0, checkCliUpdate_1.checkCliUpdate)(true);
|
|
90
|
-
var system;
|
|
91
|
-
var registry;
|
|
92
90
|
if (requiresConnection) {
|
|
91
|
+
var system;
|
|
93
92
|
if (args.systemAlias) {
|
|
94
93
|
system = systemAlias_1.SystemAlias.get(args.systemAlias).getConnection();
|
|
95
94
|
}
|
|
@@ -109,6 +108,9 @@ function executeCommand(args) {
|
|
|
109
108
|
if (args.registry) {
|
|
110
109
|
registryAlias = registryAlias_1.RegistryAlias.get(args.registry);
|
|
111
110
|
}
|
|
111
|
+
else if (args.registryEndpoint) {
|
|
112
|
+
registryAlias = registryAlias_1.RegistryAlias.getTemporaryInstance(args.registryEndpoint, args.registryAuth);
|
|
113
|
+
}
|
|
112
114
|
else {
|
|
113
115
|
registryAlias = yield commands.pickRegistry();
|
|
114
116
|
}
|
|
@@ -138,15 +140,30 @@ function executeCommand(args) {
|
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
142
|
commons_1.CommandContext.registry = registry;
|
|
143
|
+
trm_core_1.RegistryProvider.registry.push(registry);
|
|
144
|
+
registryAlias_1.RegistryAlias.getAll().forEach(o => {
|
|
145
|
+
var append = true;
|
|
146
|
+
var aliasRegistry = registryAlias_1.RegistryAlias.get(o.alias).getRegistry();
|
|
147
|
+
trm_core_1.RegistryProvider.registry.forEach(k => {
|
|
148
|
+
if (append) {
|
|
149
|
+
append = !k.compare(aliasRegistry);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
if (append) {
|
|
153
|
+
trm_core_1.RegistryProvider.registry.push(aliasRegistry);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
141
156
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
157
|
+
var commandFn = args.command;
|
|
158
|
+
if (!commands[commandFn]) {
|
|
159
|
+
commandFn = `_${commandFn}`;
|
|
160
|
+
if (!commands[commandFn]) {
|
|
161
|
+
throw new Error(`Command "${args.command}" doesn't exist.`);
|
|
146
162
|
}
|
|
147
163
|
}
|
|
148
|
-
|
|
149
|
-
|
|
164
|
+
yield commands[commandFn](args);
|
|
165
|
+
if (trm_core_1.Logger.logger instanceof trm_core_1.CliLogger || trm_core_1.Logger.logger instanceof trm_core_1.CliLogFileLogger) {
|
|
166
|
+
trm_core_1.Logger.logger.forceStop();
|
|
150
167
|
}
|
|
151
168
|
exitCode = 0;
|
|
152
169
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getClientNodeDependencies = void 0;
|
|
4
|
+
const getNodePackage_1 = require("./getNodePackage");
|
|
5
|
+
function getClientNodeDependencies() {
|
|
6
|
+
const trmClientPackage = (0, getNodePackage_1.getNodePackage)();
|
|
7
|
+
return trmClientPackage.dependencies || {};
|
|
8
|
+
}
|
|
9
|
+
exports.getClientNodeDependencies = getClientNodeDependencies;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getClientVersion = void 0;
|
|
4
|
-
const
|
|
4
|
+
const getNodePackage_1 = require("./getNodePackage");
|
|
5
5
|
function getClientVersion() {
|
|
6
|
-
const trmClientPackage = (0,
|
|
6
|
+
const trmClientPackage = (0, getNodePackage_1.getNodePackage)();
|
|
7
7
|
return trmClientPackage.version;
|
|
8
8
|
}
|
|
9
9
|
exports.getClientVersion = getClientVersion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getNodePackage(): any;
|
|
@@ -26,11 +26,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.getNodePackage = void 0;
|
|
30
30
|
const fs = __importStar(require("fs"));
|
|
31
31
|
const path_1 = __importDefault(require("path"));
|
|
32
32
|
const get_root_path_1 = require("get-root-path");
|
|
33
|
-
function
|
|
33
|
+
function getNodePackage() {
|
|
34
34
|
var file;
|
|
35
35
|
try {
|
|
36
36
|
file = fs.readFileSync(path_1.default.join(get_root_path_1.rootPath, "/node_modules/trm-client/package.json"));
|
|
@@ -44,4 +44,4 @@ function getClientPackage() {
|
|
|
44
44
|
}
|
|
45
45
|
return packageData;
|
|
46
46
|
}
|
|
47
|
-
exports.
|
|
47
|
+
exports.getNodePackage = getNodePackage;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -7,12 +7,11 @@ export * from "./getSapLogonConnections";
|
|
|
7
7
|
export * from "./logError";
|
|
8
8
|
export * from "./checkTrmDependencies";
|
|
9
9
|
export * from "./checkCliUpdate";
|
|
10
|
-
export * from "./
|
|
10
|
+
export * from "./getNodePackage";
|
|
11
11
|
export * from "./getClientVersion";
|
|
12
12
|
export * from "./getTempFolder";
|
|
13
13
|
export * from "./getLogFolder";
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./getTrmDependencies";
|
|
14
|
+
export * from "./getClientNodeDependencies";
|
|
16
15
|
export * from "./getSystemConnector";
|
|
17
16
|
export * from "./NoConnection";
|
|
18
17
|
export * from "./getNpmPackageLatestVersion";
|
package/dist/utils/index.js
CHANGED
|
@@ -23,12 +23,11 @@ __exportStar(require("./getSapLogonConnections"), exports);
|
|
|
23
23
|
__exportStar(require("./logError"), exports);
|
|
24
24
|
__exportStar(require("./checkTrmDependencies"), exports);
|
|
25
25
|
__exportStar(require("./checkCliUpdate"), exports);
|
|
26
|
-
__exportStar(require("./
|
|
26
|
+
__exportStar(require("./getNodePackage"), exports);
|
|
27
27
|
__exportStar(require("./getClientVersion"), exports);
|
|
28
28
|
__exportStar(require("./getTempFolder"), exports);
|
|
29
29
|
__exportStar(require("./getLogFolder"), exports);
|
|
30
|
-
__exportStar(require("./
|
|
31
|
-
__exportStar(require("./getTrmDependencies"), exports);
|
|
30
|
+
__exportStar(require("./getClientNodeDependencies"), exports);
|
|
32
31
|
__exportStar(require("./getSystemConnector"), exports);
|
|
33
32
|
__exportStar(require("./NoConnection"), exports);
|
|
34
33
|
__exportStar(require("./getNpmPackageLatestVersion"), exports);
|
|
@@ -43,6 +43,8 @@ function registerCommand(command, args) {
|
|
|
43
43
|
}
|
|
44
44
|
if (requiresRegistry) {
|
|
45
45
|
command.option(`-r, --registry <registry>`, `Registry name.`);
|
|
46
|
+
command.option(`-re, --registryEndpoint <endpoint>`, `Registry endpoint.`);
|
|
47
|
+
command.option(`-ra, --registryAuth <authentication>`, `Registry authentication (in JSON format).`);
|
|
46
48
|
}
|
|
47
49
|
command.option(`-log, --logType <logType>`, `Log type.`, defaultLogger);
|
|
48
50
|
command.option(`-dbg, --debug`, `Debug logging.`, false);
|