@internxt/cli 1.5.6 → 1.5.8
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 +38 -32
- package/dist/commands/add-cert.js +0 -1
- package/dist/commands/config.js +0 -1
- package/dist/commands/create-folder.js +0 -1
- package/dist/commands/delete-permanently-file.js +0 -1
- package/dist/commands/delete-permanently-folder.js +0 -1
- package/dist/commands/download-file.js +0 -1
- package/dist/commands/list.js +0 -1
- package/dist/commands/login.js +0 -1
- package/dist/commands/logout.js +0 -1
- package/dist/commands/logs.js +0 -1
- package/dist/commands/move-file.js +0 -1
- package/dist/commands/move-folder.js +0 -1
- package/dist/commands/rename-file.js +0 -1
- package/dist/commands/rename-folder.js +0 -1
- package/dist/commands/trash-clear.js +0 -1
- package/dist/commands/trash-file.js +0 -1
- package/dist/commands/trash-folder.js +0 -1
- package/dist/commands/trash-list.js +0 -1
- package/dist/commands/trash-restore-file.js +0 -1
- package/dist/commands/trash-restore-folder.js +0 -1
- package/dist/commands/upload-file.js +1 -2
- package/dist/commands/webdav-config.d.ts +1 -0
- package/dist/commands/webdav-config.js +10 -7
- package/dist/commands/webdav.js +0 -1
- package/dist/commands/whoami.js +0 -1
- package/dist/hooks/prerun/auth_check.js +0 -1
- package/dist/services/config.service.d.ts +1 -0
- package/dist/services/config.service.js +3 -0
- package/dist/types/command.types.d.ts +1 -0
- package/dist/types/drive.types.d.ts +1 -0
- package/dist/utils/cli.utils.d.ts +1 -2
- package/dist/utils/cli.utils.js +2 -2
- package/dist/utils/drive.utils.d.ts +2 -1
- package/dist/utils/drive.utils.js +14 -0
- package/dist/utils/errors.utils.d.ts +2 -1
- package/dist/utils/errors.utils.js +10 -4
- package/dist/utils/logger.utils.js +0 -10
- package/dist/utils/webdav.utils.d.ts +17 -5
- package/dist/utils/webdav.utils.js +15 -6
- package/dist/webdav/handlers/MKCOL.handler.d.ts +2 -0
- package/dist/webdav/handlers/MKCOL.handler.js +6 -16
- package/dist/webdav/handlers/MOVE.handler.d.ts +2 -0
- package/dist/webdav/handlers/MOVE.handler.js +3 -10
- package/dist/webdav/handlers/PUT.handler.d.ts +2 -2
- package/dist/webdav/handlers/PUT.handler.js +13 -18
- package/dist/webdav/middewares/auth.middleware.js +8 -2
- package/dist/webdav/middewares/errors.middleware.js +9 -2
- package/dist/webdav/services/webdav-folder.service.d.ts +17 -0
- package/dist/webdav/services/webdav-folder.service.js +51 -0
- package/dist/webdav/webdav-server.js +8 -1
- package/oclif.manifest.json +9 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ A CLI tool to interact with your Internxt encrypted files
|
|
|
10
10
|
* [Project Maintenance](#project-maintenance)
|
|
11
11
|
* [Installation](#installation)
|
|
12
12
|
* [Usage](#usage)
|
|
13
|
+
* [Docker](#docker)
|
|
13
14
|
* [Commands](#commands)
|
|
14
15
|
* [Current Limitations](#current-limitations)
|
|
15
16
|
<!-- tocstop -->
|
|
@@ -51,7 +52,7 @@ $ npm install -g @internxt/cli
|
|
|
51
52
|
$ internxt COMMAND
|
|
52
53
|
running command...
|
|
53
54
|
$ internxt (--version)
|
|
54
|
-
@internxt/cli/1.5.
|
|
55
|
+
@internxt/cli/1.5.8 linux-x64 node-v22.21.1
|
|
55
56
|
$ internxt --help [COMMAND]
|
|
56
57
|
USAGE
|
|
57
58
|
$ internxt COMMAND
|
|
@@ -59,6 +60,10 @@ USAGE
|
|
|
59
60
|
```
|
|
60
61
|
<!-- usagestop -->
|
|
61
62
|
|
|
63
|
+
# Docker
|
|
64
|
+
|
|
65
|
+
[`Internxt WebDAV (Docker Integration)`](docker/README.md)
|
|
66
|
+
|
|
62
67
|
# Commands
|
|
63
68
|
|
|
64
69
|
<!-- commands -->
|
|
@@ -120,7 +125,7 @@ EXAMPLES
|
|
|
120
125
|
$ internxt add-cert
|
|
121
126
|
```
|
|
122
127
|
|
|
123
|
-
_See code: [src/commands/add-cert.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
128
|
+
_See code: [src/commands/add-cert.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/add-cert.ts)_
|
|
124
129
|
|
|
125
130
|
## `internxt autocomplete [SHELL]`
|
|
126
131
|
|
|
@@ -151,7 +156,7 @@ EXAMPLES
|
|
|
151
156
|
$ internxt autocomplete --refresh-cache
|
|
152
157
|
```
|
|
153
158
|
|
|
154
|
-
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.
|
|
159
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.36/src/commands/autocomplete/index.ts)_
|
|
155
160
|
|
|
156
161
|
## `internxt config`
|
|
157
162
|
|
|
@@ -171,7 +176,7 @@ EXAMPLES
|
|
|
171
176
|
$ internxt config
|
|
172
177
|
```
|
|
173
178
|
|
|
174
|
-
_See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
179
|
+
_See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/config.ts)_
|
|
175
180
|
|
|
176
181
|
## `internxt create-folder`
|
|
177
182
|
|
|
@@ -200,7 +205,7 @@ EXAMPLES
|
|
|
200
205
|
$ internxt create-folder
|
|
201
206
|
```
|
|
202
207
|
|
|
203
|
-
_See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
208
|
+
_See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/create-folder.ts)_
|
|
204
209
|
|
|
205
210
|
## `internxt delete-permanently-file`
|
|
206
211
|
|
|
@@ -230,7 +235,7 @@ EXAMPLES
|
|
|
230
235
|
$ internxt delete-permanently-file
|
|
231
236
|
```
|
|
232
237
|
|
|
233
|
-
_See code: [src/commands/delete-permanently-file.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
238
|
+
_See code: [src/commands/delete-permanently-file.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/delete-permanently-file.ts)_
|
|
234
239
|
|
|
235
240
|
## `internxt delete-permanently-folder`
|
|
236
241
|
|
|
@@ -260,7 +265,7 @@ EXAMPLES
|
|
|
260
265
|
$ internxt delete-permanently-folder
|
|
261
266
|
```
|
|
262
267
|
|
|
263
|
-
_See code: [src/commands/delete-permanently-folder.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
268
|
+
_See code: [src/commands/delete-permanently-folder.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/delete-permanently-folder.ts)_
|
|
264
269
|
|
|
265
270
|
## `internxt delete permanently file`
|
|
266
271
|
|
|
@@ -349,7 +354,7 @@ EXAMPLES
|
|
|
349
354
|
$ internxt download-file
|
|
350
355
|
```
|
|
351
356
|
|
|
352
|
-
_See code: [src/commands/download-file.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
357
|
+
_See code: [src/commands/download-file.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/download-file.ts)_
|
|
353
358
|
|
|
354
359
|
## `internxt download file`
|
|
355
360
|
|
|
@@ -408,7 +413,7 @@ EXAMPLES
|
|
|
408
413
|
$ internxt list
|
|
409
414
|
```
|
|
410
415
|
|
|
411
|
-
_See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
416
|
+
_See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/list.ts)_
|
|
412
417
|
|
|
413
418
|
## `internxt login`
|
|
414
419
|
|
|
@@ -439,7 +444,7 @@ EXAMPLES
|
|
|
439
444
|
$ internxt login
|
|
440
445
|
```
|
|
441
446
|
|
|
442
|
-
_See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
447
|
+
_See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/login.ts)_
|
|
443
448
|
|
|
444
449
|
## `internxt logout`
|
|
445
450
|
|
|
@@ -459,7 +464,7 @@ EXAMPLES
|
|
|
459
464
|
$ internxt logout
|
|
460
465
|
```
|
|
461
466
|
|
|
462
|
-
_See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
467
|
+
_See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/logout.ts)_
|
|
463
468
|
|
|
464
469
|
## `internxt logs`
|
|
465
470
|
|
|
@@ -479,7 +484,7 @@ EXAMPLES
|
|
|
479
484
|
$ internxt logs
|
|
480
485
|
```
|
|
481
486
|
|
|
482
|
-
_See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
487
|
+
_See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/logs.ts)_
|
|
483
488
|
|
|
484
489
|
## `internxt move-file`
|
|
485
490
|
|
|
@@ -511,7 +516,7 @@ EXAMPLES
|
|
|
511
516
|
$ internxt move-file
|
|
512
517
|
```
|
|
513
518
|
|
|
514
|
-
_See code: [src/commands/move-file.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
519
|
+
_See code: [src/commands/move-file.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/move-file.ts)_
|
|
515
520
|
|
|
516
521
|
## `internxt move-folder`
|
|
517
522
|
|
|
@@ -543,7 +548,7 @@ EXAMPLES
|
|
|
543
548
|
$ internxt move-folder
|
|
544
549
|
```
|
|
545
550
|
|
|
546
|
-
_See code: [src/commands/move-folder.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
551
|
+
_See code: [src/commands/move-folder.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/move-folder.ts)_
|
|
547
552
|
|
|
548
553
|
## `internxt move file`
|
|
549
554
|
|
|
@@ -634,7 +639,7 @@ EXAMPLES
|
|
|
634
639
|
$ internxt rename-file
|
|
635
640
|
```
|
|
636
641
|
|
|
637
|
-
_See code: [src/commands/rename-file.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
642
|
+
_See code: [src/commands/rename-file.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/rename-file.ts)_
|
|
638
643
|
|
|
639
644
|
## `internxt rename-folder`
|
|
640
645
|
|
|
@@ -665,7 +670,7 @@ EXAMPLES
|
|
|
665
670
|
$ internxt rename-folder
|
|
666
671
|
```
|
|
667
672
|
|
|
668
|
-
_See code: [src/commands/rename-folder.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
673
|
+
_See code: [src/commands/rename-folder.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/rename-folder.ts)_
|
|
669
674
|
|
|
670
675
|
## `internxt rename file`
|
|
671
676
|
|
|
@@ -753,7 +758,7 @@ EXAMPLES
|
|
|
753
758
|
$ internxt trash-clear
|
|
754
759
|
```
|
|
755
760
|
|
|
756
|
-
_See code: [src/commands/trash-clear.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
761
|
+
_See code: [src/commands/trash-clear.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/trash-clear.ts)_
|
|
757
762
|
|
|
758
763
|
## `internxt trash-file`
|
|
759
764
|
|
|
@@ -783,7 +788,7 @@ EXAMPLES
|
|
|
783
788
|
$ internxt trash-file
|
|
784
789
|
```
|
|
785
790
|
|
|
786
|
-
_See code: [src/commands/trash-file.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
791
|
+
_See code: [src/commands/trash-file.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/trash-file.ts)_
|
|
787
792
|
|
|
788
793
|
## `internxt trash-folder`
|
|
789
794
|
|
|
@@ -813,7 +818,7 @@ EXAMPLES
|
|
|
813
818
|
$ internxt trash-folder
|
|
814
819
|
```
|
|
815
820
|
|
|
816
|
-
_See code: [src/commands/trash-folder.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
821
|
+
_See code: [src/commands/trash-folder.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/trash-folder.ts)_
|
|
817
822
|
|
|
818
823
|
## `internxt trash-list`
|
|
819
824
|
|
|
@@ -839,7 +844,7 @@ EXAMPLES
|
|
|
839
844
|
$ internxt trash-list
|
|
840
845
|
```
|
|
841
846
|
|
|
842
|
-
_See code: [src/commands/trash-list.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
847
|
+
_See code: [src/commands/trash-list.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/trash-list.ts)_
|
|
843
848
|
|
|
844
849
|
## `internxt trash-restore-file`
|
|
845
850
|
|
|
@@ -870,7 +875,7 @@ EXAMPLES
|
|
|
870
875
|
$ internxt trash-restore-file
|
|
871
876
|
```
|
|
872
877
|
|
|
873
|
-
_See code: [src/commands/trash-restore-file.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
878
|
+
_See code: [src/commands/trash-restore-file.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/trash-restore-file.ts)_
|
|
874
879
|
|
|
875
880
|
## `internxt trash-restore-folder`
|
|
876
881
|
|
|
@@ -901,7 +906,7 @@ EXAMPLES
|
|
|
901
906
|
$ internxt trash-restore-folder
|
|
902
907
|
```
|
|
903
908
|
|
|
904
|
-
_See code: [src/commands/trash-restore-folder.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
909
|
+
_See code: [src/commands/trash-restore-folder.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/trash-restore-folder.ts)_
|
|
905
910
|
|
|
906
911
|
## `internxt trash clear`
|
|
907
912
|
|
|
@@ -1098,7 +1103,7 @@ EXAMPLES
|
|
|
1098
1103
|
$ internxt upload-file
|
|
1099
1104
|
```
|
|
1100
1105
|
|
|
1101
|
-
_See code: [src/commands/upload-file.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
1106
|
+
_See code: [src/commands/upload-file.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/upload-file.ts)_
|
|
1102
1107
|
|
|
1103
1108
|
## `internxt upload file`
|
|
1104
1109
|
|
|
@@ -1153,7 +1158,7 @@ EXAMPLES
|
|
|
1153
1158
|
$ internxt webdav status
|
|
1154
1159
|
```
|
|
1155
1160
|
|
|
1156
|
-
_See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
1161
|
+
_See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/webdav.ts)_
|
|
1157
1162
|
|
|
1158
1163
|
## `internxt webdav-config`
|
|
1159
1164
|
|
|
@@ -1161,14 +1166,15 @@ Edit the configuration of the Internxt CLI WebDav server as the port or the prot
|
|
|
1161
1166
|
|
|
1162
1167
|
```
|
|
1163
1168
|
USAGE
|
|
1164
|
-
$ internxt webdav-config [--json] [-l <value>] [-p <value>] [-s | -h] [-t <value>]
|
|
1169
|
+
$ internxt webdav-config [--json] [-l <value>] [-p <value>] [-s | -h] [-t <value>] [-c]
|
|
1165
1170
|
|
|
1166
1171
|
FLAGS
|
|
1167
|
-
-
|
|
1168
|
-
-
|
|
1169
|
-
-
|
|
1170
|
-
-
|
|
1171
|
-
-
|
|
1172
|
+
-c, --[no-]createFullPath Auto-create missing parent directories during file uploads.
|
|
1173
|
+
-h, --http Configures the WebDAV server to use insecure plain HTTP.
|
|
1174
|
+
-l, --host=<value> The listening host for the WebDAV server.
|
|
1175
|
+
-p, --port=<value> The new port for the WebDAV server.
|
|
1176
|
+
-s, --https Configures the WebDAV server to use HTTPS with self-signed certificates.
|
|
1177
|
+
-t, --timeout=<value> Configures the WebDAV server to use this timeout in minutes.
|
|
1172
1178
|
|
|
1173
1179
|
GLOBAL FLAGS
|
|
1174
1180
|
--json Format output as json.
|
|
@@ -1180,7 +1186,7 @@ EXAMPLES
|
|
|
1180
1186
|
$ internxt webdav-config
|
|
1181
1187
|
```
|
|
1182
1188
|
|
|
1183
|
-
_See code: [src/commands/webdav-config.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
1189
|
+
_See code: [src/commands/webdav-config.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/webdav-config.ts)_
|
|
1184
1190
|
|
|
1185
1191
|
## `internxt whoami`
|
|
1186
1192
|
|
|
@@ -1200,7 +1206,7 @@ EXAMPLES
|
|
|
1200
1206
|
$ internxt whoami
|
|
1201
1207
|
```
|
|
1202
1208
|
|
|
1203
|
-
_See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.5.
|
|
1209
|
+
_See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.5.8/src/commands/whoami.ts)_
|
|
1204
1210
|
<!-- commandsstop -->
|
|
1205
1211
|
|
|
1206
1212
|
# Current Limitations
|
package/dist/commands/config.js
CHANGED
package/dist/commands/list.js
CHANGED
package/dist/commands/login.js
CHANGED
package/dist/commands/logout.js
CHANGED
package/dist/commands/logs.js
CHANGED
|
@@ -121,7 +121,7 @@ class UploadFile extends core_1.Command {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
catch (error) {
|
|
124
|
-
errors_utils_1.ErrorUtils.report(
|
|
124
|
+
errors_utils_1.ErrorUtils.report(error, { command: this.id });
|
|
125
125
|
}
|
|
126
126
|
progressBar?.update(100);
|
|
127
127
|
progressBar?.stop();
|
|
@@ -144,7 +144,6 @@ class UploadFile extends core_1.Command {
|
|
|
144
144
|
error,
|
|
145
145
|
command: this.id,
|
|
146
146
|
logReporter: this.log.bind(this),
|
|
147
|
-
errorReporter: this.error.bind(this),
|
|
148
147
|
jsonFlag: flags['json'],
|
|
149
148
|
});
|
|
150
149
|
this.exit(1);
|
|
@@ -10,6 +10,7 @@ export default class WebDAVConfig extends Command {
|
|
|
10
10
|
https: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
http: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
createFullPath: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
static readonly enableJsonFlag = true;
|
|
15
16
|
run: () => Promise<{
|
|
@@ -39,16 +39,20 @@ class WebDAVConfig extends core_1.Command {
|
|
|
39
39
|
required: false,
|
|
40
40
|
min: 0,
|
|
41
41
|
}),
|
|
42
|
+
createFullPath: core_1.Flags.boolean({
|
|
43
|
+
char: 'c',
|
|
44
|
+
description: 'Auto-create missing parent directories during file uploads.',
|
|
45
|
+
required: false,
|
|
46
|
+
allowNo: true,
|
|
47
|
+
}),
|
|
42
48
|
};
|
|
43
49
|
static enableJsonFlag = true;
|
|
44
50
|
run = async () => {
|
|
45
|
-
const { flags } = await this.parse(WebDAVConfig);
|
|
51
|
+
const { flags: { host, port, http, https, timeout, createFullPath }, } = await this.parse(WebDAVConfig);
|
|
46
52
|
const webdavConfig = await config_service_1.ConfigService.instance.readWebdavConfig();
|
|
47
|
-
const host = flags['host'];
|
|
48
53
|
if (host) {
|
|
49
54
|
webdavConfig['host'] = host;
|
|
50
55
|
}
|
|
51
|
-
const port = flags['port'];
|
|
52
56
|
if (port) {
|
|
53
57
|
if (validation_service_1.ValidationService.instance.validateTCPIntegerPort(port)) {
|
|
54
58
|
webdavConfig['port'] = port;
|
|
@@ -57,18 +61,18 @@ class WebDAVConfig extends core_1.Command {
|
|
|
57
61
|
throw new command_types_1.NotValidPortError();
|
|
58
62
|
}
|
|
59
63
|
}
|
|
60
|
-
const http = flags['http'];
|
|
61
64
|
if (http) {
|
|
62
65
|
webdavConfig['protocol'] = 'http';
|
|
63
66
|
}
|
|
64
|
-
const https = flags['https'];
|
|
65
67
|
if (https) {
|
|
66
68
|
webdavConfig['protocol'] = 'https';
|
|
67
69
|
}
|
|
68
|
-
const timeout = flags['timeout'];
|
|
69
70
|
if (timeout !== undefined) {
|
|
70
71
|
webdavConfig['timeoutMinutes'] = timeout;
|
|
71
72
|
}
|
|
73
|
+
if (createFullPath !== undefined) {
|
|
74
|
+
webdavConfig['createFullPath'] = createFullPath;
|
|
75
|
+
}
|
|
72
76
|
await config_service_1.ConfigService.instance.saveWebdavConfig(webdavConfig);
|
|
73
77
|
const message = `On the next start, the WebDAV server will use the next config: ${JSON.stringify(webdavConfig)}`;
|
|
74
78
|
cli_utils_1.CLIUtils.success(this.log.bind(this), message);
|
|
@@ -80,7 +84,6 @@ class WebDAVConfig extends core_1.Command {
|
|
|
80
84
|
error,
|
|
81
85
|
command: this.id,
|
|
82
86
|
logReporter: this.log.bind(this),
|
|
83
|
-
errorReporter: this.error.bind(this),
|
|
84
87
|
jsonFlag: flags['json'],
|
|
85
88
|
});
|
|
86
89
|
this.exit(1);
|
package/dist/commands/webdav.js
CHANGED
package/dist/commands/whoami.js
CHANGED
|
@@ -12,6 +12,7 @@ export declare class ConfigService {
|
|
|
12
12
|
static readonly WEBDAV_DEFAULT_PORT = "3005";
|
|
13
13
|
static readonly WEBDAV_DEFAULT_PROTOCOL = "https";
|
|
14
14
|
static readonly WEBDAV_DEFAULT_TIMEOUT = 0;
|
|
15
|
+
static readonly WEBDAV_DEFAULT_CREATE_FULL_PATH = true;
|
|
15
16
|
static readonly instance: ConfigService;
|
|
16
17
|
get: (key: keyof ConfigKeys) => string;
|
|
17
18
|
saveUser: (loginCredentials: LoginCredentials) => Promise<void>;
|
|
@@ -20,6 +20,7 @@ class ConfigService {
|
|
|
20
20
|
static WEBDAV_DEFAULT_PORT = '3005';
|
|
21
21
|
static WEBDAV_DEFAULT_PROTOCOL = 'https';
|
|
22
22
|
static WEBDAV_DEFAULT_TIMEOUT = 0;
|
|
23
|
+
static WEBDAV_DEFAULT_CREATE_FULL_PATH = true;
|
|
23
24
|
static instance = new ConfigService();
|
|
24
25
|
get = (key) => {
|
|
25
26
|
const value = process.env[key];
|
|
@@ -64,6 +65,7 @@ class ConfigService {
|
|
|
64
65
|
port: configs?.port ?? ConfigService.WEBDAV_DEFAULT_PORT,
|
|
65
66
|
protocol: configs?.protocol ?? ConfigService.WEBDAV_DEFAULT_PROTOCOL,
|
|
66
67
|
timeoutMinutes: configs?.timeoutMinutes ?? ConfigService.WEBDAV_DEFAULT_TIMEOUT,
|
|
68
|
+
createFullPath: configs?.createFullPath ?? ConfigService.WEBDAV_DEFAULT_CREATE_FULL_PATH,
|
|
67
69
|
};
|
|
68
70
|
}
|
|
69
71
|
catch {
|
|
@@ -72,6 +74,7 @@ class ConfigService {
|
|
|
72
74
|
port: ConfigService.WEBDAV_DEFAULT_PORT,
|
|
73
75
|
protocol: ConfigService.WEBDAV_DEFAULT_PROTOCOL,
|
|
74
76
|
timeoutMinutes: ConfigService.WEBDAV_DEFAULT_TIMEOUT,
|
|
77
|
+
createFullPath: ConfigService.WEBDAV_DEFAULT_CREATE_FULL_PATH,
|
|
75
78
|
};
|
|
76
79
|
}
|
|
77
80
|
};
|
|
@@ -36,11 +36,10 @@ export declare class CLIUtils {
|
|
|
36
36
|
static readonly timer: () => {
|
|
37
37
|
stop: () => number;
|
|
38
38
|
};
|
|
39
|
-
static readonly catchError: ({ error, logReporter,
|
|
39
|
+
static readonly catchError: ({ error, logReporter, command, jsonFlag, }: {
|
|
40
40
|
error: Error;
|
|
41
41
|
command?: string;
|
|
42
42
|
logReporter: (message: string) => void;
|
|
43
|
-
errorReporter: (message: string) => void;
|
|
44
43
|
jsonFlag?: boolean;
|
|
45
44
|
}) => void;
|
|
46
45
|
static readonly parseEmpty: (input: string) => Promise<string>;
|
package/dist/utils/cli.utils.js
CHANGED
|
@@ -130,7 +130,7 @@ class CLIUtils {
|
|
|
130
130
|
},
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
|
-
static catchError = ({ error, logReporter,
|
|
133
|
+
static catchError = ({ error, logReporter, command, jsonFlag, }) => {
|
|
134
134
|
let message;
|
|
135
135
|
if ('message' in error && error.message.trim().length > 0) {
|
|
136
136
|
message = error.message;
|
|
@@ -143,7 +143,7 @@ class CLIUtils {
|
|
|
143
143
|
CLIUtils.consoleLog(JSON.stringify({ success: false, message }));
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
|
-
errors_utils_1.ErrorUtils.report(
|
|
146
|
+
errors_utils_1.ErrorUtils.report(error, { command });
|
|
147
147
|
CLIUtils.error(logReporter, message);
|
|
148
148
|
}
|
|
149
149
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FileMeta, FolderMeta } from '@internxt/sdk/dist/drive/storage/types';
|
|
1
|
+
import { FileMeta, FolderMeta, CreateFolderResponse } from '@internxt/sdk/dist/drive/storage/types';
|
|
2
2
|
import { DriveFileItem, DriveFolderItem } from '../types/drive.types';
|
|
3
3
|
export declare class DriveUtils {
|
|
4
4
|
static driveFileMetaToItem(fileMeta: FileMeta): DriveFileItem;
|
|
5
5
|
static driveFolderMetaToItem(folderMeta: FolderMeta): DriveFolderItem;
|
|
6
|
+
static createFolderResponseToItem(folderResponse: CreateFolderResponse): DriveFolderItem;
|
|
6
7
|
}
|