@internxt/cli 1.6.7 → 1.6.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 (87) hide show
  1. package/README.md +36 -231
  2. package/bin/dev.js +10 -0
  3. package/bin/run.js +10 -0
  4. package/dist/commands/create-folder.js +2 -6
  5. package/dist/commands/delete-permanently-file.js +1 -1
  6. package/dist/commands/delete-permanently-folder.js +1 -1
  7. package/dist/commands/download-file.js +3 -3
  8. package/dist/commands/list.d.ts +2 -0
  9. package/dist/commands/list.js +1 -1
  10. package/dist/commands/login.d.ts +0 -1
  11. package/dist/commands/login.js +1 -11
  12. package/dist/commands/move-file.d.ts +1 -0
  13. package/dist/commands/move-file.js +1 -1
  14. package/dist/commands/move-folder.js +1 -1
  15. package/dist/commands/rename-file.js +1 -1
  16. package/dist/commands/rename-folder.js +1 -1
  17. package/dist/commands/trash-file.js +1 -1
  18. package/dist/commands/trash-folder.js +1 -1
  19. package/dist/commands/trash-list.d.ts +2 -0
  20. package/dist/commands/trash-restore-file.d.ts +1 -0
  21. package/dist/commands/trash-restore-file.js +1 -1
  22. package/dist/commands/trash-restore-folder.js +1 -1
  23. package/dist/commands/upload-file.d.ts +1 -0
  24. package/dist/commands/upload-file.js +22 -13
  25. package/dist/hooks/prerun/auth_check.js +2 -2
  26. package/dist/services/auth.service.d.ts +3 -3
  27. package/dist/services/auth.service.js +30 -40
  28. package/dist/services/crypto.service.d.ts +0 -4
  29. package/dist/services/crypto.service.js +1 -32
  30. package/dist/services/database/drive-item/drive-item.model.js +1 -0
  31. package/dist/services/database/drive-item/drive-item.repository.js +12 -2
  32. package/dist/services/drive/drive-file.service.d.ts +2 -0
  33. package/dist/services/drive/drive-file.service.js +48 -18
  34. package/dist/services/drive/drive-folder.service.d.ts +2 -0
  35. package/dist/services/drive/drive-folder.service.js +18 -48
  36. package/dist/services/drive/trash.service.d.ts +2 -0
  37. package/dist/services/drive/trash.service.js +14 -41
  38. package/dist/services/network/upload/upload-file.service.js +5 -9
  39. package/dist/services/network/upload/upload.types.d.ts +2 -1
  40. package/dist/services/sdk-manager.service.d.ts +0 -2
  41. package/dist/services/sdk-manager.service.js +0 -7
  42. package/dist/services/thumbnail.service.d.ts +4 -13
  43. package/dist/services/thumbnail.service.js +7 -21
  44. package/dist/services/universal-link.service.d.ts +1 -1
  45. package/dist/services/universal-link.service.js +2 -2
  46. package/dist/services/validation.service.d.ts +1 -1
  47. package/dist/services/validation.service.js +3 -2
  48. package/dist/types/command.types.d.ts +0 -29
  49. package/dist/types/command.types.js +1 -15
  50. package/dist/types/network.types.d.ts +3 -11
  51. package/dist/types/webdav.types.d.ts +0 -3
  52. package/dist/utils/cli.utils.js +9 -22
  53. package/dist/utils/errors.utils.d.ts +8 -0
  54. package/dist/utils/errors.utils.js +19 -1
  55. package/dist/utils/logger.utils.js +9 -2
  56. package/dist/utils/network.utils.js +7 -6
  57. package/dist/utils/stream.utils.d.ts +2 -2
  58. package/dist/utils/stream.utils.js +7 -6
  59. package/dist/utils/thumbnail.utils.d.ts +1 -3
  60. package/dist/utils/thumbnail.utils.js +3 -13
  61. package/dist/utils/upload.utils.d.ts +1 -1
  62. package/dist/utils/upload.utils.js +2 -2
  63. package/dist/utils/webdav.utils.d.ts +2 -0
  64. package/dist/utils/webdav.utils.js +16 -0
  65. package/dist/webdav/handlers/DELETE.handler.js +0 -2
  66. package/dist/webdav/handlers/GET.handler.js +18 -7
  67. package/dist/webdav/handlers/HEAD.handler.js +18 -7
  68. package/dist/webdav/handlers/LOCK.handler.js +5 -1
  69. package/dist/webdav/handlers/MOVE.handler.js +13 -1
  70. package/dist/webdav/handlers/OPTIONS.handler.js +3 -3
  71. package/dist/webdav/handlers/PROPFIND.handler.js +5 -6
  72. package/dist/webdav/handlers/PROPPATCH.handler.d.ts +3 -1
  73. package/dist/webdav/handlers/PROPPATCH.handler.js +53 -3
  74. package/dist/webdav/handlers/PUT.handler.js +19 -10
  75. package/dist/webdav/index.js +2 -2
  76. package/dist/webdav/middewares/auth.middleware.js +1 -1
  77. package/dist/webdav/middewares/errors.middleware.js +32 -6
  78. package/oclif.manifest.json +9 -198
  79. package/package.json +26 -25
  80. package/dist/commands/workspaces-list.d.ts +0 -20
  81. package/dist/commands/workspaces-list.js +0 -68
  82. package/dist/commands/workspaces-unset.d.ts +0 -23
  83. package/dist/commands/workspaces-unset.js +0 -46
  84. package/dist/commands/workspaces-use.d.ts +0 -27
  85. package/dist/commands/workspaces-use.js +0 -114
  86. package/dist/services/drive/workspace.service.d.ts +0 -7
  87. package/dist/services/drive/workspace.service.js +0 -30
