trm-client 7.0.0 → 7.0.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/changelog.txt
CHANGED
|
@@ -8,6 +8,16 @@ Legend
|
|
|
8
8
|
+ : added
|
|
9
9
|
- : removed
|
|
10
10
|
|
|
11
|
+
2025-11-07 v7.0.2
|
|
12
|
+
-------------------
|
|
13
|
+
* deprecate typo
|
|
14
|
+
* hide loading packages with dummy connector
|
|
15
|
+
|
|
16
|
+
2025-11-07 v7.0.1
|
|
17
|
+
-------------------
|
|
18
|
+
+ docker running check in darwin os
|
|
19
|
+
* hide loading packages with dummy connector
|
|
20
|
+
|
|
11
21
|
2025-11-07 v7.0.0
|
|
12
22
|
-------------------
|
|
13
23
|
! trm-core ^8.1.3
|
|
@@ -132,8 +132,13 @@ class AbstractCommand {
|
|
|
132
132
|
getSystemPackages() {
|
|
133
133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
134
134
|
if (!this.systemPackages) {
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
if (Core.SystemConnector.systemConnector instanceof utils_1.DummyConnector) {
|
|
136
|
+
this.systemPackages = [];
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
Commons.Logger.loading(`Reading "${Core.SystemConnector.getDest()}" packages...`);
|
|
140
|
+
this.systemPackages = yield Core.SystemConnector.getInstalledPackages(true, true, true);
|
|
141
|
+
}
|
|
137
142
|
}
|
|
138
143
|
return this.systemPackages;
|
|
139
144
|
});
|
|
@@ -305,13 +310,22 @@ class AbstractCommand {
|
|
|
305
310
|
this.onArgs();
|
|
306
311
|
var exitCode;
|
|
307
312
|
try {
|
|
308
|
-
if (this.registerOpts.requiresR3trans && process.platform === 'darwin') {
|
|
309
|
-
}
|
|
310
313
|
yield utils_1.GlobalContext.getInstance().load();
|
|
311
314
|
yield Commons.Plugin.call("client", "loadCore", { core: Core });
|
|
312
315
|
yield Commons.Plugin.call("client", "loadCommons", { commons: Commons });
|
|
313
316
|
Commons.Inquirer.inquirer = this.getInquirer(InquirerType_1.InquirerType.CLI);
|
|
314
317
|
Commons.Logger.logger = this.getLogger(this.args.logger, this.args.debug, this.args.loggerOutDir);
|
|
318
|
+
if (this.registerOpts.requiresR3trans && process.platform === 'darwin') {
|
|
319
|
+
Commons.Logger.info(`This command needs R3trans program dockerized in your OS.`);
|
|
320
|
+
Commons.Logger.loading(`Checking if docker is running...`);
|
|
321
|
+
if (yield (0, utils_1.isDockerRunning)()) {
|
|
322
|
+
const dockerName = utils_1.GlobalContext.getInstance().getSettings().r3transDockerName;
|
|
323
|
+
Commons.Logger.info(`Docker "${dockerName || 'local/r3trans'}" will be used.`);
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
throw new Error(`Command needs R3trans dockerized, docker is not currently running.`);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
315
329
|
if (process.platform !== 'win32' && process.platform !== 'darwin') {
|
|
316
330
|
Commons.Logger.warning(`Running on untested OS "${process.platform}"! Some features aren't tested yet.`);
|
|
317
331
|
}
|
|
@@ -330,6 +344,7 @@ class AbstractCommand {
|
|
|
330
344
|
}
|
|
331
345
|
registry = registryAlias.getRegistry();
|
|
332
346
|
try {
|
|
347
|
+
Commons.Logger.loading(`Connecting to registry "${registry.name}" (${registry.endpoint})...`);
|
|
333
348
|
const registryPing = yield registry.ping();
|
|
334
349
|
if (this.registerOpts.registryAuthBlacklist && this.registerOpts.registryAuthBlacklist.includes(registryPing.authentication_type)) {
|
|
335
350
|
throw new Error(`This command is not supported by registry "${registry.name}".`);
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ new implementations_1.DistTag(program, 'dist-tag rm').register();
|
|
|
37
37
|
new implementations_1.Publish(program, 'pack', ['export']).register();
|
|
38
38
|
new implementations_1.Lock(program, 'lock', ['lock-file']).register();
|
|
39
39
|
new implementations_1.Unpublish(program, 'unpublish').register();
|
|
40
|
-
new implementations_1.Deprecate(program, '
|
|
40
|
+
new implementations_1.Deprecate(program, 'deprecate').register();
|
|
41
41
|
new implementations_1.Install(program, 'install', ['i']).register();
|
|
42
42
|
new implementations_1.Install(program, 'clean-install', ['ci']).register();
|
|
43
43
|
new implementations_1.Install(program, 'update').register();
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -30,3 +30,4 @@ __exportStar(require("./getNpmPackageLatestVersion"), exports);
|
|
|
30
30
|
__exportStar(require("./SettingsData"), exports);
|
|
31
31
|
__exportStar(require("./CacheData"), exports);
|
|
32
32
|
__exportStar(require("./GlobalContext"), exports);
|
|
33
|
+
__exportStar(require("./isDockerRunning"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isDockerRunning(): Promise<boolean>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDockerRunning = isDockerRunning;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
function isDockerRunning() {
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
(0, child_process_1.exec)("docker info", (error) => {
|
|
8
|
+
if (error) {
|
|
9
|
+
resolve(false);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
resolve(true);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
}
|