@flowscripter/dynamic-cli-framework 5.3.4 → 5.3.6
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.
|
@@ -2,6 +2,7 @@ import type { CLIConfig, FetchService, SpawnService, UpgradeCheckResult, Upgrade
|
|
|
2
2
|
import { InstallMethod, SupportedArch, SupportedOs, type UpgradeService } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import type { UpgradeLocationsConfig } from "./UpgradeLocationsConfig.ts";
|
|
4
4
|
export declare const VERSION_CHECK_TIMEOUT_MS = 250;
|
|
5
|
+
export declare function describeUpgradeCheckResult(result: UpgradeCheckResult): string;
|
|
5
6
|
export default class DefaultUpgradeService implements UpgradeService {
|
|
6
7
|
#private;
|
|
7
8
|
constructor(config: UpgradeLocationsConfig, cliConfig: CLIConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultUpgradeService.d.ts","sourceRoot":"","sources":["../../../../src/service/upgrade/DefaultUpgradeService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EAEZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACd,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,KAAK,cAAc,EACpB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAS1E,eAAO,MAAM,wBAAwB,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultUpgradeService.d.ts","sourceRoot":"","sources":["../../../../src/service/upgrade/DefaultUpgradeService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EAEZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACd,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,KAAK,cAAc,EACpB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAS1E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAY5C,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAI7E;AAQD,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,cAAc;;IAOlE,YAAmB,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAE,SAAS,EAGtE;IAEM,eAAe,CACpB,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,YAAY,EAAE,YAAY,GAAG,SAAS,GACrC,IAAI,CAGN;IAEM,qBAAqB,CAAC,aAAa,UAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA0B/E;IAEM,QAAQ,IAAI,WAAW,GAAG,SAAS,CAWzC;IAEM,UAAU,IAAI,aAAa,GAAG,SAAS,CAS7C;IAEY,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAcpF;IAEY,eAAe,CAC1B,UAAU,CAAC,EAAE,WAAW,EACxB,YAAY,CAAC,EAAE,aAAa,EAC5B,qBAAqB,CAAC,EAAE,aAAa,GACpC,OAAO,CAAC,kBAAkB,CAAC,CAsC7B;IAEY,OAAO,CAClB,UAAU,CAAC,EAAE,WAAW,EACxB,YAAY,CAAC,EAAE,aAAa,EAC5B,qBAAqB,CAAC,EAAE,aAAa,GACpC,OAAO,CAAC,aAAa,CAAC,CA+CxB;CAuRF"}
|
|
@@ -16,6 +16,11 @@ function describeSpawnFailure(result) {
|
|
|
16
16
|
? "timed out"
|
|
17
17
|
: (result.error?.message ?? `exit code ${result.exitCode}`);
|
|
18
18
|
}
|
|
19
|
+
export function describeUpgradeCheckResult(result) {
|
|
20
|
+
return result.status === "failed"
|
|
21
|
+
? `Upgrade check result: failed - ${result.error.message}`
|
|
22
|
+
: `Upgrade check result: ${JSON.stringify(result)}`;
|
|
23
|
+
}
|
|
19
24
|
const OS_LABELS = {
|
|
20
25
|
[SupportedOs.LINUX]: "Linux",
|
|
21
26
|
[SupportedOs.MACOS]: "MacOS",
|
|
@@ -45,7 +50,7 @@ export default class DefaultUpgradeService {
|
|
|
45
50
|
// waiting via waitForResult=true) any chance of a fresh attempt for the rest of this
|
|
46
51
|
// process's lifetime.
|
|
47
52
|
this.#upgradeCheckPromise = this.checkForUpgrade().then((result) => {
|
|
48
|
-
logger.debug(() =>
|
|
53
|
+
logger.debug(() => describeUpgradeCheckResult(result));
|
|
49
54
|
if (result.status === "failed") {
|
|
50
55
|
this.#upgradeCheckPromise = undefined;
|
|
51
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/dynamic-cli-framework",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.6",
|
|
4
4
|
"description": "A framework for developing CLI applications which supports dynamic discovery and installation of new commands",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@flowscripter/dynamic-cli-framework-api": "^2.3.2",
|
|
52
|
-
"@flowscripter/dynamic-plugin-framework": "^2.2.
|
|
52
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.4",
|
|
53
53
|
"emphasize": "^7.0.0",
|
|
54
54
|
"fastest-levenshtein": "^1.0.16",
|
|
55
55
|
"figlet": "^1.11.4",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"supports-terminal-graphics": "^0.1.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@types/bun": "^1.
|
|
64
|
-
"@types/node": "^26.
|
|
63
|
+
"@types/bun": "^1.4.0",
|
|
64
|
+
"@types/node": "^26.4.0",
|
|
65
65
|
"@types/semver": "^7.8.0",
|
|
66
|
-
"oxfmt": "0.
|
|
67
|
-
"oxlint": "1.
|
|
66
|
+
"oxfmt": "0.65.0",
|
|
67
|
+
"oxlint": "1.80.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"typescript": "^7.0.2"
|
|
@@ -38,6 +38,12 @@ function describeSpawnFailure(result: Extract<SpawnResult, { ok: false }>): stri
|
|
|
38
38
|
: (result.error?.message ?? `exit code ${result.exitCode}`);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
export function describeUpgradeCheckResult(result: UpgradeCheckResult): string {
|
|
42
|
+
return result.status === "failed"
|
|
43
|
+
? `Upgrade check result: failed - ${result.error.message}`
|
|
44
|
+
: `Upgrade check result: ${JSON.stringify(result)}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
const OS_LABELS: Record<SupportedOs, string> = {
|
|
42
48
|
[SupportedOs.LINUX]: "Linux",
|
|
43
49
|
[SupportedOs.MACOS]: "MacOS",
|
|
@@ -74,7 +80,7 @@ export default class DefaultUpgradeService implements UpgradeService {
|
|
|
74
80
|
// waiting via waitForResult=true) any chance of a fresh attempt for the rest of this
|
|
75
81
|
// process's lifetime.
|
|
76
82
|
this.#upgradeCheckPromise = this.checkForUpgrade().then((result) => {
|
|
77
|
-
logger.debug(() =>
|
|
83
|
+
logger.debug(() => describeUpgradeCheckResult(result));
|
|
78
84
|
if (result.status === "failed") {
|
|
79
85
|
this.#upgradeCheckPromise = undefined;
|
|
80
86
|
}
|