package/README.md CHANGED
@@ -52,7 +52,7 @@ $ npm install -g @internxt/cli
52
52
  $ internxt COMMAND
53
53
  running command...
54
54
  $ internxt (--version)
55
- @internxt/cli/1.6.7 linux-x64 node-v22.23.1
55
+ @internxt/cli/1.6.9 linux-x64 node-v22.23.2
56
56
  $ internxt --help [COMMAND]
57
57
  USAGE
58
58
  $ internxt COMMAND
@@ -111,12 +111,6 @@ USAGE
111
111
  * [`internxt webdav ACTION`](#internxt-webdav-action)
112
112
  * [`internxt webdav-config`](#internxt-webdav-config)
113
113
  * [`internxt whoami`](#internxt-whoami)
114
- * [`internxt workspaces-list`](#internxt-workspaces-list)
115
- * [`internxt workspaces-unset`](#internxt-workspaces-unset)
116
- * [`internxt workspaces-use`](#internxt-workspaces-use)
117
- * [`internxt workspaces list`](#internxt-workspaces-list)
118
- * [`internxt workspaces unset`](#internxt-workspaces-unset)
119
- * [`internxt workspaces use`](#internxt-workspaces-use)
120
114
 
121
115
  ## `internxt add-cert`
122
116
 
@@ -145,7 +139,7 @@ EXAMPLES
145
139
  $ internxt add-cert
146
140
  ```
147
141
 
148
- _See code: [src/commands/add-cert.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/add-cert.ts)_
142
+ _See code: [src/commands/add-cert.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/add-cert.ts)_
149
143
 
150
144
  ## `internxt add cert`
151
145
 
@@ -203,7 +197,7 @@ EXAMPLES
203
197
  $ internxt autocomplete --refresh-cache
204
198
  ```
205
199
 
206
- _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.53/src/commands/autocomplete/index.ts)_
200
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v4.0.0/src/commands/autocomplete/index.ts)_
207
201
 
208
202
  ## `internxt config`
209
203
 
@@ -232,7 +226,7 @@ EXAMPLES
232
226
  $ internxt config
233
227
  ```
234
228
 
235
- _See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/config.ts)_
229
+ _See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/config.ts)_
236
230
 
237
231
  ## `internxt create-folder`
238
232
 
@@ -266,7 +260,7 @@ EXAMPLES
266
260
  $ internxt create-folder
267
261
  ```
268
262
 
269
- _See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/create-folder.ts)_
263
+ _See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/create-folder.ts)_
270
264
 
271
265
  ## `internxt create folder`
272
266
 
@@ -330,7 +324,7 @@ EXAMPLES
330
324
  $ internxt delete-permanently-file
331
325
  ```
332
326
 
333
- _See code: [src/commands/delete-permanently-file.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/delete-permanently-file.ts)_
327
+ _See code: [src/commands/delete-permanently-file.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/delete-permanently-file.ts)_
334
328
 
335
329
  ## `internxt delete-permanently-folder`
336
330
 
@@ -362,7 +356,7 @@ EXAMPLES
362
356
  $ internxt delete-permanently-folder
363
357
  ```
364
358
 
365
- _See code: [src/commands/delete-permanently-folder.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/delete-permanently-folder.ts)_
359
+ _See code: [src/commands/delete-permanently-folder.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/delete-permanently-folder.ts)_
366
360
 
367
361
  ## `internxt delete permanently file`
368
362
 
@@ -457,7 +451,7 @@ EXAMPLES
457
451
  $ internxt download-file
458
452
  ```
459
453
 
460
- _See code: [src/commands/download-file.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/download-file.ts)_
454
+ _See code: [src/commands/download-file.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/download-file.ts)_
461
455
 
462
456
  ## `internxt download file`
463
457
 
@@ -520,7 +514,7 @@ EXAMPLES
520
514
  $ internxt list
521
515
  ```
522
516
 
523
- _See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/list.ts)_
517
+ _See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/list.ts)_
524
518
 
525
519
  ## `internxt login`
526
520
 
@@ -528,12 +522,9 @@ Logs into your Internxt account using the web-based login flow. A temporary loca
528
522
 
529
523
  ```
530
524
  USAGE
531
- $ internxt login [--json] [-x] [--debug] [-h <value>] [-p <value>]
525
+ $ internxt login [--json] [-x] [--debug] [-p <value>]
532
526
 
533
527
  FLAGS
534
- -h, --host=<value> [env: INXT_LOGIN_SERVER_HOST] IP address of the machine where the CLI is running. If you are
535
- opening the login page in a browser on another device, set this to the IP address of the machine
536
- running the CLI. Defaults to 127.0.0.1.
537
528
  -p, --port=<value> [env: INXT_LOGIN_SERVER_PORT] Port used by the temporary local server to handle the login
538
529
  callback. If not specified, a random available port will be used automatically.
539
530
 
@@ -554,7 +545,7 @@ EXAMPLES
554
545
  $ internxt login
555
546
  ```
556
547
 
557
- _See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/login.ts)_
548
+ _See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/login.ts)_
558
549
 
559
550
  ## `internxt login-legacy`
560
551
 
@@ -588,7 +579,7 @@ EXAMPLES
588
579
  $ internxt login-legacy
589
580
  ```
590
581
 
591
- _See code: [src/commands/login-legacy.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/login-legacy.ts)_
582
+ _See code: [src/commands/login-legacy.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/login-legacy.ts)_
592
583
 
593
584
  ## `internxt logout`
594
585
 
@@ -614,7 +605,7 @@ EXAMPLES
614
605
  $ internxt logout
615
606
  ```
616
607
 
617
- _See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/logout.ts)_
608
+ _See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/logout.ts)_
618
609
 
