zyket 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/bin/cli.js +32 -0
  2. package/package.json +2 -1
package/bin/cli.js ADDED
@@ -0,0 +1,32 @@
1
+ const prompts = require('prompts');
2
+
3
+ (async () => {
4
+ process.stdout.write("\u001b[2J\u001b[0;0H");
5
+ const response = await prompts({
6
+ type: 'select',
7
+ name: 'value',
8
+ message: '[ZYKET] What do you want to do?',
9
+ choices: [
10
+ { title: 'Install Template', value: 'install-template', description: 'Install a new template', disabled: false },
11
+ { title: 'Remove Template', value: 'remove-template', description: 'Remove an existing template', disabled: false }
12
+ ],
13
+ initial: 0
14
+ });
15
+
16
+ const actions = {
17
+ 'install-template': async () => {
18
+ console.log('Installing template');
19
+ },
20
+ 'remove-template': async () => {
21
+ console.log('Removing template');
22
+ }
23
+ };
24
+
25
+ await actions[response.value]();
26
+
27
+ await new Promise((resolve) => {
28
+ setTimeout(() => {
29
+ resolve();
30
+ }, 2000);
31
+ });
32
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zyket",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -16,6 +16,7 @@
16
16
  "mariadb": "^3.4.0",
17
17
  "minio": "^8.0.5",
18
18
  "node-dependency-injection": "^3.2.2",
19
+ "prompts": "^2.4.2",
19
20
  "redis": "^4.7.0",
20
21
  "sequelize": "^6.37.6",
21
22
  "socket.io": "^4.8.1"