@internxt/cli 1.2.0 → 1.2.2

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 ADDED
@@ -0,0 +1,11 @@
1
+ DRIVE_URL=https://drive.internxt.com
2
+ DRIVE_API_URL=https://drive.internxt.com/api
3
+ DRIVE_NEW_API_URL=https://api.internxt.com/drive
4
+ PAYMENTS_API_URL=https://api.internxt.com/payments
5
+ PHOTOS_API_URL=https://photos.internxt.com/api
6
+ NETWORK_URL=https://api.internxt.com
7
+ APP_CRYPTO_SECRET=6KYQBP847D4ATSFA
8
+ APP_CRYPTO_SECRET2=8Q8VMUE3BJZV87GT
9
+ APP_MAGIC_IV=d139cb9a2cd17092e79e1861cf9d7023
10
+ APP_MAGIC_SALT=38dce0391b49efba88dbc8c39ebf868f0267eb110bb0012ab27dc52a528d61b1d1ed9d76f400ff58e3240028442b1eab9bb84e111d9dadd997982dbde9dbd25e
11
+ WEBDAV_SERVER_PORT=3005
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.2.0 darwin-arm64 node-v20.14.0
34
+ @internxt/cli/1.2.2 darwin-arm64 node-v20.14.0
35
35
  $ internxt --help [COMMAND]
36
36
  USAGE
37
37
  $ internxt COMMAND
@@ -71,7 +71,7 @@ EXAMPLES
71
71
  $ internxt add-cert
72
72
  ```
73
73
 
74
- _See code: [src/commands/add-cert.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/add-cert.ts)_
74
+ _See code: [src/commands/add-cert.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/add-cert.ts)_
75
75
 
76
76
  ## `internxt config`
77
77
 
@@ -100,7 +100,7 @@ EXAMPLES
100
100
  $ internxt config
101
101
  ```
102
102
 
103
- _See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/config.ts)_
103
+ _See code: [src/commands/config.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/config.ts)_
104
104
 
105
105
  ## `internxt create-folder`
106
106
 
@@ -121,7 +121,7 @@ EXAMPLES
121
121
  $ internxt create-folder
122
122
  ```
123
123
 
124
- _See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/create-folder.ts)_
124
+ _See code: [src/commands/create-folder.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/create-folder.ts)_
125
125
 
126
126
  ## `internxt download`
127
127
 
@@ -144,7 +144,7 @@ EXAMPLES
144
144
  $ internxt download
145
145
  ```
146
146
 
147
- _See code: [src/commands/download.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/download.ts)_
147
+ _See code: [src/commands/download.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/download.ts)_
148
148
 
149
149
  ## `internxt list`
150
150
 
@@ -178,7 +178,7 @@ EXAMPLES
178
178
  $ internxt list
179
179
  ```
180
180
 
181
- _See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/list.ts)_
181
+ _See code: [src/commands/list.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/list.ts)_
182
182
 
183
183
  ## `internxt login`
184
184
 
@@ -204,7 +204,7 @@ EXAMPLES
204
204
  $ internxt login
205
205
  ```
206
206
 
207
- _See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/login.ts)_
207
+ _See code: [src/commands/login.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/login.ts)_
208
208
 
209
209
  ## `internxt logout`
210
210
 
@@ -221,7 +221,7 @@ EXAMPLES
221
221
  $ internxt logout
222
222
  ```
223
223
 
224
- _See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/logout.ts)_
224
+ _See code: [src/commands/logout.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/logout.ts)_
225
225
 
226
226
  ## `internxt logs`
227
227
 
@@ -238,7 +238,7 @@ EXAMPLES
238
238
  $ internxt logs
239
239
  ```
240
240
 
241
- _See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/logs.ts)_
241
+ _See code: [src/commands/logs.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/logs.ts)_
242
242
 
243
243
  ## `internxt move`
244
244
 
@@ -263,7 +263,7 @@ EXAMPLES
263
263
  $ internxt move
264
264
  ```
265
265
 
266
- _See code: [src/commands/move.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/move.ts)_
266
+ _See code: [src/commands/move.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/move.ts)_
267
267
 
268
268
  ## `internxt trash`
269
269
 
@@ -287,7 +287,7 @@ EXAMPLES
287
287
  $ internxt trash
288
288
  ```