619
610
  ## `internxt logs`
620
611
 
@@ -640,7 +631,7 @@ EXAMPLES
640
631
  $ internxt logs
641
632
  ```
642
633
 
643
- _See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/logs.ts)_
634
+ _See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/logs.ts)_
644
635
 
645
636
  ## `internxt move-file`
646
637
 
@@ -674,7 +665,7 @@ EXAMPLES
674
665
  $ internxt move-file
675
666
  ```
676
667
 
677
- _See code: [src/commands/move-file.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/move-file.ts)_
668
+ _See code: [src/commands/move-file.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/move-file.ts)_
678
669
 
679
670
  ## `internxt move-folder`
680
671
 
@@ -708,7 +699,7 @@ EXAMPLES
708
699
  $ internxt move-folder
709
700
  ```
710
701
 
711
- _See code: [src/commands/move-folder.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/move-folder.ts)_
702
+ _See code: [src/commands/move-folder.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/move-folder.ts)_
712
703
 
713
704
  ## `internxt move file`
714
705
 
@@ -805,7 +796,7 @@ EXAMPLES
805
796
  $ internxt rename-file
806
797
  ```
807
798
 
808
- _See code: [src/commands/rename-file.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/rename-file.ts)_
799
+ _See code: [src/commands/rename-file.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/rename-file.ts)_
809
800
 
810
801
  ## `internxt rename-folder`
811
802
 
@@ -838,7 +829,7 @@ EXAMPLES
838
829
  $ internxt rename-folder
839
830
  ```
840
831
 
841
- _See code: [src/commands/rename-folder.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/rename-folder.ts)_
832
+ _See code: [src/commands/rename-folder.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/rename-folder.ts)_
842
833
 
843
834
  ## `internxt rename file`
844
835
 
@@ -932,7 +923,7 @@ EXAMPLES
932
923
  $ internxt trash-clear
933
924
  ```
934
925
 
935
- _See code: [src/commands/trash-clear.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/trash-clear.ts)_
926
+ _See code: [src/commands/trash-clear.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/trash-clear.ts)_
936
927
 
937
928
  ## `internxt trash-file`
938
929
 
@@ -964,7 +955,7 @@ EXAMPLES
964
955
  $ internxt trash-file
965
956
  ```
966
957
 
967
- _See code: [src/commands/trash-file.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/trash-file.ts)_
958
+ _See code: [src/commands/trash-file.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/trash-file.ts)_
968
959
 
969
960
  ## `internxt trash-folder`
970
961
 
@@ -996,7 +987,7 @@ EXAMPLES
996
987
  $ internxt trash-folder
997
988
  ```
