trm-client 3.1.6 → 4.0.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/README.md +2 -2
- package/dist/commands/alias.js +95 -53
- package/dist/commands/arguments/ConnectArguments.d.ts +6 -0
- package/dist/commands/arguments/FindDependenciesArguments.d.ts +1 -0
- package/dist/commands/arguments/InstallArguments.d.ts +14 -12
- package/dist/commands/arguments/PublishArguments.d.ts +18 -12
- package/dist/commands/check.js +18 -6
- package/dist/commands/commons/CommandContext.d.ts +8 -0
- package/dist/commands/commons/CommandContext.js +19 -0
- package/dist/commands/commons/index.d.ts +1 -1
- package/dist/commands/commons/index.js +1 -1
- package/dist/commands/commons/viewRegistryPackage.js +9 -5
- package/dist/commands/compare.js +40 -20
- package/dist/commands/createAlias.js +41 -22
- package/dist/commands/findDependencies.js +11 -6
- package/dist/commands/info.js +98 -15
- package/dist/commands/install.js +46 -85
- package/dist/commands/login.js +5 -5
- package/dist/commands/logout.js +2 -2
- package/dist/commands/prompts/connect.js +123 -20
- package/dist/commands/publish.js +48 -139
- package/dist/commands/unpublish.js +2 -2
- package/dist/commands/update.js +1 -1
- package/dist/commands/view.js +2 -2
- package/dist/commands/whoami.js +1 -1
- package/dist/index.js +67 -56
- package/dist/systemAlias/SystemAlias.d.ts +8 -4
- package/dist/systemAlias/SystemAlias.js +131 -30
- package/dist/systemAlias/SystemAliasData.d.ts +4 -2
- package/dist/utils/checkTrmDependencies.d.ts +1 -1
- package/dist/utils/checkTrmDependencies.js +23 -7
- package/dist/utils/executeCommand.js +5 -16
- package/dist/utils/getSystemConnector.d.ts +9 -0
- package/dist/utils/getSystemConnector.js +32 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/logError.js +39 -39
- package/dist/utils/registerCommand.js +5 -3
- package/package.json +7 -4
- package/dist/commands/addRegistry.js.map +0 -1
- package/dist/commands/alias.js.map +0 -1
- package/dist/commands/arguments/AddRegistryArguments.js.map +0 -1
- package/dist/commands/arguments/AliasArguments.js.map +0 -1
- package/dist/commands/arguments/CheckArguments.js.map +0 -1
- package/dist/commands/arguments/CompareArguments.js.map +0 -1
- package/dist/commands/arguments/ConnectArguments.js.map +0 -1
- package/dist/commands/arguments/CreateAliasArguments.js.map +0 -1
- package/dist/commands/arguments/DeleteAliasArguments.js.map +0 -1
- package/dist/commands/arguments/FindDependenciesArguments.js.map +0 -1
- package/dist/commands/arguments/InfoArguments.js.map +0 -1
- package/dist/commands/arguments/InstallArguments.js.map +0 -1
- package/dist/commands/arguments/ListArguments.js.map +0 -1
- package/dist/commands/arguments/LoginArguments.js.map +0 -1
- package/dist/commands/arguments/LogoutArguments.js.map +0 -1
- package/dist/commands/arguments/PingArguments.js.map +0 -1
- package/dist/commands/arguments/PublishArguments.js.map +0 -1
- package/dist/commands/arguments/RemoveRegistryArguments.js.map +0 -1
- package/dist/commands/arguments/SettingsArgument.js.map +0 -1
- package/dist/commands/arguments/UnpublishArguments.js.map +0 -1
- package/dist/commands/arguments/UpdateArguments.js.map +0 -1
- package/dist/commands/arguments/ViewArguments.js.map +0 -1
- package/dist/commands/arguments/WhoAmIArguments.js.map +0 -1
- package/dist/commands/arguments/index.js.map +0 -1
- package/dist/commands/check.js.map +0 -1
- package/dist/commands/commons/CommandRegistry.d.ts +0 -5
- package/dist/commands/commons/CommandRegistry.js +0 -16
- package/dist/commands/commons/CommandRegistry.js.map +0 -1
- package/dist/commands/commons/index.js.map +0 -1
- package/dist/commands/commons/viewRegistryPackage.js.map +0 -1
- package/dist/commands/compare.js.map +0 -1
- package/dist/commands/createAlias.js.map +0 -1
- package/dist/commands/deleteAlias.js.map +0 -1
- package/dist/commands/findDependencies.js.map +0 -1
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/info.js.map +0 -1
- package/dist/commands/install.js.map +0 -1
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/logout.js.map +0 -1
- package/dist/commands/ping.js.map +0 -1
- package/dist/commands/prompts/connect.js.map +0 -1
- package/dist/commands/prompts/index.js.map +0 -1
- package/dist/commands/prompts/pickRegistry.js.map +0 -1
- package/dist/commands/publish.js.map +0 -1
- package/dist/commands/removeRegistry.js.map +0 -1
- package/dist/commands/settings.js.map +0 -1
- package/dist/commands/unpublish.js.map +0 -1
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/view.js.map +0 -1
- package/dist/commands/whoami.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/registryAlias/RegistryAlias.js.map +0 -1
- package/dist/registryAlias/RegistryAliasData.js.map +0 -1
- package/dist/registryAlias/index.js.map +0 -1
- package/dist/settings/Settings.js.map +0 -1
- package/dist/settings/SettingsData.js.map +0 -1
- package/dist/settings/index.js.map +0 -1
- package/dist/systemAlias/SystemAlias.js.map +0 -1
- package/dist/systemAlias/SystemAliasData.js.map +0 -1
- package/dist/systemAlias/index.js.map +0 -1
- package/dist/utils/TrmDependencies.d.ts +0 -10
- package/dist/utils/TrmDependencies.js +0 -25
- package/dist/utils/TrmDependencies.js.map +0 -1
- package/dist/utils/checkCliUpdate.js.map +0 -1
- package/dist/utils/checkTrmDependencies.js.map +0 -1
- package/dist/utils/executeCommand.js.map +0 -1
- package/dist/utils/getClientDependencies.js.map +0 -1
- package/dist/utils/getClientPackage.js.map +0 -1
- package/dist/utils/getClientVersion.js.map +0 -1
- package/dist/utils/getLogFolder.js.map +0 -1
- package/dist/utils/getRoamingFolder.js.map +0 -1
- package/dist/utils/getRoamingPath.js.map +0 -1
- package/dist/utils/getSapLogonConnections.js.map +0 -1
- package/dist/utils/getTempFolder.js.map +0 -1
- package/dist/utils/getTrmDependencies.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/logError.js.map +0 -1
- package/dist/utils/registerCommand.js.map +0 -1
- package/dist/utils/xml2js.js.map +0 -1
package/dist/commands/publish.js
CHANGED
|
@@ -37,103 +37,21 @@ const trm_core_1 = require("trm-core");
|
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
38
|
const utils_1 = require("../utils");
|
|
39
39
|
const commons_1 = require("./commons");
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
name: packageName,
|
|
43
|
-
version: packageVersion
|
|
44
|
-
};
|
|
45
|
-
if (manifestArg) {
|
|
46
|
-
manifestArg = manifestArg.trim();
|
|
47
|
-
var sInputManifest;
|
|
48
|
-
var oInputManifest;
|
|
49
|
-
if (manifestArg[0] === '{') {
|
|
50
|
-
sInputManifest = manifestArg;
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
sInputManifest = fs.readFileSync(manifestArg);
|
|
54
|
-
}
|
|
40
|
+
const _parseDependenciesArg = (arg) => {
|
|
41
|
+
if (arg) {
|
|
55
42
|
try {
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
catch (e) {
|
|
59
|
-
throw new Error('Input manifest: invalid JSON format.');
|
|
60
|
-
}
|
|
61
|
-
if (oInputManifest.private) {
|
|
62
|
-
manifest.private = oInputManifest.private ? true : false;
|
|
63
|
-
}
|
|
64
|
-
if (oInputManifest.backwardsCompatible) {
|
|
65
|
-
manifest.backwardsCompatible = oInputManifest.backwardsCompatible ? true : false;
|
|
66
|
-
}
|
|
67
|
-
if (oInputManifest.description && typeof (oInputManifest.description) === 'string') {
|
|
68
|
-
manifest.description;
|
|
69
|
-
}
|
|
70
|
-
if (oInputManifest.git && typeof (oInputManifest.git) === 'string') {
|
|
71
|
-
manifest.git;
|
|
72
|
-
}
|
|
73
|
-
if (oInputManifest.website && typeof (oInputManifest.website) === 'string') {
|
|
74
|
-
manifest.website;
|
|
75
|
-
}
|
|
76
|
-
if (oInputManifest.license && typeof (oInputManifest.license) === 'string') {
|
|
77
|
-
manifest.license;
|
|
78
|
-
}
|
|
79
|
-
if (oInputManifest.authors) {
|
|
80
|
-
if (typeof (oInputManifest.authors) === 'string') {
|
|
81
|
-
manifest.authors = oInputManifest.authors;
|
|
82
|
-
}
|
|
83
|
-
else if (Array.isArray(oInputManifest.authors)) {
|
|
84
|
-
manifest.authors = [];
|
|
85
|
-
oInputManifest.authors.forEach(o => {
|
|
86
|
-
if (o.name || o.email) {
|
|
87
|
-
manifest.authors.push({
|
|
88
|
-
name: o.name,
|
|
89
|
-
email: o.email
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
if (oInputManifest.keywords) {
|
|
96
|
-
if (typeof (oInputManifest.keywords) === 'string') {
|
|
97
|
-
manifest.keywords = oInputManifest.keywords;
|
|
98
|
-
}
|
|
99
|
-
else if (Array.isArray(oInputManifest.keywords)) {
|
|
100
|
-
manifest.keywords = [];
|
|
101
|
-
oInputManifest.keywords.forEach(o => {
|
|
102
|
-
if (typeof (o) === 'string') {
|
|
103
|
-
manifest.keywords.push(o);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
43
|
+
return JSON.parse(arg);
|
|
107
44
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (typeof (o) === 'string') {
|
|
116
|
-
manifest.keywords.push(o);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
if (Array.isArray(oInputManifest.dependencies)) {
|
|
122
|
-
manifest.dependencies = [];
|
|
123
|
-
oInputManifest.dependencies.forEach(o => {
|
|
124
|
-
if (o.name && o.version) {
|
|
125
|
-
manifest.dependencies.push({
|
|
126
|
-
name: o.name,
|
|
127
|
-
version: o.version,
|
|
128
|
-
registry: o.registry,
|
|
129
|
-
integrity: o.integrity
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
});
|
|
45
|
+
catch (e) { }
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const _parseSapEntriesArg = (arg) => {
|
|
49
|
+
if (arg) {
|
|
50
|
+
try {
|
|
51
|
+
return JSON.parse(arg);
|
|
133
52
|
}
|
|
134
|
-
|
|
53
|
+
catch (e) { }
|
|
135
54
|
}
|
|
136
|
-
return manifest;
|
|
137
55
|
};
|
|
138
56
|
const _parseReadmeArg = (arg) => {
|
|
139
57
|
if (arg) {
|
|
@@ -153,55 +71,46 @@ const _parseReleaseTimeoutArg = (arg) => {
|
|
|
153
71
|
catch (e) { }
|
|
154
72
|
}
|
|
155
73
|
};
|
|
156
|
-
const _parseCustTransportsArg = (arg) => {
|
|
157
|
-
if (arg) {
|
|
158
|
-
try {
|
|
159
|
-
return arg.split(/\s+/);
|
|
160
|
-
}
|
|
161
|
-
catch (e) {
|
|
162
|
-
return [];
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
74
|
function publish(commandArgs) {
|
|
167
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
76
|
+
const result = yield (0, trm_core_1.publish)({
|
|
77
|
+
contextData: {
|
|
78
|
+
logTemporaryFolder: (0, utils_1.getTempFolder)(),
|
|
79
|
+
systemPackages: commons_1.CommandContext.systemPackages,
|
|
80
|
+
noInquirer: commandArgs.noPrompts
|
|
81
|
+
},
|
|
82
|
+
packageData: {
|
|
83
|
+
name: commandArgs.package,
|
|
84
|
+
version: commandArgs.version,
|
|
85
|
+
devclass: commandArgs.devclass,
|
|
86
|
+
manifest: {
|
|
87
|
+
authors: commandArgs.authors,
|
|
88
|
+
backwardsCompatible: commandArgs.backwardsCompatible,
|
|
89
|
+
description: commandArgs.description,
|
|
90
|
+
git: commandArgs.git,
|
|
91
|
+
keywords: commandArgs.keywords,
|
|
92
|
+
license: commandArgs.license,
|
|
93
|
+
website: commandArgs.website,
|
|
94
|
+
dependencies: _parseDependenciesArg(commandArgs.dependencies),
|
|
95
|
+
sapEntries: _parseSapEntriesArg(commandArgs.sapEntries)
|
|
96
|
+
},
|
|
97
|
+
registry: commons_1.CommandContext.getRegistry()
|
|
98
|
+
},
|
|
99
|
+
publishData: {
|
|
100
|
+
private: commandArgs.private,
|
|
101
|
+
keepLatestReleaseManifestValues: commandArgs.keepLatestReleaseManifestValues,
|
|
102
|
+
noLanguageTransport: commandArgs.noLanguageTransport,
|
|
103
|
+
noDependenciesDetection: commandArgs.noDependenciesDetection,
|
|
104
|
+
skipCustomizingTransports: commandArgs.skipCustomizingTransports,
|
|
105
|
+
customizingTransports: commandArgs.customizingTransports,
|
|
106
|
+
readme: _parseReadmeArg(commandArgs.readme)
|
|
107
|
+
},
|
|
108
|
+
systemData: {
|
|
109
|
+
releaseTimeout: _parseReleaseTimeoutArg(commandArgs.releaseTimeout),
|
|
110
|
+
transportTarget: commandArgs.transportTarget
|
|
111
|
+
}
|
|
203
112
|
});
|
|
204
|
-
const sOutput = `+ ${
|
|
113
|
+
const sOutput = `+ ${result.trmPackage.manifest.get().name} ${result.trmPackage.manifest.get().version} on ${commons_1.CommandContext.getRegistry().name}`;
|
|
205
114
|
trm_core_1.Logger.success(sOutput);
|
|
206
115
|
});
|
|
207
116
|
}
|
|
@@ -34,13 +34,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
exports.unpublish = void 0;
|
|
36
36
|
const semver = __importStar(require("semver"));
|
|
37
|
-
const commons_1 = require("./commons");
|
|
38
37
|
const trm_core_1 = require("trm-core");
|
|
38
|
+
const commons_1 = require("./commons");
|
|
39
39
|
function unpublish(commandArgs) {
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const packageName = commandArgs.package;
|
|
42
42
|
const packageVersion = semver.clean(commandArgs.version || '');
|
|
43
|
-
const registry = commons_1.
|
|
43
|
+
const registry = commons_1.CommandContext.getRegistry();
|
|
44
44
|
if (!packageVersion) {
|
|
45
45
|
throw new Error(`Invalid version.`);
|
|
46
46
|
}
|
package/dist/commands/update.js
CHANGED
|
@@ -14,7 +14,7 @@ const install_1 = require("./install");
|
|
|
14
14
|
function update(commandArgs) {
|
|
15
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
16
|
var installArguments = commandArgs;
|
|
17
|
-
installArguments.
|
|
17
|
+
installArguments.overwrite = true;
|
|
18
18
|
yield (0, install_1.install)(installArguments);
|
|
19
19
|
});
|
|
20
20
|
}
|
package/dist/commands/view.js
CHANGED
|
@@ -16,7 +16,7 @@ const semver_1 = require("semver");
|
|
|
16
16
|
const registryAlias_1 = require("../registryAlias");
|
|
17
17
|
const _printHeaderSection = (packageName) => {
|
|
18
18
|
trm_core_1.Logger.info(`Package name: ${packageName}`);
|
|
19
|
-
trm_core_1.Logger.info(`Registry: ${commons_1.
|
|
19
|
+
trm_core_1.Logger.info(`Registry: ${commons_1.CommandContext.getRegistry().name}`);
|
|
20
20
|
};
|
|
21
21
|
const _printVersionSection = (systemPackage, registryView) => {
|
|
22
22
|
if (!systemPackage && !registryView) {
|
|
@@ -125,7 +125,7 @@ function view(commandArgs) {
|
|
|
125
125
|
const dest = trm_core_1.SystemConnector.getDest();
|
|
126
126
|
trm_core_1.Logger.loading(`Reading system data...`);
|
|
127
127
|
const aSystemPackages = yield trm_core_1.SystemConnector.getInstalledPackages(true);
|
|
128
|
-
const oSystemView = aSystemPackages.find(o => o.compareName(packageName) && o.compareRegistry(commons_1.
|
|
128
|
+
const oSystemView = aSystemPackages.find(o => o.compareName(packageName) && o.compareRegistry(commons_1.CommandContext.getRegistry()));
|
|
129
129
|
const oRegistryView = yield (0, commons_1.viewRegistryPackage)(packageName, true);
|
|
130
130
|
var authors;
|
|
131
131
|
var keywords;
|
package/dist/commands/whoami.js
CHANGED
|
@@ -15,7 +15,7 @@ const commons_1 = require("./commons");
|
|
|
15
15
|
function whoami(commandArgs) {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
try {
|
|
18
|
-
const whoAmI = yield commons_1.
|
|
18
|
+
const whoAmI = yield commons_1.CommandContext.getRegistry().whoAmI();
|
|
19
19
|
trm_core_1.Logger.info(`Username: ${whoAmI.username}`);
|
|
20
20
|
if (whoAmI.logonMessage) {
|
|
21
21
|
trm_core_1.Logger.registryResponse(whoAmI.logonMessage);
|
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ const logout = program.command(`logout`)
|
|
|
55
55
|
registryAuthBlacklist: [trm_registry_types_1.AuthenticationType.NO_AUTH]
|
|
56
56
|
});
|
|
57
57
|
const ping = program.command(`ping`)
|
|
58
|
-
.description(`
|
|
58
|
+
.description(`Ping trm-server.`);
|
|
59
59
|
(0, utils_1.registerCommand)(ping, {
|
|
60
60
|
requiresConnection: true,
|
|
61
61
|
requiresTrmDependencies: true
|
|
@@ -63,76 +63,86 @@ const ping = program.command(`ping`)
|
|
|
63
63
|
const publish = program.command(`publish <package> [version]`)
|
|
64
64
|
.description(`Publish package to registry.`)
|
|
65
65
|
.addHelpText(`before`, `When no version is defined, it will automatically set to:
|
|
66
|
-
- When it's the first
|
|
67
|
-
- When it's already published: the latest available
|
|
68
|
-
When it's the first publish, full manifest definition is asked
|
|
69
|
-
When a release is already published, the latest available manifest is used
|
|
70
|
-
Translation transport is only generated for packages that contain one or more objects with translations (unless skipped by
|
|
71
|
-
Customizing transport is only generated if a valid list of customizing transports is provided (unless skipped by
|
|
66
|
+
- When it's the first publish: 1.0.0
|
|
67
|
+
- When it's already published: the latest available release with patch increased by 1
|
|
68
|
+
When it's the first publish, full manifest definition is asked.
|
|
69
|
+
When a release is already published, the latest available manifest is used but can be overwritten.
|
|
70
|
+
Translation transport is only generated for packages that contain one or more objects with translations (unless skipped by flag).
|
|
71
|
+
Customizing transport is only generated if a valid list of customizing transports is provided (unless skipped by flag).
|
|
72
72
|
If a default manifest with dependencies is provided in conjunction with the automatic dependency generation, results will be merged.`)
|
|
73
|
-
.option(`-
|
|
74
|
-
.option(`-
|
|
75
|
-
.option(`-
|
|
76
|
-
.option(`-
|
|
77
|
-
.option(`-
|
|
78
|
-
.option(`-
|
|
79
|
-
.option(`-
|
|
80
|
-
.option(`-
|
|
81
|
-
.option(`-
|
|
82
|
-
.option(`-
|
|
83
|
-
.option(`-
|
|
84
|
-
.option(`-
|
|
85
|
-
.option(`-
|
|
86
|
-
.option(`-
|
|
73
|
+
.option(`-p, --private`, `Publish package with private visibility.`)
|
|
74
|
+
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false)
|
|
75
|
+
.option(`-km, --keepLatestReleaseManifestValues`, `Keep the latest release (if exists) manifest values as defaults.`, true)
|
|
76
|
+
.option(`-nl, --noLanguageTransport`, `Skip language (translations) transport publish.`, false)
|
|
77
|
+
.option(`-nd, --noDependenciesDetection`, `Skip automatic dependencies detection.`, false)
|
|
78
|
+
.option(`-sc, --skipCustomizingTransports`, `Skip customizing transports input.`, false)
|
|
79
|
+
.option(`-to, --releaseTimeout <timeout>`, `Publish transports release timeout (in seconds).`, '180')
|
|
80
|
+
.option(`-d, --devclass <devclass>`, `ABAP package to publish.`)
|
|
81
|
+
.option(`-cust, --customizingTransports <customizingTransports>`, `Customizing transports (separated by comma).`)
|
|
82
|
+
.option(`-rm, --readme <readme>`, `Path to file or value of readme.`)
|
|
83
|
+
.option(`-tt, --transportTarget <transportTarget>`, `Publish transports target.`)
|
|
84
|
+
.option(`-bc, --backwardsCompatible`, `Indicates backwards compatibility with older releases.`, true)
|
|
85
|
+
.option(`-sd, --description`, `Short description of the package.`)
|
|
86
|
+
.option(`-gl, --git <link>`, `Git link.`)
|
|
87
|
+
.option(`-wl, --website <link>`, `Website link.`)
|
|
88
|
+
.option(`-pl, --license <license>`, `Package license.`)
|
|
89
|
+
.option(`-pa, --authors <authors>`, `Package authors (separated by comma).`)
|
|
90
|
+
.option(`-pk, --keywords <keywords>`, `Package keywords (separated by comma).`)
|
|
91
|
+
.option(`-pd, --dependencies <JSON>`, `Package dependencies (in JSON format).`)
|
|
92
|
+
.option(`-ps, --sapEntries <JSON>`, `Package SAP entries (in JSON format).`);
|
|
87
93
|
(0, utils_1.registerCommand)(publish, {
|
|
88
94
|
requiresConnection: true,
|
|
89
95
|
requiresRegistry: true,
|
|
90
96
|
requiresTrmDependencies: true
|
|
91
97
|
});
|
|
92
|
-
const unpublish = program.command(`unpublish <package>
|
|
98
|
+
const unpublish = program.command(`unpublish <package> [version]`)
|
|
93
99
|
.description(`Unpublish a package release from registry.`);
|
|
94
100
|
(0, utils_1.registerCommand)(unpublish, {
|
|
95
101
|
requiresRegistry: true
|
|
96
102
|
});
|
|
97
103
|
const install = program.command(`install <package> [version]`)
|
|
98
|
-
.description(`Install package from registry
|
|
99
|
-
.addHelpText(`before`, `When no version is specified, the latest will be installed
|
|
100
|
-
|
|
101
|
-
.option(`-
|
|
102
|
-
.option(`-
|
|
103
|
-
.option(`-
|
|
104
|
-
.option(`-
|
|
105
|
-
.option(`-
|
|
106
|
-
.option(`-
|
|
107
|
-
.option(`-
|
|
108
|
-
.option(`-
|
|
109
|
-
.option(`-
|
|
110
|
-
.option(`-
|
|
111
|
-
.option(`-
|
|
112
|
-
.option(`-
|
|
113
|
-
.option(`-
|
|
114
|
-
.option(`-
|
|
104
|
+
.description(`Install package from registry into system.`)
|
|
105
|
+
.addHelpText(`before`, `When no version is specified, the latest will be installed.`)
|
|
106
|
+
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false)
|
|
107
|
+
.option(`-ow, --overwrite`, `Overwrite installation (allow re-install).`, false)
|
|
108
|
+
.option(`-sf, --safe`, `Safe install (needs package integrity).`, false)
|
|
109
|
+
.option(`-nd, --noDependencies`, `Skip check/install of package dependencies.`, false)
|
|
110
|
+
.option(`-no, --noObjectTypes`, `Skip check of package object types.`, false)
|
|
111
|
+
.option(`-ns, --noSapEntries`, `Skip check of package SAP entries/objects.`, false)
|
|
112
|
+
.option(`-nl, --noLanguageTransport`, `Skip install of language (translations) transport (if exists).`, false)
|
|
113
|
+
.option(`-nc, --noCustomizingTransport`, `Skip install of customizing transport (if exists).`, false)
|
|
114
|
+
.option(`-to, --importTimeout <timeout>`, `Install transports import timeout (in seconds).`, '180')
|
|
115
|
+
.option(`-kd, --keepOriginalPackages`, `Keep original ABAP packages names.`, false)
|
|
116
|
+
.option(`-it, --createInstallTransport`, `Create/update install transport (used for landscape transports).`, true)
|
|
117
|
+
.option(`-r3, --r3transPath <path>`, `R3trans program path. (default: Environment variable R3TRANS_HOME)`)
|
|
118
|
+
.option(`-sha, --integrity <sha>`, `Package integrity.`)
|
|
119
|
+
.option(`-tl, --transportLayer <transportLayer>`, `ABAP packages transport layer. (default: System default)`)
|
|
120
|
+
.option(`-tl, --packageReplacements <JSON>`, `ABAP package replacements in JSON format.`)
|
|
121
|
+
.option(`-itt, --installTransportTargetSys <transportTarget>`, `Install transport target system.`);
|
|
115
122
|
(0, utils_1.registerCommand)(install, {
|
|
116
123
|
requiresConnection: true,
|
|
117
124
|
requiresRegistry: true,
|
|
118
125
|
requiresTrmDependencies: true
|
|
119
126
|
});
|
|
120
127
|
const update = program.command(`update <package> [version]`)
|
|
121
|
-
.description(`Update package from registry
|
|
128
|
+
.description(`Update package from registry into system.`)
|
|
129
|
+
.description(`Install package from registry into system.`)
|
|
122
130
|
.addHelpText(`before`, `When no version is specified, the latest will be installed.`)
|
|
123
|
-
.option(`-
|
|
124
|
-
.option(`-
|
|
125
|
-
.option(`-
|
|
126
|
-
.option(`-
|
|
127
|
-
.option(`-
|
|
128
|
-
.option(`-
|
|
129
|
-
.option(`-
|
|
130
|
-
.option(`-
|
|
131
|
-
.option(`-
|
|
132
|
-
.option(`-
|
|
133
|
-
.option(`-
|
|
134
|
-
.option(`-
|
|
135
|
-
.option(`-
|
|
131
|
+
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false)
|
|
132
|
+
.option(`-sf, --safe`, `Safe install (needs package integrity).`, false)
|
|
133
|
+
.option(`-nd, --noDependencies`, `Skip check/install of package dependencies.`, false)
|
|
134
|
+
.option(`-no, --noObjectTypes`, `Skip check of package object types.`, false)
|
|
135
|
+
.option(`-ns, --noSapEntries`, `Skip check of package SAP entries/objects.`, false)
|
|
136
|
+
.option(`-nl, --noLanguageTransport`, `Skip install of language (translations) transport (if exists).`, false)
|
|
137
|
+
.option(`-nc, --noCustomizingTransport`, `Skip install of customizing transport (if exists).`, false)
|
|
138
|
+
.option(`-to, --importTimeout <timeout>`, `Install transports import timeout (in seconds).`, '180')
|
|
139
|
+
.option(`-kd, --keepOriginalPackages`, `Keep original ABAP packages names.`, false)
|
|
140
|
+
.option(`-it, --createInstallTransport`, `Create/update install transport (used for landscape transports).`, true)
|
|
141
|
+
.option(`-r3, --r3transPath <path>`, `R3trans program path. (default: Environment variable R3TRANS_HOME)`)
|
|
142
|
+
.option(`-sha, --integrity <sha>`, `Package integrity.`)
|
|
143
|
+
.option(`-tl, --transportLayer <transportLayer>`, `ABAP packages transport layer. (default: System default)`)
|
|
144
|
+
.option(`-tl, --packageReplacements <JSON>`, `ABAP package replacements in JSON format.`)
|
|
145
|
+
.option(`-itt, --installTransportTargetSys <transportTarget>`, `Install transport target system.`);
|
|
136
146
|
(0, utils_1.registerCommand)(update, {
|
|
137
147
|
requiresConnection: true,
|
|
138
148
|
requiresRegistry: true,
|
|
@@ -161,15 +171,16 @@ const list = program.command(`list`)
|
|
|
161
171
|
});
|
|
162
172
|
const check = program.command(`check <package>`)
|
|
163
173
|
.description(`Analyze installed package status on a system.`)
|
|
164
|
-
.option(`-at, --analysisType`, `Analysis type.`);
|
|
174
|
+
.option(`-at, --analysisType`, `Analysis type (DEPENDENCIES, SAPENTRIES or ALL).`);
|
|
165
175
|
(0, utils_1.registerCommand)(check, {
|
|
166
176
|
requiresConnection: true,
|
|
167
177
|
requiresRegistry: true,
|
|
168
178
|
ignoreRegistryUnreachable: true
|
|
169
179
|
});
|
|
170
180
|
const findDependencies = program.command(`findDependencies <devclass>`)
|
|
171
|
-
.description(`Find SAP package dependencies with custom packages/trm packages/SAP
|
|
172
|
-
.option(`-se, --sapEntries`, `Show list of required SAP
|
|
181
|
+
.description(`Find SAP package dependencies with custom packages/trm packages/SAP entries/objects.`)
|
|
182
|
+
.option(`-se, --sapEntries`, `Show list of required SAP entries/objects.`, false)
|
|
183
|
+
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false);
|
|
173
184
|
(0, utils_1.registerCommand)(findDependencies, {
|
|
174
185
|
requiresConnection: true
|
|
175
186
|
});
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SystemConnectorType } from "../utils";
|
|
2
2
|
import { SystemAliasData } from "./SystemAliasData";
|
|
3
|
+
import { ISystemConnector, Login, RESTConnection, RFCConnection } from "trm-core";
|
|
4
|
+
import { ConnectArguments } from "../commands";
|
|
3
5
|
export declare class SystemAlias {
|
|
6
|
+
type: SystemConnectorType;
|
|
4
7
|
private _connection;
|
|
5
8
|
private _login;
|
|
6
|
-
constructor(_connection:
|
|
7
|
-
getConnection():
|
|
9
|
+
constructor(type: SystemConnectorType, _connection: RFCConnection | RESTConnection, _login: Login);
|
|
10
|
+
getConnection(): ISystemConnector;
|
|
8
11
|
private static generateFile;
|
|
9
12
|
private static getSystemAliasFilePath;
|
|
10
13
|
static getAll(): SystemAliasData[];
|
|
11
14
|
static get(name: string): SystemAlias;
|
|
12
|
-
static create(name: string, connection:
|
|
15
|
+
static create(name: string, type: SystemConnectorType, connection: RFCConnection | RESTConnection, login: Login): SystemAlias;
|
|
13
16
|
static delete(name: string): void;
|
|
17
|
+
static createIfNotExists(connArgs: ConnectArguments): Promise<void>;
|
|
14
18
|
}
|