289
289
 
290
- _See code: [src/commands/trash.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/trash.ts)_
290
+ _See code: [src/commands/trash.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/trash.ts)_
291
291
 
292
292
  ## `internxt upload`
293
293
 
@@ -311,7 +311,7 @@ EXAMPLES
311
311
  $ internxt upload
312
312
  ```
313
313
 
314
- _See code: [src/commands/upload.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/upload.ts)_
314
+ _See code: [src/commands/upload.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/upload.ts)_
315
315
 
316
316
  ## `internxt webdav ACTION`
317
317
 
@@ -334,7 +334,7 @@ EXAMPLES
334
334
  $ internxt webdav status
335
335
  ```
336
336
 
337
- _See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/webdav.ts)_
337
+ _See code: [src/commands/webdav.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/webdav.ts)_
338
338
 
339
339
  ## `internxt whoami`
340
340
 
@@ -351,7 +351,7 @@ EXAMPLES
351
351
  $ internxt whoami
352
352
  ```
353
353
 
354
- _See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.2.0/src/commands/whoami.ts)_
354
+ _See code: [src/commands/whoami.ts](https://github.com/internxt/cli/blob/v1.2.2/src/commands/whoami.ts)_
355
355
  <!-- commandsstop -->
356
356
 
357
357
  # Current Limitations
@@ -15,7 +15,7 @@ class WebDavUtils {
15
15
  return path_1.default.dirname(fromPath);
16
16
  }
17
17
  static async getRequestedResource(req, driveDatabaseManager) {
18
- const decodedUrl = decodeURI(req.url);
18
+ const decodedUrl = decodeURIComponent(req.url);
19
19
  const parsedPath = path_1.default.parse(decodedUrl);
20
20
  let isFolder = req.url.endsWith('/');
21
21
  if (!isFolder) {
@@ -33,7 +33,7 @@ class WebDavUtils {
33
33
  return {
34
34
  url: decodedUrl,
35
35
  type: 'folder',
36
- name: parsedPath.name,
36
+ name: parsedPath.base,
37
37
  path: parsedPath,
38
38
  };
39
39
  }
@@ -17,7 +17,7 @@ class MKCOLRequestHandler {
17
17
  }
18
18
  handle = async (req, res) => {
19
19
  const { driveDatabaseManager, driveFolderService } = this.dependencies;
20
- const decodedUrl = decodeURI(req.url);
20
+ const decodedUrl = decodeURIComponent(req.url);
21
21
  const resourceParsedPath = path_1.default.parse(decodedUrl);
22
22
  const parentPath = webdav_utils_1.WebDavUtils.getParentPath(decodedUrl);
23
23
  const parentResource = await driveDatabaseManager.findByRelativePath(parentPath);
@@ -27,7 +27,7 @@ class MKCOLRequestHandler {
27
27
  logger_utils_1.webdavLogger.info(`MKCOL request received for folder at ${req.url}`);
28
28
  logger_utils_1.webdavLogger.info(`Parent path: ${parentResource.id}`);
29
29
  const [createFolder] = driveFolderService.createFolder({
30
- folderName: resourceParsedPath.name,
30
+ folderName: resourceParsedPath.base,
31
31
  parentFolderId: parentResource.id,
32
32
  });
33
33
  const newFolder = await createFolder;
@@ -38,7 +38,7 @@ class PUTRequestHandler {
38
38
  bucket: user.bucket,
39
39
  });
40
40
  logger_utils_1.webdavLogger.info('✅ File uploaded to internxt drive');
41
- this.dependencies.driveDatabaseManager.createFile(file);
41
+ await this.dependencies.driveDatabaseManager.createFile(file);
42
42
  res.status(200);
43
43
  res.send();
44
44
  };
@@ -657,5 +657,5 @@
657
657
  ]
658
658
  }
659
659
  },
660
- "version": "1.2.0"
660
+ "version": "1.2.2"
661
661
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "author": "PixoDev",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Internxt CLI to manage your encrypted storage",
5
5
  "scripts": {
6
6
  "build": "tsc",