998
989
 
999
- _See code: [src/commands/trash-folder.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/trash-folder.ts)_
990
+ _See code: [src/commands/trash-folder.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/trash-folder.ts)_
1000
991
 
1001
992
  ## `internxt trash-list`
1002
993
 
@@ -1028,7 +1019,7 @@ EXAMPLES
1028
1019
  $ internxt trash-list
1029
1020
  ```
1030
1021
 
1031
- _See code: [src/commands/trash-list.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/trash-list.ts)_
1022
+ _See code: [src/commands/trash-list.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/trash-list.ts)_
1032
1023
 
1033
1024
  ## `internxt trash-restore-file`
1034
1025
 
@@ -1061,7 +1052,7 @@ EXAMPLES
1061
1052
  $ internxt trash-restore-file
1062
1053
  ```
1063
1054
 
1064
- _See code: [src/commands/trash-restore-file.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/trash-restore-file.ts)_
1055
+ _See code: [src/commands/trash-restore-file.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/trash-restore-file.ts)_
1065
1056
 
1066
1057
  ## `internxt trash-restore-folder`
1067
1058
 
@@ -1094,7 +1085,7 @@ EXAMPLES
1094
1085
  $ internxt trash-restore-folder
1095
1086
  ```
1096
1087
 
1097
- _See code: [src/commands/trash-restore-folder.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/trash-restore-folder.ts)_
1088
+ _See code: [src/commands/trash-restore-folder.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/trash-restore-folder.ts)_
1098
1089
 
1099
1090
  ## `internxt trash clear`
1100
1091
 
@@ -1284,11 +1275,13 @@ Upload a file to Internxt Drive
1284
1275
 
1285
1276
  ```
1286
1277
  USAGE
1287
- $ internxt upload-file [--json] [-x] [--debug] [-f <value>] [-i <value>]
1278
+ $ internxt upload-file [--json] [-x] [--debug] [-f <value>] [-i <value>] [-o]
1288
1279
 
1289
1280
  FLAGS
1290
1281
  -f, --file=<value> The path to the file on your system.
1291
1282
  -i, --destination=<value> The folder id where the file is going to be uploaded to. Leave empty for the root folder.
1283
+ -o, --overwrite Overwrite the file if a file with the same name already exists in the cloud destination
1284
+ folder.
1292
1285
 
1293
1286
  HELPER FLAGS
1294
1287
  -x, --non-interactive [env: INXT_NONINTERACTIVE] Prevents the CLI from being interactive. When enabled, the CLI will
@@ -1309,7 +1302,7 @@ EXAMPLES
1309
1302
  $ internxt upload-file
1310
1303
  ```
1311
1304
 
1312
- _See code: [src/commands/upload-file.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/upload-file.ts)_
1305
+ _See code: [src/commands/upload-file.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/upload-file.ts)_
1313
1306
 
1314
1307
  ## `internxt upload-folder`
1315
1308
 
@@ -1342,7 +1335,7 @@ EXAMPLES
1342
1335
  $ internxt upload-folder
1343
1336
  ```
1344
1337
 
1345
- _See code: [src/commands/upload-folder.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/upload-folder.ts)_
1338
+ _See code: [src/commands/upload-folder.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/upload-folder.ts)_
1346
1339
 
1347
1340
  ## `internxt upload file`
1348
1341
 
@@ -1350,11 +1343,13 @@ Upload a file to Internxt Drive
1350
1343
 
1351
1344
  ```
1352
1345
  USAGE
1353
- $ internxt upload file [--json] [-x] [--debug] [-f <value>] [-i <value>]
1346
+ $ internxt upload file [--json] [-x] [--debug] [-f <value>] [-i <value>] [-o]
1354
1347
 
1355
1348
  FLAGS
1356
1349
  -f, --file=<value> The path to the file on your system.
1357
1350
  -i, --destination=<value> The folder id where the file is going to be uploaded to. Leave empty for the root folder.
1351
+ -o, --overwrite Overwrite the file if a file with the same name already exists in the cloud destination
1352
+ folder.
1358
1353
 
1359
1354
  HELPER FLAGS
1360
1355
  -x, --non-interactive [env: INXT_NONINTERACTIVE] Prevents the CLI from being interactive. When enabled, the CLI will
@@ -1436,7 +1431,7 @@ EXAMPLES
1436
1431
  $ internxt webdav status
1437
1432
  ```
1438
1433
 
1439
- _See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/webdav.ts)_
1434
+ _See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/webdav.ts)_
1440
1435
 
1441
1436
  ## `internxt webdav-config`
1442
1437
 
@@ -1475,7 +1470,7 @@ EXAMPLES
1475
1470
  $ internxt webdav-config
