@flowscripter/dynamic-cli-framework 5.0.2 → 5.0.3

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":"BannerServiceProvider.d.ts","sourceRoot":"","sources":["../../../../src/service/banner/BannerServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAI5F,OAAO,KAAK,4BAA4B,MAAM,kDAAkD,CAAC;AAGjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,eAAO,MAAM,iBAAiB,uDAAuD,CAAC;AAEtF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,eAAe;;IAoBjE,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAnB3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAqB;IAC/C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAGjC;;OAEG;IACH,WAAW,UAAQ;IAEnB;;;;;;OAMG;gBAED,eAAe,EAAE,MAAM,EACvB,4BAA4B,CAAC,EAAE,4BAA4B,EAC1C,QAAQ,GAAE,MAAmB;IAMzC,cAAc,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;IAM5D,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CA2CnD"}
1
+ {"version":3,"file":"BannerServiceProvider.d.ts","sourceRoot":"","sources":["../../../../src/service/banner/BannerServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAI5F,OAAO,KAAK,4BAA4B,MAAM,kDAAkD,CAAC;AAGjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,eAAO,MAAM,iBAAiB,uDAAuD,CAAC;AAEtF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,eAAe;;IAoBjE,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAnB3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAqB;IAC/C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAGjC;;OAEG;IACH,WAAW,UAAQ;IAEnB;;;;;;OAMG;gBAED,eAAe,EAAE,MAAM,EACvB,4BAA4B,CAAC,EAAE,4BAA4B,EAC1C,QAAQ,GAAE,MAAmB;IAMzC,cAAc,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;IAM5D,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAwCnD"}
@@ -48,14 +48,15 @@ export default class BannerServiceProvider {
48
48
  await printerService.info(` ${printerService.primary(cliConfig.description)}\n`);
49
49
  }
50
50
  if (cliConfig.version.length > 0) {
51
- await printerService.info(` ${printerService.secondary("version: " + cliConfig.version)}\n`);
52
- }
53
- if (context.doesServiceExist(UPGRADE_SERVICE_ID)) {
54
- const upgradeService = context.getServiceById(UPGRADE_SERVICE_ID);
55
- const result = await upgradeService.getUpgradeCheckResult();
56
- if (result.status === "checked" && result.updateAvailable) {
57
- await printerService.info(` ${printerService.secondary(`(${result.latestVersion} available, run '${cliConfig.name} upgrade')`)}\n`);
51
+ let versionLine = "version: " + cliConfig.version;
52
+ if (context.doesServiceExist(UPGRADE_SERVICE_ID)) {
53
+ const upgradeService = context.getServiceById(UPGRADE_SERVICE_ID);
54
+ const result = await upgradeService.getUpgradeCheckResult();
55
+ if (result.status === "checked" && result.updateAvailable) {
56
+ versionLine += ` (${result.latestVersion} available, run '${cliConfig.name} upgrade')`;
57
+ }
58
58
  }
59
+ await printerService.info(` ${printerService.secondary(versionLine)}\n`);
59
60
  }
60
61
  if (this.#configurationServiceProvider) {
61
62
  const configLocation = this.#configurationServiceProvider.configLocation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowscripter/dynamic-cli-framework",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "A framework for developing CLI applications which supports dynamic discovery and installation of new commands",
5
5
  "keywords": [
6
6
  "bun",
@@ -68,18 +68,15 @@ export default class BannerServiceProvider implements ServiceProvider {
68
68
  await printerService.info(` ${printerService.primary(cliConfig.description)}\n`);
69
69
  }
70
70
  if (cliConfig.version.length > 0) {
71
- await printerService.info(` ${printerService.secondary("version: " + cliConfig.version)}\n`);
72
- }
73
- if (context.doesServiceExist(UPGRADE_SERVICE_ID)) {
74
- const upgradeService = context.getServiceById(UPGRADE_SERVICE_ID) as UpgradeService;
75
- const result = await upgradeService.getUpgradeCheckResult();
76
- if (result.status === "checked" && result.updateAvailable) {
77
- await printerService.info(
78
- ` ${printerService.secondary(
79
- `(${result.latestVersion} available, run '${cliConfig.name} upgrade')`,
80
- )}\n`,
81
- );
71
+ let versionLine = "version: " + cliConfig.version;
72
+ if (context.doesServiceExist(UPGRADE_SERVICE_ID)) {
73
+ const upgradeService = context.getServiceById(UPGRADE_SERVICE_ID) as UpgradeService;
74
+ const result = await upgradeService.getUpgradeCheckResult();
75
+ if (result.status === "checked" && result.updateAvailable) {
76
+ versionLine += ` (${result.latestVersion} available, run '${cliConfig.name} upgrade')`;
77
+ }
82
78
  }
79
+ await printerService.info(` ${printerService.secondary(versionLine)}\n`);
83
80
  }
84
81
  if (this.#configurationServiceProvider) {
85
82
  const configLocation = this.#configurationServiceProvider.configLocation;