@internxt/cli 1.0.13 → 1.0.14
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 +22 -16
- package/dist/commands/webdav.d.ts +3 -1
- package/dist/commands/webdav.js +31 -3
- package/oclif.manifest.json +9 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ $ npm install -g @internxt/cli
|
|
|
31
31
|
$ internxt COMMAND
|
|
32
32
|
running command...
|
|
33
33
|
$ internxt (--version)
|
|
34
|
-
@internxt/cli/1.0.
|
|
34
|
+
@internxt/cli/1.0.14 darwin-arm64 node-v20.10.0
|
|
35
35
|
$ internxt --help [COMMAND]
|
|
36
36
|
USAGE
|
|
37
37
|
$ internxt COMMAND
|
|
@@ -82,7 +82,7 @@ EXAMPLES
|
|
|
82
82
|
$ internxt config
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
_See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
85
|
+
_See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/config.ts)_
|
|
86
86
|
|
|
87
87
|
## `internxt create-folder`
|
|
88
88
|
|
|
@@ -103,7 +103,7 @@ EXAMPLES
|
|
|
103
103
|
$ internxt create-folder
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
_See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
106
|
+
_See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/create-folder.ts)_
|
|
107
107
|
|
|
108
108
|
## `internxt download`
|
|
109
109
|
|
|
@@ -126,7 +126,7 @@ EXAMPLES
|
|
|
126
126
|
$ internxt download
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
_See code: [src/commands/download.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
129
|
+
_See code: [src/commands/download.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/download.ts)_
|
|
130
130
|
|
|
131
131
|
## `internxt list`
|
|
132
132
|
|
|
@@ -160,7 +160,7 @@ EXAMPLES
|
|
|
160
160
|
$ internxt list
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
_See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
163
|
+
_See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/list.ts)_
|
|
164
164
|
|
|
165
165
|
## `internxt login`
|
|
166
166
|
|
|
@@ -186,7 +186,7 @@ EXAMPLES
|
|
|
186
186
|
$ internxt login
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
_See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
189
|
+
_See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/login.ts)_
|
|
190
190
|
|
|
191
191
|
## `internxt logout`
|
|
192
192
|
|
|
@@ -203,7 +203,7 @@ EXAMPLES
|
|
|
203
203
|
$ internxt logout
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
_See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
206
|
+
_See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/logout.ts)_
|
|
207
207
|
|
|
208
208
|
## `internxt logs`
|
|
209
209
|
|
|
@@ -220,7 +220,7 @@ EXAMPLES
|
|
|
220
220
|
$ internxt logs
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
-
_See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
223
|
+
_See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/logs.ts)_
|
|
224
224
|
|
|
225
225
|
## `internxt move`
|
|
226
226
|
|
|
@@ -245,7 +245,7 @@ EXAMPLES
|
|
|
245
245
|
$ internxt move
|
|
246
246
|
```
|
|
247
247
|
|
|
248
|
-
_See code: [src/commands/move.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
248
|
+
_See code: [src/commands/move.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/move.ts)_
|
|
249
249
|
|
|
250
250
|
## `internxt trash`
|
|
251
251
|
|
|
@@ -269,7 +269,7 @@ EXAMPLES
|
|
|
269
269
|
$ internxt trash
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
_See code: [src/commands/trash.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
272
|
+
_See code: [src/commands/trash.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/trash.ts)_
|
|
273
273
|
|
|
274
274
|
## `internxt upload`
|
|
275
275
|
|
|
@@ -293,24 +293,30 @@ EXAMPLES
|
|
|
293
293
|
$ internxt upload
|
|
294
294
|
```
|
|
295
295
|
|
|
296
|
-
_See code: [src/commands/upload.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
296
|
+
_See code: [src/commands/upload.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/upload.ts)_
|
|
297
297
|
|
|
298
298
|
## `internxt webdav ACTION`
|
|
299
299
|
|
|
300
|
-
Enable or
|
|
300
|
+
Enable,disable, restart or get the status of the Internxt CLI WebDav server
|
|
301
301
|
|
|
302
302
|
```
|
|
303
303
|
USAGE
|
|
304
304
|
$ internxt webdav ACTION
|
|
305
305
|
|
|
306
306
|
DESCRIPTION
|
|
307
|
-
Enable or
|
|
307
|
+
Enable,disable, restart or get the status of the Internxt CLI WebDav server
|
|
308
308
|
|
|
309
309
|
EXAMPLES
|
|
310
|
-
$ internxt webdav
|
|
310
|
+
$ internxt webdav enable
|
|
311
|
+
|
|
312
|
+
$ internxt webdav disable
|
|
313
|
+
|
|
314
|
+
$ internxt webdav restart
|
|
315
|
+
|
|
316
|
+
$ internxt webdav status
|
|
311
317
|
```
|
|
312
318
|
|
|
313
|
-
_See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
319
|
+
_See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/webdav.ts)_
|
|
314
320
|
|
|
315
321
|
## `internxt whoami`
|
|
316
322
|
|
|
@@ -327,7 +333,7 @@ EXAMPLES
|
|
|
327
333
|
$ internxt whoami
|
|
328
334
|
```
|
|
329
335
|
|
|
330
|
-
_See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.0.
|
|
336
|
+
_See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.0.14/src/commands/whoami.ts)_
|
|
331
337
|
<!-- commandsstop -->
|
|
332
338
|
|
|
333
339
|
# Current Limitations
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
export default class Webdav extends Command {
|
|
3
|
-
static readonly description = "Enable or
|
|
3
|
+
static readonly description = "Enable,disable, restart or get the status of the Internxt CLI WebDav server";
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {};
|
|
6
6
|
static args: {
|
|
@@ -8,5 +8,7 @@ export default class Webdav extends Command {
|
|
|
8
8
|
};
|
|
9
9
|
enableWebDav(): Promise<void>;
|
|
10
10
|
disableWebDav(): Promise<void>;
|
|
11
|
+
restartWebDav(): Promise<void>;
|
|
12
|
+
webDAVStatus(): Promise<void>;
|
|
11
13
|
run(): Promise<void>;
|
|
12
14
|
}
|
package/dist/commands/webdav.js
CHANGED
|
@@ -6,14 +6,20 @@ const cli_utils_1 = require("../utils/cli.utils");
|
|
|
6
6
|
const config_service_1 = require("../services/config.service");
|
|
7
7
|
const analytics_service_1 = require("../services/analytics.service");
|
|
8
8
|
const auth_service_1 = require("../services/auth.service");
|
|
9
|
+
const drive_database_manager_service_1 = require("../services/database/drive-database-manager.service");
|
|
9
10
|
class Webdav extends core_1.Command {
|
|
10
|
-
static description = 'Enable or
|
|
11
|
-
static examples = [
|
|
11
|
+
static description = 'Enable,disable, restart or get the status of the Internxt CLI WebDav server';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> enable',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> disable',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> restart',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> status',
|
|
17
|
+
];
|
|
12
18
|
static flags = {};
|
|
13
19
|
static args = {
|
|
14
20
|
action: core_1.Args.string({
|
|
15
21
|
required: true,
|
|
16
|
-
options: ['enable', 'disable'],
|
|
22
|
+
options: ['enable', 'disable', 'restart', 'status'],
|
|
17
23
|
}),
|
|
18
24
|
};
|
|
19
25
|
async enableWebDav() {
|
|
@@ -40,6 +46,20 @@ class Webdav extends core_1.Command {
|
|
|
40
46
|
cli_utils_1.CLIUtils.done();
|
|
41
47
|
cli_utils_1.CLIUtils.success('Internxt WebDav server stopped successfully');
|
|
42
48
|
}
|
|
49
|
+
async restartWebDav() {
|
|
50
|
+
cli_utils_1.CLIUtils.doing('Restarting Internxt WebDav server...');
|
|
51
|
+
await drive_database_manager_service_1.DriveDatabaseManager.clean();
|
|
52
|
+
await pm2_utils_1.PM2Utils.connect();
|
|
53
|
+
await pm2_utils_1.PM2Utils.killWebDavServer();
|
|
54
|
+
await pm2_utils_1.PM2Utils.startWebDavServer();
|
|
55
|
+
cli_utils_1.CLIUtils.done();
|
|
56
|
+
cli_utils_1.CLIUtils.success('Internxt WebDav server restarted successfully');
|
|
57
|
+
}
|
|
58
|
+
async webDAVStatus() {
|
|
59
|
+
await pm2_utils_1.PM2Utils.connect();
|
|
60
|
+
const { status } = await pm2_utils_1.PM2Utils.webdavServerStatus();
|
|
61
|
+
this.log(`Internxt WebDAV server status: ${status}`);
|
|
62
|
+
}
|
|
43
63
|
async run() {
|
|
44
64
|
const { args } = await this.parse(Webdav);
|
|
45
65
|
try {
|
|
@@ -52,6 +72,14 @@ class Webdav extends core_1.Command {
|
|
|
52
72
|
await this.disableWebDav();
|
|
53
73
|
break;
|
|
54
74
|
}
|
|
75
|
+
case 'restart': {
|
|
76
|
+
await this.restartWebDav();
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
case 'status': {
|
|
80
|
+
await this.webDAVStatus();
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
55
83
|
}
|
|
56
84
|
}
|
|
57
85
|
catch (error) {
|
package/oclif.manifest.json
CHANGED
|
@@ -580,14 +580,19 @@
|
|
|
580
580
|
"name": "action",
|
|
581
581
|
"options": [
|
|
582
582
|
"enable",
|
|
583
|
-
"disable"
|
|
583
|
+
"disable",
|
|
584
|
+
"restart",
|
|
585
|
+
"status"
|
|
584
586
|
],
|
|
585
587
|
"required": true
|
|
586
588
|
}
|
|
587
589
|
},
|
|
588
|
-
"description": "Enable or
|
|
590
|
+
"description": "Enable,disable, restart or get the status of the Internxt CLI WebDav server",
|
|
589
591
|
"examples": [
|
|
590
|
-
"<%= config.bin %> <%= command.id %>"
|
|
592
|
+
"<%= config.bin %> <%= command.id %> enable",
|
|
593
|
+
"<%= config.bin %> <%= command.id %> disable",
|
|
594
|
+
"<%= config.bin %> <%= command.id %> restart",
|
|
595
|
+
"<%= config.bin %> <%= command.id %> status"
|
|
591
596
|
],
|
|
592
597
|
"flags": {},
|
|
593
598
|
"hasDynamicHelp": false,
|
|
@@ -629,5 +634,5 @@
|
|
|
629
634
|
]
|
|
630
635
|
}
|
|
631
636
|
},
|
|
632
|
-
"version": "1.0.
|
|
637
|
+
"version": "1.0.14"
|
|
633
638
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "PixoDev",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Internxt CLI to manage your encrypted storage",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"migrate": "sequelize db:migrate",
|
|
17
17
|
"migrate:undo": "sequelize db:migrate:undo",
|
|
18
18
|
"publish:npm": "npm run build && npm publish --scope=@internxt --registry=https://registry.npmjs.org/ --access public",
|
|
19
|
-
"publish:github": "npm publish"
|
|
19
|
+
"publish:github": "npm publish",
|
|
20
|
+
"postinstall": "internxt webdav restart"
|
|
20
21
|
},
|
|
21
22
|
"publishConfig": {
|
|
22
23
|
"access": "public",
|