1476
1471
  ```
1477
1472
 
1478
- _See code: [src/commands/webdav-config.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/webdav-config.ts)_
1473
+ _See code: [src/commands/webdav-config.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/webdav-config.ts)_
1479
1474
 
1480
1475
  ## `internxt whoami`
1481
1476
 
@@ -1501,199 +1496,9 @@ EXAMPLES
1501
1496
  $ internxt whoami
1502
1497
  ```
1503
1498
 
1504
- _See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/whoami.ts)_
1505
-
1506
- ## `internxt workspaces-list`
1507
-
1508
- Get the list of workspaces.
1509
-
1510
- ```
1511
- USAGE
1512
- $ internxt workspaces-list [--json] [-x] [--debug] [-e]
1513
-
1514
- FLAGS
1515
- -e, --extended Displays additional information in the list.
1516
-
1517
- HELPER FLAGS
1518
- -x, --non-interactive [env: INXT_NONINTERACTIVE] Prevents the CLI from being interactive. When enabled, the CLI will
1519
- not request input through the console and will throw errors directly.
1520
- --debug [env: INXT_DEBUG] Enables debug mode. When enabled, the CLI will print debug messages to the
1521
- console.
1522
-
1523
- GLOBAL FLAGS
1524
- --json Format output as json.
1525
-
1526
- DESCRIPTION
1527
- Get the list of workspaces.
1528
-
1529
- ALIASES
1530
- $ internxt workspaces list
1531
-
1532
- EXAMPLES
1533
- $ internxt workspaces-list
1534
- ```
1535
-
1536
- _See code: [src/commands/workspaces-list.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/workspaces-list.ts)_
1537
-
1538
- ## `internxt workspaces-unset`
1539
-
1540
- Unset the active workspace context for the current user session. Once a workspace is unset, WebDAV and all of the subsequent CLI commands will operate within the personal drive space until it is changed or set again.
1541
-
1542
- ```
1543
- USAGE
1544
- $ internxt workspaces-unset [--json] [-x] [--debug]
1545
-
1546
- HELPER FLAGS
1547
- -x, --non-interactive [env: INXT_NONINTERACTIVE] Prevents the CLI from being interactive. When enabled, the CLI will
1548
- not request input through the console and will throw errors directly.
1549
- --debug [env: INXT_DEBUG] Enables debug mode. When enabled, the CLI will print debug messages to the
1550
- console.
1551
-
1552
- GLOBAL FLAGS
1553
- --json Format output as json.
1554
-
1555
- DESCRIPTION
1556
- Unset the active workspace context for the current user session. Once a workspace is unset, WebDAV and all of the
1557
- subsequent CLI commands will operate within the personal drive space until it is changed or set again.
1558
-
1559
- ALIASES
1560
- $ internxt workspaces unset
1561
-
1562
- EXAMPLES
1563
- $ internxt workspaces-unset
1564
- ```
1565
-
1566
- _See code: [src/commands/workspaces-unset.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/workspaces-unset.ts)_
1567
-
1568
- ## `internxt workspaces-use`
1569
-
1570
- Set the active workspace context for the current user session. Once a workspace is selected, WebDAV and all of the subsequent CLI commands will operate within that workspace until it is changed or unset.
1571
-
1572
- ```
1573
- USAGE
1574
- $ internxt workspaces-use [--json] [-x] [--debug] [-i <value> | -p]
1575
-
1576
- FLAGS
1577
- -i, --id=<value> The id of the workspace to activate. Use internxt workspaces list to view your available workspace
1578
- ids.
1579
- -p, --personal Change to the personal drive space. It unsets the active workspace context for the current user
1580
- session.
1581
-
1582
- HELPER FLAGS
1583
- -x, --non-interactive [env: INXT_NONINTERACTIVE] Prevents the CLI from being interactive. When enabled, the CLI will
1584
- not request input through the console and will throw errors directly.
1585
- --debug [env: INXT_DEBUG] Enables debug mode. When enabled, the CLI will print debug messages to the
1586
- console.
1587
-
1588
- GLOBAL FLAGS
1589
- --json Format output as json.
1590
-
1591
- DESCRIPTION
1592
- Set the active workspace context for the current user session. Once a workspace is selected, WebDAV and all of the
1593
- subsequent CLI commands will operate within that workspace until it is changed or unset.
1594
-
1595
- ALIASES
1596
- $ internxt workspaces use
1597
-
1598
- EXAMPLES
1599
- $ internxt workspaces-use
1600
- ```
1601
-
1602
- _See code: [src/commands/workspaces-use.ts](https://github.com/internxt/cli/blob/v1.6.7/src/commands/workspaces-use.ts)_
1603
-
1604
- ## `internxt workspaces list`
1605
-
1606
- Get the list of workspaces.
1607
-
1608
- ```
1609
- USAGE
1610
- $ internxt workspaces list [--json] [-x] [--debug] [-e]
1611
-
1612
- FLAGS
1613
- -e, --extended Displays additional information in the list.
1614
-
1615
- HELPER FLAGS
1616
- -x, --non-interactive [env: INXT_NONINTERACTIVE] Prevents the CLI from being interactive. When enabled, the CLI will
1617
- not request input through the console and will throw errors directly.
1618
- --debug [env: INXT_DEBUG] Enables debug mode. When enabled, the CLI will print debug messages to the
1619
- console.
1620
-
1621
- GLOBAL FLAGS
1622
- --json Format output as json.
1623
-
1624
- DESCRIPTION
1625
- Get the list of workspaces.
1626
-
1627
- ALIASES
1628
- $ internxt workspaces list
1629
-
1630
- EXAMPLES
1631
- $ internxt workspaces list
1632
- ```
1633
-
1634
- ## `internxt workspaces unset`
1635
-
1636
- Unset the active workspace context for the current user session. Once a workspace is unset, WebDAV and all of the subsequent CLI commands will operate within the personal drive space until it is changed or set again.
1637
-
1638
- ```
1639
- USAGE
1640
- $ internxt workspaces unset [--json] [-x] [--debug]
1641
-
1642
- HELPER FLAGS
1643
- -x, --non-interactive [env: INXT_NONINTERACTIVE] Prevents the CLI from being interactive. When enabled, the CLI will
1644
- not request input through the console and will throw errors directly.
1645
- --debug [env: INXT_DEBUG] Enables debug mode. When enabled, the CLI will print debug messages to the
1646
- console.
1647
-
1648
- GLOBAL FLAGS
1649
- --json Format output as json.
1650
-
1651
- DESCRIPTION
1652
- Unset the active workspace context for the current user session. Once a workspace is unset, WebDAV and all of the
1653
- subsequent CLI commands will operate within the personal drive space until it is changed or set again.
1654
-
1655
- ALIASES
1656
- $ internxt workspaces unset
1657
-
1658
- EXAMPLES
1659
- $ internxt workspaces unset
1660
- ```
1661
-
1662
- ## `internxt workspaces use`
1663
-
1664
- Set the active workspace context for the current user session. Once a workspace is selected, WebDAV and all of the subsequent CLI commands will operate within that workspace until it is changed or unset.
1665
-
1666
- ```
1667
- USAGE
1668
- $ internxt workspaces use [--json] [-x] [--debug] [-i <value> | -p]
1669
-
1670
- FLAGS
1671
- -i, --id=<value> The id of the workspace to activate. Use internxt workspaces list to view your available workspace
1672
- ids.
1673
- -p, --personal Change to the personal drive space. It unsets the active workspace context for the current user
1674
- session.
1675
-
1676
- HELPER FLAGS
1677
- -x, --non-interactive [env: INXT_NONINTERACTIVE] Prevents the CLI from being interactive. When enabled, the CLI will
1678
- not request input through the console and will throw errors directly.
1679
- --debug [env: INXT_DEBUG] Enables debug mode. When enabled, the CLI will print debug messages to the
1680
- console.
1681
-
1682
- GLOBAL FLAGS
1683
- --json Format output as json.
1684
-
1685
- DESCRIPTION
1686
- Set the active workspace context for the current user session. Once a workspace is selected, WebDAV and all of the
1687
- subsequent CLI commands will operate within that workspace until it is changed or unset.
1688
-
1689
- ALIASES
1690
- $ internxt workspaces use
1691
-
1692
- EXAMPLES
1693
- $ internxt workspaces use
1694
- ```
1499
+ _See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.6.9/src/commands/whoami.ts)_
1695
1500
  <!-- commandsstop -->
