@chabokan.net/cli 0.7.4 → 0.7.7
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/base.js +2 -1
- package/lib/commands/deploy.js +8 -2
- package/lib/constants.d.ts +1 -1
- package/lib/constants.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ $ npm install -g @chabokan.net/cli
|
|
|
19
19
|
$ chabok COMMAND
|
|
20
20
|
running command...
|
|
21
21
|
$ chabok (-v|--version|version)
|
|
22
|
-
@chabokan.net/cli/0.7.
|
|
22
|
+
@chabokan.net/cli/0.7.7 darwin-x64 node-v14.17.5
|
|
23
23
|
$ chabok --help [COMMAND]
|
|
24
24
|
USAGE
|
|
25
25
|
$ chabok COMMAND
|
|
@@ -52,7 +52,7 @@ OPTIONS
|
|
|
52
52
|
-u, --user=user default user
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
_See code: [src/commands/change-user.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
55
|
+
_See code: [src/commands/change-user.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/change-user.ts)_
|
|
56
56
|
|
|
57
57
|
## `chabok config-clear`
|
|
58
58
|
|
|
@@ -66,7 +66,7 @@ OPTIONS
|
|
|
66
66
|
-h, --help show CLI help
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
_See code: [src/commands/config-clear.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
69
|
+
_See code: [src/commands/config-clear.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/config-clear.ts)_
|
|
70
70
|
|
|
71
71
|
## `chabok deploy`
|
|
72
72
|
|
|
@@ -82,7 +82,7 @@ OPTIONS
|
|
|
82
82
|
-s, --service=service service name
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
_See code: [src/commands/deploy.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
85
|
+
_See code: [src/commands/deploy.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/deploy.ts)_
|
|
86
86
|
|
|
87
87
|
## `chabok help [COMMAND]`
|
|
88
88
|
|
|
@@ -116,7 +116,7 @@ OPTIONS
|
|
|
116
116
|
-u, --username=username your username
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
_See code: [src/commands/login.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
119
|
+
_See code: [src/commands/login.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/login.ts)_
|
|
120
120
|
|
|
121
121
|
## `chabok logs`
|
|
122
122
|
|
|
@@ -131,7 +131,7 @@ OPTIONS
|
|
|
131
131
|
-s, --service=service service name
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
_See code: [src/commands/logs.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
134
|
+
_See code: [src/commands/logs.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/logs.ts)_
|
|
135
135
|
|
|
136
136
|
## `chabok resize`
|
|
137
137
|
|
|
@@ -149,7 +149,7 @@ OPTIONS
|
|
|
149
149
|
-s, --service=service service name
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
_See code: [src/commands/resize.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
152
|
+
_See code: [src/commands/resize.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/resize.ts)_
|
|
153
153
|
|
|
154
154
|
## `chabok restart`
|
|
155
155
|
|
|
@@ -164,7 +164,7 @@ OPTIONS
|
|
|
164
164
|
-s, --service=service service name
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
_See code: [src/commands/restart.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
167
|
+
_See code: [src/commands/restart.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/restart.ts)_
|
|
168
168
|
|
|
169
169
|
## `chabok start`
|
|
170
170
|
|
|
@@ -179,7 +179,7 @@ OPTIONS
|
|
|
179
179
|
-s, --service=service service name
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
_See code: [src/commands/start.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
182
|
+
_See code: [src/commands/start.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/start.ts)_
|
|
183
183
|
|
|
184
184
|
## `chabok stop`
|
|
185
185
|
|
|
@@ -194,5 +194,5 @@ OPTIONS
|
|
|
194
194
|
-s, --service=service service name
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
_See code: [src/commands/stop.ts](https://github.com/chabokan/cli/blob/v0.7.
|
|
197
|
+
_See code: [src/commands/stop.ts](https://github.com/chabokan/cli/blob/v0.7.7/src/commands/stop.ts)_
|
|
198
198
|
<!-- commandsstop -->
|
package/lib/base.js
CHANGED
|
@@ -29,10 +29,11 @@ class default_1 extends command_1.default {
|
|
|
29
29
|
rejectUnauthorized: false
|
|
30
30
|
});
|
|
31
31
|
// @ts-ignore
|
|
32
|
-
const gotConfig = {
|
|
32
|
+
const gotConfig = {};
|
|
33
33
|
this.axiosConfig.httpsAgent = main_agent;
|
|
34
34
|
this.axiosConfig.baseURL = constants_1.BASE_API_URL;
|
|
35
35
|
gotConfig.prefixUrl = this.axiosConfig.baseURL;
|
|
36
|
+
gotConfig.agent = { https: main_agent };
|
|
36
37
|
const proxy = process.env.http_proxy || process.env.https_proxy;
|
|
37
38
|
if (proxy) {
|
|
38
39
|
this.log(`Using proxy server ${proxy}`);
|
package/lib/commands/deploy.js
CHANGED
|
@@ -54,15 +54,21 @@ class Deploy extends base_1.default {
|
|
|
54
54
|
}
|
|
55
55
|
async prepare_archive(project_path) {
|
|
56
56
|
const defaultIgnores = [
|
|
57
|
+
'.npm',
|
|
57
58
|
'.git',
|
|
58
59
|
'.idea',
|
|
60
|
+
'.DS_Store',
|
|
59
61
|
'.vscode',
|
|
62
|
+
'__pycache__',
|
|
60
63
|
'.next',
|
|
61
|
-
'.
|
|
64
|
+
'.nuxt',
|
|
62
65
|
'*.*~',
|
|
63
66
|
'liara.json',
|
|
64
67
|
'node_modules',
|
|
65
68
|
'bower_components',
|
|
69
|
+
'venv',
|
|
70
|
+
'vendor',
|
|
71
|
+
'*.log',
|
|
66
72
|
];
|
|
67
73
|
const ignoreCache = {};
|
|
68
74
|
const ignoreInstance = ignore_1.default({ ignorecase: false });
|
|
@@ -104,7 +110,7 @@ class Deploy extends base_1.default {
|
|
|
104
110
|
body.append('file', fs_extra_1.default.createReadStream(archive_path));
|
|
105
111
|
const { size: sourceSize } = fs_extra_1.default.statSync(archive_path);
|
|
106
112
|
if (sourceSize > MAX_SOURCE_SIZE) {
|
|
107
|
-
upload_response.message = "Source is too large. (max:
|
|
113
|
+
upload_response.message = "Source is too large. (max: 200MB)";
|
|
108
114
|
return upload_response;
|
|
109
115
|
}
|
|
110
116
|
const bar = new progress_1.default('Uploading [:bar] :percent :etas', {
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const GLOBAL_CONF_PATH: string;
|
|
2
|
-
export declare const BASE_API_URL = "https://hub.chabokan.net/api/v1/";
|
|
2
|
+
export declare const BASE_API_URL = "https://hub.chabokan.net/fa/api/v1/";
|
package/lib/constants.js
CHANGED
|
@@ -5,4 +5,4 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
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
|
-
exports.BASE_API_URL = "https://hub.chabokan.net/api/v1/";
|
|
8
|
+
exports.BASE_API_URL = "https://hub.chabokan.net/fa/api/v1/";
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.7.
|
|
1
|
+
{"version":"0.7.7","commands":{"change-user":{"id":"change-user","description":"switch your default user between logged in users","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"user":{"name":"user","type":"option","char":"u","description":"default user"}},"args":[]},"config-clear":{"id":"config-clear","description":"clear config file, data such as auth will be removed.","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"deploy":{"id":"deploy","description":"this command help you build and deploy your service to chabokan in easy way.","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"path":{"name":"path","type":"option","char":"p","description":"service path in your computer"},"service":{"name":"service","type":"option","char":"s","description":"service name"}},"args":[]},"login":{"id":"login","description":"login to hub.chabokan.net account","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"username":{"name":"username","type":"option","char":"u","description":"your username"},"password":{"name":"password","type":"option","char":"p","description":"your password"},"token":{"name":"token","type":"option","char":"t","description":"login with api token"}},"args":[]},"logs":{"id":"logs","description":"read latest logs from service","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"service":{"name":"service","type":"option","char":"s","description":"service name"}},"args":[]},"resize":{"id":"resize","description":"resize a service","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"service":{"name":"service","type":"option","char":"s","description":"service name"},"ram":{"name":"ram","type":"option","char":"r","description":"RAM"},"cpu":{"name":"cpu","type":"option","char":"c","description":"CPU"},"disk":{"name":"disk","type":"option","char":"d","description":"DISK"}},"args":[]},"restart":{"id":"restart","description":"restart a service","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"service":{"name":"service","type":"option","char":"s","description":"service name"}},"args":[]},"start":{"id":"start","description":"start a service","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"service":{"name":"service","type":"option","char":"s","description":"service name"}},"args":[]},"stop":{"id":"stop","description":"stop a service","pluginName":"@chabokan.net/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"service":{"name":"service","type":"option","char":"s","description":"service name"}},"args":[]}}}
|