@internxt/cli 1.2.2 → 1.3.0
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/.env +2 -1
- package/README.md +404 -25
- package/bin/dev.js +0 -0
- package/bin/run.js +0 -0
- package/dist/commands/config.js +1 -1
- package/dist/commands/list.js +1 -2
- package/dist/commands/{move.d.ts → move-file.d.ts} +5 -4
- package/dist/commands/move-file.js +84 -0
- package/dist/commands/move-folder.d.ts +19 -0
- package/dist/commands/move-folder.js +84 -0
- package/dist/commands/rename.d.ts +18 -0
- package/dist/commands/{move.js → rename.js} +29 -29
- package/dist/commands/trash-clear.d.ts +15 -0
- package/dist/commands/trash-clear.js +64 -0
- package/dist/commands/trash-list.d.ts +20 -0
- package/dist/commands/trash-list.js +95 -0
- package/dist/commands/trash-restore-file.d.ts +19 -0
- package/dist/commands/trash-restore-file.js +87 -0
- package/dist/commands/trash-restore-folder.d.ts +19 -0
- package/dist/commands/trash-restore-folder.js +87 -0
- package/dist/commands/webdav-config.d.ts +17 -0
- package/dist/commands/webdav-config.js +91 -0
- package/dist/commands/webdav.d.ts +1 -1
- package/dist/commands/webdav.js +5 -2
- package/dist/database/migrations/20241018114828-add-parent-column.d.ts +1 -0
- package/dist/database/migrations/20241018114828-add-parent-column.js +24 -0
- package/dist/hooks/prerun/auth_check.js +2 -1
- package/dist/services/analytics.service.d.ts +9 -6
- package/dist/services/analytics.service.js +2 -35
- package/dist/services/config.service.d.ts +6 -1
- package/dist/services/config.service.js +24 -0
- package/dist/services/database/drive-database-manager.service.d.ts +10 -7
- package/dist/services/database/drive-database-manager.service.js +34 -24
- package/dist/services/database/drive-file/drive-file.attributes.d.ts +1 -0
- package/dist/services/database/drive-file/drive-file.domain.d.ts +4 -1
- package/dist/services/database/drive-file/drive-file.domain.js +21 -1
- package/dist/services/database/drive-file/drive-file.model.d.ts +1 -0
- package/dist/services/database/drive-file/drive-file.model.js +4 -0
- package/dist/services/database/drive-folder/drive-folder.attributes.d.ts +1 -0
- package/dist/services/database/drive-folder/drive-folder.domain.d.ts +4 -1
- package/dist/services/database/drive-folder/drive-folder.domain.js +18 -1
- package/dist/services/database/drive-folder/drive-folder.model.d.ts +1 -0
- package/dist/services/database/drive-folder/drive-folder.model.js +5 -0
- package/dist/services/drive/drive-file.service.d.ts +5 -0
- package/dist/services/drive/drive-file.service.js +10 -0
- package/dist/services/drive/drive-folder.service.d.ts +7 -2
- package/dist/services/drive/drive-folder.service.js +16 -0
- package/dist/services/drive/trash.service.d.ts +7 -0
- package/dist/services/drive/trash.service.js +30 -0
- package/dist/services/network/upload.service.js +5 -1
- package/dist/services/sdk-manager.service.d.ts +1 -2
- package/dist/services/sdk-manager.service.js +0 -5
- package/dist/services/usage.service.d.ts +2 -1
- package/dist/services/usage.service.js +3 -7
- package/dist/services/validation.service.d.ts +2 -0
- package/dist/services/validation.service.js +6 -0
- package/dist/types/command.types.d.ts +16 -0
- package/dist/types/command.types.js +29 -1
- package/dist/types/config.types.d.ts +0 -1
- package/dist/types/drive.types.d.ts +2 -1
- package/dist/types/network.types.d.ts +5 -0
- package/dist/types/webdav.types.d.ts +1 -0
- package/dist/utils/cli.utils.d.ts +1 -1
- package/dist/utils/drive.utils.js +3 -1
- package/dist/utils/network.utils.d.ts +3 -9
- package/dist/utils/network.utils.js +21 -7
- package/dist/utils/webdav.utils.d.ts +16 -2
- package/dist/utils/webdav.utils.js +70 -19
- package/dist/utils/xml.utils.d.ts +1 -0
- package/dist/utils/xml.utils.js +3 -0
- package/dist/webdav/handlers/DELETE.handler.d.ts +5 -1
- package/dist/webdav/handlers/DELETE.handler.js +15 -12
- package/dist/webdav/handlers/GET.handler.d.ts +1 -2
- package/dist/webdav/handlers/GET.handler.js +10 -13
- package/dist/webdav/handlers/HEAD.handler.d.ts +1 -1
- package/dist/webdav/handlers/HEAD.handler.js +2 -2
- package/dist/webdav/handlers/MKCOL.handler.d.ts +1 -1
- package/dist/webdav/handlers/MKCOL.handler.js +14 -15
- package/dist/webdav/handlers/MOVE.handler.d.ts +11 -1
- package/dist/webdav/handlers/MOVE.handler.js +73 -2
- package/dist/webdav/handlers/OPTIONS.handler.d.ts +1 -1
- package/dist/webdav/handlers/OPTIONS.handler.js +2 -2
- package/dist/webdav/handlers/PROPFIND.handler.d.ts +11 -12
- package/dist/webdav/handlers/PROPFIND.handler.js +62 -76
- package/dist/webdav/handlers/PUT.handler.d.ts +5 -8
- package/dist/webdav/handlers/PUT.handler.js +34 -18
- package/dist/webdav/middewares/request-logger.middleware.js +1 -1
- package/dist/webdav/webdav-server.d.ts +14 -14
- package/dist/webdav/webdav-server.js +31 -14
- package/oclif.manifest.json +441 -8
- package/package.json +22 -26
- package/scripts/add-cert.sh +19 -5
package/.env
CHANGED
|
@@ -8,4 +8,5 @@ APP_CRYPTO_SECRET=6KYQBP847D4ATSFA
|
|
|
8
8
|
APP_CRYPTO_SECRET2=8Q8VMUE3BJZV87GT
|
|
9
9
|
APP_MAGIC_IV=d139cb9a2cd17092e79e1861cf9d7023
|
|
10
10
|
APP_MAGIC_SALT=38dce0391b49efba88dbc8c39ebf868f0267eb110bb0012ab27dc52a528d61b1d1ed9d76f400ff58e3240028442b1eab9bb84e111d9dadd997982dbde9dbd25e
|
|
11
|
-
|
|
11
|
+
RUDDERSTACK_WRITE_KEY=
|
|
12
|
+
RUDDERSTACK_DATAPLANE_URL=
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://github.com/internxt/cli/actions/workflows/commands-unit-tests.yml)
|
|
4
4
|
[](https://github.com/internxt/cli/actions/workflows/github-code-scanning/codeql)
|
|
5
5
|
|
|
6
|
-
A CLI tool to interact with
|
|
6
|
+
A CLI tool to interact with your Internxt encrypted files
|
|
7
7
|
|
|
8
8
|
<!-- toc -->
|
|
9
9
|
* [Internxt CLI](#internxt-cli)
|
|
@@ -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.
|
|
34
|
+
@internxt/cli/1.3.0 win32-x64 node-v20.2.0
|
|
35
35
|
$ internxt --help [COMMAND]
|
|
36
36
|
USAGE
|
|
37
37
|
$ internxt COMMAND
|
|
@@ -50,10 +50,23 @@ USAGE
|
|
|
50
50
|
* [`internxt login`](#internxt-login)
|
|
51
51
|
* [`internxt logout`](#internxt-logout)
|
|
52
52
|
* [`internxt logs`](#internxt-logs)
|
|
53
|
-
* [`internxt move`](#internxt-move)
|
|
53
|
+
* [`internxt move-file`](#internxt-move-file)
|
|
54
|
+
* [`internxt move-folder`](#internxt-move-folder)
|
|
55
|
+
* [`internxt move file`](#internxt-move-file-1)
|
|
56
|
+
* [`internxt move folder`](#internxt-move-folder-1)
|
|
57
|
+
* [`internxt rename`](#internxt-rename)
|
|
54
58
|
* [`internxt trash`](#internxt-trash)
|
|
59
|
+
* [`internxt trash-clear`](#internxt-trash-clear)
|
|
60
|
+
* [`internxt trash-list`](#internxt-trash-list)
|
|
61
|
+
* [`internxt trash-restore-file`](#internxt-trash-restore-file)
|
|
62
|
+
* [`internxt trash-restore-folder`](#internxt-trash-restore-folder)
|
|
63
|
+
* [`internxt trash clear`](#internxt-trash-clear-1)
|
|
64
|
+
* [`internxt trash list`](#internxt-trash-list-1)
|
|
65
|
+
* [`internxt trash restore file`](#internxt-trash-restore-file-1)
|
|
66
|
+
* [`internxt trash restore folder`](#internxt-trash-restore-folder-1)
|
|
55
67
|
* [`internxt upload`](#internxt-upload)
|
|
56
68
|
* [`internxt webdav ACTION`](#internxt-webdav-action)
|
|
69
|
+
* [`internxt webdav-config ACTION`](#internxt-webdav-config-action)
|
|
57
70
|
* [`internxt whoami`](#internxt-whoami)
|
|
58
71
|
|
|
59
72
|
## `internxt add-cert`
|
|
@@ -71,7 +84,7 @@ EXAMPLES
|
|
|
71
84
|
$ internxt add-cert
|
|
72
85
|
```
|
|
73
86
|
|
|
74
|
-
_See code: [src/commands/add-cert.ts](https://github.com/internxt/cli/blob/v1.
|
|
87
|
+
_See code: [src/commands/add-cert.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/add-cert.ts)_
|
|
75
88
|
|
|
76
89
|
## `internxt config`
|
|
77
90
|
|
|
@@ -100,7 +113,7 @@ EXAMPLES
|
|
|
100
113
|
$ internxt config
|
|
101
114
|
```
|
|
102
115
|
|
|
103
|
-
_See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.
|
|
116
|
+
_See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/config.ts)_
|
|
104
117
|
|
|
105
118
|
## `internxt create-folder`
|
|
106
119
|
|
|
@@ -121,7 +134,7 @@ EXAMPLES
|
|
|
121
134
|
$ internxt create-folder
|
|
122
135
|
```
|
|
123
136
|
|
|
124
|
-
_See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.
|
|
137
|
+
_See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/create-folder.ts)_
|
|
125
138
|
|
|
126
139
|
## `internxt download`
|
|
127
140
|
|
|
@@ -144,7 +157,7 @@ EXAMPLES
|
|
|
144
157
|
$ internxt download
|
|
145
158
|
```
|
|
146
159
|
|
|
147
|
-
_See code: [src/commands/download.ts](https://github.com/internxt/cli/blob/v1.
|
|
160
|
+
_See code: [src/commands/download.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/download.ts)_
|
|
148
161
|
|
|
149
162
|
## `internxt list`
|
|
150
163
|
|
|
@@ -178,7 +191,7 @@ EXAMPLES
|
|
|
178
191
|
$ internxt list
|
|
179
192
|
```
|
|
180
193
|
|
|
181
|
-
_See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.
|
|
194
|
+
_See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/list.ts)_
|
|
182
195
|
|
|
183
196
|
## `internxt login`
|
|
184
197
|
|
|
@@ -204,7 +217,7 @@ EXAMPLES
|
|
|
204
217
|
$ internxt login
|
|
205
218
|
```
|
|
206
219
|
|
|
207
|
-
_See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.
|
|
220
|
+
_See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/login.ts)_
|
|
208
221
|
|
|
209
222
|
## `internxt logout`
|
|
210
223
|
|
|
@@ -221,7 +234,7 @@ EXAMPLES
|
|
|
221
234
|
$ internxt logout
|
|
222
235
|
```
|
|
223
236
|
|
|
224
|
-
_See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.
|
|
237
|
+
_See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/logout.ts)_
|
|
225
238
|
|
|
226
239
|
## `internxt logs`
|
|
227
240
|
|
|
@@ -238,32 +251,140 @@ EXAMPLES
|
|
|
238
251
|
$ internxt logs
|
|
239
252
|
```
|
|
240
253
|
|
|
241
|
-
_See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.
|
|
254
|
+
_See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/logs.ts)_
|
|
242
255
|
|
|
243
|
-
## `internxt move`
|
|
256
|
+
## `internxt move-file`
|
|
244
257
|
|
|
245
|
-
Move a
|
|
258
|
+
Move a file into a destination folder.
|
|
246
259
|
|
|
247
260
|
```
|
|
248
261
|
USAGE
|
|
249
|
-
$ internxt move [-n] [-i <value>] [-d <value>]
|
|
262
|
+
$ internxt move-file [-n] [-i <value>] [-d <value>]
|
|
250
263
|
|
|
251
264
|
FLAGS
|
|
252
|
-
-d, --destination=<value> The destination folder id where the
|
|
253
|
-
-i, --id=<value> The
|
|
265
|
+
-d, --destination=<value> The destination folder id where the file is going to be moved.
|
|
266
|
+
-i, --id=<value> The file id to be moved.
|
|
254
267
|
|
|
255
268
|
HELPER FLAGS
|
|
256
269
|
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
257
270
|
console and will throw errors directly
|
|
258
271
|
|
|
259
272
|
DESCRIPTION
|
|
260
|
-
Move a
|
|
273
|
+
Move a file into a destination folder.
|
|
274
|
+
|
|
275
|
+
ALIASES
|
|
276
|
+
$ internxt move file
|
|
277
|
+
|
|
278
|
+
EXAMPLES
|
|
279
|
+
$ internxt move-file
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
_See code: [src/commands/move-file.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/move-file.ts)_
|
|
283
|
+
|
|
284
|
+
## `internxt move-folder`
|
|
285
|
+
|
|
286
|
+
Move a folder into a destination folder.
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
USAGE
|
|
290
|
+
$ internxt move-folder [-n] [-i <value>] [-d <value>]
|
|
291
|
+
|
|
292
|
+
FLAGS
|
|
293
|
+
-d, --destination=<value> The destination folder id where the folder is going to be moved.
|
|
294
|
+
-i, --id=<value> The folder id to be moved.
|
|
295
|
+
|
|
296
|
+
HELPER FLAGS
|
|
297
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
298
|
+
console and will throw errors directly
|
|
299
|
+
|
|
300
|
+
DESCRIPTION
|
|
301
|
+
Move a folder into a destination folder.
|
|
302
|
+
|
|
303
|
+
ALIASES
|
|
304
|
+
$ internxt move folder
|
|
261
305
|
|
|
262
306
|
EXAMPLES
|
|
263
|
-
$ internxt move
|
|
307
|
+
$ internxt move-folder
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
_See code: [src/commands/move-folder.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/move-folder.ts)_
|
|
311
|
+
|
|
312
|
+
## `internxt move file`
|
|
313
|
+
|
|
314
|
+
Move a file into a destination folder.
|
|
315
|
+
|
|
264
316
|
```
|
|
317
|
+
USAGE
|
|
318
|
+
$ internxt move file [-n] [-i <value>] [-d <value>]
|
|
319
|
+
|
|
320
|
+
FLAGS
|
|
321
|
+
-d, --destination=<value> The destination folder id where the file is going to be moved.
|
|
322
|
+
-i, --id=<value> The file id to be moved.
|
|
323
|
+
|
|
324
|
+
HELPER FLAGS
|
|
325
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
326
|
+
console and will throw errors directly
|
|
265
327
|
|
|
266
|
-
|
|
328
|
+
DESCRIPTION
|
|
329
|
+
Move a file into a destination folder.
|
|
330
|
+
|
|
331
|
+
ALIASES
|
|
332
|
+
$ internxt move file
|
|
333
|
+
|
|
334
|
+
EXAMPLES
|
|
335
|
+
$ internxt move file
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
## `internxt move folder`
|
|
339
|
+
|
|
340
|
+
Move a folder into a destination folder.
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
USAGE
|
|
344
|
+
$ internxt move folder [-n] [-i <value>] [-d <value>]
|
|
345
|
+
|
|
346
|
+
FLAGS
|
|
347
|
+
-d, --destination=<value> The destination folder id where the folder is going to be moved.
|
|
348
|
+
-i, --id=<value> The folder id to be moved.
|
|
349
|
+
|
|
350
|
+
HELPER FLAGS
|
|
351
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
352
|
+
console and will throw errors directly
|
|
353
|
+
|
|
354
|
+
DESCRIPTION
|
|
355
|
+
Move a folder into a destination folder.
|
|
356
|
+
|
|
357
|
+
ALIASES
|
|
358
|
+
$ internxt move folder
|
|
359
|
+
|
|
360
|
+
EXAMPLES
|
|
361
|
+
$ internxt move folder
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
## `internxt rename`
|
|
365
|
+
|
|
366
|
+
Rename a folder/file.
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
USAGE
|
|
370
|
+
$ internxt rename [-n] [-i <value>] [-n <value>]
|
|
371
|
+
|
|
372
|
+
FLAGS
|
|
373
|
+
-i, --id=<value> The ID of the item to rename (can be a file ID or a folder ID).
|
|
374
|
+
-n, --name=<value> The new name for the item.
|
|
375
|
+
|
|
376
|
+
HELPER FLAGS
|
|
377
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
378
|
+
console and will throw errors directly
|
|
379
|
+
|
|
380
|
+
DESCRIPTION
|
|
381
|
+
Rename a folder/file.
|
|
382
|
+
|
|
383
|
+
EXAMPLES
|
|
384
|
+
$ internxt rename
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
_See code: [src/commands/rename.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/rename.ts)_
|
|
267
388
|
|
|
268
389
|
## `internxt trash`
|
|
269
390
|
|
|
@@ -287,7 +408,237 @@ EXAMPLES
|
|
|
287
408
|
$ internxt trash
|
|
288
409
|
```
|
|
289
410
|
|
|
290
|
-
_See code: [src/commands/trash.ts](https://github.com/internxt/cli/blob/v1.
|
|
411
|
+
_See code: [src/commands/trash.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/trash.ts)_
|
|
412
|
+
|
|
413
|
+
## `internxt trash-clear`
|
|
414
|
+
|
|
415
|
+
Deletes permanently all the content of the trash. This action cannot be undone.
|
|
416
|
+
|
|
417
|
+
```
|
|
418
|
+
USAGE
|
|
419
|
+
$ internxt trash-clear [-n] [-f]
|
|
420
|
+
|
|
421
|
+
FLAGS
|
|
422
|
+
-f, --force It forces the trash to be emptied without confirmation.
|
|
423
|
+
|
|
424
|
+
HELPER FLAGS
|
|
425
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
426
|
+
console and will throw errors directly
|
|
427
|
+
|
|
428
|
+
DESCRIPTION
|
|
429
|
+
Deletes permanently all the content of the trash. This action cannot be undone.
|
|
430
|
+
|
|
431
|
+
ALIASES
|
|
432
|
+
$ internxt trash clear
|
|
433
|
+
|
|
434
|
+
EXAMPLES
|
|
435
|
+
$ internxt trash-clear
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
_See code: [src/commands/trash-clear.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/trash-clear.ts)_
|
|
439
|
+
|
|
440
|
+
## `internxt trash-list`
|
|
441
|
+
|
|
442
|
+
Lists the content of the trash.
|
|
443
|
+
|
|
444
|
+
```
|
|
445
|
+
USAGE
|
|
446
|
+
$ internxt trash-list [-n] [--columns <value> | -x] [--filter <value>] [--no-header | [--csv | --no-truncate]]
|
|
447
|
+
[--output csv|json|yaml | | ] [--sort <value>]
|
|
448
|
+
|
|
449
|
+
FLAGS
|
|
450
|
+
-x, --extended show extra columns
|
|
451
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
452
|
+
--csv output is csv format [alias: --output=csv]
|
|
453
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
454
|
+
--no-header hide table header from output
|
|
455
|
+
--no-truncate do not truncate output to fit screen
|
|
456
|
+
--output=<option> output in a more machine friendly format
|
|
457
|
+
<options: csv|json|yaml>
|
|
458
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
459
|
+
|
|
460
|
+
HELPER FLAGS
|
|
461
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
462
|
+
console and will throw errors directly
|
|
463
|
+
|
|
464
|
+
DESCRIPTION
|
|
465
|
+
Lists the content of the trash.
|
|
466
|
+
|
|
467
|
+
ALIASES
|
|
468
|
+
$ internxt trash list
|
|
469
|
+
|
|
470
|
+
EXAMPLES
|
|
471
|
+
$ internxt trash-list
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
_See code: [src/commands/trash-list.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/trash-list.ts)_
|
|
475
|
+
|
|
476
|
+
## `internxt trash-restore-file`
|
|
477
|
+
|
|
478
|
+
Restore a trashed file into a destination folder.
|
|
479
|
+
|
|
480
|
+
```
|
|
481
|
+
USAGE
|
|
482
|
+
$ internxt trash-restore-file [-n] [-i <value>] [-d <value>]
|
|
483
|
+
|
|
484
|
+
FLAGS
|
|
485
|
+
-d, --destination=<value> The folder id where the file is going to be restored. Leave empty for the root folder.
|
|
486
|
+
-i, --id=<value> The file id to be restored from the trash.
|
|
487
|
+
|
|
488
|
+
HELPER FLAGS
|
|
489
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
490
|
+
console and will throw errors directly
|
|
491
|
+
|
|
492
|
+
DESCRIPTION
|
|
493
|
+
Restore a trashed file into a destination folder.
|
|
494
|
+
|
|
495
|
+
ALIASES
|
|
496
|
+
$ internxt trash restore file
|
|
497
|
+
|
|
498
|
+
EXAMPLES
|
|
499
|
+
$ internxt trash-restore-file
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
_See code: [src/commands/trash-restore-file.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/trash-restore-file.ts)_
|
|
503
|
+
|
|
504
|
+
## `internxt trash-restore-folder`
|
|
505
|
+
|
|
506
|
+
Restore a trashed folder into a destination folder.
|
|
507
|
+
|
|
508
|
+
```
|
|
509
|
+
USAGE
|
|
510
|
+
$ internxt trash-restore-folder [-n] [-i <value>] [-d <value>]
|
|
511
|
+
|
|
512
|
+
FLAGS
|
|
513
|
+
-d, --destination=<value> The folder id where the folder is going to be restored. Leave empty for the root folder.
|
|
514
|
+
-i, --id=<value> The folder id to be restored from the trash.
|
|
515
|
+
|
|
516
|
+
HELPER FLAGS
|
|
517
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
518
|
+
console and will throw errors directly
|
|
519
|
+
|
|
520
|
+
DESCRIPTION
|
|
521
|
+
Restore a trashed folder into a destination folder.
|
|
522
|
+
|
|
523
|
+
ALIASES
|
|
524
|
+
$ internxt trash restore folder
|
|
525
|
+
|
|
526
|
+
EXAMPLES
|
|
527
|
+
$ internxt trash-restore-folder
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
_See code: [src/commands/trash-restore-folder.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/trash-restore-folder.ts)_
|
|
531
|
+
|
|
532
|
+
## `internxt trash clear`
|
|
533
|
+
|
|
534
|
+
Deletes permanently all the content of the trash. This action cannot be undone.
|
|
535
|
+
|
|
536
|
+
```
|
|
537
|
+
USAGE
|
|
538
|
+
$ internxt trash clear [-n] [-f]
|
|
539
|
+
|
|
540
|
+
FLAGS
|
|
541
|
+
-f, --force It forces the trash to be emptied without confirmation.
|
|
542
|
+
|
|
543
|
+
HELPER FLAGS
|
|
544
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
545
|
+
console and will throw errors directly
|
|
546
|
+
|
|
547
|
+
DESCRIPTION
|
|
548
|
+
Deletes permanently all the content of the trash. This action cannot be undone.
|
|
549
|
+
|
|
550
|
+
ALIASES
|
|
551
|
+
$ internxt trash clear
|
|
552
|
+
|
|
553
|
+
EXAMPLES
|
|
554
|
+
$ internxt trash clear
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
## `internxt trash list`
|
|
558
|
+
|
|
559
|
+
Lists the content of the trash.
|
|
560
|
+
|
|
561
|
+
```
|
|
562
|
+
USAGE
|
|
563
|
+
$ internxt trash list [-n] [--columns <value> | -x] [--filter <value>] [--no-header | [--csv | --no-truncate]]
|
|
564
|
+
[--output csv|json|yaml | | ] [--sort <value>]
|
|
565
|
+
|
|
566
|
+
FLAGS
|
|
567
|
+
-x, --extended show extra columns
|
|
568
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
569
|
+
--csv output is csv format [alias: --output=csv]
|
|
570
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
571
|
+
--no-header hide table header from output
|
|
572
|
+
--no-truncate do not truncate output to fit screen
|
|
573
|
+
--output=<option> output in a more machine friendly format
|
|
574
|
+
<options: csv|json|yaml>
|
|
575
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
576
|
+
|
|
577
|
+
HELPER FLAGS
|
|
578
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
579
|
+
console and will throw errors directly
|
|
580
|
+
|
|
581
|
+
DESCRIPTION
|
|
582
|
+
Lists the content of the trash.
|
|
583
|
+
|
|
584
|
+
ALIASES
|
|
585
|
+
$ internxt trash list
|
|
586
|
+
|
|
587
|
+
EXAMPLES
|
|
588
|
+
$ internxt trash list
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
## `internxt trash restore file`
|
|
592
|
+
|
|
593
|
+
Restore a trashed file into a destination folder.
|
|
594
|
+
|
|
595
|
+
```
|
|
596
|
+
USAGE
|
|
597
|
+
$ internxt trash restore file [-n] [-i <value>] [-d <value>]
|
|
598
|
+
|
|
599
|
+
FLAGS
|
|
600
|
+
-d, --destination=<value> The folder id where the file is going to be restored. Leave empty for the root folder.
|
|
601
|
+
-i, --id=<value> The file id to be restored from the trash.
|
|
602
|
+
|
|
603
|
+
HELPER FLAGS
|
|
604
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
605
|
+
console and will throw errors directly
|
|
606
|
+
|
|
607
|
+
DESCRIPTION
|
|
608
|
+
Restore a trashed file into a destination folder.
|
|
609
|
+
|
|
610
|
+
ALIASES
|
|
611
|
+
$ internxt trash restore file
|
|
612
|
+
|
|
613
|
+
EXAMPLES
|
|
614
|
+
$ internxt trash restore file
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
## `internxt trash restore folder`
|
|
618
|
+
|
|
619
|
+
Restore a trashed folder into a destination folder.
|
|
620
|
+
|
|
621
|
+
```
|
|
622
|
+
USAGE
|
|
623
|
+
$ internxt trash restore folder [-n] [-i <value>] [-d <value>]
|
|
624
|
+
|
|
625
|
+
FLAGS
|
|
626
|
+
-d, --destination=<value> The folder id where the folder is going to be restored. Leave empty for the root folder.
|
|
627
|
+
-i, --id=<value> The folder id to be restored from the trash.
|
|
628
|
+
|
|
629
|
+
HELPER FLAGS
|
|
630
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
631
|
+
console and will throw errors directly
|
|
632
|
+
|
|
633
|
+
DESCRIPTION
|
|
634
|
+
Restore a trashed folder into a destination folder.
|
|
635
|
+
|
|
636
|
+
ALIASES
|
|
637
|
+
$ internxt trash restore folder
|
|
638
|
+
|
|
639
|
+
EXAMPLES
|
|
640
|
+
$ internxt trash restore folder
|
|
641
|
+
```
|
|
291
642
|
|
|
292
643
|
## `internxt upload`
|
|
293
644
|
|
|
@@ -311,18 +662,18 @@ EXAMPLES
|
|
|
311
662
|
$ internxt upload
|
|
312
663
|
```
|
|
313
664
|
|
|
314
|
-
_See code: [src/commands/upload.ts](https://github.com/internxt/cli/blob/v1.
|
|
665
|
+
_See code: [src/commands/upload.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/upload.ts)_
|
|
315
666
|
|
|
316
667
|
## `internxt webdav ACTION`
|
|
317
668
|
|
|
318
|
-
Enable,disable, restart or get the status of the Internxt CLI WebDav server
|
|
669
|
+
Enable, disable, restart or get the status of the Internxt CLI WebDav server
|
|
319
670
|
|
|
320
671
|
```
|
|
321
672
|
USAGE
|
|
322
673
|
$ internxt webdav ACTION
|
|
323
674
|
|
|
324
675
|
DESCRIPTION
|
|
325
|
-
Enable,disable, restart or get the status of the Internxt CLI WebDav server
|
|
676
|
+
Enable, disable, restart or get the status of the Internxt CLI WebDav server
|
|
326
677
|
|
|
327
678
|
EXAMPLES
|
|
328
679
|
$ internxt webdav enable
|
|
@@ -334,7 +685,35 @@ EXAMPLES
|
|
|
334
685
|
$ internxt webdav status
|
|
335
686
|
```
|
|
336
687
|
|
|
337
|
-
_See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.
|
|
688
|
+
_See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/webdav.ts)_
|
|
689
|
+
|
|
690
|
+
## `internxt webdav-config ACTION`
|
|
691
|
+
|
|
692
|
+
Edit the configuration of the Internxt CLI WebDav server as the port or the protocol.
|
|
693
|
+
|
|
694
|
+
```
|
|
695
|
+
USAGE
|
|
696
|
+
$ internxt webdav-config ACTION [-n] [-p <value>]
|
|
697
|
+
|
|
698
|
+
FLAGS
|
|
699
|
+
-p, --port=<value> The new port that the WebDAV server is going to be have.
|
|
700
|
+
|
|
701
|
+
HELPER FLAGS
|
|
702
|
+
-n, --non-interactive Blocks the cli from being interactive. If passed, the cli will not request data through the
|
|
703
|
+
console and will throw errors directly
|
|
704
|
+
|
|
705
|
+
DESCRIPTION
|
|
706
|
+
Edit the configuration of the Internxt CLI WebDav server as the port or the protocol.
|
|
707
|
+
|
|
708
|
+
EXAMPLES
|
|
709
|
+
$ internxt webdav-config set-http
|
|
710
|
+
|
|
711
|
+
$ internxt webdav-config set-https
|
|
712
|
+
|
|
713
|
+
$ internxt webdav-config change-port
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
_See code: [src/commands/webdav-config.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/webdav-config.ts)_
|
|
338
717
|
|
|
339
718
|
## `internxt whoami`
|
|
340
719
|
|
|
@@ -351,7 +730,7 @@ EXAMPLES
|
|
|
351
730
|
$ internxt whoami
|
|
352
731
|
```
|
|
353
732
|
|
|
354
|
-
_See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.
|
|
733
|
+
_See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.3.0/src/commands/whoami.ts)_
|
|
355
734
|
<!-- commandsstop -->
|
|
356
735
|
|
|
357
736
|
# Current Limitations
|
package/bin/dev.js
CHANGED
|
File without changes
|
package/bin/run.js
CHANGED
|
File without changes
|
package/dist/commands/config.js
CHANGED
|
@@ -25,7 +25,7 @@ class Config extends core_1.Command {
|
|
|
25
25
|
const configList = [
|
|
26
26
|
{ key: 'Email', value: userCredentials.user.email },
|
|
27
27
|
{ key: 'Root folder ID', value: userCredentials.root_folder_uuid },
|
|
28
|
-
{ key: 'Used space', value: format_utils_1.FormatUtils.humanFileSize(await usage_service_1.UsageService.instance.
|
|
28
|
+
{ key: 'Used space', value: format_utils_1.FormatUtils.humanFileSize((await usage_service_1.UsageService.instance.fetchUsage()).total) },
|
|
29
29
|
{ key: 'Available space', value: format_utils_1.FormatUtils.formatLimit(await usage_service_1.UsageService.instance.fetchSpaceLimit()) },
|
|
30
30
|
];
|
|
31
31
|
core_1.ux.table(configList, {
|
package/dist/commands/list.js
CHANGED
|
@@ -109,7 +109,7 @@ class List extends core_1.Command {
|
|
|
109
109
|
error: new command_types_1.NotValidFolderUuidError(),
|
|
110
110
|
canBeEmpty: true,
|
|
111
111
|
}, nonInteractive, (folderUuid) => validation_service_1.ValidationService.instance.validateUUIDv4(folderUuid));
|
|
112
|
-
if (!folderUuid
|
|
112
|
+
if (!folderUuid) {
|
|
113
113
|
folderUuid = (await this.getFolderUuidInteractively()).trim();
|
|
114
114
|
}
|
|
115
115
|
return folderUuid;
|
|
@@ -118,7 +118,6 @@ class List extends core_1.Command {
|
|
|
118
118
|
return cli_utils_1.CLIUtils.prompt({
|
|
119
119
|
message: 'What is the folder id you want to list? (leave empty for the root folder)',
|
|
120
120
|
options: { required: false },
|
|
121
|
-
error: new command_types_1.NotValidFolderUuidError(),
|
|
122
121
|
});
|
|
123
122
|
};
|
|
124
123
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
|
-
export default class
|
|
2
|
+
export default class MoveFile extends Command {
|
|
3
3
|
static readonly args: {};
|
|
4
|
-
static readonly description = "Move a
|
|
4
|
+
static readonly description = "Move a file into a destination folder.";
|
|
5
|
+
static readonly aliases: string[];
|
|
5
6
|
static readonly examples: string[];
|
|
6
7
|
static readonly flags: {
|
|
7
8
|
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -10,9 +11,9 @@ export default class Move extends Command {
|
|
|
10
11
|
};
|
|
11
12
|
run(): Promise<void>;
|
|
12
13
|
catch(error: Error): Promise<void>;
|
|
13
|
-
|
|
14
|
+
getFileUuid: (fileUuidFlag: string | undefined, nonInteractive: boolean) => Promise<string>;
|
|
14
15
|
getDestinationFolderUuid: (destinationFolderUuidFlag: string | undefined, nonInteractive: boolean) => Promise<string>;
|
|
15
16
|
private static readonly MAX_ATTEMPTS;
|
|
16
|
-
|
|
17
|
+
getFileUuidInteractively: () => Promise<string>;
|
|
17
18
|
getDestinationFolderUuidInteractively: () => Promise<string>;
|
|
18
19
|
}
|