1696
1501
 
1697
1502
  # Current Limitations
1698
1503
 
1699
- - We currently have a 40GB size upload limitation per file for both, CLI and WebDAV
1504
+ - Upload size limits depend on the account's plan tier. Since the CLI is only available to Ultimate plan users, we currently have a 100GB size upload limitation per file for both, CLI and WebDAV
package/bin/dev.js CHANGED
@@ -1,6 +1,16 @@
1
1
  #!/usr/bin/env node_modules/.bin/ts-node
2
2
  /* eslint-disable */
3
3
  require('dotenv').config({ path: __dirname + '/../.env', quiet: true });
4
+
5
+ // Some dependencies (e.g. @internxt/inxt-js's upload stream pipeline) can leave an
6
+ // orphaned promise that rejects with an AbortError when a network request fails mid-stream.
7
+ // That rejection never reaches our own try/catch blocks, and Node terminates the whole
8
+ // process by default. Log it instead so commands with their own retry/skip logic
9
+ // (e.g. upload-folder) can keep going.
10
+ process.on('unhandledRejection', (reason) => {
11
+ console.error('Unhandled rejection:', reason);
12
+ });
13
+
4
14
  (async () => {
5
15
  const oclif = await import('@oclif/core');
6
16
  await oclif.execute({ development: true, dir: __dirname });
package/bin/run.js CHANGED
@@ -1,6 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  /* eslint-disable */
3
3
  require('dotenv').config({ path: __dirname + '/../.env', quiet: true });
4
+
5
+ // Some dependencies (e.g. @internxt/inxt-js's upload stream pipeline) can leave an
6
+ // orphaned promise that rejects with an AbortError when a network request fails mid-stream.
7
+ // That rejection never reaches our own try/catch blocks, and Node terminates the whole
8
+ // process by default. Log it instead so commands with their own retry/skip logic
9
+ // (e.g. upload-folder) can keep going.
10
+ process.on('unhandledRejection', (reason) => {
11
+ console.error('Unhandled rejection:', reason);
12
+ });
13
+
4
14
  (async () => {
5
15
  const oclif = await import('@oclif/core');
6
16
  await oclif.execute({ development: false, dir: __dirname });
@@ -7,7 +7,6 @@ const config_service_1 = require("../services/config.service");
7
7
  const validation_service_1 = require("../services/validation.service");
8
8
  const command_types_1 = require("../types/command.types");
9
9
  const async_utils_1 = require("../utils/async.utils");
10
- const auth_service_1 = require("../services/auth.service");
11
10
  class CreateFolder extends core_1.Command {
12
11
  static args = {};
13
12
  static description = 'Create a folder in your Internxt Drive';
@@ -49,11 +48,8 @@ class CreateFolder extends core_1.Command {
49
48
  const newFolder = await createNewFolder;
50
49
  await async_utils_1.AsyncUtils.sleep(500);
51
50
  cli_utils_1.CLIUtils.done(flags['json']);
52
- const workspace = await auth_service_1.AuthService.instance.getCurrentWorkspace();
53
- const workspaceId = workspace?.workspaceData.workspace.id;
54
51
  const message = `Folder ${newFolder.plainName} created successfully, view it at ` +
55
- `${config_service_1.ConfigService.instance.get('DRIVE_WEB_URL')}/folder/${newFolder.uuid}` +
56
- `${workspaceId ? `?workspaceid=${workspaceId}` : ''}`;
52
+ `${config_service_1.ConfigService.instance.get('DRIVE_WEB_URL')}/folder/${newFolder.uuid}`;
57
53
  cli_utils_1.CLIUtils.success(this.log.bind(this), message);
58
54
  return { success: true, message, folder: newFolder };
59
55
  };
@@ -95,7 +91,7 @@ class CreateFolder extends core_1.Command {
95
91
  options: { type: 'input' },
96
92
  },
97
93
  }, {
98
- validate: validation_service_1.ValidationService.instance.validateUUIDv4,
94
+ validate: validation_service_1.ValidationService.instance.validateUUID,
99
95
  error: new command_types_1.NotValidFolderUuidError(),
100
96
  canBeEmpty: true,
101
97
  }, this.log.bind(this));
@@ -59,7 +59,7 @@ class DeletePermanentlyFile extends core_1.Command {
59
59
  options: { type: 'input' },
60
60
  },
61
61
  }, {
62
- validate: validation_service_1.ValidationService.instance.validateUUIDv4,
62
+ validate: validation_service_1.ValidationService.instance.validateUUID,
63
63
  error: new command_types_1.NotValidFileUuidError(),
64
64
  }, this.log.bind(this));
65
65
  return fileUuid;
@@ -59,7 +59,7 @@ class DeletePermanentlyFolder extends core_1.Command {
59
59
  options: { type: 'input' },
60
60
  },
61
61
  }, {
62
- validate: validation_service_1.ValidationService.instance.validateUUIDv4,
62
+ validate: validation_service_1.ValidationService.instance.validateUUID,
63
63
  error: new command_types_1.NotValidFolderUuidError(),
64
64
  }, this.log.bind(this));
