product-discovery-cli 0.0.4 → 0.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "product-discovery-cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "CLI to consume the Product Discovery Agent API",
5
5
  "license": "Apache-2.0",
6
6
  "author": "AuronForge",
@@ -78,6 +78,8 @@ class RunDiscoveryFlow {
78
78
  continueOuter = false;
79
79
  }
80
80
  }
81
+
82
+ this.presenter.goodbye();
81
83
  }
82
84
  }
83
85
 
package/src/index.js CHANGED
@@ -10,7 +10,7 @@ const { RunDiscoveryFlow } = require("./application/RunDiscoveryFlow");
10
10
  const DEFAULT_API_URL = process.env.API_URL || "http://localhost:3000/api/v1/discovery";
11
11
 
12
12
  const prompt = new PromptService();
13
- const presenter = new ConsolePresenter();
13
+ const presenter = new ConsolePresenter(null);
14
14
  const apiClient = new ProductDiscoveryApi();
15
15
  const storage = new JsonFileStorage();
16
16
  const useCase = new RunDiscoveryFlow({ prompt, apiClient, storage, presenter });
@@ -57,6 +57,23 @@ class ConsolePresenter {
57
57
  spinner(text) {
58
58
  return ora(text).start();
59
59
  }
60
+
61
+ goodbye() {
62
+ if (!this.i18n) return;
63
+ output.write("\n");
64
+ output.write(
65
+ boxen(
66
+ `${chalk.bold.cyan(this.i18n.t("thankYou"))}\n${chalk.gray(this.i18n.t("closeConsole"))}`,
67
+ {
68
+ padding: 1,
69
+ margin: 1,
70
+ borderStyle: "round",
71
+ borderColor: "cyan"
72
+ }
73
+ )
74
+ );
75
+ output.write("\n");
76
+ }
60
77
  }
61
78
 
62
79
  module.exports = { ConsolePresenter };
@@ -36,7 +36,11 @@ const translations = {
36
36
  configError: "Erro no config:",
37
37
 
38
38
  // Validation
39
- required: "Este campo é obrigatório"
39
+ required: "Este campo é obrigatório",
40
+
41
+ // Goodbye
42
+ thankYou: "Obrigado por usar o Product Discovery CLI!",
43
+ closeConsole: "Você pode fechar esta janela ou pressionar Ctrl+C"
40
44
  },
41
45
 
42
46
  "en-us": {
@@ -76,7 +80,11 @@ const translations = {
76
80
  configError: "Config error:",
77
81
 
78
82
  // Validation
79
- required: "This field is required"
83
+ required: "This field is required",
84
+
85
+ // Goodbye
86
+ thankYou: "Thank you for using Product Discovery CLI!",
87
+ closeConsole: "You can close this window or press Ctrl+C"
80
88
  }
81
89
  };
82
90