@flowscripter/dynamic-cli-framework 9.0.1 → 9.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpgradeSubCommand.d.ts","sourceRoot":"","sources":["../../../../../src/service/upgrade/command/UpgradeSubCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"UpgradeSubCommand.d.ts","sourceRoot":"","sources":["../../../../../src/service/upgrade/command/UpgradeSubCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,yCAAyC,CAAC;AAuBrF,qBAAa,iBAAkB,YAAW,UAAU;IAClD,QAAQ,CAAC,IAAI,aAAa;IAC1B,QAAQ,CAAC,WAAW,6CAA6C;IACjE,QAAQ,CAAC,mBAAmB,SAAS;IACrC,QAAQ,CAAC,WAAW,UAAM;IAE1B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAQrC;IAEW,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqD5E;CACF"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { ValueTypeName } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import { Icon, InstallMethod, PRINTER_SERVICE_ID, UPGRADE_SERVICE_ID, } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
function installMethodsForPlatform() {
|
|
4
|
+
if (process.platform === "darwin") {
|
|
5
|
+
return [InstallMethod.HOMEBREW, InstallMethod.GITHUB_RELEASE];
|
|
6
|
+
}
|
|
7
|
+
if (process.platform === "linux") {
|
|
8
|
+
return [InstallMethod.LINUX_SCRIPT, InstallMethod.GITHUB_RELEASE];
|
|
9
|
+
}
|
|
10
|
+
if (process.platform === "win32") {
|
|
11
|
+
return [InstallMethod.WINGET, InstallMethod.GITHUB_RELEASE];
|
|
12
|
+
}
|
|
13
|
+
return [InstallMethod.GITHUB_RELEASE];
|
|
14
|
+
}
|
|
3
15
|
export class UpgradeSubCommand {
|
|
4
16
|
name = "upgrade";
|
|
5
17
|
description = "Upgrade to the latest available version";
|
|
@@ -10,7 +22,7 @@ export class UpgradeSubCommand {
|
|
|
10
22
|
name: "install-method",
|
|
11
23
|
type: ValueTypeName.STRING,
|
|
12
24
|
isOptional: true,
|
|
13
|
-
allowableValues:
|
|
25
|
+
allowableValues: installMethodsForPlatform(),
|
|
14
26
|
description: "Override the detected install method",
|
|
15
27
|
},
|
|
16
28
|
];
|
package/package.json
CHANGED
|
@@ -11,6 +11,19 @@ import {
|
|
|
11
11
|
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
12
12
|
import type { UpgradeService } from "@flowscripter/dynamic-cli-framework-api";
|
|
13
13
|
|
|
14
|
+
function installMethodsForPlatform(): InstallMethod[] {
|
|
15
|
+
if (process.platform === "darwin") {
|
|
16
|
+
return [InstallMethod.HOMEBREW, InstallMethod.GITHUB_RELEASE];
|
|
17
|
+
}
|
|
18
|
+
if (process.platform === "linux") {
|
|
19
|
+
return [InstallMethod.LINUX_SCRIPT, InstallMethod.GITHUB_RELEASE];
|
|
20
|
+
}
|
|
21
|
+
if (process.platform === "win32") {
|
|
22
|
+
return [InstallMethod.WINGET, InstallMethod.GITHUB_RELEASE];
|
|
23
|
+
}
|
|
24
|
+
return [InstallMethod.GITHUB_RELEASE];
|
|
25
|
+
}
|
|
26
|
+
|
|
14
27
|
export class UpgradeSubCommand implements SubCommand {
|
|
15
28
|
readonly name = "upgrade";
|
|
16
29
|
readonly description = "Upgrade to the latest available version";
|
|
@@ -22,7 +35,7 @@ export class UpgradeSubCommand implements SubCommand {
|
|
|
22
35
|
name: "install-method",
|
|
23
36
|
type: ValueTypeName.STRING,
|
|
24
37
|
isOptional: true,
|
|
25
|
-
allowableValues:
|
|
38
|
+
allowableValues: installMethodsForPlatform(),
|
|
26
39
|
description: "Override the detected install method",
|
|
27
40
|
},
|
|
28
41
|
];
|