@milaboratories/pl-drivers 1.5.59 → 1.5.61

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-drivers",
3
- "version": "1.5.59",
3
+ "version": "1.5.61",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -31,11 +31,11 @@
31
31
  "undici": "~7.5.0",
32
32
  "zod": "~3.23.8",
33
33
  "upath": "^2.0.1",
34
- "@milaboratories/ts-helpers": "^1.3.0",
35
- "@milaboratories/computable": "^2.4.8",
36
- "@milaboratories/pl-client": "^2.9.1",
37
- "@milaboratories/pl-model-common": "^1.15.1",
38
- "@milaboratories/pl-tree": "^1.6.2"
34
+ "@milaboratories/ts-helpers": "^1.3.1",
35
+ "@milaboratories/pl-client": "^2.9.2",
36
+ "@milaboratories/pl-tree": "^1.6.3",
37
+ "@milaboratories/pl-model-common": "^1.15.2",
38
+ "@milaboratories/computable": "^2.4.9"
39
39
  },
40
40
  "devDependencies": {
41
41
  "eslint": "^9.25.1",
@@ -39,6 +39,8 @@ test('should ok when list files from remote storage in ls driver', async () => {
39
39
  throw Error();
40
40
  });
41
41
 
42
+ const universalPath = (path: string) => path.startsWith('/') ? path.slice(1) : path;
43
+
42
44
  const storages = await driver.getStorageList();
43
45
  const library = storages.find((se) => se.name == env.libraryStorage)!.handle;
44
46
 
@@ -49,20 +51,19 @@ test('should ok when list files from remote storage in ls driver', async () => {
49
51
  expect(testDir).toBeDefined();
50
52
  expect(testDir!.type).toEqual('dir');
51
53
 
52
- const fullPath = testDir!.fullPath.startsWith('/') ? testDir!.fullPath.slice(1) : testDir!.fullPath;
53
- expect(fullPath).toEqual('ls_dir_structure_test');
54
+ expect(universalPath(testDir!.fullPath)).toEqual('ls_dir_structure_test');
54
55
  expect(testDir!.name).toEqual('ls_dir_structure_test');
55
56
 
56
57
  const secondDirs = await driver.listFiles(library, testDir!.fullPath);
57
58
  expect(secondDirs.entries).toHaveLength(2);
58
59
  expect(secondDirs.entries[0].type).toEqual('dir');
59
- expect(secondDirs.entries[0].fullPath).toEqual('/ls_dir_structure_test/abc');
60
+ expect(universalPath(secondDirs.entries[0].fullPath)).toEqual('ls_dir_structure_test/abc');
60
61
  expect(secondDirs.entries[0].name).toEqual('abc');
61
62
 
62
63
  const f = await driver.listFiles(library, secondDirs.entries[0].fullPath);
63
64
  expect(f.entries).toHaveLength(1);
64
65
  expect(f.entries[0].type).toEqual('file');
65
- expect(f.entries[0].fullPath).toEqual('/ls_dir_structure_test/abc/42.txt');
66
+ expect(universalPath(f.entries[0].fullPath)).toEqual('ls_dir_structure_test/abc/42.txt');
66
67
  expect(f.entries[0].name).toEqual('42.txt');
67
68
  expect((f.entries[0] as any).handle).toContain('index://index/');
68
69
  });