@flowscripter/dynamic-cli-framework 5.1.8 → 5.2.1
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":"PluginAddSubCommand.d.ts","sourceRoot":"","sources":["../../../../../src/service/plugin/command/PluginAddSubCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AASxE,qBAAa,mBAAoB,YAAW,UAAU;IACpD,QAAQ,CAAC,IAAI,SAAS;IACtB,QAAQ,CAAC,WAAW,6BAA6B;IACjD,QAAQ,CAAC,mBAAmB,SAAS;IACrC,QAAQ,CAAC,OAAO,UAAM;IACtB,QAAQ,CAAC,WAAW;;;;QAMlB;IAEI,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"PluginAddSubCommand.d.ts","sourceRoot":"","sources":["../../../../../src/service/plugin/command/PluginAddSubCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AASxE,qBAAa,mBAAoB,YAAW,UAAU;IACpD,QAAQ,CAAC,IAAI,SAAS;IACtB,QAAQ,CAAC,WAAW,6BAA6B;IACjD,QAAQ,CAAC,mBAAmB,SAAS;IACrC,QAAQ,CAAC,OAAO,UAAM;IACtB,QAAQ,CAAC,WAAW;;;;QAMlB;IAEI,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA+EvE"}
|
|
@@ -64,6 +64,16 @@ export class PluginAddSubCommand {
|
|
|
64
64
|
}
|
|
65
65
|
await printerService.info(`Installing ${installLabel}...\n`, Icon.INFORMATION);
|
|
66
66
|
await pluginService.install(descriptor);
|
|
67
|
-
|
|
67
|
+
// Look up the actually-installed version rather than trusting `descriptor.version`: when no
|
|
68
|
+
// version was requested and the plugin wasn't found via search (direct-install fallback),
|
|
69
|
+
// `descriptor.version` is still the literal placeholder "latest", not a real version number.
|
|
70
|
+
let installedVersion = descriptor.version;
|
|
71
|
+
for await (const installed of pluginService.listInstalled()) {
|
|
72
|
+
if (installed.pluginId === descriptor.pluginId) {
|
|
73
|
+
installedVersion = installed.version;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
await printerService.print(`Plugin ${descriptor.pluginId}@${installedVersion} installed.\n`, Icon.SUCCESS);
|
|
68
78
|
}
|
|
69
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/dynamic-cli-framework",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
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.0",
|
|
52
|
-
"@flowscripter/dynamic-plugin-framework": "^2.2.
|
|
52
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.3",
|
|
53
53
|
"emphasize": "^7.0.0",
|
|
54
54
|
"fastest-levenshtein": "^1.0.16",
|
|
55
55
|
"figlet": "^1.11.0",
|
|
@@ -85,6 +85,21 @@ export class PluginAddSubCommand implements SubCommand {
|
|
|
85
85
|
|
|
86
86
|
await printerService.info(`Installing ${installLabel}...\n`, Icon.INFORMATION);
|
|
87
87
|
await pluginService.install(descriptor);
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
// Look up the actually-installed version rather than trusting `descriptor.version`: when no
|
|
90
|
+
// version was requested and the plugin wasn't found via search (direct-install fallback),
|
|
91
|
+
// `descriptor.version` is still the literal placeholder "latest", not a real version number.
|
|
92
|
+
let installedVersion = descriptor.version;
|
|
93
|
+
for await (const installed of pluginService.listInstalled()) {
|
|
94
|
+
if (installed.pluginId === descriptor.pluginId) {
|
|
95
|
+
installedVersion = installed.version;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
await printerService.print(
|
|
101
|
+
`Plugin ${descriptor.pluginId}@${installedVersion} installed.\n`,
|
|
102
|
+
Icon.SUCCESS,
|
|
103
|
+
);
|
|
89
104
|
}
|
|
90
105
|
}
|