65
65
  return folderUuid;
@@ -64,10 +64,10 @@ class DownloadFile extends core_1.Command {
64
64
  }
65
65
  const { user } = await auth_service_1.AuthService.instance.getAuthDetails();
66
66
  cli_utils_1.CLIUtils.doing('Preparing Network', flags['json']);
67
- const { networkFacade, bucket, mnemonic } = await cli_utils_1.CLIUtils.prepareNetwork(user);
67
+ const { networkFacade, mnemonic } = await cli_utils_1.CLIUtils.prepareNetwork(user);
68
68
  cli_utils_1.CLIUtils.done(flags['json']);
69
69
  const fileWriteStream = (0, node_fs_1.createWriteStream)(downloadPath);
70
- const [executeDownload, abortable] = await networkFacade.downloadToStream(bucket, mnemonic, driveFile.fileId, driveFile.size, stream_utils_1.StreamUtils.writeStreamToWritableStream(fileWriteStream), undefined, {
70
+ const [executeDownload, abortable] = await networkFacade.downloadToStream(driveFile.bucket, mnemonic, driveFile.fileId, driveFile.size, stream_utils_1.StreamUtils.writeStreamToWritableStream(fileWriteStream), undefined, {
71
71
  abortController: new AbortController(),
72
72
  progressCallback: (progress) => {
73
73
  progressBar?.update(progress * 0.99);
@@ -112,7 +112,7 @@ class DownloadFile extends core_1.Command {
112
112
  options: { type: 'input' },
113
113
  },
114
114
  }, {
115
- validate: validation_service_1.ValidationService.instance.validateUUIDv4,
115
+ validate: validation_service_1.ValidationService.instance.validateUUID,
116
116
  error: new command_types_1.NotValidFileUuidError(),
117
117
  }, this.log.bind(this));
118
118
  return fileUuid;
@@ -34,6 +34,7 @@ export default class List extends Command {
34
34
  status: "EXISTS" | "TRASHED" | "DELETED";
35
35
  removed: boolean;
36
36
  deleted: boolean;
37
+ isFavorite?: boolean;
37
38
  }[];
38
39
  files: {
39
40
  id: number;
@@ -53,6 +54,7 @@ export default class List extends Command {
53
54
  updatedAt: string;
54
55
  plainName: string;
55
56
  status: "EXISTS" | "TRASHED" | "DELETED";
57
+ isFavorite?: boolean;
56
58
  }[];
57
59
  };
58
60
  }>;
@@ -91,7 +91,7 @@ class List extends core_1.Command {
91
91
  options: { type: 'input' },
92
92
  },
93
93
  }, {
94
- validate: validation_service_1.ValidationService.instance.validateUUIDv4,
94
+ validate: validation_service_1.ValidationService.instance.validateUUID,
95
95
  error: new command_types_1.NotValidFolderUuidError(),
96
96
  canBeEmpty: true,
97
97
  }, this.log.bind(this));
