trm-client 9.4.0 → 10.0.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.
- package/changelog.txt +12 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +78 -0
- package/dist/command/AbstractCommand.d.ts +9 -4
- package/dist/command/AbstractCommand.js +82 -34
- package/dist/command/implementations/Alias.d.ts +2 -1
- package/dist/command/implementations/Alias.js +44 -13
- package/dist/command/implementations/Cg3y.d.ts +2 -1
- package/dist/command/implementations/Cg3y.js +18 -7
- package/dist/command/implementations/Cg3z.d.ts +2 -1
- package/dist/command/implementations/Cg3z.js +18 -7
- package/dist/command/implementations/ClearCache.d.ts +2 -1
- package/dist/command/implementations/ClearCache.js +11 -3
- package/dist/command/implementations/Compare.d.ts +2 -1
- package/dist/command/implementations/Compare.js +20 -7
- package/dist/command/implementations/Content.d.ts +2 -1
- package/dist/command/implementations/Content.js +21 -9
- package/dist/command/implementations/Deprecate.d.ts +2 -1
- package/dist/command/implementations/Deprecate.js +19 -7
- package/dist/command/implementations/Dirty.d.ts +2 -1
- package/dist/command/implementations/Dirty.js +21 -8
- package/dist/command/implementations/DistTag.d.ts +2 -1
- package/dist/command/implementations/DistTag.js +38 -14
- package/dist/command/implementations/FindDependencies.d.ts +2 -1
- package/dist/command/implementations/FindDependencies.js +20 -8
- package/dist/command/implementations/Info.d.ts +2 -1
- package/dist/command/implementations/Info.js +16 -6
- package/dist/command/implementations/Install.d.ts +4 -1
- package/dist/command/implementations/Install.js +118 -43
- package/dist/command/implementations/List.d.ts +2 -1
- package/dist/command/implementations/List.js +19 -6
- package/dist/command/implementations/Lock.d.ts +2 -1
- package/dist/command/implementations/Lock.js +21 -8
- package/dist/command/implementations/Login.d.ts +2 -1
- package/dist/command/implementations/Login.js +26 -8
- package/dist/command/implementations/Logout.d.ts +2 -1
- package/dist/command/implementations/Logout.js +17 -7
- package/dist/command/implementations/Ping.d.ts +2 -1
- package/dist/command/implementations/Ping.js +15 -5
- package/dist/command/implementations/Publish.d.ts +3 -1
- package/dist/command/implementations/Publish.js +70 -40
- package/dist/command/implementations/Registry.d.ts +2 -1
- package/dist/command/implementations/Registry.js +39 -12
- package/dist/command/implementations/Settings.d.ts +2 -1
- package/dist/command/implementations/Settings.js +18 -6
- package/dist/command/implementations/Unpublish.d.ts +2 -1
- package/dist/command/implementations/Unpublish.js +17 -6
- package/dist/command/implementations/View.d.ts +2 -1
- package/dist/command/implementations/View.js +22 -11
- package/dist/command/implementations/WhoAmI.d.ts +2 -1
- package/dist/command/implementations/WhoAmI.js +17 -7
- package/dist/command/implementations/index.d.ts +27 -0
- package/dist/command/implementations/index.js +65 -0
- package/dist/command/index.d.ts +2 -0
- package/dist/command/index.js +2 -0
- package/dist/command/metadata/CommandMetadata.d.ts +55 -0
- package/dist/command/metadata/CommandMetadata.js +2 -0
- package/dist/command/metadata/applyCommandMetadata.d.ts +3 -0
- package/dist/command/metadata/applyCommandMetadata.js +26 -0
- package/dist/command/metadata/helpers.d.ts +5 -0
- package/dist/command/metadata/helpers.js +42 -0
- package/dist/command/metadata/index.d.ts +3 -0
- package/dist/command/metadata/index.js +19 -0
- package/dist/command/runCommandHandler.d.ts +2 -0
- package/dist/command/runCommandHandler.js +24 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +19 -75
- package/dist/utils/GlobalContext.d.ts +3 -1
- package/dist/utils/GlobalContext.js +28 -20
- package/dist/utils/SettingsData.d.ts +4 -0
- package/package.json +5 -6
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CommandArgumentMetadata, CommandFieldMetadata, CommandOptionMetadata } from "./CommandMetadata";
|
|
2
|
+
type FieldArgs = Omit<CommandFieldMetadata, "required" | "control"> & Partial<Pick<CommandFieldMetadata, "required" | "control">>;
|
|
3
|
+
export declare function argument(position: number, args: FieldArgs): CommandArgumentMetadata;
|
|
4
|
+
export declare function option(flags: string, args: FieldArgs): CommandOptionMetadata;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.argument = argument;
|
|
4
|
+
exports.option = option;
|
|
5
|
+
function argument(position, args) {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
return {
|
|
8
|
+
kind: "argument",
|
|
9
|
+
position,
|
|
10
|
+
name: args.name,
|
|
11
|
+
cliName: args.cliName,
|
|
12
|
+
label: args.label,
|
|
13
|
+
description: args.description,
|
|
14
|
+
required: (_a = args.required) !== null && _a !== void 0 ? _a : true,
|
|
15
|
+
control: (_b = args.control) !== null && _b !== void 0 ? _b : "text-input",
|
|
16
|
+
defaultValue: args.defaultValue,
|
|
17
|
+
choices: args.choices,
|
|
18
|
+
placeholder: args.placeholder,
|
|
19
|
+
multiple: args.multiple,
|
|
20
|
+
sensitive: args.sensitive,
|
|
21
|
+
guiRelevant: args.guiRelevant
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function option(flags, args) {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
return {
|
|
27
|
+
kind: "option",
|
|
28
|
+
flags,
|
|
29
|
+
name: args.name,
|
|
30
|
+
cliName: args.cliName,
|
|
31
|
+
label: args.label,
|
|
32
|
+
description: args.description,
|
|
33
|
+
required: (_a = args.required) !== null && _a !== void 0 ? _a : false,
|
|
34
|
+
control: (_b = args.control) !== null && _b !== void 0 ? _b : "text-input",
|
|
35
|
+
defaultValue: args.defaultValue,
|
|
36
|
+
choices: args.choices,
|
|
37
|
+
placeholder: args.placeholder,
|
|
38
|
+
multiple: args.multiple,
|
|
39
|
+
sensitive: args.sensitive,
|
|
40
|
+
guiRelevant: args.guiRelevant
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CommandMetadata"), exports);
|
|
18
|
+
__exportStar(require("./applyCommandMetadata"), exports);
|
|
19
|
+
__exportStar(require("./helpers"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.runCommandHandler = runCommandHandler;
|
|
13
|
+
const implementations_1 = require("./implementations");
|
|
14
|
+
function runCommandHandler(id_1) {
|
|
15
|
+
return __awaiter(this, arguments, void 0, function* (id, values = {}) {
|
|
16
|
+
const commandClass = (0, implementations_1.getCommand)(id);
|
|
17
|
+
const metadata = (0, implementations_1.getCommandMetadata)(id);
|
|
18
|
+
if (!commandClass || !metadata) {
|
|
19
|
+
throw new Error(`Unknown command metadata id "${id}".`);
|
|
20
|
+
}
|
|
21
|
+
const command = new commandClass(metadata.command, metadata.aliases, metadata.subcommand);
|
|
22
|
+
yield command.run(values);
|
|
23
|
+
});
|
|
24
|
+
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,78 +1,22 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
"use strict";
|
|
3
|
-
var
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5
15
|
};
|
|
6
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
quiet: true
|
|
14
|
-
});
|
|
15
|
-
const program = new commander_1.Command();
|
|
16
|
-
program
|
|
17
|
-
.name(`trm`)
|
|
18
|
-
.description(`${trm_core_1.Transport.getTransportIcon()} TRM - Transport Request Manager CLI
|
|
19
|
-
|
|
20
|
-
Full documentation available at https://docs.trmregistry.com/
|
|
21
|
-
Public registry at https://trmregistry.com/
|
|
22
|
-
|
|
23
|
-
© 2023 RegestaItalia https://regestaitalia.eu/`)
|
|
24
|
-
.version(process.env.DEVELOPMENT && process.env.DEVELOPMENT.toLowerCase().trim() === 'true' ? 'Development' : (0, utils_1.getClientVersion)());
|
|
25
|
-
program.configureHelp({
|
|
26
|
-
sortSubcommands: true,
|
|
27
|
-
visibleCommands: (cmd) => {
|
|
28
|
-
var commands = [];
|
|
29
|
-
cmd.commands.forEach(c => {
|
|
30
|
-
if (c.description()) {
|
|
31
|
-
commands.push(c);
|
|
32
|
-
}
|
|
33
|
-
c.commands.forEach(s => {
|
|
34
|
-
commands.push(s);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
return commands;
|
|
38
|
-
},
|
|
39
|
-
subcommandTerm: (cmd) => {
|
|
40
|
-
var term = `${cmd.name()} ${cmd.usage()}`;
|
|
41
|
-
if (cmd.parent.name() !== program.name()) {
|
|
42
|
-
term = `${cmd.parent.name()} ${cmd.name()} ${cmd.usage()}`;
|
|
43
|
-
}
|
|
44
|
-
return term;
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
new implementations_1.Ping(program, 'ping').register();
|
|
48
|
-
new implementations_1.Info(program, 'info').register();
|
|
49
|
-
new implementations_1.Registry(program, 'registry', null, 'add').register();
|
|
50
|
-
new implementations_1.Registry(program, 'registry', null, 'rm').register();
|
|
51
|
-
new implementations_1.Login(program, 'login').register();
|
|
52
|
-
new implementations_1.WhoAmI(program, 'whoami').register();
|
|
53
|
-
new implementations_1.Logout(program, 'logout').register();
|
|
54
|
-
new implementations_1.Alias(program, 'alias').register();
|
|
55
|
-
new implementations_1.Alias(program, 'alias', null, 'create').register();
|
|
56
|
-
new implementations_1.Alias(program, 'alias', null, 'delete').register();
|
|
57
|
-
new implementations_1.Publish(program, 'publish').register();
|
|
58
|
-
new implementations_1.DistTag(program, 'dist-tag', null, 'add').register();
|
|
59
|
-
new implementations_1.DistTag(program, 'dist-tag', null, 'rm').register();
|
|
60
|
-
new implementations_1.Publish(program, 'pack', ['export']).register();
|
|
61
|
-
new implementations_1.Lock(program, 'lock', ['lock-file']).register();
|
|
62
|
-
new implementations_1.Unpublish(program, 'unpublish').register();
|
|
63
|
-
new implementations_1.Deprecate(program, 'deprecate').register();
|
|
64
|
-
new implementations_1.Install(program, 'install', ['i']).register();
|
|
65
|
-
new implementations_1.Install(program, 'clean-install', ['ci']).register();
|
|
66
|
-
new implementations_1.Install(program, 'update').register();
|
|
67
|
-
new implementations_1.Install(program, 'import').register();
|
|
68
|
-
new implementations_1.List(program, 'list', ['ls']).register();
|
|
69
|
-
new implementations_1.Content(program, 'content', ['contents']).register();
|
|
70
|
-
new implementations_1.View(program, 'view').register();
|
|
71
|
-
new implementations_1.Compare(program, 'compare').register();
|
|
72
|
-
new implementations_1.Dirty(program, 'dirty').register();
|
|
73
|
-
new implementations_1.FindDependencies(program, 'find-dependencies').register();
|
|
74
|
-
new implementations_1.Cg3y(program, 'cg3y').register();
|
|
75
|
-
new implementations_1.Cg3z(program, 'cg3z').register();
|
|
76
|
-
new implementations_1.Settings(program, 'settings').register();
|
|
77
|
-
new implementations_1.ClearCache(program, 'clear-cache').register();
|
|
78
|
-
program.parse(process.argv);
|
|
17
|
+
__exportStar(require("./command"), exports);
|
|
18
|
+
__exportStar(require("./command/implementations"), exports);
|
|
19
|
+
__exportStar(require("./command/prompts"), exports);
|
|
20
|
+
__exportStar(require("./registryAlias"), exports);
|
|
21
|
+
__exportStar(require("./systemAlias"), exports);
|
|
22
|
+
__exportStar(require("./utils"), exports);
|
|
@@ -7,7 +7,6 @@ export declare class GlobalContext {
|
|
|
7
7
|
private _cache;
|
|
8
8
|
private _connections;
|
|
9
9
|
private _plugins;
|
|
10
|
-
private _dockerized;
|
|
11
10
|
constructor();
|
|
12
11
|
getSettings(): SettingsData;
|
|
13
12
|
getGlobalNodeModules(): string;
|
|
@@ -26,6 +25,9 @@ export declare class GlobalContext {
|
|
|
26
25
|
private getSettingsInternal;
|
|
27
26
|
clearCache(): void;
|
|
28
27
|
private getCacheInternal;
|
|
28
|
+
private isCacheData;
|
|
29
|
+
private isCacheEntryValid;
|
|
30
|
+
private isStringCacheEntryValid;
|
|
29
31
|
private generateSettingsFile;
|
|
30
32
|
private generateCacheFile;
|
|
31
33
|
static getInstance(): GlobalContext;
|
|
@@ -52,6 +52,7 @@ const fs = __importStar(require("fs"));
|
|
|
52
52
|
const ini = __importStar(require("ini"));
|
|
53
53
|
const trm_commons_1 = require("trm-commons");
|
|
54
54
|
const trm_core_1 = require("trm-core");
|
|
55
|
+
const registryAlias_1 = require("../registryAlias");
|
|
55
56
|
const CACHE_FILE_NAME = ".cache";
|
|
56
57
|
const SETTINGS_FILE_NAME = "settings.ini";
|
|
57
58
|
class RESTConnectExtended extends trm_commons_1.RESTConnect {
|
|
@@ -71,7 +72,6 @@ class GlobalContext {
|
|
|
71
72
|
this._pluginsLoaded = false;
|
|
72
73
|
this._connections = [];
|
|
73
74
|
this._plugins = [];
|
|
74
|
-
this._dockerized = process.env.TRM_DOCKERIZED === 'true';
|
|
75
75
|
this._settings = this.getSettingsInternal();
|
|
76
76
|
this._cache = this.getCacheInternal();
|
|
77
77
|
if (typeof (this._settings.r3transDocker) !== 'boolean') {
|
|
@@ -85,19 +85,22 @@ class GlobalContext {
|
|
|
85
85
|
return this._settings;
|
|
86
86
|
}
|
|
87
87
|
getGlobalNodeModules() {
|
|
88
|
-
if (!this._cache.globalNpmPath) {
|
|
88
|
+
if (!this.isStringCacheEntryValid(this._cache.globalNpmPath, this.getSettings().npmGlobalPathCheckCache)) {
|
|
89
89
|
this.setGlobalNpmPathInternal();
|
|
90
90
|
}
|
|
91
91
|
return this._cache.globalNpmPath.data;
|
|
92
92
|
}
|
|
93
93
|
getLatestVersion() {
|
|
94
|
+
if (!this.isStringCacheEntryValid(this._cache.latestVersion)) {
|
|
95
|
+
throw new Error(`Client latest version cache is not loaded.`);
|
|
96
|
+
}
|
|
94
97
|
return this._cache.latestVersion.data;
|
|
95
98
|
}
|
|
96
99
|
load() {
|
|
97
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
101
|
this.setGlobalNpmPathInternal();
|
|
99
102
|
const latestVersionCache = this._cache.latestVersion;
|
|
100
|
-
if (!
|
|
103
|
+
if (!this.isStringCacheEntryValid(latestVersionCache, this.getSettings().cliUpdateCheckCache)) {
|
|
101
104
|
trm_commons_1.Logger.loading(`Cache expired, setting client latest version...`, true);
|
|
102
105
|
const version = (yield (0, _1.getNpmPackageLatestVersion)('trm-client')).latest;
|
|
103
106
|
trm_commons_1.Logger.log(`Client latest version set to ${version}`, true);
|
|
@@ -164,29 +167,22 @@ class GlobalContext {
|
|
|
164
167
|
if (!sapLandscape || !fs.existsSync(sapLandscape)) {
|
|
165
168
|
sapLandscape = undefined;
|
|
166
169
|
}
|
|
170
|
+
const registryAliases = registryAlias_1.RegistryAlias.getAll();
|
|
167
171
|
return {
|
|
168
172
|
loggerType: 'CLI',
|
|
169
173
|
logOutputFolder: 'default',
|
|
170
174
|
cliUpdateCheckCache: 60,
|
|
171
175
|
npmGlobalPathCheckCache: 180,
|
|
176
|
+
guiRegistryAutoconnect: registryAliases.length === 1,
|
|
177
|
+
guiRegistryAutoconnectAlias: registryAliases.length === 1 ? registryAliases[0].alias : undefined,
|
|
178
|
+
guiSystemAutoconnect: false,
|
|
172
179
|
sapLandscape
|
|
173
180
|
};
|
|
174
181
|
}
|
|
175
182
|
setGlobalNpmPathInternal() {
|
|
176
183
|
var path;
|
|
177
|
-
if (this._dockerized) {
|
|
178
|
-
trm_commons_1.Logger.log(`TRM running in docker environment, ignoring cache and recalculating NPM global path`, true);
|
|
179
|
-
path = (0, trm_commons_1.getGlobalNodeModules)();
|
|
180
|
-
this._cache['globalNpmPath'] = {
|
|
181
|
-
ts: -1,
|
|
182
|
-
data: path
|
|
183
|
-
};
|
|
184
|
-
trm_commons_1.Logger.log(`Npm global modules path set to ${path}`, true);
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
184
|
const globalNpmPathCache = this._cache.globalNpmPath;
|
|
188
|
-
|
|
189
|
-
if (isValid) {
|
|
185
|
+
if (this.isStringCacheEntryValid(globalNpmPathCache, this.getSettings().npmGlobalPathCheckCache)) {
|
|
190
186
|
return globalNpmPathCache.data;
|
|
191
187
|
}
|
|
192
188
|
trm_commons_1.Logger.loading(`Cache expired, setting npm global modules path...`, true);
|
|
@@ -224,23 +220,35 @@ class GlobalContext {
|
|
|
224
220
|
}
|
|
225
221
|
clearCache() {
|
|
226
222
|
const filePath = this.getCacheFilePath();
|
|
227
|
-
this.
|
|
223
|
+
this._cache = {};
|
|
224
|
+
this.generateCacheFile(this._cache, filePath);
|
|
228
225
|
}
|
|
229
226
|
getCacheInternal() {
|
|
230
227
|
const filePath = this.getCacheFilePath();
|
|
231
228
|
if (fs.existsSync(filePath)) {
|
|
232
229
|
try {
|
|
233
|
-
|
|
234
|
-
if (this.
|
|
235
|
-
|
|
230
|
+
const data = JSON.parse(fs.readFileSync(filePath).toString());
|
|
231
|
+
if (this.isCacheData(data)) {
|
|
232
|
+
return data;
|
|
236
233
|
}
|
|
237
|
-
return data;
|
|
238
234
|
}
|
|
239
235
|
catch (e) { }
|
|
240
236
|
}
|
|
241
237
|
this.generateCacheFile({}, filePath);
|
|
242
238
|
return {};
|
|
243
239
|
}
|
|
240
|
+
isCacheData(data) {
|
|
241
|
+
return !!data && typeof data === 'object' && !Array.isArray(data);
|
|
242
|
+
}
|
|
243
|
+
isCacheEntryValid(cache, ttlSeconds) {
|
|
244
|
+
if (!cache || typeof cache !== 'object' || typeof cache.ts !== 'number' || Number.isNaN(cache.ts) || cache.data === undefined || cache.data === null) {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
return ttlSeconds === undefined || Date.now() - cache.ts < ttlSeconds * 1000;
|
|
248
|
+
}
|
|
249
|
+
isStringCacheEntryValid(cache, ttlSeconds) {
|
|
250
|
+
return this.isCacheEntryValid(cache, ttlSeconds) && typeof cache.data === 'string' && cache.data.length > 0;
|
|
251
|
+
}
|
|
244
252
|
generateSettingsFile(data, filePath) {
|
|
245
253
|
fs.writeFileSync(filePath, ini.encode(data), { encoding: 'utf8', flag: 'w' });
|
|
246
254
|
}
|
|
@@ -3,6 +3,10 @@ export type SettingsData = {
|
|
|
3
3
|
logOutputFolder: string;
|
|
4
4
|
cliUpdateCheckCache: number;
|
|
5
5
|
npmGlobalPathCheckCache: number;
|
|
6
|
+
guiRegistryAutoconnect: boolean;
|
|
7
|
+
guiRegistryAutoconnectAlias?: string;
|
|
8
|
+
guiSystemAutoconnect: boolean;
|
|
9
|
+
guiSystemAutoconnectAlias?: string;
|
|
6
10
|
sapLandscape?: string;
|
|
7
11
|
r3transDocker?: boolean;
|
|
8
12
|
r3transDockerName?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trm-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "TRM (Transport Request Manager) Client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"!dist/dev_rfc.log"
|
|
15
15
|
],
|
|
16
16
|
"bin": {
|
|
17
|
-
"trm": "dist/
|
|
17
|
+
"trm": "dist/cli.js"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"cleanBuild": "rimraf dist/",
|
|
@@ -41,19 +41,18 @@
|
|
|
41
41
|
"chalk": "^4.1.2",
|
|
42
42
|
"commander": "^11.0.0",
|
|
43
43
|
"dotenv": "^17.2.2",
|
|
44
|
-
"execa": "^9.6.0",
|
|
45
44
|
"i": "^0.3.7",
|
|
46
45
|
"ini": "^4.1.1",
|
|
47
46
|
"lodash": "^4.17.21",
|
|
48
47
|
"sanitize-filename": "^1.6.3",
|
|
49
48
|
"semver": "^7.7.4",
|
|
50
|
-
"trm-commons": "^5.0.
|
|
51
|
-
"trm-core": "^9.8.
|
|
49
|
+
"trm-commons": "^5.0.1",
|
|
50
|
+
"trm-core": "^9.8.1",
|
|
52
51
|
"trm-registry-types": "^2.1.0",
|
|
53
52
|
"xml2js": "^0.6.2"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
56
|
-
"trm-commons": "^5.0.
|
|
55
|
+
"trm-commons": "^5.0.1"
|
|
57
56
|
},
|
|
58
57
|
"devDependencies": {
|
|
59
58
|
"@types/ini": "^1.3.31",
|