@flowscripter/dynamic-cli-framework 5.0.3 → 5.0.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionCommand.d.ts","sourceRoot":"","sources":["../../../src/command/VersionCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"VersionCommand.d.ts","sourceRoot":"","sources":["../../../src/command/VersionCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAI7E;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,aAAa;IAC1D,QAAQ,CAAC,IAAI,aAAa;IAC1B,QAAQ,CAAC,WAAW,8BAA8B;IAClD,QAAQ,CAAC,UAAU,OAAO;IAEb,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAKtD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
-
import { UPGRADE_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
2
|
/**
|
|
4
3
|
* Implementation of a {@link GlobalCommand} which outputs the version of the CLI.
|
|
5
4
|
*/
|
|
@@ -9,14 +8,6 @@ export default class VersionCommand {
|
|
|
9
8
|
shortAlias = "v";
|
|
10
9
|
async execute(context) {
|
|
11
10
|
const printerService = context.getServiceById(PRINTER_SERVICE_ID);
|
|
12
|
-
|
|
13
|
-
if (context.doesServiceExist(UPGRADE_SERVICE_ID)) {
|
|
14
|
-
const upgradeService = context.getServiceById(UPGRADE_SERVICE_ID);
|
|
15
|
-
const result = await upgradeService.getUpgradeCheckResult();
|
|
16
|
-
if (result.status === "checked" && result.updateAvailable) {
|
|
17
|
-
line += ` (${result.latestVersion} available, run '${context.cliConfig.name} upgrade')`;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
await printerService.print(`${line}\n`);
|
|
11
|
+
await printerService.print(`${context.cliConfig.version}\n`);
|
|
21
12
|
}
|
|
22
13
|
}
|
package/package.json
CHANGED
|
@@ -2,8 +2,6 @@ import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
|
2
2
|
import type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
4
|
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
-
import { UPGRADE_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
|
-
import type { UpgradeService } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
* Implementation of a {@link GlobalCommand} which outputs the version of the CLI.
|
|
@@ -16,15 +14,6 @@ export default class VersionCommand implements GlobalCommand {
|
|
|
16
14
|
public async execute(context: Context): Promise<void> {
|
|
17
15
|
const printerService = context.getServiceById(PRINTER_SERVICE_ID) as PrinterService;
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
if (context.doesServiceExist(UPGRADE_SERVICE_ID)) {
|
|
21
|
-
const upgradeService = context.getServiceById(UPGRADE_SERVICE_ID) as UpgradeService;
|
|
22
|
-
const result = await upgradeService.getUpgradeCheckResult();
|
|
23
|
-
if (result.status === "checked" && result.updateAvailable) {
|
|
24
|
-
line += ` (${result.latestVersion} available, run '${context.cliConfig.name} upgrade')`;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
await printerService.print(`${line}\n`);
|
|
17
|
+
await printerService.print(`${context.cliConfig.version}\n`);
|
|
29
18
|
}
|
|
30
19
|
}
|