@chabokan.net/cli 0.8.7 → 0.8.9

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 (39) hide show
  1. package/README.md +318 -17
  2. package/bin/dev.cmd +1 -1
  3. package/bin/dev.js +6 -0
  4. package/bin/run.js +5 -0
  5. package/{lib → dist}/base.js +8 -12
  6. package/{lib → dist}/commands/account/list.js +5 -6
  7. package/{lib → dist}/commands/account/remove.js +5 -6
  8. package/{lib → dist}/commands/account/use.js +6 -7
  9. package/{lib → dist}/commands/deploy.js +10 -11
  10. package/{lib → dist}/commands/login.js +8 -9
  11. package/{lib → dist}/commands/service/list.js +5 -6
  12. package/{lib → dist}/commands/service/logs.js +6 -7
  13. package/{lib → dist}/commands/service/resize.js +9 -10
  14. package/{lib → dist}/commands/service/restart.js +6 -7
  15. package/{lib → dist}/commands/service/start.js +6 -7
  16. package/{lib → dist}/commands/service/stop.js +6 -7
  17. package/oclif.manifest.json +12 -12
  18. package/package.json +40 -38
  19. package/LICENSE +0 -21
  20. package/bin/dev +0 -17
  21. package/bin/run +0 -5
  22. /package/{lib → dist}/base.d.ts +0 -0
  23. /package/{lib → dist}/commands/account/list.d.ts +0 -0
  24. /package/{lib → dist}/commands/account/remove.d.ts +0 -0
  25. /package/{lib → dist}/commands/account/use.d.ts +0 -0
  26. /package/{lib → dist}/commands/deploy.d.ts +0 -0
  27. /package/{lib → dist}/commands/login.d.ts +0 -0
  28. /package/{lib → dist}/commands/service/list.d.ts +0 -0
  29. /package/{lib → dist}/commands/service/logs.d.ts +0 -0
  30. /package/{lib → dist}/commands/service/resize.d.ts +0 -0
  31. /package/{lib → dist}/commands/service/restart.d.ts +0 -0
  32. /package/{lib → dist}/commands/service/start.d.ts +0 -0
  33. /package/{lib → dist}/commands/service/stop.d.ts +0 -0
  34. /package/{lib → dist}/constants.d.ts +0 -0
  35. /package/{lib → dist}/constants.js +0 -0
  36. /package/{lib → dist}/helper.d.ts +0 -0
  37. /package/{lib → dist}/helper.js +0 -0
  38. /package/{lib → dist}/index.d.ts +0 -0
  39. /package/{lib → dist}/index.js +0 -0
package/README.md CHANGED
@@ -1,11 +1,13 @@
1
- chabok CLI
1
+ chabok
2
2
  =================
3
3
 