@@ -5,7 +5,6 @@ export default class Login extends Command {
5
5
  static readonly aliases: never[];
6
6
  static readonly examples: string[];
7
7
  static readonly flags: {
8
- host: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
8
  port: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
9
  'non-interactive': import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
10
  debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
@@ -14,15 +14,6 @@ class Login extends core_1.Command {
14
14
  static examples = ['<%= config.bin %> <%= command.id %>'];
15
15
  static flags = {
16
16
  ...cli_utils_1.CLIUtils.CommonFlags,
17
- host: core_1.Flags.string({
18
- char: 'h',
19
- aliases: ['host'],
20
- env: 'INXT_LOGIN_SERVER_HOST',
21
- description: 'IP address of the machine where the CLI is running. ' +
22
- 'If you are opening the login page in a browser on another device, ' +
23
- 'set this to the IP address of the machine running the CLI. Defaults to 127.0.0.1.',
24
- required: false,
25
- }),
26
17
  port: core_1.Flags.integer({
27
18
  char: 'p',
28
19
  aliases: ['port'],
@@ -35,9 +26,8 @@ class Login extends core_1.Command {
35
26
  static enableJsonFlag = true;
36
27
  run = async () => {
37
28
  const { flags } = await this.parse(Login);
38
- const host = flags['host'];
39
29
  const port = flags['port'];
40
- const loginCredentials = await universal_link_service_1.UniversalLinkService.instance.loginSSO(flags['json'] ?? false, this.log.bind(this), host, port);
30
+ const loginCredentials = await universal_link_service_1.UniversalLinkService.instance.loginSSO(flags['json'] ?? false, this.log.bind(this), port);
41
31
  sdk_manager_service_1.SdkManager.init({ token: loginCredentials.token });
42
32
  cache_service_1.CacheService.instance.clearCaches();
43
33
  await config_service_1.ConfigService.instance.saveUser(loginCredentials);
@@ -32,6 +32,7 @@ export default class MoveFile extends Command {
32
32
  updatedAt: string;
33
33
  plainName: string;
34
34
  status: "EXISTS" | "TRASHED" | "DELETED";
35
+ isFavorite?: boolean;
35
36
  };
36
37
  }>;
37
38
  catch: (error: Error) => Promise<never>;