@chabokan.net/cli 0.8.4 → 0.8.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/README.md +10 -10
- package/lib/commands/login.js +4 -0
- package/lib/commands/service/resize.js +1 -1
- package/lib/commands/service/restart.js +1 -1
- package/lib/commands/service/start.js +1 -1
- package/lib/commands/service/stop.js +1 -1
- package/lib/constants.d.ts +1 -1
- package/lib/constants.js +3 -0
- package/oclif.manifest.json +312 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ $ npm install -g @chabokan.net/cli
|
|
|
18
18
|
$ chabok COMMAND
|
|
19
19
|
running command...
|
|
20
20
|
$ chabok (--version|-v)
|
|
21
|
-
@chabokan.net/cli/0.8.
|
|
21
|
+
@chabokan.net/cli/0.8.6 darwin-arm64 node-v18.12.1
|
|
22
22
|
$ chabok --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ chabok COMMAND
|
|
@@ -32,7 +32,7 @@ USAGE
|
|
|
32
32
|
* [`chabok account use`](#chabok-account-use)
|
|
33
33
|
* [`chabok autocomplete [SHELL]`](#chabok-autocomplete-shell)
|
|
34
34
|
* [`chabok deploy`](#chabok-deploy)
|
|
35
|
-
* [`chabok help [
|
|
35
|
+
* [`chabok help [COMMANDS]`](#chabok-help-commands)
|
|
36
36
|
* [`chabok login`](#chabok-login)
|
|
37
37
|
* [`chabok service list`](#chabok-service-list)
|
|
38
38
|
* [`chabok service logs`](#chabok-service-logs)
|
|
@@ -115,7 +115,7 @@ EXAMPLES
|
|
|
115
115
|
$ chabok autocomplete --refresh-cache
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.
|
|
118
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.4.6/src/commands/autocomplete/index.ts)_
|
|
119
119
|
|
|
120
120
|
## `chabok deploy`
|
|
121
121
|
|
|
@@ -134,18 +134,18 @@ DESCRIPTION
|
|
|
134
134
|
this command help you build and deploy your service to chabokan in easy way.
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
_See code: [src/commands/deploy.ts](https://github.com/chabokan/cli/blob/v0.8.
|
|
137
|
+
_See code: [src/commands/deploy.ts](https://github.com/chabokan/cli/blob/v0.8.6/src/commands/deploy.ts)_
|
|
138
138
|
|
|
139
|
-
## `chabok help [
|
|
139
|
+
## `chabok help [COMMANDS]`
|
|
140
140
|
|
|
141
141
|
Display help for chabok.
|
|
142
142
|
|
|
143
143
|
```
|
|
144
144
|
USAGE
|
|
145
|
-
$ chabok help [
|
|
145
|
+
$ chabok help [COMMANDS] [-n]
|
|
146
146
|
|
|
147
147
|
ARGUMENTS
|
|
148
|
-
|
|
148
|
+
COMMANDS Command to show help for.
|
|
149
149
|
|
|
150
150
|
FLAGS
|
|
151
151
|
-n, --nested-commands Include all nested commands in the output.
|
|
@@ -154,7 +154,7 @@ DESCRIPTION
|
|
|
154
154
|
Display help for chabok.
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.
|
|
157
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.10/src/commands/help.ts)_
|
|
158
158
|
|
|
159
159
|
## `chabok login`
|
|
160
160
|
|
|
@@ -174,7 +174,7 @@ DESCRIPTION
|
|
|
174
174
|
login to hub.chabokan.net account
|
|
175
175
|
```
|
|
176
176
|
|
|
177
|
-
_See code: [src/commands/login.ts](https://github.com/chabokan/cli/blob/v0.8.
|
|
177
|
+
_See code: [src/commands/login.ts](https://github.com/chabokan/cli/blob/v0.8.6/src/commands/login.ts)_
|
|
178
178
|
|
|
179
179
|
## `chabok service list`
|
|
180
180
|
|
|
@@ -292,5 +292,5 @@ FLAG DESCRIPTIONS
|
|
|
292
292
|
Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
|
|
293
293
|
```
|
|
294
294
|
|
|
295
|
-
_See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/v1.
|
|
295
|
+
_See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/v1.3.5/src/commands/version.ts)_
|
|
296
296
|
<!-- commandsstop -->
|
package/lib/commands/login.js
CHANGED
|
@@ -76,6 +76,10 @@ class Login extends base_1.default {
|
|
|
76
76
|
cli.log(`${chalk_1.default.green('[Success]')} you are logged in successfully.`);
|
|
77
77
|
}
|
|
78
78
|
catch (e) {
|
|
79
|
+
if (process.env.CHABOK_DEBUG == "true") {
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
cli.log(e);
|
|
82
|
+
}
|
|
79
83
|
cli.log(`${chalk_1.default.red('[Error]')} your token is wrong!`);
|
|
80
84
|
}
|
|
81
85
|
}
|
|
@@ -11,7 +11,7 @@ class ServiceResize extends base_1.default {
|
|
|
11
11
|
async run() {
|
|
12
12
|
const { args, flags } = await this.parse(ServiceResize);
|
|
13
13
|
const cli = this;
|
|
14
|
-
this.init_run();
|
|
14
|
+
await this.init_run();
|
|
15
15
|
const config_json = await this.read_config();
|
|
16
16
|
let selected_service = flags.service;
|
|
17
17
|
let selected_ram = flags.ram;
|
|
@@ -11,7 +11,7 @@ class ServiceRestart extends base_1.default {
|
|
|
11
11
|
async run() {
|
|
12
12
|
const { args, flags } = await this.parse(ServiceRestart);
|
|
13
13
|
const cli = this;
|
|
14
|
-
this.init_run();
|
|
14
|
+
await this.init_run();
|
|
15
15
|
const config_json = await this.read_config();
|
|
16
16
|
let selected_service = flags.service;
|
|
17
17
|
if ((0, helper_1.isEmptyObject)(config_json.users)) {
|
|
@@ -11,7 +11,7 @@ class ServiceStart extends base_1.default {
|
|
|
11
11
|
async run() {
|
|
12
12
|
const { args, flags } = await this.parse(ServiceStart);
|
|
13
13
|
const cli = this;
|
|
14
|
-
this.init_run();
|
|
14
|
+
await this.init_run();
|
|
15
15
|
const config_json = await this.read_config();
|
|
16
16
|
let selected_service = flags.service;
|
|
17
17
|
if ((0, helper_1.isEmptyObject)(config_json.users)) {
|
|
@@ -11,7 +11,7 @@ class ServiceStop extends base_1.default {
|
|
|
11
11
|
async run() {
|
|
12
12
|
const { args, flags } = await this.parse(ServiceStop);
|
|
13
13
|
const cli = this;
|
|
14
|
-
this.init_run();
|
|
14
|
+
await this.init_run();
|
|
15
15
|
const config_json = await this.read_config();
|
|
16
16
|
let selected_service = flags.service;
|
|
17
17
|
if ((0, helper_1.isEmptyObject)(config_json.users)) {
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const GLOBAL_CONF_PATH: string;
|
|
2
|
-
export declare
|
|
2
|
+
export declare let BASE_API_URL: string;
|
package/lib/constants.js
CHANGED
|
@@ -6,3 +6,6 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
6
6
|
const os = tslib_1.__importStar(require("os"));
|
|
7
7
|
exports.GLOBAL_CONF_PATH = path.join(os.homedir(), '.chabok.json');
|
|
8
8
|
exports.BASE_API_URL = 'https://apihub.chabokan.net/fa/api/v1/';
|
|
9
|
+
if (process.env.CHABOK_API_URL) {
|
|
10
|
+
exports.BASE_API_URL = process.env.CHABOK_API_URL;
|
|
11
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1,312 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": "0.8.6",
|
|
3
|
+
"commands": {
|
|
4
|
+
"deploy": {
|
|
5
|
+
"id": "deploy",
|
|
6
|
+
"description": "this command help you build and deploy your service to chabokan in easy way.",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"pluginName": "@chabokan.net/cli",
|
|
9
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
10
|
+
"pluginType": "core",
|
|
11
|
+
"aliases": [],
|
|
12
|
+
"flags": {
|
|
13
|
+
"help": {
|
|
14
|
+
"name": "help",
|
|
15
|
+
"type": "boolean",
|
|
16
|
+
"char": "h",
|
|
17
|
+
"description": "Show CLI help.",
|
|
18
|
+
"allowNo": false
|
|
19
|
+
},
|
|
20
|
+
"path": {
|
|
21
|
+
"name": "path",
|
|
22
|
+
"type": "option",
|
|
23
|
+
"char": "p",
|
|
24
|
+
"description": "service path in your computer",
|
|
25
|
+
"multiple": false
|
|
26
|
+
},
|
|
27
|
+
"service": {
|
|
28
|
+
"name": "service",
|
|
29
|
+
"type": "option",
|
|
30
|
+
"char": "s",
|
|
31
|
+
"description": "service name",
|
|
32
|
+
"multiple": false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"args": {}
|
|
36
|
+
},
|
|
37
|
+
"login": {
|
|
38
|
+
"id": "login",
|
|
39
|
+
"description": "login to hub.chabokan.net account",
|
|
40
|
+
"strict": true,
|
|
41
|
+
"pluginName": "@chabokan.net/cli",
|
|
42
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
43
|
+
"pluginType": "core",
|
|
44
|
+
"aliases": [],
|
|
45
|
+
"flags": {
|
|
46
|
+
"help": {
|
|
47
|
+
"name": "help",
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"char": "h",
|
|
50
|
+
"description": "Show CLI help.",
|
|
51
|
+
"allowNo": false
|
|
52
|
+
},
|
|
53
|
+
"username": {
|
|
54
|
+
"name": "username",
|
|
55
|
+
"type": "option",
|
|
56
|
+
"char": "u",
|
|
57
|
+
"description": "your username",
|
|
58
|
+
"multiple": false
|
|
59
|
+
},
|
|
60
|
+
"password": {
|
|
61
|
+
"name": "password",
|
|
62
|
+
"type": "option",
|
|
63
|
+
"char": "p",
|
|
64
|
+
"description": "your password",
|
|
65
|
+
"multiple": false
|
|
66
|
+
},
|
|
67
|
+
"token": {
|
|
68
|
+
"name": "token",
|
|
69
|
+
"type": "option",
|
|
70
|
+
"char": "t",
|
|
71
|
+
"description": "login with api token",
|
|
72
|
+
"multiple": false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"args": {}
|
|
76
|
+
},
|
|
77
|
+
"account:list": {
|
|
78
|
+
"id": "account:list",
|
|
79
|
+
"description": "show accounts list",
|
|
80
|
+
"strict": true,
|
|
81
|
+
"pluginName": "@chabokan.net/cli",
|
|
82
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
83
|
+
"pluginType": "core",
|
|
84
|
+
"aliases": [],
|
|
85
|
+
"flags": {
|
|
86
|
+
"help": {
|
|
87
|
+
"name": "help",
|
|
88
|
+
"type": "boolean",
|
|
89
|
+
"char": "h",
|
|
90
|
+
"description": "Show CLI help.",
|
|
91
|
+
"allowNo": false
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"args": {}
|
|
95
|
+
},
|
|
96
|
+
"account:remove": {
|
|
97
|
+
"id": "account:remove",
|
|
98
|
+
"description": "remove account from list",
|
|
99
|
+
"strict": true,
|
|
100
|
+
"pluginName": "@chabokan.net/cli",
|
|
101
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
102
|
+
"pluginType": "core",
|
|
103
|
+
"aliases": [],
|
|
104
|
+
"flags": {
|
|
105
|
+
"help": {
|
|
106
|
+
"name": "help",
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"char": "h",
|
|
109
|
+
"description": "Show CLI help.",
|
|
110
|
+
"allowNo": false
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"args": {}
|
|
114
|
+
},
|
|
115
|
+
"account:use": {
|
|
116
|
+
"id": "account:use",
|
|
117
|
+
"description": "switch your default user between logged in users",
|
|
118
|
+
"strict": true,
|
|
119
|
+
"pluginName": "@chabokan.net/cli",
|
|
120
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
121
|
+
"pluginType": "core",
|
|
122
|
+
"aliases": [],
|
|
123
|
+
"flags": {
|
|
124
|
+
"help": {
|
|
125
|
+
"name": "help",
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"char": "h",
|
|
128
|
+
"description": "Show CLI help.",
|
|
129
|
+
"allowNo": false
|
|
130
|
+
},
|
|
131
|
+
"user": {
|
|
132
|
+
"name": "user",
|
|
133
|
+
"type": "option",
|
|
134
|
+
"char": "u",
|
|
135
|
+
"description": "default user",
|
|
136
|
+
"multiple": false
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"args": {}
|
|
140
|
+
},
|
|
141
|
+
"service:list": {
|
|
142
|
+
"id": "service:list",
|
|
143
|
+
"description": "show account services list",
|
|
144
|
+
"strict": true,
|
|
145
|
+
"pluginName": "@chabokan.net/cli",
|
|
146
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
147
|
+
"pluginType": "core",
|
|
148
|
+
"aliases": [],
|
|
149
|
+
"flags": {
|
|
150
|
+
"help": {
|
|
151
|
+
"name": "help",
|
|
152
|
+
"type": "boolean",
|
|
153
|
+
"char": "h",
|
|
154
|
+
"description": "Show CLI help.",
|
|
155
|
+
"allowNo": false
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"args": {}
|
|
159
|
+
},
|
|
160
|
+
"service:logs": {
|
|
161
|
+
"id": "service:logs",
|
|
162
|
+
"description": "read latest logs from service",
|
|
163
|
+
"strict": true,
|
|
164
|
+
"pluginName": "@chabokan.net/cli",
|
|
165
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
166
|
+
"pluginType": "core",
|
|
167
|
+
"aliases": [],
|
|
168
|
+
"flags": {
|
|
169
|
+
"help": {
|
|
170
|
+
"name": "help",
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"char": "h",
|
|
173
|
+
"description": "Show CLI help.",
|
|
174
|
+
"allowNo": false
|
|
175
|
+
},
|
|
176
|
+
"service": {
|
|
177
|
+
"name": "service",
|
|
178
|
+
"type": "option",
|
|
179
|
+
"char": "s",
|
|
180
|
+
"description": "service name",
|
|
181
|
+
"multiple": false
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"args": {}
|
|
185
|
+
},
|
|
186
|
+
"service:resize": {
|
|
187
|
+
"id": "service:resize",
|
|
188
|
+
"description": "resize a service",
|
|
189
|
+
"strict": true,
|
|
190
|
+
"pluginName": "@chabokan.net/cli",
|
|
191
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
192
|
+
"pluginType": "core",
|
|
193
|
+
"aliases": [],
|
|
194
|
+
"flags": {
|
|
195
|
+
"help": {
|
|
196
|
+
"name": "help",
|
|
197
|
+
"type": "boolean",
|
|
198
|
+
"char": "h",
|
|
199
|
+
"description": "Show CLI help.",
|
|
200
|
+
"allowNo": false
|
|
201
|
+
},
|
|
202
|
+
"service": {
|
|
203
|
+
"name": "service",
|
|
204
|
+
"type": "option",
|
|
205
|
+
"char": "s",
|
|
206
|
+
"description": "service name",
|
|
207
|
+
"multiple": false
|
|
208
|
+
},
|
|
209
|
+
"ram": {
|
|
210
|
+
"name": "ram",
|
|
211
|
+
"type": "option",
|
|
212
|
+
"char": "r",
|
|
213
|
+
"description": "RAM",
|
|
214
|
+
"multiple": false
|
|
215
|
+
},
|
|
216
|
+
"cpu": {
|
|
217
|
+
"name": "cpu",
|
|
218
|
+
"type": "option",
|
|
219
|
+
"char": "c",
|
|
220
|
+
"description": "CPU",
|
|
221
|
+
"multiple": false
|
|
222
|
+
},
|
|
223
|
+
"disk": {
|
|
224
|
+
"name": "disk",
|
|
225
|
+
"type": "option",
|
|
226
|
+
"char": "d",
|
|
227
|
+
"description": "DISK",
|
|
228
|
+
"multiple": false
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"args": {}
|
|
232
|
+
},
|
|
233
|
+
"service:restart": {
|
|
234
|
+
"id": "service:restart",
|
|
235
|
+
"description": "restart a service",
|
|
236
|
+
"strict": true,
|
|
237
|
+
"pluginName": "@chabokan.net/cli",
|
|
238
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
239
|
+
"pluginType": "core",
|
|
240
|
+
"aliases": [],
|
|
241
|
+
"flags": {
|
|
242
|
+
"help": {
|
|
243
|
+
"name": "help",
|
|
244
|
+
"type": "boolean",
|
|
245
|
+
"char": "h",
|
|
246
|
+
"description": "Show CLI help.",
|
|
247
|
+
"allowNo": false
|
|
248
|
+
},
|
|
249
|
+
"service": {
|
|
250
|
+
"name": "service",
|
|
251
|
+
"type": "option",
|
|
252
|
+
"char": "s",
|
|
253
|
+
"description": "service name",
|
|
254
|
+
"multiple": false
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"args": {}
|
|
258
|
+
},
|
|
259
|
+
"service:start": {
|
|
260
|
+
"id": "service:start",
|
|
261
|
+
"description": "start a service",
|
|
262
|
+
"strict": true,
|
|
263
|
+
"pluginName": "@chabokan.net/cli",
|
|
264
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
265
|
+
"pluginType": "core",
|
|
266
|
+
"aliases": [],
|
|
267
|
+
"flags": {
|
|
268
|
+
"help": {
|
|
269
|
+
"name": "help",
|
|
270
|
+
"type": "boolean",
|
|
271
|
+
"char": "h",
|
|
272
|
+
"description": "Show CLI help.",
|
|
273
|
+
"allowNo": false
|
|
274
|
+
},
|
|
275
|
+
"service": {
|
|
276
|
+
"name": "service",
|
|
277
|
+
"type": "option",
|
|
278
|
+
"char": "s",
|
|
279
|
+
"description": "service name",
|
|
280
|
+
"multiple": false
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"args": {}
|
|
284
|
+
},
|
|
285
|
+
"service:stop": {
|
|
286
|
+
"id": "service:stop",
|
|
287
|
+
"description": "stop a service",
|
|
288
|
+
"strict": true,
|
|
289
|
+
"pluginName": "@chabokan.net/cli",
|
|
290
|
+
"pluginAlias": "@chabokan.net/cli",
|
|
291
|
+
"pluginType": "core",
|
|
292
|
+
"aliases": [],
|
|
293
|
+
"flags": {
|
|
294
|
+
"help": {
|
|
295
|
+
"name": "help",
|
|
296
|
+
"type": "boolean",
|
|
297
|
+
"char": "h",
|
|
298
|
+
"description": "Show CLI help.",
|
|
299
|
+
"allowNo": false
|
|
300
|
+
},
|
|
301
|
+
"service": {
|
|
302
|
+
"name": "service",
|
|
303
|
+
"type": "option",
|
|
304
|
+
"char": "s",
|
|
305
|
+
"description": "service name",
|
|
306
|
+
"multiple": false
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"args": {}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chabokan.net/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Chabokan Cli for PaaS Services",
|
|
5
5
|
"author": "Mohammad Abdi",
|
|
6
6
|
"bin": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"version": "oclif readme && git add README.md"
|
|
94
94
|
},
|
|
95
95
|
"engines": {
|
|
96
|
-
"node": ">=
|
|
96
|
+
"node": ">=16.0.0"
|
|
97
97
|
},
|
|
98
98
|
"bugs": "https://github.com/chabokan/cli/issues",
|
|
99
99
|
"keywords": [
|