4
- The command line interface for chabokan.net
4
+ A new CLI generated with oclif
5
+
6
+
7
+ [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
8
+ [![Version](https://img.shields.io/npm/v/chabok.svg)](https://npmjs.org/package/chabok)
9
+ [![Downloads/week](https://img.shields.io/npm/dw/chabok.svg)](https://npmjs.org/package/chabok)
5
10
 
6
- [![Version](https://img.shields.io/npm/v/@chabokan.net/cli.svg)](https://npmjs.com/package/@chabokan.net/cli)
7
- [![Downloads/week](https://img.shields.io/npm/dw/@chabokan.net/cli.svg)](https://npmjs.org/package/@chabokan.net/cli)
8
- [![License](https://img.shields.io/npm/l/@chabokan.net/cli.svg)](https://github.com/chabokan/cli/blob/master/package.json)
9
11
 
10
12
  <!-- toc -->
11
13
  * [Usage](#usage)
@@ -18,7 +20,7 @@ $ npm install -g @chabokan.net/cli
18
20
  $ chabok COMMAND
19
21
  running command...
20
22
  $ chabok (--version|-v)
21
- @chabokan.net/cli/0.8.7 darwin-arm64 node-v20.13.1
23
+ @chabokan.net/cli/0.8.9 darwin-arm64 node-v20.13.1
22
24
  $ chabok --help [COMMAND]
23
25
  USAGE
24
26
  $ chabok COMMAND
@@ -34,6 +36,16 @@ USAGE
34
36
  * [`chabok deploy`](#chabok-deploy)
35
37
  * [`chabok help [COMMAND]`](#chabok-help-command)
36
38
  * [`chabok login`](#chabok-login)
39
+ * [`chabok plugins`](#chabok-plugins)
40
+ * [`chabok plugins add PLUGIN`](#chabok-plugins-add-plugin)
41
+ * [`chabok plugins:inspect PLUGIN...`](#chabok-pluginsinspect-plugin)
42
+ * [`chabok plugins install PLUGIN`](#chabok-plugins-install-plugin)
43
+ * [`chabok plugins link PATH`](#chabok-plugins-link-path)
44
+ * [`chabok plugins remove [PLUGIN]`](#chabok-plugins-remove-plugin)
45
+ * [`chabok plugins reset`](#chabok-plugins-reset)
46
+ * [`chabok plugins uninstall [PLUGIN]`](#chabok-plugins-uninstall-plugin)
47
+ * [`chabok plugins unlink [PLUGIN]`](#chabok-plugins-unlink-plugin)
48
+ * [`chabok plugins update`](#chabok-plugins-update)
37
49
  * [`chabok service list`](#chabok-service-list)
38
50
  * [`chabok service logs`](#chabok-service-logs)
39
51
  * [`chabok service resize`](#chabok-service-resize)
@@ -57,7 +69,7 @@ DESCRIPTION
57
69
  show accounts list
58
70
  ```
59
71
 
60
- _See code: [src/commands/account/list.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/account/list.ts)_
72
+ _See code: [src/commands/account/list.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/account/list.ts)_
61
73
 
62
74
  ## `chabok account remove`
63
75
 
@@ -74,7 +86,7 @@ DESCRIPTION
74
86
  remove account from list
75
87
  ```
76
88
 
77
- _See code: [src/commands/account/remove.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/account/remove.ts)_
89
+ _See code: [src/commands/account/remove.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/account/remove.ts)_
78
90
 
79
91
  ## `chabok account use`
80
92
 
@@ -92,7 +104,7 @@ DESCRIPTION
92
104
  switch your default user between logged in users
93
105
  ```
94
106
 
95
- _See code: [src/commands/account/use.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/account/use.ts)_
107
+ _See code: [src/commands/account/use.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/account/use.ts)_
96
108
 
97
109
  ## `chabok autocomplete [SHELL]`
98
110
 
@@ -142,7 +154,7 @@ DESCRIPTION
142
154
  this command help you build and deploy your service to chabokan in easy way.
143
155
  ```
144
156
 
145
- _See code: [src/commands/deploy.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/deploy.ts)_
157
+ _See code: [src/commands/deploy.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/deploy.ts)_
146
158
 
147
159
  ## `chabok help [COMMAND]`
148
160
 
@@ -182,7 +194,296 @@ DESCRIPTION
182
194
  login to hub.chabokan.net account
183
195
  ```
184
196
 
185
- _See code: [src/commands/login.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/login.ts)_
197
+ _See code: [src/commands/login.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/login.ts)_
198
+
199
+ ## `chabok plugins`
200
+
201
+ List installed plugins.
202
+
203
+ ```
204
+ USAGE
205
+ $ chabok plugins [--json] [--core]
206
+
207
+ FLAGS
208
+ --core Show core plugins.
209
+
210
+ GLOBAL FLAGS
211
+ --json Format output as json.
212
+
213
+ DESCRIPTION
214
+ List installed plugins.
215
+
216
+ EXAMPLES
217
+ $ chabok plugins
218
+ ```
219
+
220
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.1.3/src/commands/plugins/index.ts)_
221
+
222
+ ## `chabok plugins add PLUGIN`
223
+
224
+ Installs a plugin into chabok.
225
+
226
+ ```
227
+ USAGE
228
+ $ chabok plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
229
+
230
+ ARGUMENTS
231
+ PLUGIN... Plugin to install.
232
+
233
+ FLAGS
234
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
235
+ -h, --help Show CLI help.
236
+ -s, --silent Silences npm output.
237
+ -v, --verbose Show verbose npm output.
238
+
239
+ GLOBAL FLAGS
240
+ --json Format output as json.
241
+
242
+ DESCRIPTION
243
+ Installs a plugin into chabok.
244
+
245
+ Uses bundled npm executable to install plugins into /Users/mohammad/.local/share/cli
246
+
247
+ Installation of a user-installed plugin will override a core plugin.
248
+
249
+ Use the CHABOK_NPM_LOG_LEVEL environment variable to set the npm loglevel.
250
+ Use the CHABOK_NPM_REGISTRY environment variable to set the npm registry.
251
+
252
+ ALIASES
253
+ $ chabok plugins add
254
+
255
+ EXAMPLES
256
+ Install a plugin from npm registry.
257
+
258
+ $ chabok plugins add myplugin
259
+
260
+ Install a plugin from a github url.
261
+
262
+ $ chabok plugins add https://github.com/someuser/someplugin
263
+
264
+ Install a plugin from a github slug.
265
+
266
+ $ chabok plugins add someuser/someplugin
267
+ ```
268
+
269
+ ## `chabok plugins:inspect PLUGIN...`
270
+
271
+ Displays installation properties of a plugin.
272
+
273
+ ```
274
+ USAGE
275
+ $ chabok plugins inspect PLUGIN...
276
+
277
+ ARGUMENTS
278
+ PLUGIN... [default: .] Plugin to inspect.
279
+
280
+ FLAGS
281
+ -h, --help Show CLI help.
282
+ -v, --verbose
283
+
284
+ GLOBAL FLAGS
285
+ --json Format output as json.
286
+
287
+ DESCRIPTION
288
+ Displays installation properties of a plugin.
289
+
290
+ EXAMPLES
291
+ $ chabok plugins inspect myplugin
292
+ ```
293
+
294
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.1.3/src/commands/plugins/inspect.ts)_
295
+
296
+ ## `chabok plugins install PLUGIN`
297
+
298
+ Installs a plugin into chabok.
299
+
300
+ ```
301
+ USAGE
302
+ $ chabok plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
303
+
304
+ ARGUMENTS
305
+ PLUGIN... Plugin to install.
306
+
307
+ FLAGS
308
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
309
+ -h, --help Show CLI help.
310
+ -s, --silent Silences npm output.
311
+ -v, --verbose Show verbose npm output.
312
+
313
+ GLOBAL FLAGS
314
+ --json Format output as json.
315
+
316
+ DESCRIPTION
317
+ Installs a plugin into chabok.
318
+
319
+ Uses bundled npm executable to install plugins into /Users/mohammad/.local/share/cli
320
+
321
+ Installation of a user-installed plugin will override a core plugin.
322
+
323
+ Use the CHABOK_NPM_LOG_LEVEL environment variable to set the npm loglevel.
324
+ Use the CHABOK_NPM_REGISTRY environment variable to set the npm registry.
325
+
326
+ ALIASES
327
+ $ chabok plugins add
328
+
329
+ EXAMPLES
330
+ Install a plugin from npm registry.
331
+
332
+ $ chabok plugins install myplugin
333
+
334
+ Install a plugin from a github url.
335
+
336
+ $ chabok plugins install https://github.com/someuser/someplugin
337
+
338
+ Install a plugin from a github slug.
339
+
340
+ $ chabok plugins install someuser/someplugin
341
+ ```
342
+
343
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.1.3/src/commands/plugins/install.ts)_
344
+
345
+ ## `chabok plugins link PATH`
346
+
347
+ Links a plugin into the CLI for development.
348
+
349
+ ```
350
+ USAGE
351
+ $ chabok plugins link PATH [-h] [--install] [-v]
352
+
353
+ ARGUMENTS
354
+ PATH [default: .] path to plugin
355
+
356
+ FLAGS
357
+ -h, --help Show CLI help.
358
+ -v, --verbose
359
+ --[no-]install Install dependencies after linking the plugin.
360
+
361
+ DESCRIPTION
362
+ Links a plugin into the CLI for development.
363
+ Installation of a linked plugin will override a user-installed or core plugin.
364
+
365
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
366
+ command will override the user-installed or core plugin implementation. This is useful for development work.
367
+
368
+
369
+ EXAMPLES
370
+ $ chabok plugins link myplugin
371
+ ```
372
+
373
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.1.3/src/commands/plugins/link.ts)_
374
+
375
+ ## `chabok plugins remove [PLUGIN]`
376
+
377
+ Removes a plugin from the CLI.
378
+
379
+ ```
380
+ USAGE
381
+ $ chabok plugins remove [PLUGIN...] [-h] [-v]
382
+
383
+ ARGUMENTS
384
+ PLUGIN... plugin to uninstall
385
+
386
+ FLAGS
387
+ -h, --help Show CLI help.
388
+ -v, --verbose
389
+
390
+ DESCRIPTION
391
+ Removes a plugin from the CLI.
392
+
393
+ ALIASES
394
+ $ chabok plugins unlink
395
+ $ chabok plugins remove
396
+
397
+ EXAMPLES
398
+ $ chabok plugins remove myplugin
399
+ ```
400
+
401
+ ## `chabok plugins reset`
402
+
403
+ Remove all user-installed and linked plugins.
404
+
405
+ ```
406
+ USAGE
407
+ $ chabok plugins reset [--hard] [--reinstall]
408
+
409
+ FLAGS
410
+ --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
411
+ --reinstall Reinstall all plugins after uninstalling.
412
+ ```
413
+
414
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.1.3/src/commands/plugins/reset.ts)_
415
+
416
+ ## `chabok plugins uninstall [PLUGIN]`
417
+
418
+ Removes a plugin from the CLI.
419
+
420
+ ```
421
+ USAGE
422
+ $ chabok plugins uninstall [PLUGIN...] [-h] [-v]
423
+
424
+ ARGUMENTS
425
+ PLUGIN... plugin to uninstall
426
+
427
+ FLAGS
428
+ -h, --help Show CLI help.
429
+ -v, --verbose
430
+
431
+ DESCRIPTION
432
+ Removes a plugin from the CLI.
433
+
434
+ ALIASES
435
+ $ chabok plugins unlink
436
+ $ chabok plugins remove
437
+
438
+ EXAMPLES
439
+ $ chabok plugins uninstall myplugin
440
+ ```
441
+
442
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.1.3/src/commands/plugins/uninstall.ts)_
443
+
444
+ ## `chabok plugins unlink [PLUGIN]`
445
+
446
+ Removes a plugin from the CLI.
447
+
448
+ ```
449
+ USAGE
450
+ $ chabok plugins unlink [PLUGIN...] [-h] [-v]
451
+
452
+ ARGUMENTS
453
+ PLUGIN... plugin to uninstall
454
+
455
+ FLAGS
456
+ -h, --help Show CLI help.
457
+ -v, --verbose
458
+
459
+ DESCRIPTION
460
+ Removes a plugin from the CLI.
461
+
462
+ ALIASES
463
+ $ chabok plugins unlink
464
+ $ chabok plugins remove
465
+
466
+ EXAMPLES
467
+ $ chabok plugins unlink myplugin
468
+ ```
469
+
470
+ ## `chabok plugins update`
471
+
472
+ Update installed plugins.
473
+
474
+ ```
475
+ USAGE
476
+ $ chabok plugins update [-h] [-v]
477
+
478
+ FLAGS
479
+ -h, --help Show CLI help.
480
+ -v, --verbose
481
+
482
+ DESCRIPTION
483
+ Update installed plugins.
484
+ ```
485
+
486
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.1.3/src/commands/plugins/update.ts)_
186
487
 
187
488
  ## `chabok service list`
188
489
 
@@ -199,7 +500,7 @@ DESCRIPTION
199
500
  show account services list
200
501
  ```
201
502
 
202
- _See code: [src/commands/service/list.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/service/list.ts)_
503
+ _See code: [src/commands/service/list.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/service/list.ts)_
203
504
 
204
505
  ## `chabok service logs`
205
506
 
@@ -217,7 +518,7 @@ DESCRIPTION
217
518
  read latest logs from service
218
519
  ```
219
520
 
220
- _See code: [src/commands/service/logs.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/service/logs.ts)_
521
+ _See code: [src/commands/service/logs.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/service/logs.ts)_
221
522
 
222
523
  ## `chabok service resize`
223
524
 
@@ -238,7 +539,7 @@ DESCRIPTION
238
539
  resize a service
239
540
  ```
240
541
 
241
- _See code: [src/commands/service/resize.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/service/resize.ts)_
542
+ _See code: [src/commands/service/resize.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/service/resize.ts)_
242
543
 
243
544
  ## `chabok service restart`
244
545
 
@@ -256,7 +557,7 @@ DESCRIPTION
256
557
  restart a service
257
558
  ```
258
559
 
259
- _See code: [src/commands/service/restart.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/service/restart.ts)_
560
+ _See code: [src/commands/service/restart.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/service/restart.ts)_
260
561
 
261
562
  ## `chabok service start`
262
563
 
@@ -274,7 +575,7 @@ DESCRIPTION
274
575
  start a service
275
576
  ```
276
577
 
277
- _See code: [src/commands/service/start.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/service/start.ts)_
578
+ _See code: [src/commands/service/start.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/service/start.ts)_
278
579
 
279
580
  ## `chabok service stop`
280
581
 
@@ -292,7 +593,7 @@ DESCRIPTION
292
593
  stop a service
293
594
  ```
294
595
 
295
- _See code: [src/commands/service/stop.ts](https://github.com/chabokan/cli/blob/v0.8.7/src/commands/service/stop.ts)_
596
+ _See code: [src/commands/service/stop.ts](https://github.com/chabokan/cli/blob/v0.8.9/src/commands/service/stop.ts)_
296
597
 
297
598
  ## `chabok version`
298
599
 
package/bin/dev.cmd CHANGED
@@ -1,3 +1,3 @@
1
1
  @echo off
2
2
 
3
- node "%~dp0\dev" %*
3
+ node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
package/bin/dev.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
2
+
3
+ // eslint-disable-next-line n/shebang
4
+ import {execute} from '@oclif/core'
5
+
6
+ await execute({development: true, dir: import.meta.url})
package/bin/run.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {execute} from '@oclif/core'
4
+
5
+ await execute({dir: import.meta.url})
@@ -6,14 +6,14 @@ import HttpsProxyAgent from 'https-proxy-agent';
6
6
  import * as fs from 'fs';
7
7
  import got from 'got';
8
8
  import * as https from 'https';
9
- class default_1 extends Command {
10
- constructor() {
11
- super(...arguments);
12
- this.axiosConfig = {
13
- ...axios.defaults
14
- };
15
- this.got = got.extend();
16
- }
9
+ export default class default_1 extends Command {
10
+ static flags = {
11
+ help: Flags.help({ char: 'h' }),
12
+ };
13
+ axiosConfig = {
14
+ ...axios.defaults
15
+ };
16
+ got = got.extend();
17
17
  async read_config() {
18
18
  return read_config_file();
19
19
  }
@@ -58,7 +58,3 @@ class default_1 extends Command {
58
58
  this.got = got.extend(gotConfig);
59
59
  }
60
60
  }
61
- default_1.flags = {
62
- help: Flags.help({ char: 'h' }),
63
- };
64
- export default default_1;
@@ -1,6 +1,10 @@
1
1
  import Command from "../../base.js";
2
2
  import { ux } from "@oclif/core";
3
- class AccountList extends Command {
3
+ export default class AccountList extends Command {
4
+ static description = "show accounts list";
5
+ static flags = {
6
+ ...Command.flags,
7
+ };
4
8
  async run() {
5
9
  const { args, flags } = await this.parse(AccountList);
6
10
  const cli = this;
@@ -22,8 +26,3 @@ class AccountList extends Command {
22
26
  }
23
27
  }
24
28
  }
25
- AccountList.description = "show accounts list";
26
- AccountList.flags = {
27
- ...Command.flags,
28
- };
29
- export default AccountList;
@@ -4,7 +4,11 @@ import { isEmptyObject, read_config_file } from "../../helper.js";
4
4
  import Command from "../../base.js";
5
5
  import { GLOBAL_CONF_PATH } from "../../constants.js";
6
6
  import fs from "fs";
7
- class AccountRemove extends Command {
7
+ export default class AccountRemove extends Command {
8
+ static description = "remove account from list";
9
+ static flags = {
10
+ ...Command.flags,
11
+ };
8
12
  async run() {
9
13
  const cli = this;
10
14
  const { args, flags } = await this.parse(AccountRemove);
@@ -28,8 +32,3 @@ class AccountRemove extends Command {
28
32
  cli.log(`${chalk.green("[Success]")} user deleted successfully.`);
29
33
  }
30
34
  }
31
- AccountRemove.description = "remove account from list";
32
- AccountRemove.flags = {
33
- ...Command.flags,
34
- };
35
- export default AccountRemove;
@@ -5,7 +5,12 @@ import chalk from "chalk";
5
5
  import { isEmptyObject, read_config_file } from "../../helper.js";
6
6
  import Command from "../../base.js";
7
7
  import { GLOBAL_CONF_PATH } from "../../constants.js";
8
- class AccountUse extends Command {
8
+ export default class AccountUse extends Command {
9
+ static description = "switch your default user between logged in users";
10
+ static flags = {
11
+ ...Command.flags,
12
+ user: Flags.string({ char: "u", description: "default user" }),
13
+ };
9
14
  async run() {
10
15
  const cli = this;
11
16
  const { args, flags } = await this.parse(AccountUse);
@@ -34,9 +39,3 @@ class AccountUse extends Command {
34
39
  }
35
40
  }
36
41
  }
37
- AccountUse.description = "switch your default user between logged in users";
38
- AccountUse.flags = {
39
- ...Command.flags,
40
- user: Flags.string({ char: "u", description: "default user" }),
41
- };
42
- export default AccountUse;
@@ -12,7 +12,16 @@ import * as os from "os";
12
12
  import fs from "fs-extra";
13
13
  import * as tar from 'tar';
14
14
  const MAX_SOURCE_SIZE = 100 * 1024 * 1024; // 100 MB
15
- class Deploy extends Command {
15
+ export default class Deploy extends Command {
16
+ static description = "this command help you build and deploy your service to chabokan in easy way.";
17
+ static flags = {
18
+ ...Command.flags,
19
+ path: Flags.string({
20
+ char: "p",
21
+ description: "service path in your computer",
22
+ }),
23
+ service: Flags.string({ char: "s", description: "service name" }),
24
+ };
16
25
  async run() {
17
26
  const { args, flags } = await this.parse(Deploy);
18
27
  const cli = this;
@@ -162,13 +171,3 @@ class Deploy extends Command {
162
171
  }
163
172
  }
164
173
  }
165
- Deploy.description = "this command help you build and deploy your service to chabokan in easy way.";
166
- Deploy.flags = {
167
- ...Command.flags,
168
- path: Flags.string({
169
- char: "p",
170
- description: "service path in your computer",
171
- }),
172
- service: Flags.string({ char: "s", description: "service name" }),
173
- };
174
- export default Deploy;
@@ -4,7 +4,14 @@ import axios from "axios";
4
4
  import chalk from "chalk";
5
5
  import { isObject } from "../helper.js";
6
6
  import Command from "../base.js";
7
- class Login extends Command {
7
+ export default class Login extends Command {
8
+ static description = 'login to hub.chabokan.net account';
9
+ static flags = {
10
+ ...Command.flags,
11
+ username: Flags.string({ char: 'u', description: 'your username' }),
12
+ password: Flags.string({ char: 'p', description: 'your password' }),
13
+ token: Flags.string({ char: 't', description: 'login with api token' }),
14
+ };
8
15
  async run() {
9
16
  const { args, flags } = await this.parse(Login);
10
17
  const cli = this;
@@ -82,11 +89,3 @@ class Login extends Command {
82
89
  }
83
90
  }
84
91
  }
85
- Login.description = 'login to hub.chabokan.net account';
86
- Login.flags = {
87
- ...Command.flags,
88
- username: Flags.string({ char: 'u', description: 'your username' }),
89
- password: Flags.string({ char: 'p', description: 'your password' }),
90
- token: Flags.string({ char: 't', description: 'login with api token' }),
91
- };
92
- export default Login;
@@ -1,6 +1,10 @@
1
1
  import Command from "../../base.js";
2
2
  import { ux } from "@oclif/core";
3
- class ServiceList extends Command {
3
+ export default class ServiceList extends Command {
4
+ static description = "show account services list";
5
+ static flags = {
6
+ ...Command.flags,
7
+ };
4
8
  async run() {
5
9
  const { args, flags } = await this.parse(ServiceList);
6
10
  const cli = this;
@@ -26,8 +30,3 @@ class ServiceList extends Command {
26
30
  }
27
31
  }
28
32
  }
29
- ServiceList.description = "show account services list";
30
- ServiceList.flags = {
31
- ...Command.flags,
32
- };
33
- export default ServiceList;
@@ -4,7 +4,12 @@ import { isEmptyObject } from "../../helper.js";
4
4
  import chalk from "chalk";
5
5
  import inquirer from 'inquirer';
6
6
  import axios from "axios";
7
- class ServiceLogs extends Command {
7
+ export default class ServiceLogs extends Command {
8
+ static description = 'read latest logs from service';
9
+ static flags = {
10
+ ...Command.flags,
11
+ service: Flags.string({ char: 's', description: 'service name' }),
12
+ };
8
13
  async run() {
9
14
  const { args, flags } = await this.parse(ServiceLogs);
10
15
  const cli = this;
@@ -52,9 +57,3 @@ class ServiceLogs extends Command {
52
57
  }
53
58
  }
54
59
  }
55
- ServiceLogs.description = 'read latest logs from service';
56
- ServiceLogs.flags = {
57
- ...Command.flags,
58
- service: Flags.string({ char: 's', description: 'service name' }),
59
- };
60
- export default ServiceLogs;
@@ -4,7 +4,15 @@ import { isEmptyObject } from "../../helper.js";
4
4
  import chalk from "chalk";
5
5
  import inquirer from 'inquirer';
6
6
  import axios from "axios";
7
- class ServiceResize extends Command {
7
+ export default class ServiceResize extends Command {
8
+ static description = 'resize a service';
9
+ static flags = {
10
+ ...Command.flags,
11
+ service: Flags.string({ char: 's', description: 'service name' }),
12
+ ram: Flags.string({ char: 'r', description: 'RAM' }),
13
+ cpu: Flags.string({ char: 'c', description: 'CPU' }),
14
+ disk: Flags.string({ char: 'd', description: 'DISK' }),
15
+ };
8
16
  async run() {
9
17
  const { args, flags } = await this.parse(ServiceResize);
10
18
  const cli = this;
@@ -120,12 +128,3 @@ class ServiceResize extends Command {
120
128
  }
121
129
  }
122
130
  }
123
- ServiceResize.description = 'resize a service';
124
- ServiceResize.flags = {
125
- ...Command.flags,
126
- service: Flags.string({ char: 's', description: 'service name' }),
127
- ram: Flags.string({ char: 'r', description: 'RAM' }),
128
- cpu: Flags.string({ char: 'c', description: 'CPU' }),
129
- disk: Flags.string({ char: 'd', description: 'DISK' }),
130
- };
131
- export default ServiceResize;
@@ -4,7 +4,12 @@ import { isEmptyObject } from "../../helper.js";
4
4
  import chalk from "chalk";
5
5
  import inquirer from "inquirer";
6
6
  import axios from "axios";
7
- class ServiceRestart extends Command {
7
+ export default class ServiceRestart extends Command {
8
+ static description = "restart a service";
9
+ static flags = {
10
+ ...Command.flags,
11
+ service: Flags.string({ char: "s", description: "service name" }),
12
+ };
8
13
  async run() {
9
14
  const { args, flags } = await this.parse(ServiceRestart);
10
15
  const cli = this;
@@ -50,9 +55,3 @@ class ServiceRestart extends Command {
50
55
  }
51
56
  }
52
57
  }
53
- ServiceRestart.description = "restart a service";
54
- ServiceRestart.flags = {
55
- ...Command.flags,
56
- service: Flags.string({ char: "s", description: "service name" }),
57
- };
58
- export default ServiceRestart;
@@ -4,7 +4,12 @@ import { isEmptyObject } from "../../helper.js";
4
4
  import chalk from "chalk";
5
5
  import inquirer from 'inquirer';
6
6
  import axios from "axios";
7
- class ServiceStart extends Command {
7
+ export default class ServiceStart extends Command {
8
+ static description = 'start a service';
9
+ static flags = {
10
+ ...Command.flags,
11
+ service: Flags.string({ char: 's', description: 'service name' }),
12
+ };
8
13
  async run() {
9
14
  const { args, flags } = await this.parse(ServiceStart);
10
15
  const cli = this;
@@ -48,9 +53,3 @@ class ServiceStart extends Command {
48
53
  }
49
54
  }
50
55
  }
51
- ServiceStart.description = 'start a service';
52
- ServiceStart.flags = {
53
- ...Command.flags,
54
- service: Flags.string({ char: 's', description: 'service name' }),
55
- };
56
- export default ServiceStart;
@@ -4,7 +4,12 @@ import { isEmptyObject } from "../../helper.js";
4
4
  import chalk from "chalk";
5
5
  import inquirer from 'inquirer';
6
6
  import axios from "axios";
7
- class ServiceStop extends Command {
7
+ export default class ServiceStop extends Command {
8
+ static description = 'stop a service';
9
+ static flags = {
10
+ ...Command.flags,
11
+ service: Flags.string({ char: 's', description: 'service name' }),
12
+ };
8
13
  async run() {
9
14
  const { args, flags } = await this.parse(ServiceStop);
10
15
  const cli = this;
@@ -48,9 +53,3 @@ class ServiceStop extends Command {
48
53
  }
49
54
  }
50
55
  }
51
- ServiceStop.description = 'stop a service';
52
- ServiceStop.flags = {
53
- ...Command.flags,
54
- service: Flags.string({ char: 's', description: 'service name' }),
55
- };
56
- export default ServiceStop;
@@ -39,7 +39,7 @@
39
39
  "enableJsonFlag": false,
40
40
  "isESM": true,
41
41
  "relativePath": [
42
- "lib",
42
+ "dist",
43
43
  "commands",
44
44
  "deploy.js"
45
45
  ]
@@ -91,7 +91,7 @@
91
91
  "enableJsonFlag": false,
92
92
  "isESM": true,
93
93
  "relativePath": [
94
- "lib",
94
+ "dist",
95
95
  "commands",
96
96
  "login.js"
97
97
  ]
@@ -119,7 +119,7 @@
119
119
  "enableJsonFlag": false,
120
120
  "isESM": true,
121
121
  "relativePath": [
122
- "lib",
122
+ "dist",
123
123
  "commands",
124
124
  "account",
125
125
  "list.js"
@@ -148,7 +148,7 @@
148
148
  "enableJsonFlag": false,
149
149
  "isESM": true,
150
150
  "relativePath": [
151
- "lib",
151
+ "dist",
152
152
  "commands",
153
153
  "account",
154
154
  "remove.js"
@@ -185,7 +185,7 @@
185
185
  "enableJsonFlag": false,
186
186
  "isESM": true,
187
187
  "relativePath": [
188
- "lib",
188
+ "dist",
189
189
  "commands",
190
190
  "account",
191
191
  "use.js"
@@ -214,7 +214,7 @@
214
214
  "enableJsonFlag": false,
215
215
  "isESM": true,
216
216
  "relativePath": [
217
- "lib",
217
+ "dist",
218
218
  "commands",
219
219
  "service",
220
220
  "list.js"
@@ -251,7 +251,7 @@
251
251
  "enableJsonFlag": false,
252
252
  "isESM": true,
253
253
  "relativePath": [
254
- "lib",
254
+ "dist",
255
255
  "commands",
256
256
  "service",
257
257
  "logs.js"
@@ -312,7 +312,7 @@
312
312
  "enableJsonFlag": false,
313
313
  "isESM": true,
314
314
  "relativePath": [
315
- "lib",
315
+ "dist",
316
316
  "commands",
317
317
  "service",
318
318
  "resize.js"
@@ -349,7 +349,7 @@
349
349
  "enableJsonFlag": false,
350
350
  "isESM": true,
351
351
  "relativePath": [
352
- "lib",
352
+ "dist",
353
353
  "commands",
354
354
  "service",
355
355
  "restart.js"
@@ -386,7 +386,7 @@
386
386
  "enableJsonFlag": false,
387
387
  "isESM": true,
388
388
  "relativePath": [
389
- "lib",
389
+ "dist",
390
390
  "commands",
391
391
  "service",
392
392
  "start.js"
@@ -423,12 +423,12 @@
423
423
  "enableJsonFlag": false,
424
424
  "isESM": true,
425
425
  "relativePath": [
426
- "lib",
426
+ "dist",
427
427
  "commands",
428
428
  "service",
429
429
  "stop.js"
430
430
  ]
431
431
  }
432
432
  },
433
- "version": "0.8.7"
433
+ "version": "0.8.9"
434
434
  }
package/package.json CHANGED
@@ -1,27 +1,16 @@
1
1
  {
2
- "name": "@chabokan.net/cli",
3
- "version": "0.8.7",
2
+ "name": "@chabokan.net/cli",
3
+ "version": "0.8.9",
4
4
  "description": "Chabokan Cli for PaaS Services",
5
5
  "author": "Mohammad Abdi",
6
- "type": "module",
7
6
  "bin": {
8
- "chabok": "./bin/run"
7
+ "chabok": "./bin/run.js"
9
8
  },
10
- "homepage": "https://github.com/chabokan/cli",
11
- "license": "MIT",
12
- "main": "lib/index.js",
13
- "repository": "chabokan/cli",
14
- "files": [
15
- "/bin",
16
- "/lib",
17
- "/npm-shrinkwrap.json",
18
- "/oclif.manifest.json"
19
- ],
20
9
  "dependencies": {
21
- "@oclif/core": "^3.26.6",
22
- "@oclif/plugin-autocomplete": "^3.0.18",
10
+ "@oclif/core": "^3",
23
11
  "@oclif/plugin-help": "^6",
24
- "@oclif/plugin-plugins": "^5.1.3",
12
+ "@oclif/plugin-plugins": "^5",
13
+ "@oclif/plugin-autocomplete": "^3.0.18",
25
14
  "@oclif/plugin-version": "^2.1.2",
26
15
  "axios": "^1.7.2",
27
16
  "boxen": "^7.1.1",
@@ -40,29 +29,40 @@
40
29
  "tar": "^7.1.0"
41
30
  },
42
31
  "devDependencies": {
43
- "@oclif/test": "^4.0.2",
32
+ "@oclif/prettier-config": "^0.2.1",
33
+ "@oclif/test": "^4",
44
34
  "@types/chai": "^4",
35
+ "@types/mocha": "^10",
36
+ "@types/node": "^18",
37
+ "chai": "^4",
38
+ "eslint": "^8",
39
+ "eslint-config-oclif": "^5",
40
+ "eslint-config-oclif-typescript": "^3",
41
+ "eslint-config-prettier": "^9",
42
+ "mocha": "^10",
43
+ "oclif": "^4",
44
+ "shx": "^0.3.3",
45
+ "ts-node": "^10",
46
+ "typescript": "^5",
45
47
  "@types/fs-extra": "^11.0.4",
46
48
  "@types/inquirer": "^9.0.7",
47
- "@types/mocha": "^10.0.6",
48
- "@types/node": "^20.12.12",
49
49
  "@types/progress": "^2.0.7",
50
50
  "@types/semver": "^7.5.8",
51
- "@types/tar": "^6.1.13",
52
- "chai": "^5",
53
- "eslint": "^9.3.0",
54
- "eslint-config-oclif": "^5",
55
- "eslint-config-oclif-typescript": "^3.1.7",
56
- "mocha": "^10",
57
- "oclif": "^4",
58
- "shx": "^0.3.4",
59
- "ts-node": "^10.9.2",
60
- "tslib": "^2.6.2",
61
- "typescript": "^5.4.5"
51
+ "@types/tar": "^6.1.13"
62
52
  },
53
+ "files": [
54
+ "/bin",
55
+ "/dist",
56
+ "/oclif.manifest.json"
57
+ ],
58
+ "homepage": "https://github.com/chabokan/cli",
59
+ "license": "MIT",
60
+ "main": "dist/index.js",
61
+ "type": "module",
63
62
  "oclif": {
64
63
  "bin": "chabok",
65
- "commands": "./lib/commands",
64
+ "dirname": "cli",
65
+ "commands": "./dist/commands",
66
66
  "additionalHelpFlags": [
67
67
  "-h"
68
68
  ],
@@ -71,6 +71,7 @@
71
71
  ],
72
72
  "plugins": [
73
73
  "@oclif/plugin-help",
74
+ "@oclif/plugin-plugins",
74
75
  "@oclif/plugin-autocomplete",
75
76
  "@oclif/plugin-version"
76
77
  ],
@@ -84,16 +85,17 @@
84
85
  }
85
86
  }
86
87
  },
88
+ "repository": "chabokan/cli",
87
89
  "scripts": {
88
- "build": "shx rm -rf lib && rm -rf tsconfig.tsbuildinfo && tsc -b",
89
- "lint": "eslint . --ext .ts --config .eslintrc",
90
+ "build": "shx rm -rf dist && tsc -b",
91
+ "lint": "eslint . --ext .ts",
90
92
  "postpack": "shx rm -f oclif.manifest.json",
91
- "posttest": "yarn lint",
92
- "prepack": "yarn build && oclif manifest && oclif readme",
93
+ "posttest": "npm run lint",
94
+ "prepack": "oclif manifest && oclif readme",
93
95
  "test": "mocha --forbid-only \"test/**/*.test.ts\"",
94
96
  "version": "oclif readme && git add README.md"
95
97
  },
96
- "engines": {
98
+ "engines": {
97
99
  "node": ">=18.18.0"
98
100
  },
99
101
  "bugs": "https://github.com/chabokan/cli/issues",
@@ -105,5 +107,5 @@
105
107
  "cloud",
106
108
  "docker"
107
109
  ],
108
- "types": "lib/index.d.ts"
110
+ "types": "dist/index.d.ts"
109
111
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Salesforce
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/bin/dev DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const oclif = require('@oclif/core')
4
-
5
- const path = require('path')
6
- const project = path.join(__dirname, '..', 'tsconfig.json')
7
-
8
- // In dev mode -> use ts-node and dev plugins
9
- process.env.NODE_ENV = 'development'
10
-
11
- require('ts-node').register({project})
12
-
13
- // In dev mode, always show stack traces
14
- oclif.settings.debug = true;
15
-
16
- // Start the CLI
17
- oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
package/bin/run DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const oclif = require('@oclif/core')
4
-
5
- oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes